Debiasing Counterfactuals In the Presence of Spurious Correlations

Amar Kumar, Nima Fathi, Raghav Mehta, Brennan Nichyporuk, Jean-Pierre R. Falet, Sotirios A. Tsaftaris, Tal Arbel · DOI

Abstract

Deep learning models in medical imaging often rely on "spurious correlations"—visual shortcuts like medical devices or hospital-specific artifacts—rather than actual pathology. This paper introduces a novel framework that integrates debiasing classifiers with counterfactual image generation to ensure models focus on clinically relevant markers. By proposing the Spurious Correlation Latching Score (SCLS), the researchers provide a quantitative method to measure how much a model relies on these shortcuts. Experiments on the RSNA and CheXpert datasets demonstrate that using Group Distributionally Robust Optimization (Group-DRO) significantly reduces the model's reliance on artifacts, producing more clinically valid counterfactual explanations.

Introduction

Deep learning models are notoriously "lazy" learners, often achieving high accuracy by identifying unintended patterns in data. In clinical settings, this manifests as a model identifying a patient as "sick" because it detects a pacemaker or a specific chest tube, rather than the underlying disease. These confounders, or spurious correlations, pose a significant risk to the reliability of AI in healthcare.

While explainability tools like Grad-CAM highlight which regions of an image influence a prediction, they do not provide a mechanism to correct the underlying bias. Counterfactual explanations—which generate a version of an image that would change the model's prediction (e.g., "How would this X-ray look if the patient were healthy?")—offer a deeper look into a model's logic. However, if a model is biased, its counterfactuals will also be biased. This research addresses the need for a unified framework that both exposes and mitigates these biases during the training process.

Methodology

The authors propose an end-to-end framework consisting of three core components designed to move beyond standard Empirical Risk Minimization (ERM), which often ignores minority subgroups in favor of average accuracy.

1. Debiasing with Group-DRO

Instead of standard training, the framework utilizes Group Distributionally Robust Optimization (Group-DRO). This technique minimizes the maximum loss across predefined subgroups. By forcing the model to perform well even on "minority" groups—such as sick patients who do not have a pacemaker—the model is discouraged from using the pacemaker as a shortcut for the disease.

2. Counterfactual Generation via Cycle-GAN

The framework integrates a Cycle-GAN architecture to synthesize counterfactual images. The classifier provides supervision to the generator, ensuring that the generated "healthy" version of an image is perceived as healthy by the model. This setup allows researchers to visualize exactly what the model believes constitutes a change in clinical status.

3. The Spurious Correlation Latching Score (SCLS)

To quantitatively measure success, the authors introduced the Spurious Correlation Latching Score (SCLS). This metric utilizes a separate, pre-trained artifact detector ($d$). If the counterfactual generation process modifies the artifact (e.g., digitally removing a pacemaker to "cure" the patient), the SCLS increases. A low SCLS indicates that the model has successfully ignored the artifact and focused on the actual pathology.

Experimental Setup and Datasets

The framework was evaluated using two distinct datasets:

  • Modified RSNA Pneumonia Detection Challenge: To create a controlled environment, the authors added a synthetic artifact (a small black dot) to 90% of the "sick" images. This allowed for precise measurement of how easily a model latches onto a simple visual shortcut.
  • CheXpert: A real-world dataset focused on "Pleural Effusion." In this scenario, actual medical devices (pacemakers, chest tubes) served as the naturally occurring spurious correlations.

Key Results

The results demonstrated a clear distinction between standard ERM models and the proposed debiased framework.

In the CheXpert dataset, the SCLS dropped from 0.76 in the standard ERM model to 0.22 in the Group-DRO model. This quantitative shift indicates that the debiased model was significantly less likely to "latch" onto medical devices when making predictions. Furthermore, the Group-DRO classifier maintained high accuracy across minority subgroups where the standard model's performance typically plummeted.

Qualitatively, visual heatmaps and counterfactual images supported these findings. While the standard model's counterfactuals attempted to erase medical devices, the debiased model's counterfactuals focused on lung opacity and the costophrenic angle—the true clinical indicators of pleural effusion.

Discussion and Future Work

This research shifts the role of counterfactuals from post-hoc explanations to active validation tools for debiasing. It highlights that standard metrics for counterfactuals, such as similarity (SSIM), are often blind to bias; a model can achieve high similarity while still relying on clinically useless shortcuts.

However, limitations remain. The current implementation of Group-DRO requires researchers to have prior knowledge of potential spurious correlations to label subgroups. Future research should focus on "unsupervised" debiasing techniques that do not require explicit labels. Additionally, exploring more modern architectures, such as Vision Transformers or Diffusion-based generators, could further refine the precision of these counterfactual explanations. By ensuring AI looks at the disease rather than the pacemaker, this framework represents a critical step toward trustworthy clinical deployment.

Summary updated

BibTeX
@inproceedings{kumar2023debiasing,
  author = {Amar Kumar and Nima Fathi and Raghav Mehta and Brennan Nichyporuk and Jean-Pierre R. Falet and Sotirios A. Tsaftaris and Tal Arbel},
  title = {{Debiasing Counterfactuals In the Presence of Spurious Correlations}},
  booktitle = {CLIP/FAIMI/EPIMI @ MICCAI},
  year = {2023},
  doi = {10.1007/978-3-031-45249-9\_27},
}
Figure