SVARM-IQ: Efficient Approximation of Any-order Shapley Interactions through Stratification

Patrick Kolpaczki, Maximilian Muschalik, Fabian Fumagalli, Barbara Hammer, Eyke Hüllermeier · DOI

Introduction

In the field of Explainable AI (XAI), the Shapley Value (SV) has emerged as a gold standard for determining the contribution of individual features to a model's prediction. However, individual attributions often fail to capture the complexity of modern machine learning models, where features frequently interact in non-additive ways. For instance, in natural language processing, the combination of "not" and "bad" creates a positive sentiment that neither word conveys in isolation.

While various Shapley-based interaction indices—such as the Shapley Interaction Index (SII), Shapley-Taylor Interaction Index (STI), and Faithful Shapley Interaction (FSI)—have been developed to quantify these relationships, they are hindered by the "curse of dimensionality." Calculating these indices exactly requires $2^n$ model evaluations, which is computationally prohibitive for most real-world applications. SVARM-IQ (SVARM Interaction Quantification) is a new sampling-based algorithm designed to overcome these limitations by efficiently approximating high-order feature interactions.

The SVARM-IQ Framework

SVARM-IQ extends the principles of stratified sampling to any-order interactions, allowing for high-accuracy estimates within a limited computational budget. The algorithm is built upon several key technical innovations:

  • Stratified Representation: The algorithm decomposes the complex "discrete derivative" used to define interactions into distinct "strata" based on coalition sizes. This approach leverages the observation that coalitions of similar sizes tend to have lower variance in their contributions, leading to faster convergence.
  • Maximum Sample Reuse: Unlike traditional permutation-based sampling methods that update only a few estimates per model evaluation, SVARM-IQ is designed to update the estimates for all considered interaction subsets simultaneously. This maximizes the information extracted from every model call.
  • Border Evaluation: For very small and very large coalition sizes, the total number of possible combinations is relatively small. SVARM-IQ identifies these "borders" and evaluates them exactly, preserving the sampling budget for the more complex "middle" coalition sizes where the search space is largest.
  • Unified Framework for CIIs: SVARM-IQ is not limited to a single index. It provides a generalized framework for approximating a broad class of Cardinal Interaction Indices (CIIs), including the popular SII and STI.

Experimental Evaluation

The authors evaluated SVARM-IQ across a variety of synthetic and real-world scenarios to test its robustness and efficiency:

  • Natural Language Processing: A DistilBert model fine-tuned on the IMDB movie review dataset for sentiment analysis.
  • Computer Vision: A Vision Transformer (ViT-32-384) pre-trained on ImageNet (using 9 or 16 patches) and a ResNet18 model using SLIC superpixels as features.
  • Synthetic Benchmarks: Sum Of Unanimity Models (SOUM) were utilized to provide ground-truth calculations for high-dimensional feature sets ($n=20$), allowing for precise error measurement.

Key Results and Insights

SVARM-IQ demonstrates state-of-the-art performance across multiple metrics. In experiments involving Language Models and Vision Transformers, the algorithm consistently achieved lower Mean Squared Error (MSE) and higher precision (Prec@10) compared to existing methods like SHAP-IQ and standard permutation sampling.

One of the most significant findings is the algorithm's budget efficiency. SVARM-IQ exhibits a "steep increase" in explanation quality even at very low evaluation budgets. In specific vision tasks, the algorithm produced explanations nearly identical to the ground truth using only 7.6% of the evaluations required for an exact calculation. Furthermore, the authors provide theoretical guarantees, proving that SVARM-IQ is an unbiased estimator and offering non-asymptotic bounds on approximation error, providing a level of mathematical reliability often missing in heuristic XAI methods.

Beyond numerical accuracy, SVARM-IQ enables better qualitative interpretation of model behavior. For example, while first-order attributions might identify various parts of a dog's face as important, second-order interactions reveal why those parts are significant in combination—such as how the model relies on the specific interaction between the eyes and mouth to identify a breed.

Limitations and Future Work

Despite its strengths, the algorithm faces a challenge regarding space complexity, as the number of strata that must be stored in memory grows exponentially with the interaction order ($k$). While $k=2$ or $k=3$ is sufficient for most human-centric explanations, higher-order interactions may require "coarser" stratification strategies that group multiple coalition sizes together.

Future research will also explore adapting kernel-based regression techniques to the SVARM-IQ framework. While SVARM-IQ is highly efficient for most CIIs, the authors noted that kernel-based methods currently perform better specifically for the FSI index, suggesting a potential area for hybrid methodological development.

Summary updated

BibTeX
@inproceedings{kolpaczki2024svarm,
  author = {Patrick Kolpaczki and Maximilian Muschalik and Fabian Fumagalli and Barbara Hammer and Eyke Hüllermeier},
  title = {{SVARM-IQ: Efficient Approximation of Any-order Shapley Interactions through Stratification}},
  booktitle = {International Conference on Artificial Intelligence and Statistics},
  year = {2024},
  url = {https://openreview.net/forum?id=uieevZh4G0},
}
Figure