Skip to main content
QUICK REVIEW

[Paper Review] An empirical study of the effect of background data size on the stability of SHapley Additive exPlanations (SHAP) for deep learning models

Han Yuan, Mingxuan Liu|arXiv (Cornell University)|Apr 24, 2022
Explainable Artificial Intelligence (XAI)Computer Science15 citations
TL;DR

This empirical study investigates how background data size affects the stability of SHapley Additive explanations (SHAP) for deep learning models. Using the MIMIC-III dataset and three-layer ANNs, the authors demonstrate that SHAP values and variable rankings fluctuate significantly with small background datasets but stabilize as sample size increases, with a U-shaped reliability pattern favoring extreme (most/least) important variables. Larger background datasets improve explanation stability, suggesting users should prioritize size for trustworthy interpretability.

ABSTRACT

Nowadays, the interpretation of why a machine learning (ML) model makes certain inferences is as crucial as the accuracy of such inferences. Some ML models like the decision tree possess inherent interpretability that can be directly comprehended by humans. Others like artificial neural networks (ANN), however, rely on external methods to uncover the deduction mechanism. SHapley Additive exPlanations (SHAP) is one of such external methods, which requires a background dataset when interpreting ANNs. Generally, a background dataset consists of instances randomly sampled from the training dataset. However, the sampling size and its effect on SHAP remain to be unexplored. In our empirical study on the MIMIC-III dataset, we show that the two core explanations - SHAP values and variable rankings fluctuate when using different background datasets acquired from random sampling, indicating that users cannot unquestioningly trust the one-shot interpretation from SHAP. Luckily, such fluctuation decreases with the increase of the background dataset size. Also, we notice an U-shape in the stability assessment of SHAP variable rankings, demonstrating that SHAP is more reliable in ranking the most and least important variables compared to moderately important ones. Overall, our results suggest that users should take into account how background data affects SHAP results, with improved SHAP stability as the background sample size increases.

Motivation & Objective

  • To investigate the impact of background dataset size on SHAP explanation stability for deep learning models.
  • To quantify fluctuations in SHAP values and variable rankings across different background sample sizes.
  • To evaluate the reliability of SHAP-based variable rankings using exact (BLEU) and fuzzy (Jaccard) similarity measures.
  • To provide practical guidance on selecting optimal background dataset sizes for robust model interpretation.

Proposed method

  • Empirically evaluated SHAP explanations using random background datasets of varying sizes (100 to 1000) sampled from the MIMIC-III dataset.
  • Computed instance-level SHAP values via DeepExplainer, using the background dataset to estimate prior expectation (P_bg).
  • Calculated model-level variable importance as the sum of absolute SHAP values across all instances.
  • Assessed variable ranking stability using BLEU score (exact order comparison) and Jaccard index (fuzzy set similarity).
  • Applied statistical analysis to quantify fluctuation in SHAP values and rankings across 100 independent simulations per sample size.
  • Used central limit theorem reasoning to explain convergence of background distributions with increasing sample size.

Experimental results

Research questions

  • RQ1How does background dataset size affect the stability of SHAP values in deep learning model interpretation?
  • RQ2To what extent do variable rankings derived from SHAP fluctuate across different background datasets of varying sizes?
  • RQ3Is there a U-shaped pattern in the reliability of SHAP variable rankings, indicating higher stability for extreme (most/least) vs. moderately important variables?
  • RQ4What is the optimal background dataset size for achieving stable and trustworthy SHAP explanations?
  • RQ5How can users estimate computational cost and select a representative background dataset within budget constraints?

Key findings

  • SHAP values and variable rankings exhibit significant fluctuation when using small background datasets (e.g., 100 samples), indicating low stability.
  • Stability of SHAP explanations increases with larger background datasets, with BLEU and Jaccard scores improving monotonically from 100 to 1000 samples.
  • A U-shaped pattern in BLEU and Jaccard scores indicates that SHAP is most reliable for ranking the most and least important variables, with lower reliability for moderately important ones.
  • At 1000 background samples, the BLEU score reached 0.818 and the Jaccard index reached 0.924 (average), indicating high stability in variable rankings.
  • The study suggests that using the full training dataset as a background dataset may be optimal, though computational cost increases linearly with sample size.
  • A pilot experiment with 100 samples can be used to estimate computational cost for larger datasets, with complexity scaling linearly as m/100 × C_100.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.