arXiv:2605.04497cs.LG2026-05被引 2

提出新方法,让树模型解释更快更准,且不受树深影响。

Quadrature-TreeSHAP: Depth-Independent TreeSHAP and Shapley Interactions

论文配图:Quadrature-TreeSHAP: Depth-Independent TreeSHAP and Shapley Interactions
图 1 · 摘自论文原文
  • 用数值积分重构解释算法,避免深度依赖问题。
  • 8个固定点即可达精度,计算速度比旧方法快10倍以上。
  • 支持高阶交互分析,适合需要精准解释的工业场景。

Shapley值是解释树集成模型预测的标准工具,其中路径依赖型TreeSHAP应用最广。尽管已有进展,现有方法仍面临运行时间依赖深度、数值不稳定及高阶交互支持不足的权衡。为此,我们提出Quadrature-TreeSHAP,一种基于数值积分的路径依赖型TreeSHAP重构方法,具有数值稳定性强、天然支持任意阶Shapley交互值、对树深度几乎无敏感性等优点。该方法基于加权Banzhaf交互多项式,将特征参与概率为 $p$ 时的Banzhaf交互值表示为期望,再通过在 $p$ 从0到1上积分恢复出Shapley值与任意阶交互值。采用Gauss-Legendre数值积分,实践中仅需8个固定积分点即可达到机器精度。实际测试表明,8点方案在数值稳定性上优于原始TreeSHAP。固定点设计消除内层计算对深度的依赖,支持高效SIMD执行。在12个XGBoost基准测试中,其在CPU上比TreeSHAP快1.06倍至10.59倍,在GPU上比GPUTreeSHAP快1.84倍至6.95倍;配对交互计算快3.80倍至58.11倍,高阶交互最高提速达1200倍(对比TreeSHAP-IQ)。

原文摘要 · Abstract (English)

Shapley values are a standard tool for explaining predictions of tree ensembles, with Path-Dependent SHAP being the most widely used variant. Despite substantial progress, existing methods still exhibit trade-offs between depth-dependent runtime, numerical stability, and support for higher-order interactions. To address these challenges, we introduce Quadrature-TreeSHAP, a quadrature-based reformulation of Path-Dependent TreeSHAP that is numerically stable, naturally extends to any-order Shapley interaction values and is practically insensitive to tree depth. Our implementation supports both CPU and GPU and is integrated into XGBoost. Our method is based on a weighted-Banzhaf interaction polynomial, which expresses Banzhaf interaction values as expectations under a feature participation probability $p$. Shapley values and any-order interaction values are then recovered by integrating these polynomials over $p$ from 0 to 1. We evaluate these integrals using Gauss-Legendre quadrature, and show that, in practice, only 8 fixed quadrature points are sufficient to reach machine precision. In fact, Quadrature-TreeSHAP with 8 fixed points achieves greater numerical stability than TreeSHAP. This fixed-point formulation removes depth dependence from the inner computation and enables efficient SIMD execution. We confirm these advantages empirically. On 12 XGBoost benchmarks, Quadrature-TreeSHAP computes Shapley values 1.06x-10.59x faster than TreeSHAP on CPU and 1.84x-6.95x faster than GPUTreeSHAP on GPU. Shapley pairwise interactions are 3.80x-58.11x faster on CPU, with higher-order interactions achieving speedups of up to 1200x compared to TreeSHAP-IQ.

模型解释树模型数值积分性能优化

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。