On marginal feature attributions of tree-based models

Read original: arXiv:2302.08434 - Published 5/7/2024 by Khashayar Filom, Alexey Miroshnikov, Konstandinos Kotsiopoulos, Arjun Ravi Kannan
Total Score

0

Sign in to get full access

or

If you already have an account, we'll log you in

Overview

  • Tree-based machine learning models, such as random forests and gradient-boosted tree ensembles, are popular due to their power and ease of use.
  • To interpret these models, local feature attributions based on marginal expectations, like marginal Shapley, Owen or Banzhaf values, can be employed.
  • Such methods are true to the model and implementation invariant, meaning they depend only on the input-output function of the model.
  • The paper contrasts this with the popular TreeSHAP algorithm and presents decision trees that compute the same function but yield different feature rankings with TreeSHAP.

Plain English Explanation

Tree-based machine learning models, like random forests and gradient-boosted trees, have become very popular because they are powerful and easy to use. To understand how these models make their predictions, researchers often look at the "importance" or "attribution" of each input feature.

One approach is to use marginal feature attributions, which consider how much each input feature contributes to the model's output on average. Methods like Shapley, Owen, and Banzhaf values can be used to calculate these marginal attributions. These methods are reliable because they depend only on the overall behavior of the model, not its internal structure.

In contrast, the popular TreeSHAP algorithm looks at the model's internal structure to estimate feature importance. The paper shows that TreeSHAP can give different feature rankings for two decision trees that compute the exact same function. The marginal Shapley values, however, coincide for these two trees.

Technical Explanation

The paper explores how the internal structure of tree-based models can be leveraged to efficiently compute marginal feature attributions, such as Shapley, Owen, or Banzhaf values. The key observations are:

  1. Tree-based models define piecewise-constant functions over a grid partition of the input space determined by the model structure.
  2. Only a subset of all features typically appears in the trees of an ensemble model, reducing the complexity of computing marginal feature attributions.
  3. For CatBoost models, where the trees are "oblivious" (symmetric), the number of features in each tree is no larger than the tree depth. This symmetry can be exploited to derive an explicit formula for marginal Shapley, Banzhaf, and Owen values, resulting in a fast and accurate algorithm.

Experiments with XGBoost, LightGBM, and CatBoost libraries confirm these insights and demonstrate the efficiency gains of the proposed approach compared to standard Shapley value estimation methods.

Critical Analysis

The paper provides a thorough analysis and a novel approach to efficiently computing marginal feature attributions for tree-based models. However, a few potential limitations and areas for further research are worth considering:

  1. The paper focuses on tree-based models, but it would be valuable to explore the applicability of the proposed techniques to other model types, such as neural networks.
  2. The paper assumes that the internal structure of the tree-based models is available, which may not always be the case, especially for deployed models.
  3. The paper does not address the potential issues with Shapley-based explanations in certain scenarios, such as when the feature dependencies are complex.

Further research could investigate ways to overcome these limitations and explore the broader implications of the efficient marginal feature attribution techniques presented in the paper.

Conclusion

This paper makes a significant contribution to the interpretation of tree-based machine learning models. By leveraging the internal structure of these models, the authors present efficient algorithms for computing marginal feature attributions, such as Shapley, Owen, and Banzhaf values. These techniques can provide reliable and fast model interpretations, which is crucial for the responsible deployment of powerful tree-based models in real-world applications.



This summary was produced with help from an AI and may contain inaccuracies - check out the links to read the original source documents!

Follow @aimodelsfyi on 𝕏 →

Related Papers

Total Score

0

On marginal feature attributions of tree-based models

Khashayar Filom, Alexey Miroshnikov, Konstandinos Kotsiopoulos, Arjun Ravi Kannan

Due to their power and ease of use, tree-based machine learning models, such as random forests and gradient-boosted tree ensembles, have become very popular. To interpret them, local feature attributions based on marginal expectations, e.g. marginal (interventional) Shapley, Owen or Banzhaf values, may be employed. Such methods are true to the model and implementation invariant, i.e. dependent only on the input-output function of the model. We contrast this with the popular TreeSHAP algorithm by presenting two (statistically similar) decision trees that compute the exact same function for which the path-dependent TreeSHAP yields different rankings of features, whereas the marginal Shapley values coincide. Furthermore, we discuss how the internal structure of tree-based models may be leveraged to help with computing their marginal feature attributions according to a linear game value. One important observation is that these are simple (piecewise-constant) functions with respect to a certain grid partition of the input space determined by the trained model. Another crucial observation, showcased by experiments with XGBoost, LightGBM and CatBoost libraries, is that only a portion of all features appears in a tree from the ensemble. Thus, the complexity of computing marginal Shapley (or Owen or Banzhaf) feature attributions may be reduced. This remains valid for a broader class of game values which we shall axiomatically characterize. A prime example is the case of CatBoost models where the trees are oblivious (symmetric) and the number of features in each of them is no larger than the depth. We exploit the symmetry to derive an explicit formula, with improved complexity and only in terms of the internal model parameters, for marginal Shapley (and Banzhaf and Owen) values of CatBoost models. This results in a fast, accurate algorithm for estimating these feature attributions.

Read more

5/7/2024

Shapley Marginal Surplus for Strong Models
Total Score

0

Shapley Marginal Surplus for Strong Models

Daniel de Marchi, Michael Kosorok, Scott de Marchi

Shapley values have seen widespread use in machine learning as a way to explain model predictions and estimate the importance of covariates. Accurately explaining models is critical in real-world models to both aid in decision making and to infer the properties of the true data-generating process (DGP). In this paper, we demonstrate that while model-based Shapley values might be accurate explainers of model predictions, machine learning models themselves are often poor explainers of the DGP even if the model is highly accurate. Particularly in the presence of interrelated or noisy variables, the output of a highly predictive model may fail to account for these relationships. This implies explanations of a trained model's behavior may fail to provide meaningful insight into the DGP. In this paper we introduce a novel variable importance algorithm, Shapley Marginal Surplus for Strong Models, that samples the space of possible models to come up with an inferential measure of feature importance. We compare this method to other popular feature importance methods, both Shapley-based and non-Shapley based, and demonstrate significant outperformance in inferential capabilities relative to other methods.

Read more

8/19/2024

Feature-Specific Coefficients of Determination in Tree Ensembles
Total Score

0

Feature-Specific Coefficients of Determination in Tree Ensembles

Zhongli Jiang, Dabao Zhang, Min Zhang

Tree ensemble methods provide promising predictions with models difficult to interpret. Recent introduction of Shapley values for individualized feature contributions, accompanied with several fast computing algorithms for predicted values, shows intriguing results. However, individualizing coefficients of determination, aka $R^2$, for each feature is challenged by the underlying quadratic losses, although these coefficients allow us to comparatively assess single feature's contribution to tree ensembles. Here we propose an efficient algorithm, Q-SHAP, that reduces the computational complexity to polynomial time when calculating Shapley values related to quadratic losses. Our extensive simulation studies demonstrate that this approach not only enhances computational efficiency but also improves estimation accuracy of feature-specific coefficients of determination.

Read more

7/8/2024

Helpful or Harmful Data? Fine-tuning-free Shapley Attribution for Explaining Language Model Predictions
Total Score

0

Helpful or Harmful Data? Fine-tuning-free Shapley Attribution for Explaining Language Model Predictions

Jingtan Wang, Xiaoqiang Lin, Rui Qiao, Chuan-Sheng Foo, Bryan Kian Hsiang Low

The increasing complexity of foundational models underscores the necessity for explainability, particularly for fine-tuning, the most widely used training method for adapting models to downstream tasks. Instance attribution, one type of explanation, attributes the model prediction to each training example by an instance score. However, the robustness of instance scores, specifically towards dataset resampling, has been overlooked. To bridge this gap, we propose a notion of robustness on the sign of the instance score. We theoretically and empirically demonstrate that the popular leave-one-out-based methods lack robustness, while the Shapley value behaves significantly better, but at a higher computational cost. Accordingly, we introduce an efficient fine-tuning-free approximation of the Shapley value (FreeShap) for instance attribution based on the neural tangent kernel. We empirically demonstrate that FreeShap outperforms other methods for instance attribution and other data-centric applications such as data removal, data selection, and wrong label detection, and further generalize our scale to large language models (LLMs). Our code is available at https://github.com/JTWang2000/FreeShap.

Read more

6/10/2024