Deep Learning Applied to Chest X-Rays: Exploiting and Preventing Shortcuts

Sarah Jabbour, David Fouhey, Ella Kazerooni, Michael W. Sjoding, Jenna Wiens

Abstract: While deep learning has shown promise in improving the automated diagnosis of disease based on chest X-rays, deep networks may exhibit undesirable behavior related to shortcuts. This paper studies how CNNs extract demographic data and proposes a transfer learning technique to force models to learn clinically relevant features by freezing a feature extractor trained on an unbiased related task.

Introduction

In medical imaging, deep convolutional neural networks (CNNs) often demonstrate impressive performance on internal datasets but fail to generalize when deployed in new clinical environments. A primary driver of this failure is the exploitation of "shortcuts"—spurious correlations in the training data that do not reflect the underlying pathology. For example, if a hospital's dataset predominantly features older patients with congestive heart failure, a model might learn to identify "old age" via bone density rather than the clinical markers of the disease. When this model is applied to a younger population, its diagnostic accuracy collapses.

Methodology: Preventing Shortcut Exploitation

To address this, the authors propose a two-stage transfer learning approach designed to decouple feature extraction from biased target labels. Using a DenseNet-121 architecture, the process is divided as follows:

  1. Source Task Pretraining: The entire network is trained on an unbiased source task, such as pneumonia diagnosis. This stage allows the model to learn a rich set of clinically relevant features.
  2. Target Task Fine-Tuning: When moving to a potentially biased target task (e.g., congestive heart failure), the feature extractor's weights are frozen. Only the final linear classification layer is trained.
The proposed two-stage training process. Stage 1 involves full training on an unbiased source task. Stage 2 freezes the feature extractor and trains only the final layer on the target task.

By restricting the trainable parameters during the second stage, the model is forced to rely on the robust clinical features learned during pretraining rather than discovering new, spurious shortcuts in the biased target dataset.

Experimental Setup and Datasets

The study utilized three primary datasets to evaluate shortcut learning and mitigation:

  • AHRF (Acute Hypoxemic Respiratory Failure): A curated cohort of 1,296 patients used for both the target task (Heart Failure) and the source task (Pneumonia), containing detailed metadata including age, sex, and race.
  • MIMIC-CXR & CheXpert: Large-scale public datasets used to establish baselines and verify the model's ability to learn demographic shortcuts across diverse populations.

Key Findings

The Visibility of Metadata

The researchers first demonstrated that CNNs are remarkably adept at extracting demographic information from chest X-rays—data that is often considered "hidden" to the human eye in this modality. Models achieved near-perfect accuracy in predicting sex (AUROC 0.96–1.00) and high accuracy for age (AUROC $\ge$ 0.90). These findings underscore how easily a model can latch onto demographic proxies if they correlate with disease labels in the training set.

Generalization Performance

The impact of bias was quantified by artificially skewing training data. Under standard full-network training on an age-skewed dataset (where older patients were more likely to have heart failure), the model's generalization AUROC on an unbiased test set was only 0.66. However, applying the proposed "last-layer fine-tuning" method on the same skewed data boosted the generalization AUROC to 0.84.

The method proved resilient even when synthetic biases (like Gaussian blur) were introduced, consistently outperforming standard training by preventing the model from "cheating" with easy-to-learn non-clinical features.

Discussion and Limitations

The study highlights that feature reuse is a powerful defense against shortcut learning. Features learned for one respiratory condition (pneumonia) are highly transferable to others (heart failure), providing a robust foundation that resists overfitting to spurious correlations. By limiting the model's capacity to learn new features on biased data, researchers can enforce the use of these robust clinical markers.

However, the authors note that this approach relies on the visual similarity between the source and target tasks. If the diagnostic features required for the target task are not captured during the unbiased pretraining phase, freezing the encoder may limit performance. Furthermore, real-world clinical data often contains complex, overlapping biases that may require more sophisticated mitigation strategies. Future research will focus on mapping the transportability of features across a wider array of diseases and demographic skews.

Summary updated

BibTeX
@inproceedings{jabbour2020deep,
  author = {Sarah Jabbour and David Fouhey and Ella Kazerooni and Michael W. Sjoding and Jenna Wiens},
  title = {{Deep Learning Applied to Chest X-Rays: Exploiting and Preventing Shortcuts}},
  booktitle = {MLHC},
  year = {2020},
  url = {https://openreview.net/forum?id=bwG5zU32P0i},
}
Figure