Provably Stable Feature Rankings with SHAP and LIME

Jeremy Goldwasser, Giles Hooker · DOI

Introduction

Feature attribution methods like SHAP and LIME have become standard tools for interpreting "black-box" machine learning models in high-stakes domains such as healthcare and finance. However, these methods rely on stochastic Monte Carlo sampling, which introduces inherent noise. Consequently, running the same algorithm twice on the same input can yield different feature rankings—a phenomenon that undermines the reproducibility and trustworthiness of AI explanations. This paper addresses this "jitter" by proposing a rigorous statistical framework to verify feature rankings with high-probability guarantees ($1-\alpha$).

Methods: Statistical Verification of Rankings

The authors treat feature importance scores as random variables and introduce two primary verification procedures:

  1. Top-K Ranks: Verifies the exact ordering of the top $K$ features.
  2. Top-K Set: Verifies that a specific set of $K$ features are the most important, regardless of their internal order.

To implement these procedures efficiently, the paper introduces StableSHAP, an adaptive resampling approach. Unlike uniform sampling, StableSHAP identifies "ambiguous pairs"—features with scores too close to rank confidently—and focuses computational resources on them.

Adaptive sampling budget across features in the Adult dataset.

As shown in the figure above, StableSHAP's efficiency stems from its ability to stop sampling "clear winners" early. For instance, in the Adult dataset, the feature 'Marital Status' often requires far fewer samples to confirm its rank than more ambiguous features like 'Sex' or 'Education-Num.'

Additionally, the authors propose SPRT-SHAP, which utilizes the Sequential Probability Ratio Test (SPRT). This allows for "optional stopping," where sampling continues only until a pre-defined confidence threshold is reached, ensuring error rates remain bounded without requiring fixed sample sizes.

Experimental Evaluation

The proposed methods were evaluated using neural network classifiers across five benchmark datasets from the UCI repository: Adult Census Income, Portuguese Bank, BRCA (gene expression), Wisconsin Breast Cancer (WBC), and German Credit. These datasets represent a range of feature dimensions (12 to 30) and sample sizes, providing a robust testbed for statistical power and efficiency.

Key Results and Insights

The experiments demonstrate that the proposed framework provides guaranteed error control. Across 60 experimental settings, the empirical Family-Wise Error Rate (FWER) consistently remained below the user-defined threshold $\alpha$. By using selective inference techniques tailored for Gaussian data, the authors achieve higher statistical power than traditional corrections like Holm’s method, effectively avoiding the "winner's curse" where noise is mistaken for significance.

Selection frequency of top-5 feature rankings across different attribution methods.

As illustrated in the selection frequency analysis, standard methods like LIME and Shapley Sampling exhibit significant instability at lower ranks (4th and 5th). In contrast, the proposed stable variants maintain significantly higher reliability. Notably, the study revealed that for the German Credit dataset, even the top-ranked feature could not be statistically verified at $\alpha=0.05$ for over 25% of inputs, highlighting how misleading unverified "standard" rankings can be.

Conclusion

By moving from simple point estimates to a framework of statistical significance, this work provides a path toward more reliable and reproducible model explanations. While adaptive budgeting significantly improves efficiency, these methods still require more total computation than naive runs. Future work may explore relaxing the independence assumptions of feature importance estimates to handle highly correlated data more effectively.

Summary updated

BibTeX
@inproceedings{goldwasser2025provably,
  author = {Jeremy Goldwasser and Giles Hooker},
  title = {{Provably Stable Feature Rankings with SHAP and LIME}},
  booktitle = {Conference on Uncertainty in Artificial Intelligence},
  year = {2025},
  url = {https://openreview.net/forum?id=32BLljqMbd},
}
Figure