"Is your explanation stable?": A Robustness Evaluation Framework for Feature Attribution

Yuyou Gan, Yuhao Mao, Xuhong Zhang, Shouling Ji, Yuwen Pu, Meng Han, Jianwei Yin, Ting Wang

Abstract

Deep Neural Networks (DNNs) are increasingly deployed in high-stakes environments, yet their decision-making processes remain largely opaque. Feature attribution methods aim to provide transparency by identifying influential input features, but these explanations often suffer from a "reliability crisis," where minor input perturbations or adversarial attacks lead to drastically different attribution maps. This paper introduces MeTFA (Median Test for Feature Attribution), a method-agnostic framework that applies statistical hypothesis testing to the median of sampled explanations. By shifting from mean-based smoothing to median-based statistical rigor, MeTFA provides theoretical guarantees on stability with significantly lower computational overhead, effectively filtering noise and defending against adversarial manipulation.

1. Introduction: The Reliability Crisis in AI Explanations

As Deep Neural Networks (DNNs) are integrated into critical domains such as autonomous driving and security, the need for interpretable AI has never been greater. Feature attribution methods—which highlight the pixels in an image or words in a sentence that drive a model's prediction—are the primary tools used to achieve this transparency.

However, these explanations are notoriously unstable. A phenomenon known as the "reliability crisis" reveals that adding imperceptible random noise to an input can result in a completely different explanation map, even when the model’s underlying prediction remains unchanged. Furthermore, malicious actors can craft "explanation-oriented attacks" that manipulate the visual output of an attribution map without altering the classification. While existing smoothing techniques like SmoothGrad attempt to mitigate this, they often require a massive number of samples to provide theoretical guarantees, making them computationally expensive for real-world applications.

2. The MeTFA Framework

MeTFA addresses these challenges by treating feature attribution not as a single deterministic score, but as a statistical distribution. The framework introduces three core innovations:

2.1 Median over Mean

Traditional smoothing methods typically calculate the average (mean) of multiple explanation samples. MeTFA instead focuses on the median. The median is statistically more robust to outliers and extreme values—precisely the kind of artifacts introduced by random noise or adversarial perturbations.

2.2 Hypothesis Testing and Efficiency

By treating the sampling process as a series of Bernoulli trials, MeTFA utilizes binomial tests to provide exact confidence bounds. This statistical approach allows the framework to achieve high reliability with a very small number of samples (as few as 10), whereas mean-based methods often rely on the Central Limit Theorem, which requires significantly more data to converge.

2.3 Functional Mapping

MeTFA generates two distinct types of attribution maps:

  1. MeTFA-significant map: Uses one-sided hypothesis testing to categorize features into three states: "significantly important," "significantly unimportant," or "undecided," based on a user-defined significance threshold.
  2. MeTFA-smoothed map: Uses two-sided testing to calculate confidence intervals, producing a stabilized version of the original explanation that filters out non-robust features.

3. Robustness Metrics: RI and RD

To evaluate the effectiveness of explanations in a neighborhood of similar inputs, the authors introduce two new metrics: Robust Insertion (RI) and Robust Deletion (RD). Unlike standard faithfulness metrics that evaluate a single point, RI and RD measure how consistently an explanation identifies important features across a range of perturbations, providing a more realistic measure of trust.

4. Experimental Evaluation

The framework was rigorously tested across three distinct domains:

  • Image Classification: Evaluated on the ILSVRC2012 (ImageNet) validation set using VGG16, ResNet50, and DenseNet169 architectures.
  • Text Classification: Tested on the Toxic Comment Classification and IMDb Movie Reviews datasets using LSTM models.
  • Semantic Segmentation: Applied to the CityScapes dataset using PSPNet to identify "context bias" (e.g., determining if a model identifies a "rider" based on the person or the presence of a bike).

5. Key Results and Insights

5.1 Enhanced Stability and Faithfulness

MeTFA-smoothed explanations demonstrated significantly lower variance (mstd) compared to vanilla attribution methods. For instance, when applied to the RISE algorithm on DenseNet169, MeTFA reduced instability by approximately 50%. Crucially, this stability does not come at the cost of accuracy; MeTFA maintains the "faithfulness" of the original methods while significantly improving "robust faithfulness."

5.2 Adversarial Defense

MeTFA proves to be an effective defense against sophisticated manipulation attacks such as MASK and LRP-attack. Because these attacks typically target the gradient of a single input point, the sampling and median-based approach of MeTFA effectively "breaks" the attack, recovering plausible explanations where vanilla methods fail.

5.3 Context Bias Detection

In semantic segmentation tasks, MeTFA-significant maps were able to isolate context bias using extremely small regions (e.g., just 2% of pixels for "tree" classes) while maintaining over 99% faithfulness. This allows researchers to pinpoint exactly when a model is relying on background correlations rather than the object of interest.

6. Conclusion and Future Work

MeTFA is a powerful, method-agnostic "wrapper" that can be applied to almost any existing explanation algorithm, including LIME, RISE, and ScoreCAM. It does not create explanations from scratch but rather refines them by removing noise and quantifying uncertainty. While it cannot fix a fundamentally flawed underlying algorithm, it makes "weak explanations stronger."

Future research will explore the application of MeTFA to more complex noise distributions and optimize the parallelization of the sampling process to further reduce latency for real-time AI systems.

Summary updated

BibTeX
@inproceedings{gan2022is,
  author = {Yuyou Gan and Yuhao Mao and Xuhong Zhang and Shouling Ji and Yuwen Pu and Meng Han and Jianwei Yin and Ting Wang},
  title = {{"Is your explanation stable?": A Robustness Evaluation Framework for Feature Attribution}},
  booktitle = {CCS},
  year = {2022},
  doi = {10.1145/3548606.3559392},
}
Figure