AttributionLab: Faithfulness of Feature Attribution Under Controllable Environments

Yang Zhang, Yawei Li, Hannah Brown, Mina Rezaei, Bernd Bischl, Philip Torr, Ashkan Khakzar, Kenji Kawaguchi · Submission to ICLR 2024 · Rejected

TL;DR

Evaluating whether feature attribution methods faithfully explain a neural network's true decision-making process is hindered because models trained on synthetic datasets often exploit shortcuts rather than intended ground-truth features. The authors introduce AttributionLab, a controlled testing suite where both the synthetic data and the neural network weights are manually constructed, providing guaranteed ground-truth attributions. This laboratory environment exposes critical failure modes in popular explainability methods (e.g., Integrated Gradients, DeepSHAP, LIME) and reveals major flaws in standard perturbation-based evaluation metrics.

What Problem Does This Paper Address?

Feature attribution methods (such as GradCAM, Integrated Gradients, and SHAP) aim to identify which input features drove a neural network’s prediction. However, verifying whether an explanation is faithful—meaning it accurately reflects the features the model actually used—is fundamentally difficult without a true ground truth.

Recent research tried evaluating faithfulness by training neural networks on synthetic datasets with known feature-label rules (e.g., classifying geometric shapes). The authors highlight a critical blind spot in this paradigm: the Rashomon effect. Even if a network achieves 100% accuracy on synthetic data, over-parameterization means it often learns spurious shortcuts (e.g., only looking at corner pixels) while completely ignoring intended ground-truth features. As a result, comparing an attribution map against designed dataset labels does not accurately evaluate the model’s internal reasoning.

Methods

To eliminate the gap between dataset design and model behavior, the authors built AttributionLab:

  • Manually Programmed Neural Networks: Instead of training, network weights are explicitly defined using modular ReLU building blocks (e.g., exact integer identification, color detection, and spatial accumulation modules). This guarantees that every foreground pixel contributes with known magnitude and sign to the output, directly satisfying formal Sensitivity and Symmetry axioms.
  • Simulating the "Unseen Data Effect": Trained neural networks produce erratic outputs when fed out-of-distribution (OOD) inputs. AttributionLab models this by including redundant channels that activate whenever non-specified colors are introduced.
  • Benchmarking Attribution & Evaluation Metrics: Using exact ground-truth masks, the authors evaluate:
  • Gradient and perturbation-based attribution methods (DeepSHAP, Integrated Gradients, LIME, GradCAM, GuidedBP, Occlusion, ExPerturb, IBA).
  • Common perturbation-based evaluation metrics (Insertion, Deletion, and Sensitivity-N).

Datasets

  • Multi-Color-Sum Environment (Synthetic): RGB images containing randomly shaped foreground patches (triangles, squares, circles) in distinct colors over a constant background (20, 20, 20). The network counts color pixels and predicts the dominant color.
  • Single-Color-Modulo Environment (Synthetic): Single-channel images with patches sampled from a Bernoulli distribution. The model counts active pixels and applies a modulo operation ($s \pmod N$).
  • ImageNet (Real-World): Pretrained VGG-16 and Vision Transformer (ViT-B-16) models used to verify whether synthetic findings generalize to real-world vision models.

Key Insights and Ideas

  • DeepSHAP struggles with feature sign: DeepSHAP reliably identifies relevant spatial regions (high overall precision/recall), but frequently mixes up whether a pixel contributes positively or negatively to a class.
  • Extreme sensitivity to baselines: Integrated Gradients (IG) and Occlusion depend heavily on reference baseline values. Replacing the background color baseline (20, 20, 20) with the default black baseline (0, 0, 0) causes massive precision drops and background noise due to the Unseen Data Effect.
  • LIME is only as good as its segmenter: LIME’s faithfulness depends heavily on superpixel quality. Replacing classical heuristics (Quickshift, Felzenszwalb) with the Segment Anything Model (SAM) significantly boosts attribution quality across synthetic images, VGG-16, and ViT architectures.
  • Perturbation metrics can be fundamentally misleading: Standard evaluation metrics (Insertion, Deletion, Sensitivity-N) assume model output drops reflect feature importance. In reality, perturbing pixels often creates out-of-distribution inputs ("Unseen Data Effect"), triggering unpredictable model swings that scramble attribution rankings.

Key Results

  • Metric Ranking Inconsistency: When the Unseen Data Effect is active, the Spearman rank correlation between perturbation-based metrics and ground-truth $F_1$-score collapses dramatically:
  • Insertion: drops from $0.42$ to $0.02$.
  • Deletion: drops from $0.61$ to $0.47$.
  • Sensitivity-N: drops from $0.81$ to $0.65$.
  • Baseline Accuracy: Using the true baseline ($\text{IG}^*$ and $\text{Occlusion}^*$) substantially outperforms default black baselines in precision and recall (Figure 6).
  • Single-Color Modulo Benchmark: In a clean environment without unmodeled OOD behavior, Integrated Gradients, DeepSHAP, and LRP achieve optimal performance (Insertion AUC of $0.9754$ and Deletion AUC of $0.0246$, compared to $0.4996$ / $0.5009$ for random attributions).
  • Coarse Resolution Artifacts: Latent-feature methods like GradCAM and IBA exhibit high recall but poor precision due to blurring caused by upsampling low-resolution feature maps.

Limitations and Future Work

  • Stylized Network Tasks: The synthetic architectures are hand-coded arithmetic and pixel-counting operations; while mathematically transparent, they do not fully replicate the hierarchical semantic representations of deep networks trained on natural images.
  • Scope of Modalities: Current experiments focus exclusively on computer vision tasks. The authors suggest expanding the manually engineered "lab" approach to other data modalities (natural language processing, tabular data, audio) and complex architectures.

Summary updated

BibTeX
@inproceedings{zhang2023attributionlab,
  author = {Yang Zhang and Yawei Li and Hannah Brown and Mina Rezaei and Bernd Bischl and Philip Torr and Ashkan Khakzar and Kenji Kawaguchi},
  title = {{AttributionLab: Faithfulness of Feature Attribution Under Controllable Environments}},
  booktitle = {XAIA @ NeurIPS},
  year = {2023},
  url = {https://openreview.net/forum?id=h5usKrxCH2},
}
Figure