Pretraining EHR Foundation Models with Patient-Aware Sampling

📅 2026-07-24
📈 Citations: 0
Influential: 0
📄 PDF
🤖 AI Summary
This work addresses a critical limitation in conventional autoregressive pretraining for electronic health records (EHRs), where trajectories from multiple patients are concatenated into a single global sequence, leading to training windows that intermingle data across individuals and allowing patients with longer records to dominate the optimization process—introducing significant bias. The study presents the first systematic investigation into the impact of sequence construction strategies in EHR foundation models and proposes Patient Sampling, a novel approach that constructs sequences on a per-patient basis during pretraining. By employing controlled random sampling, this method ensures balanced contribution of training signals across all patients. Evaluated within an autoregressive language modeling framework on MIMIC-IV v2.2 and v3.1, Patient Sampling consistently outperforms the standard Global Stream baseline across multiple downstream clinical tasks, achieving notable improvements in both Macro AUROC and AUPRC.
📝 Abstract
Autoregressive foundation models for electronic health records (EHRs) typically inherit pretraining methods from language modeling, where patient trajectories are concatenated into a single token stream and windows are sampled from that stream. In EHR data, this choice is consequential: windows may mix multiple patients, and patients with longer records contribute more optimization updates, potentially introducing bias. We propose Patient Sampling, a pretraining sequence-construction method that allows us to control how training signal is distributed across patients. We compare this method to the standard approach, which we refer to as Global Stream. We show that stochastic Patient Sampling with controllable weighting improves performance on real-world EHR data. Across downstream clinical tasks on MIMIC-IV v2.2 and v3.1, Patient Sampling improves Macro AUROC and AUPRC over the Global Stream baseline. These results identify training and validation sequence construction as important and underexplored design choices for autoregressive EHR foundation models.
Problem

Research questions and friction points this paper is trying to address.

Electronic Health Records
Foundation Models
Pretraining Bias
Patient Sampling
Autoregressive Modeling
Innovation

Methods, ideas, or system contributions that make the work stand out.

Patient Sampling
EHR foundation models
autoregressive modeling
sequence construction
clinical prediction
J
Joshua Placidi
1Dept. of Computing, Imperial College London, London, United Kingdom; 2Dept. of Bioengineering, Imperial College London, London, United Kingdom; 3UKRI Centres in AI for Health, United Kingdom
Y
Yuxuan Liu
1Dept. of Computing, Imperial College London, London, United Kingdom; 2Dept. of Bioengineering, Imperial College London, London, United Kingdom; 3UKRI Centres in AI for Health, United Kingdom
J
Jinpei Han
1Dept. of Computing, Imperial College London, London, United Kingdom; 2Dept. of Bioengineering, Imperial College London, London, United Kingdom
Marek Rei
Marek Rei
Associate Professor, Imperial College London
Artificial IntelligenceLanguage ModelingMachine LearningNatural Language Processing
A. Aldo Faisal
A. Aldo Faisal
Professor in AI & Neuroscience, Imperial College; Chair in Digital Health, Universität Bayreuth
AI for HealthcareReinforcement LearningNeurotechnologyComputational NeuroscienceRegulation