qshap: Fast Shapley Decomposition of R2 for Gradient-Boosted Trees
Abstract
Numerous methods have been developed to quantify feature attributions in individual predictions for tree ensembles. However, many applications require global measures of feature contributions to overall model performance. Although local attribution scores can be aggregated to characterize feature importance, such summaries do not directly decompose measures of predictive performance, such as R2. This article introduces qshap, available in both R and Python, which provides Shapley decomposition of R2 values for gradient-boosted decision trees (GBDTs) to quantify feature-specific contributions to model performance. By decomposing the quadratic loss of individual observations, qshap provides flexible tools to explore the importance of individual features and observations. qshap currently supports widely used GBDT implementations, including xgboost, lightgbm, and catboost, through a unified tree representation and efficient C++ backends. Its modular design can accommodate other GBDT implementations built from binary decision trees. In addition, we introduce a specialized backend for oblivious trees that exploits their symmetric structure to substantially accelerate computation.
Related
- Distributed Optimization of M-Convex Functions Subject to Linear Constraints via Continuous Relaxation and Shapley-Folkman Decomposition
- NPBoost: Neural Processes with Gradient-Boosted Fixed Effects
- Conditional Weight of Evidence for Gradient-Boosted Credit Models: Estimation, Additivity and Its Relation to Adverse Action Reasons
- The skeleton-blocks decomposition of Bienaymé trees, and applications to their local convergence
- CRAFT-GBM: Selecting Best Features for Gradient-Boosted Machine Learning
BibTeX
@misc{jiang2026qshap,
title = {{qshap: Fast Shapley Decomposition of $R^2$ for Gradient-Boosted Trees}},
author = {Zhongli Jiang and Min Zhang and Dabao Zhang},
howpublished = {arXiv},
year = {2026},
month = nov,
doi = {10.48550/arxiv.2608.24104},
eprint = {2608.24104},
archivePrefix = {arXiv},
url = {https://arxiv.org/abs/2608.24104},
}
RIS
TY - UNPB
TI - qshap: Fast Shapley Decomposition of R^2 for Gradient-Boosted Trees
AU - Zhongli Jiang
AU - Min Zhang
AU - Dabao Zhang
PY - 2026
DA - 2026/11/24
PB - arXiv
DO - 10.48550/arxiv.2608.24104
UR - https://arxiv.org/abs/2608.24104
AB - Numerous methods have been developed to quantify feature attributions in individual predictions for tree ensembles. However, many applications require global measures of feature contributions to overall model performance. Although local attribution scores can be aggregated to characterize feature importance, such summaries do not directly decompose measures of predictive performance, such as R^2. This article introduces qshap, available in both R and Python, which provides Shapley decomposition of R^2 values for gradient-boosted decision trees (GBDTs) to quantify feature-specific contributions to model performance. By decomposing the quadratic loss of individual observations, qshap provides flexible tools to explore the importance of individual features and observations. qshap currently supports widely used GBDT implementations, including xgboost, lightgbm, and catboost, through a unified tree representation and efficient C++ backends. Its modular design can accommodate other GBDT implementations built from binary decision trees. In addition, we introduce a specialized backend for oblivious trees that exploits their symmetric structure to substantially accelerate computation.
ER -