From Decision Trees to Boolean Logic: A Fast and Unified SHAP Algorithm
摘要
SHapley Additive exPlanations (SHAP) is a key tool for interpreting decision tree ensembles by assigning contribution values to features. It is widely used in finance, advertising, medicine, and other domains. Two main approaches to SHAP calculation exist: Path-Dependent SHAP, which leverages the tree structure for efficiency, and Background SHAP, which uses a background dataset to estimate feature distributions.
We introduce Woodelf, a SHAP algorithm that integrates decision trees, game theory, and Boolean logic into a unified framework. For each consumer, Woodelf constructs a pseudo-Boolean formula that captures their feature values, the structure of the decision tree ensemble, and the entire background dataset. It then leverages this representation to compute Background SHAP in linear time. Woodelf can also compute Path-Dependent SHAP, Shapley interaction values, Banzhaf values, and Banzhaf interaction values.
Woodelf is designed to run efficiently on CPU and GPU hardware alike. Available via the Python package woodelf, it is implemented using NumPy, SciPy, and CuPy without relying on custom C++ or CUDA code. This design enables fast performance and seamless integration into existing frameworks, supporting large-scale computation of SHAP and other game-theoretic values in practice.
For example, on a dataset with 3,000,000 rows, 5,000,000 background samples, and 127 features, Woodelf computed all Background Shapley values in 162 seconds on CPU and 16 seconds on GPU—compared to 44 minutes required by the best method on any hardware platform, representing 16x and 165x speedups, respectively.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
脉络
- SHAP values via sparse Fourier representation 引用了 The Many Shapley Values for Model Explanation
- SHAP values via sparse Fourier representation 引用了 On the Tractability of SHAP Explanations
- SHAP values via sparse Fourier representation 引用了 Interventional SHAP Values and Interaction Values for Piecewise Linear Regression Trees
- On the Tractability of SHAP Explanations 引用了 The Many Shapley Values for Model Explanation
- Interventional SHAP Values and Interaction Values for Piecewise Linear Regression Trees 引用了 Understanding Global Feature Contributions With Additive Importance Measures
它引用的 Paper6
- The Many Shapley Values for Model ExplanationMukund Sundararajan, Amir NajmiICML 2020 · 799 次引用
- On the Tractability of SHAP ExplanationsGuy Van den Broeck, Anton Lykov, Maximilian Schleich, Dan SuciuAAAI 2021 · 485 次引用
- Understanding Global Feature Contributions With Additive Importance MeasuresIan Covert, Scott M. Lundberg, Su-In LeeNeurIPS 2020 · 476 次引用
- Interventional SHAP Values and Interaction Values for Piecewise Linear Regression TreesArtjom Zern, Klaus Broelemann, Gjergji KasneciAAAI 2023 · 27 次引用
- SHAP values via sparse Fourier representationAli Gorji, Andisheh Amrollahi, Andreas KrauseNeurIPS 2025 · 11 次引用
相关 Paper
- Linear tree shapPeng Yu, Albert Bifet, Jesse Read, Chao XuNeurIPS 2022 · 27 次引用
- Beyond TreeSHAP: Efficient Computation of Any-Order Shapley Interactions for Tree EnsemblesMaximilian Muschalik, Fabian Fumagalli, Barbara Hammer, Eyke HüllermeierAAAI 2024 · 35 次引用
- Tree Ensemble Explainability through the Hoeffding Functional Decomposition and TreeHFD AlgorithmClément BénardNeurIPS 2025 · 7 次引用
- Fast Estimation of Partial Dependence Functions using TreesJinyang Liu, Tessa Steensgaard, Marvin N. Wright, Niklas Pfister 等ICML 2025
- Regression-adjusted Monte Carlo Estimators for Shapley Values and Probabilistic ValuesR. Teal Witter, Yurong Liu, Christopher MuscoNeurIPS 2025 · 22 次引用
