Approximating the Shapley Value without Marginal Contributions

Patrick Kolpaczki, Viktor Bengs, Eyke Hüllermeier · DOI

Abstract

The Shapley value is the gold standard for fair feature importance in Explainable AI (XAI), but its exact calculation is computationally impossible for large models. This paper introduces SVARM and Stratified SVARM, novel approximation algorithms that ditch the traditional "marginal contribution" approach in favor of a "maximum sample reuse" strategy. By updating every player's estimate with every single model evaluation, these methods achieve state-of-the-art accuracy with superior theoretical guarantees, including logarithmic variance scaling.

Introduction

In cooperative game theory and machine learning, the Shapley value ($\phi_i$) quantifies the contribution of each "player" (feature) to a collective outcome. Its unique fairness is derived from satisfying key mathematical axioms. However, exact calculation requires $2^n$ model evaluations, making it impractical for models with many features.

Existing approximations, such as ApproShapley, typically rely on marginal contributions: the difference in model output when a feature is added to a subset. This approach is inefficient, requiring two model calls per sample and only informing a single feature's estimate. This research proposes a paradigm shift: extracting maximal information from every model evaluation to update all features simultaneously.

Methodology: The SVARM Framework

The authors represent the Shapley value as the difference between two weighted averages: $$\phi_i = \phi_i^+ - \phi_i^-$$ where $\phi_i^+$ is the average worth of coalitions containing player $i$, and $\phi_i^-$ is the average worth of coalitions excluding player $i$.

SVARM (Shapley Value Approximation without Requesting Marginals)

SVARM samples coalitions from two specific probability distributions ($P^+$ and $P^-$). Unlike marginal methods, every evaluation of a coalition $S$ updates the estimates for all players. If player $i \in S$, its "positive" estimate $\hat{\phi}_i^+$ is updated; otherwise, its "negative" estimate $\hat{\phi}_i^-$ is updated. This "swarm" of updates leads to significantly faster convergence.

Overview of the SVARM update mechanism across multiple players.

Stratification for Variance Reduction

To further improve efficiency, the authors introduce Stratified SVARM. This method partitions coalitions by their size (strata). Since coalitions of similar sizes often yield similar "worth," stratification reduces the variance of the estimates.

The Stratified SVARM approach, partitioning estimates by coalition size to reduce variance.

An empirical variant, Stratified SVARM+, incorporates sampling without replacement (similar to KernelSHAP) to enhance performance in practical XAI scenarios.

Experimental Evaluation

The methods were evaluated across synthetic benchmarks and real-world XAI tasks, including the 100-player Airport game and complex models like DistilBERT and ResNet18.

Key Results

  • Superior Accuracy: In high-dimensional settings, Stratified SVARM significantly outperformed ApproShapley and KernelSHAP in Mean Squared Error (MSE).
  • Theoretical Robustness: The authors proved that SVARM estimates are unbiased. Crucially, the variance depends on $\log n$ rather than $n$, making the method highly scalable.
  • State-of-the-Art Performance: Stratified SVARM+ is the first sample-mean-based approach to rival KernelSHAP's accuracy while maintaining a simpler implementation and stronger theoretical foundation.

Conclusion

SVARM represents a significant advancement in Shapley value approximation by replacing marginal contributions with a "maximum sample reuse" principle. By updating all player estimates with every model call, it achieves superior efficiency and scalability. While current implementations face $O(n^2)$ space complexity due to stratification, future work on coarser stratification promises to extend these benefits to even larger-scale problems.

Summary updated

BibTeX
@inproceedings{kolpaczki2024approximating,
  author = {Patrick Kolpaczki and Viktor Bengs and Eyke Hüllermeier},
  title = {{Approximating the Shapley Value without Marginal Contributions}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2024},
  doi = {10.1609/aaai.v38i12.29225},
}
Figure