Organizations: Université de technologie de Compiègne, UMR-CNRS 7253 Heudiasyc Compiègne, France · IUT de l’Oise, Université de Picardie Jules Verne Beauvais, France
Shapley values are among the most popular feature-attribution explanations. Efficient approaches for computing/estimating Shapley values for tree-based models, which are state-of-the-art for tabular data sets, have been developed. However, it is known that Shapley values can be (highly) unrobust due to small and realistic changes. In this paper, we propose an imprecise Dirichlet model (IDM) based method to analyze the robustness of Shapley values in decision trees and random forests. Technically, it is done by quantifying and analyzing the interval-valued Shapley values when a few unannotated instances are randomly introduced to the leaves of the trees. The interval-valued Shapley values can be defined following common principles in handling incomplete data: the pessimistic and averaging principles. We derive various theoretical results that lead to efficient computation of the interval-valued Shapley values. We also show that the proposed method can be straightforwardly generalized to the case of Banzhaf values. We then present various case studies and experiments to illustrate the behaviour of the proposed interval-valued Shapley values and their applications in debiasing uninformative features.
Figures & tables
leaf
nℓ
Nℓ
wℓ
mℓ
[wℓ,wℓ]
ℓ1
20
60
1/3
1
[6120,6121]
ℓ2
20
50
2/5
2
[5220,5222]
ℓ3
10
30
1/3
1
[3110,3111]
ℓ4
30
50
3/5
2
[5230,5232]
TABLE I : IDM leaf-output intervals.
Δℓ(mℓ+1)
:=αi,ℓ−(Nℓ+mℓ+1mℓ+1−Nℓ+mℓmℓ)
=αi,ℓ−(Nℓ+mℓ+1)(Nℓ+mℓ)Nℓ;
(19)
Algorithm 1 Optimal allocation of virtual samples
step
leaf
Δℓ
m
1
ℓ1
0.00984
(1,0,0,0)
2
ℓ4
0.00980
(1,0,0,1)
3
ℓ3
0.00968
(1,0,1,1)
4
ℓ1
0.00952
(2,0,1,1)
5
ℓ4
0.00943
(2,0,1,2)
6
ℓ1
0.00922
(3,0,1,2)
TABLE II : Worst-case and stochastic allocation computations.
Diab.
BreC.
Ions.
Mort.
Features
8
30
34
79
Instances
768
569
351
14264
TABLE III : Summary of datasets
TABLE IV : Representative instances from the Diabetes dataset, their nominal SHAP values, and magnitude-based intervals. (+) and (−) indicate support for and opposition to the diabetic prediction, respectively
Table 6
Fig. 1 : Comparison of (row) nominal SHAP, SHAPPess , SHAPShrunk , and SHAPoob , where only X2 is informative, for different signal strengths (column) ρ∈[0,0.3] .
SHAP
SHAPSafe
SHAPPess
SHAPShrunk
SHAPoob
0.82
0.81
0.83
0.79
0.85
TABLE VII : Average AUC scores for separating informative from uninformative features.
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.
Ron Wettenstein, Rory Mitchell, Peng Yu
Reichman University, Herzliya, Israel · Nvidia Corporation · Shopify
We address the problem of explainability in machine learning models through feature attribution methods. In particular, we consider a variant of Shapley values known as Asymmetric Shapley Values (ASV), which enables the incorporation of causal knowledge into model-agnostic explanations through the use of a causal graph. We show that in certain contexts in which the computation of SHAP is #P-hard, the exact computation of ASV can be done in polynomial time. To extend this algorithmic result, we introduce a notion of equivalence classes over the topological orderings of the underlying causal graph, which is useful to reduce the time to compute ASV. In particular, we present a polynomial-time algorithm (in the number of equivalence classes) to compute it whenever the causal graph is a rooted directed tree. Finally, we develop an algorithm for approximating ASV in arbitrary causal DAGs which relies on a procedure to sample topological orderings uniformly at random. To implement this sampling mechanism we leverage known algorithms as well as simpler alternatives. Our experimental results demonstrate the practical viability of the proposed approach in realistic causal structures.
Ezequiel Companeetz, Santiago Cifuentes, Sergio Abriola
Departamento de Computación, Facultad de Ciencias Exactas y Naturales, UBA · Instituto de Ciencias de la Computación (ICC), CONICET
Machine learning pipelines commonly flatten relational data into single-table representations, discarding structural constraints. Widely used Shapley value-based feature attributions then rely on feature independence, evaluating the model on combinations that could never arise in the underlying data, producing misleading explanations. We propose RelShap, a framework that incorporates relational constraints and data provenance into Shapley value computation, restricting both background data and coalition evaluation to relationally valid configurations. The framework is estimator-agnostic and composes with Kernel SHAP, Monte Carlo, and Leverage SHAP without altering their sampling or weighting properties. Functional dependencies further induce equivalence classes over feature coalitions, which RelShap exploits to reduce runtime without changing Shapley values; we provide a combinatorial characterization of the expected speedup. Experiments across multiple datasets, models, and estimators show that RelShap produces explanations that are more faithful to the data-generating process, correctly identifying the dominant feature in controlled settings where existing methods, including Conditional SHAP and ManifoldShap, do not. Our code is available at: https://github.com/duneag2/relshap.
Seungeun Lee, Joao Fonseca, Julia Stoyanovich
New York University, New York, USA · INESC-ID, Lisbon, Portugal