Statistical Significance of Feature Importance Rankings

Jeremy Goldwasser, Giles Hooker

TL;DR

Popular feature attribution methods like SHAP and LIME suffer from significant instability: rerunning them often yields different "top" features due to Monte Carlo sampling noise. This paper introduces hypothesis-testing frameworks grounded in selective inference to verify whether the top-$K$ feature rankings (or top-$K$ sets) are statistically reliable with a user-specified confidence level ($1 - \alpha$). The authors also design two adaptive sampling algorithms—SPRT-SHAP and StableSHAP—that dynamically focus computation on ambiguous feature pairs to guarantee stable explanations.

What Problem Does This Paper Address?

In high-stakes domains like healthcare, finance, and criminal justice, practitioners rely on feature attribution methods to understand model predictions. In practice, researchers rarely care about the exact numerical attribution score; they care about the ranking—specifically, identifying the top-$K$ most impactful features (e.g., the top 5 risk factors for a disease).

However, local methods (SHAP, LIME) and global metrics (LOCO, permutation importance) rely on Monte Carlo approximations or finite data samples. As a result, random seed variations can completely reshuffle which features appear in the top spots. Prior attempts to establish statistical significance either used loose, ultra-conservative multiple-testing bounds (e.g., Holm’s or Bonferroni adjustments inflating $p$-values by $O(d^2)$) or relaxed the goal to vague "$\epsilon$-approximate" top-$K$ sets.

Methods

The paper unifies attribution scores under an asymptotic normality and unbiasedness framework, leveraging selective inference techniques for Gaussian data:

  1. Retrospective Rank and Set Verification:
  2. Top-$K$ Ranks (Procedure 1): Successively tests whether the $i$-th observed feature mean exceeds all lower-ranked means conditioned on it winning. Rather than generic multiple-testing corrections, it evaluates tail mass under a truncated normal distribution. Testing continues until a null hypothesis cannot be rejected at level $\alpha$.
  3. Top-$K$ Set (Procedure 2): When internal ordering among the top-$K$ does not matter, it tests whether all $K$ top elements exceed all $d - K$ remaining elements.
  4. Sequential Probability Ratio Test (SPRT-SHAP):
  5. Standard $p$-values become invalid under optional stopping (sampling until a test passes). To sample continuously, the authors derive an anytime-valid SPRT likelihood ratio test statistic ($T_{ij}$) in closed form, allowing KernelSHAP to stop as soon as top-$K$ ranks are statistically guaranteed.
  6. Adaptive Resampling (StableSHAP):
  7. Because SPRT can be conservative, StableSHAP uses Shapley Sampling (where features are estimated independently). When a pairwise comparison fails to reach significance, the algorithm computes an analytical sample-size estimate ($n'_i, n'_j$) scaled by feature variance, discards the ambiguous pair's previous data to maintain statistical independence, and resamples until significance is reached.
  8. Stabilized LIME:
  9. Adapts the S-LIME framework to guarantee stability along the Least Angle Regression (LARS) path using a Bonferroni-corrected threshold ($\alpha / 2K$).

Datasets

The authors evaluated neural network classifiers (two-layer feedforward networks with 50 hidden units) across five UCI Machine Learning repository benchmarks:

  • Adult Census Income (32,561 rows, 12 features)
  • Portuguese Bank Marketing (45,211 rows, 16 features)
  • BRCA (572 rows, 20 features)
  • German Credit (1,000 rows, 20 features)
  • Wisconsin Breast Cancer (WBC) (569 rows, 30 features)

Key Insights and Ideas

  • Selective Inference Avoids Over-Correction: Standard multiple-testing corrections destroy statistical power because there are $O(d^2)$ pairwise comparisons. Conditioning directly on the selection event isolates the parameter of interest as a truncated normal variable, avoiding unnecessary penalties.
  • Adaptive Computation Allocation: Traditional Shapley Sampling allocates an equal sample budget across all $d$ features. StableSHAP demonstrates that clear winners (e.g., a dominant feature) need minimal samples, while compute is dynamically channeled into high-variance or closely contested rank boundaries.
  • Fragility of Default Explanations: The authors found that under standard SHAP settings at $\alpha = 0.05$, even the single top-ranked feature could not be statistically verified on over 25% of inputs, demonstrating the severe reproducibility hazard of unverified attributions.

Key Results

  • Rigorous Error Control: Across all 60 retrospective test configurations (Table 1), the empirical family-wise error rate (FWER) across 30 test inputs (evaluated over 50 runs each) never exceeded the nominal threshold $\alpha$ (tested at 0.05, 0.1, and 0.2).
  • Higher Power than Baselines: In retrospective evaluations against Holm-adjusted tests (Neuhof & Benjamini, 2024), the proposed method consistently identified a higher number of stable top ranks.
  • Computational Efficiency: StableSHAP achieved target stability within practical sample budgets (often within 1,000–3,000 samples for top-2 rankings) and converged substantially faster than SPRT-SHAP, which exhibited wider sample-count variance due to the strictness of anytime-valid testing.

Limitations and Future Work

  • Independence Assumption: The theoretical derivations assume feature attribution estimators are mutually independent. While KernelSHAP exhibits weak correlation, it still controlled the empirical FWER; however, incorporating formal correlation requires strong assumptions about conditional mean rankings.
  • SPRT Conservatism: Because SPRT must remain valid under infinite optional stopping, it can demand prohibitive sample budgets for closely spaced means (resulting in occasional timeouts/non-convergence). Future work could leverage group-sequential boundaries (e.g., Pocock or O'Brien-Fleming) that restrict stopping to fixed checkpoint intervals.
  • Heuristic Sample Bounds: The sample size formulas in StableSHAP rely on plug-in sample variance estimates and assume the runner-up dominates the rejection threshold.

Summary updated

BibTeX
@inproceedings{goldwasser2025statistical,
  author = {Jeremy Goldwasser and Giles Hooker},
  title = {{Statistical Significance of Feature Importance Rankings}},
  booktitle = {Conference on Uncertainty in Artificial Intelligence},
  year = {2025},
  url = {https://openreview.net/forum?id=32BLljqMbd},
}
Figure