cs.LGOct 12, 2026

Sequence Composition in EHR Foundation Model Pretraining

Authors: Joshua Placidi, Inigo Stibbe, Alfred J. Balston, Marek Rei, A. Aldo Faisal

Organizations: Department of Computing, Imperial College London

Abstract

Autoregressive electronic health record (EHR) foundation models predict the next event token in patient trajectories: sequences of structured medical events. A typical pretraining strategy is to concatenate all trajectories into a global stream and sample token windows from it. This gives patients with longer sequences more training exposure and allows tokens to attend across patient boundaries. We argue that these choices create a misalignment between pretraining and downstream clinical tasks. To explore this, we investigate how the composition of pretraining sequences affects clinical prediction performance. Using the global-stream approach as a baseline, we propose alternative sequence composition methods that control how patient trajectories contribute to pretraining sequences. Across four MIMIC-IV v2.2 tasks, our best method improves macro AUROC, AUPRC, F1, and balanced accuracy, with relative gains of 9.3% in F1 and 2.7% in AUPRC under a fixed training recipe. We find that these gains generalize across four additional evaluation settings, including the INSPIRE and eICU-CRD datasets, with improvements in macro AUROC, AUPRC, and F1 score. Our results show that simply changing how EHR data are presented to the model during pretraining can improve downstream performance, without changing the model or collecting additional data.

Figures & tables

Appendix figures & tables13 assets

Supplementary material from the paper’s appendix.

Appendix

Explore similar work

CardsList
  1. Pretraining EHR Foundation Models with Patient-Aware Sampling

    Jul 24, 2026Joshua Placidi, Yuxuan Liu, Jinpei Han +2Longitudinal EHR ModelingElectronic Health Records

  2. Scaling Recurrence-aware Foundation Models for Clinical Records via Next-Visit Prediction

    Mar 25, 2026Haresh Rengaraj Rajamohan, Xiang Gao, Weicheng Zhu +10Longitudinal EHR ModelingElectronic Health Records

  3. EveryQuery: A Promptable Foundation Model for Clinical Prediction Tasks over Electronic Health Records

    Mar 9, 2026Payal Chandak, Gregory Kondas, Liat Antwarg Friedman +2Clinical Outcome PredictionClinical Prediction