快速分解梯度提升树的R²贡献,量化特征对模型性能的影响
qshap: Fast Shapley Decomposition of $R^2$ for Gradient-Boosted Trees

- 基于Shapley值分解每条样本的平方损失,实现全局性能归因
- 支持xgboost、lightgbm、catboost等主流GBDT模型,计算高效
- 专为对称结构的oblivious树优化,速度显著提升,适合模型可解释性研究
针对梯度提升决策树(GBDT)模型,现有方法多聚焦于单个预测的特征归因,但许多应用场景需要衡量特征对整体模型性能的贡献。尽管可通过聚合局部归因获得特征重要性,但此类方法无法直接分解如R²等性能指标。本文提出qshap,可在R与Python中使用,实现对GBDT模型的R²值进行Shapley分解,量化各特征对模型性能的具体贡献。该方法通过分解个体样本的二次损失,提供灵活工具以分析特征与样本层面的重要性。qshap目前支持xgboost、lightgbm、catboost等常用GBDT实现,依托统一树结构表示和高效的C++后端。其模块化设计可扩展至其他基于二叉决策树的GBDT框架。此外,针对oblivious树的对称结构,引入专用加速后端,显著提升计算效率。
原文摘要 · Abstract (English)
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.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。