Research
Adaptive Test-Time Training for Predicting Need for Invasive Mechanical Ventilation in Multi-Center Cohorts
Adaptive Test-Time Training for Predicting Need for Invasive Mechanical Ventilation in Multi-Center Cohorts Overview Research area: Machine learning for clinical time-series / electronic health record

- arXiv
- 2512.06652
- Published
- 2025-12-07
- Authors
- Xiaolei Lu, Shamim Nemati
AI summary
Adaptive Test-Time Training for Predicting Need for Invasive Mechanical Ventilation in Multi-Center CohortsOverview
Research area: Machine learning for clinical time-series / electronic health record (EHR) based prediction, specifically test-time adaptation (test-time training, TTA/TTT) for domain shift in multi-center ICU cohorts.
Technical level: Advanced. The paper combines information-theoretic error bounds, self-supervised pretext tasks, prototype learning, and Partial Optimal Transport (POT), and assumes familiarity with domain adaptation terminology.
Scope: The paper introduces AdaTTT, a source-free adaptive test-time training framework that predicts the need for invasive mechanical ventilation (IMV) 24 hours in advance and is evaluated across three ICU cohorts (two institutional sites and MIMIC-IV).
What This Paper Is About
Machine learning models that predict which ICU patients will need invasive mechanical ventilation often lose accuracy when deployed at a new hospital, because patient populations, clinical practices, and EHR systems differ from the training site. The paper's goal is to let a pretrained model adapt itself on the fly, using only unlabeled test-time inputs at the moment of prediction, without access to labeled target-domain data or expensive retraining.
Key Contributions
-
Information-theoretic error bounds for test-time training. The authors derive a bound showing that test-time prediction error is constrained by the conditional uncertainty between the main task and the auxiliary (self-supervised) task, which they use to motivate how auxiliary tasks should be designed.
-
Dynamic, feature-aware self-supervised learning. Two pretext tasks — Reconstruction and Masked Feature Modeling — are combined with a dynamic masking strategy whose masking probabilities are derived from global feature relevance scores for the main task, so masked features are the ones that matter clinically. Training uses a two-phase schedule: a warm-up phase with a fixed prior mask probability of 0.5, followed by an adaptive phase where relevance scores are updated each epoch; masking probabilities continue to be refined at every test-time gradient step.
-
Prototype learning plus Partial Optimal Transport (POT). Learned source-domain prototypes act as stable anchors, and POT allows flexible partial matching between test-time features and prototypes (implemented by augmenting the test feature with k-1 perturbed duplicates so the problem becomes a standard optimal transport problem), limiting overfitting to noisy or site-specific samples.
-
Multi-center evaluation with ablations. AdaTTT is benchmarked against nine TTA/TTT baselines and two ablations of itself (PriTTT, which keeps only mask-probability updates, and DynTTT, which keeps only adaptive distribution matching) on three ICU cohorts, reporting both AUC and Brier score.
Main Findings
-
AdaTTT achieves the top AUC on every test site. Site A: 85.02; Site B: 84.10; MIMIC-IV: 77.17. For comparison, TEST (no adaptation) scored 84.01, 83.75 and 75.28 respectively.
-
Improvements hold in calibration as well as discrimination. AdaTTT achieved Brier scores of 0.086 on Site A and 0.085 on Site B versus 0.089 and 0.089 for TEST, and 0.106 on MIMIC-IV.
-
Only some baselines come close, and only on individual sites. SAR was closest to AdaTTT on Site A (84.30 ± 0.04), and CoTTA was competitive on MIMIC-IV (76.60 ± 0.05), but both remained below AdaTTT on those cohorts. T3A performed better on MIMIC-IV (76.10 ± 0.03) than on Site A (82.50 ± 0.04), consistent with its classifier-only adjustment being unable to correct representation shift.
-
Both components contribute. PriTTT (84.61 Site A; 83.98 Site B; 76.84 MIMIC-IV) and DynTTT (84.54; 83.84; 76.79) each improved over TTT and TTT++, but only their combination produced the most consistent AUC and Brier gains across sites.
-
AUC improves steadily with more test-time iterations. Across all sites, AdaTTT showed stable and consistent AUC improvement as gradient updates increased from 1 to 5 iterations, while PriTTT and DynTTT fluctuated, particularly on Site B.
-
Sequential (non-reset) updating degrades over time. Under a sequential update mechanism, performance initially improved with short-term adaptation (reaching 80.27% AUC on MIMIC-IV) but then gradually deteriorated as updates accumulated across a larger patient population, attributed to accumulated adaptation noise.
-
Computational overhead is modest. The average execution time of a single gradient update during test-time training was 0.29s, and it remained at 0.26s when the prototype size was increased from 4 to 16.
-
Risk scores rise as intubation approaches. For a Site A patient, early predictions trended lower but risk escalated approaching the intubation event within 24 hours, reflecting dynamic adaptation.
Methodology in Plain English
The model has a shared encoder, a main classification head that predicts IMV need, and a self-supervised head. During training, the encoder learns both to predict the clinical outcome and to solve two auxiliary puzzles: reconstructing input features, and predicting deliberately masked features. The masking is not random — features that the main task relies on most (measured through a relevance score based on the product of the gradient of the main-task output and the feature value, normalized across features) are masked more often, so the auxiliary task stays aligned with the clinical goal.
To keep the model from overfitting to a single patient at deployment, the authors learn a small set of prototypes (k = 4 in the experiments) summarizing the source population, plus a regularization term that prevents all features collapsing onto one prototype. At test time the encoder is updated for a few gradient steps per input (five, referred to as iterations) using the self-supervised loss plus an optimal transport cost that partially matches the test representation to the prototypes. Sinkhorn is used with entropic regularization ε = 0.1, up to 1000 Sinkhorn iterations, and a mini-batch size equal to the prototype count. After each instance, encoder weights are restored to the pretrained state (the standard reset protocol), so no information carries across patients.
The evaluation is retrospective. The development cohort is 24,943 ICU encounters at Site A (2016–2023) with 1,308 positive cases (IMV prevalence 5.2%). Test cohorts are Site A (2024, 1,835 encounters, 104 positives, 5.7%), Site B (2023–2024, 2,564 encounters, 141 positives, 5.5%), and MIMIC-IV, which originally contains 35,534 encounters with an IMV prevalence of 15.4% and was randomly downsampled to 2,069 encounters (244 positives, 11.8%). Performance is reported as AUC with mean ± standard error over 20 independent test-time training runs, alongside Brier score.
Why This Matters
Impact on research. The paper argues that existing test-time adaptation methods designed for computer vision transfer poorly to ICU EHR data: per-encounter batches are tiny (undermining batch-normalization statistics), pseudo-labeling struggles with class imbalance and temporal nonstationarity, clustering assumptions break under irregular sampling and missingness, and classifier-only adaptation cannot fix representation shift. It also distinguishes its source-free, on-the-fly setting from pretraining/offline alignment approaches such as MaskTab, PhyMask and SPOT, which require source data and extended training. The information-theoretic bound gives a principled argument for why the auxiliary task must be tied to the clinical target rather than left feature-agnostic.
Real-world applications:
- Early warning for ICU respiratory deterioration, flagging patients likely to need intubation within 24 hours so clinicians can intervene proactively.
- Cross-hospital deployment of a model trained at one institution, reducing the performance drop seen when transferring between sites (the paper cites roughly a 12% AUC drop for a respiratory failure prediction model trained at UC San Diego Health and evaluated on an external ICU cohort).
- Resource planning for ventilator availability and staffing across hospital systems.
- Risk stratification in settings where target-site labels are unavailable or cannot be collected, since adaptation uses only unlabeled test inputs.
Industry relevance. The approach fits real-time clinical decision support products, as the paper notes that EHR-based systems such as Composer have shown real-world impact (a before-and-after study at two emergency departments reported increased sepsis bundle compliance and reduced in-hospital mortality). The reported 0.29s per gradient update and stability as prototype size grows from 4 to 16 suggest the additional computation is not a major deployment barrier.
Future Directions
- Handling extreme conditional shifts. The authors explicitly acknowledge that the method may be sensitive to extreme shifts in p(Y|X), such as changes in clinical practice patterns, and flag this as an important direction for future work.
- Reducing prototype-based overhead. Prototype-based adaptation adds moderate computational overhead at test time, which the authors identify as an unresolved challenge.
- Extending to secondary clinical outcomes. The conclusion states that additional experiments were added on secondary outcomes including acute kidney injury (AKI) and in-hospital mortality, showing similar trends, though no numerical results for these outcomes appear in the provided content.
- Solving long-horizon sequential adaptation. Since the sequential (non-reset) update mechanism improved initially and then degraded with accumulated adaptation noise, developing methods that retain the benefits of short-term adaptation without long-run drift remains open.
Target Audience
This paper is aimed primarily at machine learning researchers working on domain adaptation, test-time adaptation, and source-free methods, and at clinical AI researchers and informaticists who deploy predictive models across multiple hospital systems. Readers need comfort with information theory, optimal transport, and self-supervised learning to follow the methodology and theoretical sections; the experimental results and ablation structure are accessible to a broader applied ML audience interested in healthcare.
Authors’ abstract
Accurate prediction of the need for invasive mechanical ventilation (IMV) in intensive care units (ICUs) patients is crucial for timely interventions and resource allocation. However, variability in patient populations, clinical practices, and electronic health record (EHR) systems across institutions introduces domain shifts that degrade the generalization performance of predictive models during deployment. Test-Time Training (TTT) has emerged as a promising approach to mitigate such shifts by adapting models dynamically during inference without requiring labeled target-domain data. In this work, we introduce Adaptive Test-Time Training (AdaTTT), an enhanced TTT framework tailored for EHR-based IMV prediction in ICU settings. We begin by deriving information-theoretic bounds on the test-time prediction error and demonstrate that it is constrained by the uncertainty between the main and auxiliary tasks. To enhance their alignment, we introduce a self-supervised learning framework with pretext tasks: reconstruction and masked feature modeling optimized through a dynamic masking strategy that emphasizes features critical to the main task. Additionally, to improve robustness against domain shifts, we incorporate prototype learning and employ Partial Optimal Transport (POT) for flexible, partial feature alignment while maintaining clinically meaningful patient representations. Experiments across multi-center ICU cohorts demonstrate competitive classification performance on different test-time adaptation benchmarks.