Evaluation of Domain Generalization and Adaptation on Improving Model Robustness to Temporal Dataset Shift in Clinical Medicine

Lin Lawrence Guo, Stephen Pfohl, Jason Fries, Alistair E. W. Johnson, Jose Posada, Catherine Aftandilian, Nigam H. Shah, Lillian SungmedRxiv 2021

Abstract

Temporal dataset shift—performance degradation caused by changes in healthcare practices, technology, and patient demographics over time—poses a significant challenge to the deployment of machine learning models in clinical settings. This study evaluates whether advanced algorithms, specifically Domain Generalization (DG) and Unsupervised Domain Adaptation (UDA), can proactively mitigate these shifts. Using the MIMIC-IV database, researchers benchmarked these algorithms against standard Empirical Risk Minimization (ERM) across four clinical tasks: mortality, long length of stay, sepsis, and invasive ventilation. The results indicate that while temporal shift significantly impacts model performance—particularly in sepsis prediction—DG and UDA algorithms fail to consistently outperform standard ERM. These findings suggest that purely data-driven robustness techniques may be insufficient for clinical applications without the integration of domain-specific knowledge.

Introduction

In clinical medicine, the environment in which a machine learning model operates is rarely static. Changes in clinical guidelines, electronic health record (EHR) systems, and evolving patient populations create a phenomenon known as temporal dataset shift. When a model is trained on historical data, its predictive accuracy often decays as it encounters "future" data that reflects these systemic changes.

To address this, researchers have proposed algorithms designed to learn "invariant" features—patterns that remain stable across different environments. This study investigates two primary frameworks: Domain Generalization (DG), which seeks to find stable patterns across multiple historical time periods, and Unsupervised Domain Adaptation (UDA), which uses unlabeled data from the target time period to adjust the model. The goal was to determine if these sophisticated approaches could provide a more robust alternative to standard training methods.

Methods

Data and Cohort

The study utilized the MIMIC-IV database, comprising 53,150 ICU patients admitted to Beth Israel Deaconess Medical Center between 2008 and 2019. To simulate the passage of time, the data was partitioned into four distinct year groups: 2008–2010, 2011–2013, 2014–2016, and 2017–2019.

Experimental Design

The researchers evaluated three training paradigms using feedforward neural networks:

  1. Baseline (ERM[08-10]): Models were trained using Empirical Risk Minimization on the earliest time block and evaluated on all subsequent blocks to measure the natural decay of performance.
  2. Domain Generalization (DG): Algorithms including Invariant Risk Minimization (IRM) and GroupDRO were trained on data from 2008–2016, organized by year groups, to identify time-invariant features.
  3. Unsupervised Domain Adaptation (UDA): Algorithms such as Adversarial Learning (AL) and CORAL leveraged unlabeled data from the 2017–2019 target period to align the model’s internal representations with the new distribution.

Performance was measured using the Area Under the Receiver Operating Characteristic curve (AUROC), Area Under the Precision-Recall curve (AUPRC), and absolute calibration error.

Results

The Impact of Temporal Shift

The baseline experiments confirmed that temporal shift is a pervasive issue. Sepsis prediction was identified as the most vulnerable task; a model trained on 2008–2010 data saw its AUROC drop by as much as 0.090 (95% CI, 0.080-0.101) when applied to the 2017–2019 cohort. This decline is likely attributable to significant shifts in clinical definitions (e.g., the introduction of Sepsis-3) and treatment protocols over that decade.

Clinical Consequences

To quantify the real-world impact, the authors simulated a scenario involving 100 consecutively admitted patients. When the outdated sepsis model (ERM[08-10]) was applied to the 2017–2019 population, it resulted in one additional false-negative (missed case) among 11 patients with sepsis and seven additional false-positives (false alarms) compared to its original performance in 2008–2010.

Failure of Robustness Algorithms

Despite their theoretical advantages, DG and UDA algorithms did not yield meaningful improvements over standard ERM. When compared to an ERM model trained on the full 2008–2016 period (ERM[08-16]), the performance difference for DG and UDA models was negligible, ranging from -0.003 to 0.050 in AUROC. In most cases, simply including more historical data via standard ERM was as effective as, or more effective than, using specialized robustness algorithms.

Discussion

The failure of DG and UDA to outperform standard training suggests that temporal shift in medicine is not merely a statistical nuisance but often a structural change. These shifts represent fundamental alterations in how data is captured and how medicine is practiced. Purely data-driven algorithms struggle to distinguish between "spurious" correlations that will change and "causal" relationships that remain stable without external guidance.

Limitations

This study was limited by the 3-year granularity of the MIMIC-IV year groups, which may mask more rapid shifts. Additionally, as a single-center study, the results may not fully capture the complexity of shifts that occur when moving between different hospital systems.

Conclusion

This benchmarking study demonstrates that current Domain Generalization and Unsupervised Domain Adaptation algorithms do not yet provide a reliable solution for mitigating temporal dataset shift in clinical AI. For the foreseeable future, maintaining model safety will require active performance monitoring and the potential integration of causal domain knowledge to help models navigate the evolving landscape of modern healthcare.

Summary updated

BibTeX
@misc{guo2021evaluation,
  author = {Lin Lawrence Guo and Stephen Pfohl and Jason Fries and Alistair E. W. Johnson and Jose Posada and Catherine Aftandilian and Nigam H. Shah and Lillian Sung},
  title = {{Evaluation of Domain Generalization and Adaptation on Improving Model Robustness to Temporal Dataset Shift in Clinical Medicine}},
  year = {2021},
  doi = {10.1101/2021.06.17.21259092},
  howpublished = {medRxiv},
}
Figure