Machine learning generalizability across healthcare settings: insights from multi-site COVID-19 screening

Jenny Yang, Andrew A. S. Soltan, David A. CliftonNpj Digit. Medicine 2022

TL;DR

This paper tackles the critical challenge of making machine learning models developed in one hospital setting work effectively in others, a problem exacerbated by data privacy regulations. They propose and evaluate three methods for adapting pre-trained models, finding that transfer learning significantly improves performance, demonstrating the crucial role of site-specific customization for robust healthcare AI.

What Problem Does This Paper Address?

Machine learning (ML) holds immense promise for healthcare, but a major hurdle is ensuring models generalize well beyond the specific hospital or dataset they were trained on. This "generalizability gap" is particularly pronounced in healthcare due to strict patient data privacy regulations, which often prevent researchers from accessing and testing models on external patient cohorts. Even when models perform well locally, they can fail dramatically in new settings due to differences in patient demographics, data collection protocols, and even subtle variations in how data is processed. This limits the real-world impact and reproducibility of ML in medicine. The paper specifically addresses the challenge of adopting ready-made models in new settings, where full retraining from scratch might be impractical due to data limitations or computational resources.

Methods

The authors introduce and compare three distinct strategies for adapting a pre-trained, single-site ML model for use in a new, independent hospital setting:

  1. "As-is" Application: The simplest approach, where a pre-trained model is directly applied to new data without any modifications. This assumes the model is already generalizable enough.
  2. Threshold Adjustment: This method takes the output probabilities from a ready-made model and adjusts the decision threshold using site-specific validation data. This allows for tuning the model's sensitivity or specificity to better suit the new environment without altering the underlying model weights.
  3. Transfer Learning (Fine-tuning): This approach involves taking a pre-trained model and further training a subset of its layers (or the entire model, in this case, a shallow network) on site-specific data. This allows the model to adapt its learned features to the nuances of the new dataset.

These methods were evaluated against two baseline models: a model trained on data from a single site (internal validation) and a model trained on combined data from all sites (multi-site training). A key aspect of their methodology was a rigorous testing protocol designed to mimic real-world scenarios where original training data, preprocessing pipelines, and code are not shared.

Datasets

The study utilized electronic health record (EHR) data from four independent UK National Health Service (NHS) Trusts for COVID-19 screening. The trusts included:

  • Oxford University Hospitals (OUH)
  • Portsmouth University Hospital NHS Trust (PUH)
  • University Hospitals Birmingham NHS Foundation Trust (UHB)
  • Bedfordshire Hospitals NHS Foundation Trust (BH)

Data was split into training, validation, and test sets for each site. Notably, the OUH dataset included both pre-pandemic and early COVID-19 wave data, allowing for a more robust evaluation of model adaptation. The preprocessing of test sets was performed independently of the training data to simulate real-world external validation.

Key Insights and Ideas

  • Site-specific data clustering is real: Visualizations (t-SNE) revealed distinct clusters for data from different hospitals, highlighting that training data is often biased towards site-specific features (e.g., annotation methods, equipment). This underscores the need for adaptation.
  • "As-is" is rarely optimal: Directly applying a model trained at one site to another without any adjustments generally yielded the lowest performance, emphasizing that models often fail to generalize without customization.
  • Threshold adjustment offers a quick fix: While not achieving the highest performance, adjusting the decision threshold proved to be a simple and effective way to quickly adapt a model's sensitivity or specificity to a new site, making it a practical option when computational resources or data availability are limited.
  • Transfer learning is powerful: Fine-tuning a pre-trained model using site-specific data, even with a limited subset of the training data, consistently yielded the best predictive performance among the ready-made model adaptation strategies. This demonstrates the value of leveraging prior knowledge.
  • Site-specific customization is crucial: Across all ready-made model adaptation methods, models that incorporated site-specific data (threshold adjustment and transfer learning) outperformed the "as-is" approach, reinforcing the importance of tailoring models to new environments.

Key Results

  • All tested methods achieved clinically effective Negative Predictive Values (NPVs) greater than 0.959, meaning they were good at ruling out COVID-19.
  • Transfer learning achieved the best results among the ready-made model adaptation strategies, with mean Area Under the Receiver Operating Characteristic (AUROC) scores ranging from 0.870 to 0.925 across the test sites. These performances were comparable to the baseline site-specific models.
  • Applying models "as-is" and using threshold adjustment resulted in lower mean AUROCs compared to transfer learning, though they still performed reasonably well, especially in terms of sensitivity.
  • The study demonstrated that transfer learning significantly improved performance compared to applying models "as-is" and performing threshold adjustment individually (p < 0.05).

Limitations and Future Work

  • Dataset Size for Transfer Learning: The transfer learning approach from the BH dataset (which had the fewest patients) showed lower performance, suggesting that very small training datasets can still pose challenges for generalization.
  • Catastrophic Forgetting: When performing transfer learning, there's a risk of the neural network "forgetting" previously learned information if the new data is significantly different. The authors used a small learning rate to mitigate this but suggest exploring techniques like freezing select network weights, especially for deeper models.
  • Imputation Methods: The study used population median imputation for missing data. The authors acknowledge that the nature of missing data can reflect biases (e.g., access to care) and suggest exploring other imputation methods to better account for site-specific differences.
  • Understanding Distribution Shifts: While the study identified distribution shifts, further work is needed to understand the specific drivers of these shifts (social, behavioral, genetic factors) and how to best address them, potentially through adversarial frameworks.
  • Future Directions: The authors suggest that future work could explore freezing select network weights in transfer learning and developing adversarial frameworks to train models unbiased towards certain features. They also emphasize the need for further research into understanding the drivers of distribution shifts.

Summary updated

Abstract

As patient health information is highly regulated due to privacy concerns, most machine learning (ML)-based healthcare studies are unable to test on external patient cohorts, resulting in a gap between locally reported model performance and cross-site generalizability. Different approaches have been introduced for developing models across multiple clinical sites, however less attention has been given to adopting ready-made models in new settings. We introduce three methods to do this—(1) applying a ready-made model “as-is” (2); readjusting the decision threshold on the model’s output using site-specific data and (3); finetuning the model using site-specific data via transfer learning. Using a case study of COVID-19 diagnosis across four NHS Hospital Trusts, we show that all methods achieve clinically-effective performances (NPV &gt; 0.959), with transfer learning achieving the best results (mean AUROCs between 0.870 and 0.925). Our models demonstrate that site-specific customization improves predictive performance when compared to other ready-made approaches.
BibTeX
@inproceedings{yang2022machine,
  author = {Jenny Yang and Andrew A. S. Soltan and David A. Clifton},
  title = {{Machine learning generalizability across healthcare settings: insights from multi-site COVID-19 screening}},
  booktitle = {Npj Digit. Medicine},
  year = {2022},
  url = {https://openreview.net/forum?id=On6uKKuIoO},
}

Loading related content...

Figure