NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

A Meaningful Perturbation Metric for Evaluating Explainability Methods

Daniel Cohen-Or, Hila Chefer, Lior Wolf

A Meaningful Perturbation Metric for Evaluating Explainability Methods

Deep Neural Networks (DNNs) are often criticized as "black boxes," making it difficult to understand the logic behind their predictions. To address this, researchers use attribution methods (such as Grad-CAM) to generate heatmaps that highlight the pixels most influential to a specific classification. However, a critical question remains: how do we verify if these heatmaps are truly faithful to the model's internal logic?

The Problem: The Out-of-Distribution Trap

The standard way to evaluate an attribution method is through perturbation. In this process, the pixels identified as "important" are deleted or blurred, and the resulting drop in model confidence is measured. The assumption is that if the model's confidence plummets, the attribution method correctly identified the key features.

However, this approach suffers from a major flaw: deleting or blurring pixels creates "Out-of-Distribution" (OOD) artifacts. These unnatural, noisy images are unlike anything the model encountered during training. As a result, a drop in confidence might not be due to the removal of important features, but rather because the image has become "digital garbage" that confuses the model.

Figure 1: Traditional perturbation methods often introduce noise that leads to nonsensical class changes, such as a goldfish being classified as a volcano due to salt-and-pepper artifacts.

As shown in the figure above, even minor random perturbations can cause models like ResNet and ViT to shift their predictions to entirely unrelated classes (e.g., a wing becoming a "tiger shark"). This suggests that current metrics often measure a model's sensitivity to noise rather than the actual faithfulness of an explanation.

The Solution: Stratified Inpainting

Researchers from Tel Aviv University have introduced Stratified Inpainting, a new metric that leverages generative AI to perform "meaningful" perturbations. Instead of destroying pixels, the method uses Stable Diffusion (SD) to realistically replace high-relevance pixels with content representing the model's second-highest predicted class.

For instance, if a model identifies a "Goldfish" but its second-most likely guess is "Volcano," the metric attempts to turn the goldfish-related pixels into volcano-related textures. Because the resulting image remains "In-Distribution" (plausible and realistic), a shift in the model's prediction becomes a much stronger signal that the attribution method correctly identified the defining features of the original class.

To ensure accuracy, the authors implemented a novel weighting function that compares relevance maps before and after inpainting. This confirms that the change in prediction was caused by the specific pixels modified, rather than an unintended side-effect of the generative process. Furthermore, the process was optimized to just 10 iterations, making it computationally feasible for research use.

Key Insights and Results

The study evaluated various architectures, including ResNet-50, VGG, and Vision Transformers (ViT), across ImageNet and specialized datasets. Several key findings emerged:

  • Separation from Noise: In quantitative benchmarks, Stratified Inpainting showed a significantly higher "distance" between valid attribution methods and random noise compared to traditional deletion. For VGG models, the gap was 13% higher; for binary classifiers, it reached 37%.
  • Human Alignment: A user study involving 22 participants found that humans overwhelmingly preferred the rankings produced by this new metric. When traditional metrics and Stratified Inpainting disagreed on which explanation was "best," humans chose the new metric's top pick nearly every time.
  • Architectural Robustness: The experiments highlighted that Vision Transformers (ViTs) are generally more robust to OOD perturbations than CNNs, explaining why traditional metrics occasionally appear more effective on newer architectures.

Limitations and Future Directions

While a significant step forward, the metric is currently limited by the "vocabulary" of the underlying generative model. If Stable Diffusion cannot reliably generate a specific fine-grained class, the metric cannot be applied. Additionally, while optimized, running diffusion models for evaluation is more compute-intensive than simple pixel manipulation. Future work may involve expanding the metric beyond Top-1 predictions and utilizing faster inference techniques like LCM-LoRA to reduce overhead.

Summary updated

BibTeX
@inproceedings{cohenor2025meaningful,
  author = {Daniel Cohen-Or and Hila Chefer and Lior Wolf},
  title = {{A Meaningful Perturbation Metric for Evaluating Explainability Methods}},
  booktitle = {SCIA},
  year = {2025},
  doi = {10.1007/978-3-031-95918-9\_22},
}
Figure