🤖 AI Summary
To address the high variance and low computational efficiency of Shapley value approximations in KernelSHAP, this paper proposes a deterministic kernel weighting scheme that replaces conventional stochastic weighting. Grounded in Shapley value theory and weighted least squares regression, the method analytically derives a deterministic weight function, substantially reducing estimation variance. Furthermore, the implementation of KernelSHAP in the SHAP library is optimized to enhance computational simplicity and robustness while preserving theoretical consistency. Experiments demonstrate that, without compromising explanation fidelity, the approach reduces the number of contribution function evaluations by 5%–50% and accelerates inference by up to 50%, enabling real-time, interpretable analysis for high-dimensional features and large-scale predictions. The core innovation lies in the first principled replacement of stochastic kernel weights with a theory-driven deterministic weighting mechanism—achieving improved efficiency, numerical stability, and scalability.
📝 Abstract
In Explainable AI (XAI), Shapley values are a popular model-agnostic framework for explaining predictions made by complex machine learning models. The computation of Shapley values requires estimating non-trivial contribution functions representing predictions with only a subset of the features present. As the number of these terms grows exponentially with the number of features, computational costs escalate rapidly, creating a pressing need for efficient and accurate approximation methods. For tabular data, the KernelSHAP framework is considered the state-of-the-art model-agnostic approximation framework. KernelSHAP approximates the Shapley values using a weighted sample of the contribution functions for different feature subsets. We propose a novel modification of KernelSHAP which replaces the stochastic weights with deterministic ones to reduce the variance of the resulting Shapley value approximations. This may also be combined with our simple, yet effective modification to the KernelSHAP variant implemented in the popular Python library SHAP. Additionally, we provide an overview of established methods. Numerical experiments demonstrate that our methods can reduce the required number of contribution function evaluations by $5%$ to $50%$ while preserving the same accuracy of the approximated Shapley values -- essentially reducing the running time by up to $50%$. These computational advancements push the boundaries of the feature dimensionality and number of predictions that can be accurately explained with Shapley values within a feasible runtime.