# Quadrature-TreeSHAP: Depth-Independent TreeSHAP and Shapley Interactions

Source: [Quadrature-TreeSHAP: Depth-Independent TreeSHAP and Shapley Interactions](<https://www.sota2.com/research/paper/69fc1cac5497b3b670c88617>)

Collection index: [llms.txt](<https://www.sota2.com/research/llms.txt>)

Data updated: 2026-05-08T05:00:04.262Z

Authors: Ron Wettenstein, Rory Mitchell, Peng Yu

Published: 2026-05-06T05:02:10.000Z

## Abstract

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.

## Recorded benchmark results

A research result applies to its stated dataset, split, metric and evaluation configuration. Compare like-for-like settings, preserve the metric's unit and direction, and distinguish paper-reported results from independent reproduction. The best result recorded here is not a claim of exhaustive, current global coverage.

- [Second-order Shapley interaction value runtime calculation on Adult](<https://www.sota2.com/research/sota/second-order-shapley-interaction-value-runtime-calculation-on-adult.md>): Second-order Shapley interaction value runtime calculation; Adult; Runtime (s): 0.001.

- [Second-order Shapley interaction value runtime calculation on CalHousing](<https://www.sota2.com/research/sota/second-order-shapley-interaction-value-runtime-calculation-on-calhousing.md>): Second-order Shapley interaction value runtime calculation; calhousing; Runtime (s): 0.001.

- [Second-order Shapley interaction value runtime calculation on CovType](<https://www.sota2.com/research/sota/second-order-shapley-interaction-value-runtime-calculation-on-covtype.md>): Second-order Shapley interaction value runtime calculation; CovType; Runtime (seconds): 0.005.

- [First-order Shapley value calculation on Adult small setting](<https://www.sota2.com/research/sota/first-order-shapley-value-calculation-on-adult-small-setting.md>): First-order Shapley value calculation; Adult small setting; Runtime (s): 0.001.

- [First-order Shapley value calculation on CalHousing small setting](<https://www.sota2.com/research/sota/first-order-shapley-value-calculation-on-calhousing-small-setting.md>): First-order Shapley value calculation; CalHousing small setting; Runtime (s): 0.001.

- [First-order Shapley value calculation on CalHousing large setting](<https://www.sota2.com/research/sota/first-order-shapley-value-calculation-on-calhousing-large-setting.md>): First-order Shapley value calculation; CalHousing large setting; Runtime (s): 2.705.

- [First-order Shapley value calculation on CalHousing (sparse setting)](<https://www.sota2.com/research/sota/first-order-shapley-value-calculation-on-calhousing-sparse-setting.md>): First-order Shapley value calculation; CalHousing (sparse setting); Runtime (s): 0.035.

- [First-order Shapley value calculation on CovType small setting](<https://www.sota2.com/research/sota/first-order-shapley-value-calculation-on-covtype-small-setting.md>): First-order Shapley value calculation; CovType small setting; Runtime (s): 0.001.

- [First-order Shapley value calculation on CovType large setting](<https://www.sota2.com/research/sota/first-order-shapley-value-calculation-on-covtype-large-setting.md>): First-order Shapley value calculation; CovType large setting; Runtime (s): 0.019.

- [First-order Shapley value calculation on CovType sparse setting](<https://www.sota2.com/research/sota/first-order-shapley-value-calculation-on-covtype-sparse-setting.md>): First-order Shapley value calculation; CovType sparse setting; Runtime (s): 0.004.

- [First-order Shapley value calculation on Fashion-MNIST small setting](<https://www.sota2.com/research/sota/first-order-shapley-value-calculation-on-fashion-mnist-small-setting.md>): First-order Shapley value calculation; Fashion-MNIST small setting; Runtime (seconds): 0.012.

- [First-order Shapley value calculation on Fashion-MNIST large setting](<https://www.sota2.com/research/sota/first-order-shapley-value-calculation-on-fashion-mnist-large-setting.md>): First-order Shapley value calculation; Fashion-MNIST large setting; Runtime (s): 2.431.

- [First-order Shapley value calculation on Adult large setting](<https://www.sota2.com/research/sota/first-order-shapley-value-calculation-on-adult-large-setting.md>): First-order Shapley value calculation; Adult large setting; Runtime (seconds): 0.602.

- [First-order Shapley value calculation on Fashion-MNIST sparse setting](<https://www.sota2.com/research/sota/first-order-shapley-value-calculation-on-fashion-mnist-sparse-setting.md>): First-order Shapley value calculation; Fashion-MNIST sparse setting; Runtime (s): 0.372.

- [Third-order Shapley interaction calculation on CalHousing small](<https://www.sota2.com/research/sota/third-order-shapley-interaction-calculation-on-calhousing-small.md>): Third-order Shapley interaction calculation; CalHousing small; Runtime: 0.014.

- [Third-order Shapley interaction calculation on CalHousing sparse](<https://www.sota2.com/research/sota/third-order-shapley-interaction-calculation-on-calhousing-sparse.md>): Third-order Shapley interaction calculation; CalHousing sparse; Runtime: 1.362.

- [Third-order Shapley interaction calculation on CovType small](<https://www.sota2.com/research/sota/third-order-shapley-interaction-calculation-on-covtype-small.md>): Third-order Shapley interaction calculation; CovType small; Runtime: 0.009.

- [Third-order Shapley interaction calculation on CovType large](<https://www.sota2.com/research/sota/third-order-shapley-interaction-calculation-on-covtype-large.md>): Third-order Shapley interaction calculation; CovType large; Runtime: 0.962.

- [Third-order Shapley interaction calculation on CovType sparse](<https://www.sota2.com/research/sota/third-order-shapley-interaction-calculation-on-covtype-sparse.md>): Third-order Shapley interaction calculation; CovType sparse; Runtime: 0.186.

- [First-order Shapley value runtime computation on Adult sparse](<https://www.sota2.com/research/sota/first-order-shapley-value-runtime-computation-on-adult-sparse.md>): First-order Shapley value runtime computation; Adult sparse; Runtime (s): 5.663.

- [Third-order Shapley interaction calculation on Adult small](<https://www.sota2.com/research/sota/third-order-shapley-interaction-calculation-on-adult-small.md>): Third-order Shapley interaction calculation; Adult small; Runtime: 0.01.

- [Third-order Shapley interaction calculation on Adult large](<https://www.sota2.com/research/sota/third-order-shapley-interaction-calculation-on-adult-large.md>): Third-order Shapley interaction calculation; Adult large; Runtime: 37.616.

- [Third-order Shapley interaction calculation on Adult sparse](<https://www.sota2.com/research/sota/third-order-shapley-interaction-calculation-on-adult-sparse.md>): Third-order Shapley interaction calculation; Adult sparse; Runtime: 2.873.

- [Second-order Shapley interaction value runtime calculation on Fashion-MNIST](<https://www.sota2.com/research/sota/second-order-shapley-interaction-value-runtime-calculation-on-fashion-mnist.md>): Second-order Shapley interaction value runtime calculation; Fashion MNIST; Runtime (s): 2.052.

## Original sources and implementation

[Original paper](<https://arxiv.org/abs/2605.04497>)

[PDF](<https://arxiv.org/pdf/2605.04497.pdf>)
