Right for the Wrong Reason: Can Interpretable ML Techniques Detect Spurious Correlations?

Susu Sun, Lisa M. Koch, Christian F. BaumgartnerarXiv 2023

TL;DR

Deep neural networks are notorious for exploiting spurious correlations (shortcuts) in training data, which standard performance metrics fail to detect. This paper introduces a rigorous evaluation framework to test whether interpretability methods can actually expose these faulty models. The authors find that the post-hoc method SHAP and the inherently interpretable Attri-Net reliably detect these shortcuts, while popular gradient-based methods fall short.

What Problem Does This Paper Address?

When training deep learning models—especially in medical imaging—networks often achieve high accuracy by cheating. For instance, a model might learn to detect a disease based on a hospital-specific text tag, a specific X-ray machine artifact, or the patient's age, rather than the actual pathology. This is known as shortcut learning or spurious correlation.

If your validation and test datasets contain the same artifacts as your training set, standard metrics like the Area Under the ROC Curve (AUC) will look perfect. However, the model will fail catastrophically when deployed in a new hospital. While explainable AI (XAI) methods promise to reveal why a model made a decision, previous literature offers conflicting evidence on whether they can actually flag these spurious correlations. This paper establishes a systematic framework to determine which interpretability tools can be trusted to catch a model doing the right thing for the wrong reason.

Methods

The authors developed an evaluation strategy based on injecting three types of synthetic, real-world-inspired confounders into chest X-rays at varying contamination percentages ($p \in \{0\%, 20\%, 50\%, 80\%, 100\%\}$) for positive cases:

  1. Hospital Tags: Text placed in the lower-left corner.
  2. Hyperintensities: Vertical lines mimicking foreign objects in the X-ray light path.
  3. Obstructions: An oblique occlusion at the bottom of the image.
Fig. 1. Overview. We train classifiers on datasets with three types of artificially added confounders highlighted by arrows. We then evaluate the ability of explanation tech- niques to correctly identify reliance on these confounders (shown Attri-Net [24]).

To evaluate how well an interpretability method exposes a model's reliance on these features, they introduced two quantitative metrics:

  • Confounder Sensitivity (CS): Measures whether the pixels belonging to the confounder are ranked within the top 10% of the explanation's important features.
  • Explanation Normalized Cross Correlation (NCC): Compares the explanation of an image with the confounder to the explanation of the same image without the confounder. If a model relies heavily on the shortcut, the explanation should drastically change (lower NCC) when the shortcut is removed.

They tested five post-hoc methods (Guided Backpropagation, Grad-CAM, LIME, SHAP, and Gifsplanation) on a standard ResNet50, and compared them against Attri-Net, an inherently interpretable network architecture that bases its final classification entirely on human-readable feature attribution maps.

Datasets

The experiments were conducted using chest X-ray images from the widely recognized CheXpert dataset, focusing specifically on the binary classification task for diagnosing cardiomegaly (an enlarged heart). The dataset was split into standard training (80%), validation (10%), and testing (10%) subsets before the synthetic confounders were introduced.

Key Insights and Ideas

  • The Illusion of Performance: As data contamination ($p$) increases, the classification AUC of both models climbs toward a perfect 1.0. This highlights the danger: standard performance metrics completely mask the fact that the model has stopped looking at the heart and is only looking at the artifacts.
  • Gradient-Based Failures: Popular gradient-based methods like Guided Backpropagation and Grad-CAM performed poorly. Guided Backpropagation, in particular, generated nearly identical feature attributions regardless of whether the model was relying on the true pathology or the artificial confounder.
  • Sparsity and Shape Matter: Post-hoc methods perform differently depending on the geometry of the shortcut. For example, SHAP excelled at identifying small, localized hospital tags because its superpixel approach cleanly encapsulates small regions, but it struggled with distributed artifacts like vertical hyperintensity lines.
  • Inherent Interpretability Wins on Balance: Attri-Net provided the most robust and balanced performance across all confounder types, validating the argument that building inherently interpretable models is often safer for high-stakes domains like medicine than trying to explain a black box after the fact.

Key Results

When the dataset was 100% contaminated (meaning every positive image contained a confounder), both the ResNet50 and Attri-Net achieved an AUC of ~1.0, proving they fully leveraged the shortcuts.

Fig. 2. (top row) Classification AUC of Attri-Net and Resnet50 on images containing hospital tags (left), hyperintensities (middle) or obstruction confounders (right col- umn). The classifiers were trained with a varying proportion of confounders present in the positive examples in the training set (shown on the x-axes). (bottom rows) The explanation techniques’ ability to identify confounders in terms of confounder sensitivity (middle row) and explanation NCC (bottom row, lower is better).

As shown in the quantitative results above:

  • SHAP achieved the highest Confounder Sensitivity for the "Tag" artifact, nearly reaching a perfect score of 1.0 at higher contamination levels.
  • Attri-Net consistently demonstrated high Confounder Sensitivity and a sharp drop in Explanation NCC across all three confounder types, making it the most reliable overall detector.

Qualitatively, when a confounder was present, SHAP tended to isolate only the confounder, whereas Attri-Net highlighted both the confounder and the actual cardiomegaly features, reflecting their differing internal decision-making mechanics.

Fig. 3. Explanations for one example image with and without hyperintensities con- founders. We show results for models trained on 20% (top rows) and 80% (bottom rows) confounded data points, respectively.

Limitations and Future Work

The authors note a few limitations to their study:

  • Scope of Methods: The study evaluated a select group of six popular methods. Other inherently interpretable architectures, such as CoDA-Nets, had to be excluded due to extensive hyperparameter tuning requirements.
  • Synthetic vs. Real Confounders: While the synthetic artifacts were inspired by real-world issues, actual clinical data shortcuts (like patient posture or specific hospital protocols) can be much more subtle and complex.
  • Human-in-the-Loop: The evaluation was purely algorithmic. Future work will focus on human-in-the-loop experiments to evaluate whether clinicians can successfully use these explanations to reject faulty models in practice.

Summary updated

BibTeX
@misc{sun2023right,
  author = {Susu Sun and Lisa M. Koch and Christian F. Baumgartner},
  title = {{Right for the Wrong Reason: Can Interpretable ML Techniques Detect Spurious Correlations?}},
  year = {2023},
  eprint = {2307.12344},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2307.12344},
}
Figure