从决策树到布尔逻辑:一种快速且统一的SHAP算法
From Decision Trees to Boolean Logic: A Fast and Unified SHAP Algorithm
AI总结:
本文提出WOODELF算法,结合决策树、博弈论和布尔逻辑,实现快速统一的SHAP计算,支持CPU和GPU高效运行,显著提升大规模数据处理速度。
摘要:
SHapley Additive exPlanations (SHAP) 是一种用于解释决策树集成的关键工具,通过为特征分配贡献值。两种主要的SHAP计算方法:路径依赖SHAP利用树结构提高效率,背景SHAP利用背景数据集估计特征分布。本文介绍WOODELF,一种将决策树、博弈论和布尔逻辑整合到统一框架中的SHAP算法。对于每个消费者,WOODELF构建伪布尔公式,捕捉其特征值、决策树集成结构和整个背景数据集。然后利用该表示计算背景SHAP的线性时间。WOODELF还能计算路径依赖SHAP、Shapley交互值、Banzhaf值和Banzhaf交互值。WOODELF设计用于在CPU和GPU硬件上高效运行。通过WOODELF Python包提供,使用NumPy、SciPy和CuPy实现,不依赖自定义C++或CUDA代码。这种设计实现了快速性能和无缝集成到现有框架中,支持大规模计算SHAP和其他博弈论值。例如,在300万行数据集、500万背景样本和127个特征的数据上,WOODELF在CPU上162秒计算所有背景Shapley值,在GPU上16秒,相比任何硬件平台的最佳方法所需44分钟,分别代表16倍和165倍的加速。
英文摘要:
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 WOODELF Python package, 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.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。