Source-linked AI summary
Confounding variables can degrade generalization performance of radiological deep learning models
John R. Zech, Marcus A. Badgeley, Manway Liu, Anthony B. Costa, Joseph J. Titano, Eric K. Oermann
TL;DR
Whether radiological CNNs trained at one hospital generalize to external hospital systems remained unclear before clinical deployment. This study compared pneumonia-screening CNNs across three hospital systems and found that external performance was lower in 3 / 5 natural comparisons.
Problem
Whether radiological CNNs trained at one hospital generalize to external hospital systems remained unclear, an important question before clinical deployment.
Method
The study trained and evaluated pneumonia-screening CNNs on 158,323 chest x-rays from NIH, Mount Sinai, and Indiana, comparing internal and external test performance.
Results
3 / 5 natural comparisons showed lower external than internal performance, while CNNs identified hospital systems and departments with extremely high accuracy.
Takeaways & Limitations
CNN diagnostic performance may exploit confounding information, so estimates from hospital systems used for training may overstate likely real-world performance.
Takeaways & Limitations
The study could not fully assess which patient-population factors contributed to hospital system-specific model bias.
Abstract
from arXiv · showhide
Early results in using convolutional neural networks (CNNs) on x-rays to diagnose disease have been promising, but it has not yet been shown that models trained on x-rays from one hospital or one group of hospitals will work equally well at different hospitals. Before these tools are used for computer-aided diagnosis in real-world clinical settings, we must verify their ability to generalize across a variety of hospital systems. A cross-sectional design was used to train and evaluate pneumonia screening CNNs on 158,323 chest x-rays from NIH (n=112,120 from 30,805 patients), Mount Sinai (42,396 from 12,904 patients), and Indiana (n=3,807 from 3,683 patients). In 3 / 5 natural comparisons, performance on chest x-rays from outside hospitals was significantly lower than on held-out x-rays from the original hospital systems. CNNs were able to detect where an x-ray was acquired (hospital system, hospital department) with extremely high accuracy and calibrate predictions accordingly. The performance of CNNs in diagnosing diseases on x-rays may reflect not only their ability to identify disease-specific imaging findings on x-rays, but also their ability to exploit confounding information. Estimates of CNN performance based on test data from hospital systems used for model training may overstate their likely real-world performance.
Author summary
Pneumonia-screening CNNs showed lower external than internal performance in 3 of 5 natural comparisons and could identify acquisition site with extremely high accuracy. These findings indicate that diagnostic performance may exploit confounding information and that hospital-internal test estimates may overstate real-world performance.
- Study design: 158,323 chest x-rays from NIH, Mount Sinai, and Indiana were used to train and evaluate pneumonia-screening CNNs.The dataset included 112,120 NIH, 42,396 Mount Sinai, and 3,807 Indiana chest x-rays.
- Generalization: 3 / 5 natural comparisons showed significantly lower performance on outside-hospital x-rays than on held-out x-rays from the original hospital systems.The conclusions likewise report better internal than external performance in 3 / 5 natural comparisons.
- Confounding: Extremely high accuracy enabled CNNs to detect the hospital system and department where an x-ray was acquired and calibrate predictions accordingly.Hospital systems and departments can differ substantially in disease burden, potentially confounding disease predictions.
- Confounding: 0.861 AUC was achieved by merely sorting the joint Mount Sinai–NIH dataset by hospital system because pneumonia prevalence differed across sites.Pneumonia prevalence was 34.2% at Mount Sinai versus 1.2% at NIH and 1.0% at Indiana.
- Generalization: Pooled-site training improved performance on new pooled data from those sites but not on external data.Models trained on NIH or Mount Sinai had equivalent performance on Indiana, with p-values 0.580 and 0.27.
Introduction
The study addresses whether radiological CNNs generalize beyond the hospital systems used for training, since external performance may be lower than internal performance and overestimation could harm patients. It evaluates this question using pneumonia diagnosis on chest x-rays from three hospital systems.
- Background: Radiological CNN research has expanded toward computer-aided diagnosis across radiology, pathology, and clinical imaging.These methods were generally developed using techniques pioneered on well-characterized computer vision datasets such as ImageNet and MNIST.
- Generalization: Test-set performance assumes that the test data reflect future data encountered elsewhere, but prior computer-vision work found lower-than-believed generalization to new data.The passage contrasts internal performance on unseen data from the same system with external performance on data from elsewhere.
- Problem: No prior study had examined whether radiological CNNs generalize to external data, raising a risk that clinicians could overestimate deployed accuracy and harm patients.The concern arises when external test performance is inferior to internal test performance.
- Study aim: The study aimed to assess how well models trained at one hospital system generalized to two other hospital systems using pneumonia diagnosis on chest x-rays.The investigators selected pneumonia because of its clinical significance, common occurrence, and substantial interest, and planned comparisons across three distinct institutions.
Methods … Preprocessing: Frontal View Filtering
The study used retrospective chest-radiograph datasets from three hospital groups and filtered inconsistent frontal/lateral labels with ResNet-50 CNNs before analysis. This preprocessing produced 158,323 frontal radiographs, with high test accuracy for view classification.
- Methods: The retrospective study was approved by the Mount Sinai Health System Institutional Review Board, with patient consent waived because it posed minimal risk.
- Datasets: Three datasets came from the National Institutes of Health Clinical Center, Indiana University Network for Patient Care, and Mount Sinai Hospital.The supplied passage reports 112,120 NIH radiographs, 7,470 IU radiographs, and 48,915 MSH radiographs before subsequent filtering.
- Convolutional Neural Networks (CNNs): Classification CNNs are supervised deep learning models that take images as input and output predicted class-membership probabilities.The supplied background passage defines deep learning as algorithms using multiple feed-forward neural-network layers.
- Datasets: The NIH dataset contained only frontal chest radiographs, whereas IU and MSH datasets contained both frontal and lateral radiographs.
- Datasets: Manual review found inconsistent frontal and lateral labels in the IU and MSH datasets.The reviewed samples included 402 IU and 490 MSH radiographs.
- Preprocessing: Frontal View Filtering: ResNet-50 CNNs were trained to identify frontal radiographs using manually labeled IU and MSH images divided into training, tuning, and test groups.IU used 200 training, 100 tuning, and 102 test radiographs; MSH used 200 training, 100 tuning, and 190 test radiographs.
- Preprocessing: Frontal View Filtering: 187/190 MSH and 102/102 IU test radiographs were accurately classified as frontal or lateral.
- Preprocessing: Frontal View Filtering: Filtering the datasets to frontal radiographs left 158,323 radiographs available for analysis: 112,120 NIH, 42,396 MSH, and 3,807 IU.
Preprocessing: Generating Labels for Pathology
Pathology labels were generated differently across datasets: IU used manual curation, NIH used rule-based NLP, and MSH used manually labeled reports to train an NLP label-inference algorithm. For MSH, 405 reports spanning nine pathologies were manually labeled and split into training and test groups.
- IU radiographs were manually labeled by curators after reviewing accompanying text radiology reports.
- NIH radiographs were automatically labeled with a proprietary NLP system using parse-tree sentence expansion and hand-crafted rules based on MESH vocabulary.
- 405 MSH radiology reports were manually labeled for nine pathologies to train an NLP algorithm that inferred labels across the full dataset.
- 283 reports were assigned to training and 122 to testing when evaluating the MSH NLP algorithm.
Preprocessing: Separation of Patients Across Train / Tune / Test Groups · Preprocessing: Identifying Mount Sinai Portable Scans From Inpatient Wards and Emergency Department · Model Training
The study used fixed patient-level splits for NIH and Mount Sinai data, reserved Indiana data as an external pneumonia test set, identified Mount Sinai portable scans by department, and trained DenseNet-121 CNNs on standardized images.
- Preprocessing: Separation of Patients Across Train / Tune / Test Groups: NIH and Mount Sinai patients were separated into fixed train (70%), tune (10%), and test (20%) groups using patient identifiers.Indiana data lacked patient identifiers and was split using accession numbers when used for hospital-system detection.
- Preprocessing: Separation of Patients Across Train / Tune / Test Groups: 100% of Indiana pneumonia-detection data was reserved as an external test set.Indiana data was used for training only to detect hospital system.
- Preprocessing: Identifying Mount Sinai Portable Scans From Inpatient Wards and Emergency Department: 42,396 Mount Sinai radiographs were available, including 39,574 with portable-radiograph labels and 31,838 labeled portable.These counts describe successive subsets of the Mount Sinai radiograph cohort.
- Preprocessing: Identifying Mount Sinai Portable Scans From Inpatient Wards and Emergency Department: 31,076 Mount Sinai portable radiographs documented acquisition department, including 28,841 from inpatient wards and 2,235 from the emergency department.Department labels enabled separation of portable scans by inpatient-ward versus emergency-department acquisition.
- Model Training: All images were resized to 224 x 224 for model training.Training used PyTorch 0.2.0 and torchvision.
- Model Training: Experiments used DenseNet-121 with an additional dense layer (n=15) attached to the original bottleneck layer.Binary classification used sigmoid activation, while multiclass prediction used a linear output layer followed by softmax activation.
Internal and External Performance Testing · Hospital System and Department Prediction · Sample Activation Maps
The paper compares pneumonia CNNs trained on single-site or joint datasets, then examines whether radiographs reveal hospital-system information and which image regions support that classification. Sample activation maps quantify decisive subregions in NIH radiographs and illustrate influential features such as laterality labels.
- Internal and External Performance Testing: Three training combinations—NIH, MSH, and joint NIH-MSH—were used to assess how single-dataset models generalize relative to jointly trained models.The CNNs predicted nine overlapping diagnoses, although pneumonia was the only diagnosis of interest.
- Internal and External Performance Testing: The models predicted nine overlapping diagnoses, including pneumonia, cardiomegaly, emphysema, effusion, hernia, nodule, atelectasis, edema, and consolidation.Other diagnoses were included to improve overall model training, while evaluation focused on pneumonia prediction.
- Hospital System and Department Prediction: Additional analysis assessed whether CNNs could detect hospital system and department information and how that capability could affect pneumonia prediction.The hospital-system experiment tested whether location information was directly detectable from radiographs alone.
- Hospital System and Department Prediction: Radiographs from all three hospital systems were used to train a CNN to identify the hospital system from radiographs.This experiment was designed to assess direct detectability of location information from the radiograph itself.
- Sample Activation Maps: The study created 7x7 sample activation maps to identify locations in chest radiographs providing strong evidence for hospital-system classification.The final convolutional layer represented 7x7 = 49 subregions.
- Sample Activation Maps: For 100 NIH test radiographs, softmax probabilities were averaged for each of the 49 final-layer subregions.The analysis specifically identified NIH radiographs and used a sample of n=100 test radiographs.
- Sample Activation Maps: The analysis reported the mean, minimum, and maximum number of subregions predicting NIH decisively at probability >= 95%.It also aimed to illustrate particularly influential features, including laterality labels, in hospital-system classification.
Engineered Relative Risk Experiment
The experiment tested whether CNNs could exploit hospital-system differences in pneumonia prevalence by calibrating predictions to baseline prevalence rather than relying only on pathology findings. Engineered prevalence cohorts were used to compare internal joint MSH-NIH performance with external IU generalization.
- Motivation: The experiment assessed whether CNNs could exploit large differences in pathology prevalence between two hospital systems in the training data.The stated hypothesis concerned prevalence differences between hospital systems.
- Hypothesis: CNNs could achieve strong performance on imbalanced data from both hospital systems by calibrating predictions to each system’s baseline prevalence, but this strategy would fail on an external hospital system.The hypothesis contrasted prevalence calibration with exclusive discrimination based on direct pathology findings.
- Experimental design: Engineered prevalence cohorts differed in relative disease prevalence, maintained equal pneumonia prevalence for males and females, and preserved prior train, tune, and test splits.CNNs were trained on each cohort, and test AUCs were compared on internal joint MSH-NIH and external IU data.
Statistical Methods
Statistical comparisons used DeLong’s tests for ROC curves and χ2 tests for proportions, with p-values assessed at α=0.05.
- Statistical Methods: DeLong’s tests compared classification models using paired or unpaired ROC-curve analyses as appropriate.Statistical analysis used R 3.4, the pROC package, and scikit-learn 0.18.1.
- Statistical Methods: χ2 tests compared proportions, with all p-values assessed at an alpha of 0.05.
Results
Pneumonia CNNs often performed worse on external hospital data than on internal tests, while accurately identifying hospital systems and departments. Differences in pneumonia prevalence increased internal performance without improving external performance, consistent with exploitation of confounding information.
- Dataset characteristics: Pneumonia prevalence was 34.2% in MSH, versus 1.2% in NIH and 1.0% in IU.The MSH cohort also had a higher average patient age: 63.2 years versus 49.6 years in IU and 46.9 years in NIH.
- Internal and external performance: 3 / 5 natural comparisons showed significantly higher internal than external pneumonia-detection performance.NIH-trained CNNs had internal test AUC 0.750 versus external test AUC 0.695 at MSH, while MSH-trained CNNs had internal test AUC 0.802 versus external test AUC 0.717 at NIH; the jointly trained MSH-NIH model had internal test AUC 0.931 versus external test AUC 0.815 at IU.
- Confounder detection: 99.95% of NIH, 99.98% of MSH, and 95.59% of IU test radiographs were correctly classified by hospital system.Hospital-system predictions used features from many image regions, and 35.7 / 49 image subregions individually predicted NIH with >= 95% certainty.
- Confounder detection: 100% of inpatient and 100% of emergency-department MSH radiographs were correctly classified by department.Pneumonia prevalence was 41.1% for portable inpatient-floor radiographs versus 32.8% in the emergency department.
- Engineered prevalence experiment: Imbalanced engineered prevalence cohorts produced stronger internal performance but significantly worse external IU performance.External AUCs were 0.641 for MSH Severe, 0.650 for MSH Mild, 0.703 for NIH Mild, and 0.683 for NIH Severe; Balanced performance was 0.739.
Discussion
Pneumonia-screening CNNs did not consistently generalize to external hospital sites and could exploit site- and department-specific confounding information rather than underlying pathology alone. The discussion cautions that downsampling, dataset construction, medical-management artifacts, limited population details, and omitted clinical context can undermine model reliability and applicability.
- Generalization: Pneumonia-screening CNNs trained on one or more hospital systems did not consistently generalize to external sites or base predictions exclusively on underlying pathology.This external-site issue was distinct from ordinary train/test degradation because all comparisons used held-out test data.
- Confounding: Greater differences in pneumonia prevalence between hospital systems increased exploitation of prevalence-related signals and worsened external-dataset generalization.Site-specific metallic laterality tokens could make hospital-system identification trivial, although CNNs did not require that indicator.
- Model design: 224 x 224-pixel downsampling used for ImageNet-pretrained models may eliminate important radiographic details and increase reliance on confounding factors.The authors argue that low-resolution pretrained models are not optimal for radiological imaging.
- Confounding: 100% accuracy separated portable radiographs from inpatient wards and emergency-department radiographs in Mount Sinai data, despite significantly different pneumonia prevalences between these patient groups.This finding suggests that even customized single-site models may not control potential confounding variables.
- Limitations: External performance can be better or worse than internal performance because dataset construction and clinical data, including prevalence, severity, labeling, and protocolized variables, affect results.The study could not fully assess contributors to hospital-system-specific bias without more granular patient-population details.
- Clinical applicability: Radiologic findings alone are insufficient for diagnosing pneumonia because diagnosis also incorporates patient history and clinical presentation.The discussion proposes combining clinical data with imaging findings to better reflect radiologists’ practice.
Conclusion
Pneumonia screening CNNs performed better internally than externally in 3 of 5 natural comparisons, while pooled-site training improved performance on pooled but not external data. CNNs also identified hospital system and department, which may confound disease predictions through differences in disease burden.
- 3 / 5 natural comparisons showed better internal than external performance for pneumonia screening CNNs.The comparison evaluated performance on held-out data from original hospital systems versus chest x-rays from outside hospitals.
- Pooled-site training improved performance on new pooled data from those sites but not on external data.The sites had different pneumonia prevalence.
- CNNs robustly identified hospital system and department within a hospital, where disease burden can differ substantially and confound disease predictions.