Shaping Up SHAP: Enhancing Stability through Layer-Wise Neighbor Selection
Gwladys Kelodjou, Laurence Rozé, Véronique Masson, Luis Galárraga, Romaric Gaudel, Maurice Tchuente, Alexandre Termier
TL;DR
Shaping Up SHAP identifies instability in Kernel SHAP caused by stochastic neighbor selection and proposes ST-SHAP to enforce layer-wise stability, including full-layer determinism or Layer-1-only attributions. The authors derive a closed-form Layer-1 attribution formula, show it satisfies LES properties, and empirically validate high stability without fidelity loss, plus substantial speedups relative to exact SHAP. The approach yields a robust, scalable alternative for local explanations, with Layer-1 attributions offering near-SHAP fidelity at linear-time complexity $O(M)$. Across multiple datasets and models, ST-SHAP demonstrates stable explanations (often $Jaccard=1.0$ on complete layers) and strong agreement with exact SHAP values, suggesting practical impact for trustworthy, efficient model interpretability.
Abstract
Machine learning techniques, such as deep learning and ensemble methods, are widely used in various domains due to their ability to handle complex real-world tasks. However, their black-box nature has raised multiple concerns about the fairness, trustworthiness, and transparency of computer-assisted decision-making. This has led to the emergence of local post-hoc explainability methods, which offer explanations for individual decisions made by black-box algorithms. Among these methods, Kernel SHAP is widely used due to its model-agnostic nature and its well-founded theoretical framework. Despite these strengths, Kernel SHAP suffers from high instability: different executions of the method with the same inputs can lead to significantly different explanations, which diminishes the relevance of the explanations. The contribution of this paper is two-fold. On the one hand, we show that Kernel SHAP's instability is caused by its stochastic neighbor selection procedure, which we adapt to achieve full stability without compromising explanation fidelity. On the other hand, we show that by restricting the neighbors generation to perturbations of size 1 -- which we call the coalitions of Layer 1 -- we obtain a novel feature-attribution method that is fully stable, computationally efficient, and still meaningful.
