Abstract
Local Interpretable Model-agnostic Explanations (LIME) is a cornerstone of explainable AI, yet its reliability hinges on the quality of its locally perturbed synthetic data. This study investigates the presence of data and label shift within the LIME framework. By employing Maximum Mean Discrepancy (MMD) and fidelity metrics across text and image datasets, the authors demonstrate that LIME's synthetic instances often diverge significantly from the original training distribution. These shifts result in low-fidelity surrogate models, particularly as sample sizes increase, suggesting that current perturbation methods may produce misleading explanations.
Introduction
As machine learning models grow in complexity, the need for interpretability has led to the widespread adoption of frameworks like LIME. LIME operates by "perturbing" a single data point—tweaking its features—to create a local neighborhood of synthetic instances. A simple, interpretable surrogate model (like linear regression) is then trained on these instances to explain the complex black-box model's behavior. However, this study questions whether these synthetic instances are representative of the real-world data the model was originally trained on. If LIME generates "out-of-distribution" data, the black-box model's responses may be unpredictable, undermining the validity of the resulting explanation.
Methodology
The researchers employed a rigorous statistical approach to detect distribution shifts:
- Maximum Mean Discrepancy (MMD): A kernel-based statistical test used to determine if LIME’s perturbed samples ($Z$) come from the same distribution as the nearest neighbors in the actual training set ($X_{knn}$).
- Fidelity Metric: A measure of how effectively the simple surrogate model ($g$) mimics the complex black-box model ($f$). Low fidelity indicates that the explanation does not accurately reflect the model's logic.
- Two-Sample Testing: Hypothesis tests were conducted to statistically prove the presence of "Data Shift" (in input features) and "Label Shift" (in model predictions).
Experimental Results
The study evaluated LIME on two primary benchmarks: the 20 Newsgroups text dataset (using an SVM) and ImageNet (using the Inception V3 deep neural network).
As shown in the fidelity analysis, the surrogate models often struggle to accurately mimic the black-box models. In complex image tasks, the fidelity was consistently lower than in text classification, sometimes performing no better than a random guess. This suggests that the local linear approximations LIME relies on may not hold when the synthetic data is too far from the training manifold.
Analysis of Distribution Shift
A key finding of the research is the "Perturbation Paradox." LIME’s core mechanism—randomly toggling features on and off—is exactly what introduces significant distribution shift. In text, this creates gibberish; in images, it creates unrealistic "super-pixel" masks.
Quantitatively, the shift is nearly universal. For the Newsgroup dataset, the null hypothesis (that LIME data matches real data) was rejected for 100% of test instances once the sample size ($n$) reached 200. Surprisingly, as the number of samples increases, the MMD divergence grows. While more samples typically improve statistical power, here they only serve to highlight how statistically distinct LIME's synthetic neighborhood is from the real training data.
Conclusion
The study concludes that LIME's reliance on out-of-distribution synthetic data creates a shaky foundation for model explanations. The observed negative correlation between data shift and fidelity suggests that the more "unrealistic" the synthetic data becomes, the less reliable the explanation is. To mitigate this, the authors propose a new sampling strategy: instead of random perturbations, local neighborhoods should be constructed by sampling actual training instances near the point of interest. By using data the model has already "seen," researchers can produce explanations that are more grounded in the model's learned logic.
Summary updated