[Paper Review] Accurate Shapley Values for explaining tree-based models
This paper proposes two new estimators—Discrete and Leaf—for computing Shapley Values (SV) in tree-based models that are more accurate than state-of-the-art methods like TreeSHAP, especially under feature dependence and with categorical variables. It demonstrates that standard SV estimation is biased when features are dependent and that encoding-based SV aggregation for categorical variables leads to incorrect interpretations, offering a theoretically sound alternative via coalition-based SV computation.
Shapley Values (SV) are widely used in explainable AI, but their estimation and interpretation can be challenging, leading to inaccurate inferences and explanations. As a starting point, we remind an invariance principle for SV and derive the correct approach for computing the SV of categorical variables that are particularly sensitive to the encoding used. In the case of tree-based models, we introduce two estimators of Shapley Values that exploit the tree structure efficiently and are more accurate than state-of-the-art methods. Simulations and comparisons are performed with state-of-the-art algorithms and show the practical gain of our approach. Finally, we discuss the limitations of Shapley Values as a local explanation. These methods are available as a Python package.
Motivation & Objective
- To address the inaccuracy of existing Shapley Value (SV) estimators in tree-based models, particularly under feature dependence.
- To resolve the misinterpretation of SV for categorical variables caused by standard encoding practices.
- To provide a theoretically grounded method for computing SV that ensures invariance under reparametrization.
- To improve local explanation reliability by correcting the global nature of SV, which affects local interpretability.
Proposed method
- Derives an invariance principle for SV under reparametrization, ensuring consistent explanations regardless of variable encoding.
- Introduces a coalition-based SV definition (Equation 2) that generalizes classical SV to groups of variables, particularly for categorical features.
- Proposes the Discrete estimator, which computes SV directly on discretized categorical variables, avoiding encoding-induced bias.
- Develops the Leaf estimator, which computes reduced predictors by aggregating over all training data points in each leaf, enabling accurate SV estimation.
- Uses conditional expectations under the true data distribution to define reduced predictors, improving estimation accuracy.
- Implements the proposed estimators in a Python package for practical use in XAI applications.
Experimental results
Research questions
- RQ1How does feature dependence affect the accuracy of Shapley Value estimation in tree-based models?
- RQ2Why is the standard practice of summing SVs of encoded variables problematic for categorical variables?
- RQ3Can a theoretically principled estimator be developed that ensures invariance under variable encoding for both continuous and categorical features?
- RQ4To what extent do current SV estimators like TreeSHAP fail in capturing true feature contributions under feature dependence?
- RQ5Are Shapley Values truly local explanations, or do they retain global dependencies that undermine local interpretability?
Key findings
- The Discrete estimator outperforms TreeSHAP in terms of relative absolute error (R-AE) on synthetic data with p=5, especially under feature dependence.
- The Leaf estimator achieves significantly lower R-AE than TreeSHAP as feature correlation increases, with performance gains up to ρ=0.99.
- TreeSHAP exhibits high bias when features are dependent, leading to unreliable feature importance estimates.
- Summing SVs of encoded variables for a categorical variable produces incorrect SVs for all features, invalidating interpretations.
- Shapley Values are not truly local explanations, as demonstrated by Proposition 5.1, which shows that SVs for inactive features can be non-zero due to global averaging over different model regimes.
- The proposed estimators are computationally feasible even at high dimensionality (p=500), with the Leaf estimator showing robustness to increasing p, though at higher runtime than TreeSHAP.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.