Due to their power and ease of use, tree-based machine learning models have become very popular. To interpret these models, local feature attributions based on marginal expectations e.g. marginal (interventional) Shapley, Owen or Banzhaf values may be employed. Such feature attribution methods are true to the model and implementation invariant, i.e. dependent only on the input-output function of the model. By taking advantage of the internal structure of tree-based models, we prove that their marginal Shapley values, or more generally marginal feature attributions obtained from a linear game value, are simple (piecewise-constant) functions with respect to a certain finite partition of the input space determined by the trained model. The same is true for feature attributions obtained from the famous TreeSHAP algorithm. Nevertheless, we show that the "path-dependent" TreeSHAP is not implementation invariant by presenting two (statistically similar) decision trees computing the exact same function for which the algorithm yields different rankings of features, whereas the marginal Shapley values coincide. Furthermore, we discuss how the fact that marginal feature attributions are simple functions can potentially be utilized to compute them. An important 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. In particular, in the case of CatBoost models, 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 for marginal Shapley (and Banzhaf and Owen) values which is only in terms of the internal parameters of the CatBoost model.
翻译:由于其强大和易用性,基于树的机器学习模型已变得非常流行。为解释这些模型,可采用基于边际期望的局部特征归因方法,例如边际(干预性)Shapley值、Owen值或Banzhaf值。此类特征归因方法忠实于模型且实现不变,即仅依赖于模型的输入输出函数。通过利用树模型的内部结构,我们证明其边际Shapley值,更一般地,由线性博弈值导出的边际特征归因,是相对于经训练模型确定的输入空间某一有限划分的简单(分段常数)函数。著名的TreeSHAP算法生成的特征归因同样具有此性质。然而,我们通过展示两个计算完全相同函数的(统计上相似的)决策树(其中算法产生不同的特征排序,而边际Shapley值一致),证明了“路径依赖型”TreeSHAP并非实现不变。此外,我们讨论了边际特征归因为简单函数这一事实可如何潜在用于计算它们。基于XGBoost、LightGBM和CatBoost库的实验表明,一个重要观察结果是:集成模型中每棵树仅包含部分特征;因此计算边际Shapley(或Owen或Banzhaf)特征归因的复杂度可能降低。特别地,对于CatBoost模型,树是遗忘的(对称的),且每棵树中的特征数不超过其深度。我们利用对称性推导出仅由CatBoost模型内部参数表达的、具有改进复杂度的边际Shapley(及Banzhaf和Owen)值的显式公式。