An adversarial approach for the robust classification of pneumonia from chest radiographs

Joseph D. Janizek, Gabriel G. Erion, Alex J. DeGrave, Su-In LeeCHIL 2020

Abstract: While deep learning has shown promise in the domain of disease classification from medical images, models based on state-of-the-art convolutional neural network architectures often exhibit performance loss due to dataset shift. Models trained using data from one hospital system achieve high predictive performance when tested on data from the same hospital, but perform significantly worse when they are tested in different hospital systems. Furthermore, even within a given hospital system, deep learning models have been shown to depend on hospital- and patient-level confounders rather than meaningful pathology to make classifications. In order for these models to be safely deployed, we would like to ensure that they do not use confounding variables to make their classification, and that they will work well even when tested on images from hospitals that were not included in the training data. We attempt to address this problem in the context of pneumonia classification from chest radiographs. We propose an approach based on adversarial optimization, which allows us to learn more robust models that do not depend on confounders. Specifically, we demonstrate improved out-of-hospital generalization performance of a pneumonia classifier by training a model that is invariant to the view position of chest radiographs (anterior-posterior vs. posterior-anterior). Our approach leads to better predictive performance on external hospital data than both a standard baseline and previously proposed methods to handle confounding, and also suggests a method for identifying models that may rely on confounders.

Introduction

Deep learning models for medical imaging often exhibit high performance in laboratory settings but fail to generalize in clinical environments. This phenomenon is frequently driven by dataset shift, where a model learns to rely on "shortcuts" or confounders specific to its training site rather than genuine pathology.

A prominent example in chest radiography is the radiograph view position. Sicker patients are often imaged using portable "Anterior-Posterior" (AP) scans in hospital beds, while healthier patients typically undergo "Posterior-Anterior" (PA) scans at a dedicated station. If a model learns that "AP view = Pneumonia," it may achieve high internal accuracy without analyzing the patient's lungs. When deployed to a different hospital with different protocols, this shortcut fails, leading to a collapse in predictive performance.

Methods

The authors propose a proactive approach to domain adaptation using adversarial deconfounding. The framework consists of two competing components:

  1. The Classifier: A standard DenseNet-121 architecture trained to predict pneumonia from chest radiographs ($X$).
  2. The Adversary: A three-layer neural network that attempts to predict a known confounder—specifically the radiograph view ($V$)—from the output score of the classifier.
Causal graph illustrating the relationships between pathology (Y), attributes (A), view (V), and the image (X).

These networks are trained using a minimax optimization strategy. The classifier aims to minimize pneumonia prediction error while simultaneously maximizing the adversary's error. This forces the model to produce a pneumonia score that is mathematically independent of the view position, compelling the classifier to ignore visual cues of the scan type in favor of anatomically relevant features.

Datasets and Confounder Analysis

The study utilizes two massive, publicly available datasets: the CheXpert dataset (Stanford) for training and the MIMIC-CXR dataset (MIT) for external testing. Both datasets use identical pathology labels and automated labeling algorithms, allowing for a controlled comparison of generalization across institutions.

Preliminary analysis revealed that standard CNNs are "super-predictors" of nuisance variables. As shown in the ROC curves below, models can predict a patient's sex and radiograph view with near-perfect accuracy from raw pixels. More importantly, the pneumonia scores generated by standard models (dashed lines) remain highly predictive of the view position, indicating significant confounding.

ROC curves showing that models can predict nuisance variables (AP/PA and M/F) from raw data, and that pneumonia scores from standard models are confounded by view position.

Results and Discussion

The adversarial approach significantly improved out-of-hospital generalization. While the standard baseline experienced a performance drop of nearly 0.09 AUROC when moving from internal to external data, the adversarial model remained stable, with a drop of only 0.01.

Method Source (Internal) AUROC Target (External) AUROC
Standard Baseline 0.791 0.703
Adversarial (Ours) 0.747 0.739
Instance Weighting 0.685 0.648
Covariate Regression 0.793 0.715

This stability comes with a "robustness vs. accuracy" trade-off: the adversarial model performed slightly worse on its internal training data because it was forced to ignore predictive (though non-causal) shortcuts. However, its superior performance on external data suggests it is a more reliable tool for clinical deployment.

Future work may involve extending this framework to handle "unknown unknowns"—confounders not explicitly labeled in the training data—and integrating non-image clinical data to further disentangle radiographic evidence from institutional labeling bias.

Summary updated

BibTeX
@inproceedings{janizek2020adversarial,
  author = {Joseph D. Janizek and Gabriel G. Erion and Alex J. DeGrave and Su-In Lee},
  title = {{An adversarial approach for the robust classification of pneumonia from chest radiographs}},
  booktitle = {CHIL},
  year = {2020},
  url = {https://openreview.net/forum?id=1CfqtSIRDkO},
}
Figure