cs.LGSep 28, 2026

Learning Continuous Patient Trajectories from Electronic Health Records

Authors: Silas Ruhrberg Estévez, Kara Liu, Christopher Chiu, Benjamin Atta Owusu, Umesh Kadam, Russ B. Altman, Mihaela van der Schaar

Organizations: University of Cambridge · Stanford University · University of Exeter

Abstract

Electronic health records provide irregular observations of latent patient states that evolve continuously over time. Recent autoregressive models condition on clinical histories to forecast future events as sequences of discrete observations. Conversely, multi-marginal flow matching provides a continuous-time formulation, but using multiple observations to supervise training paths does not itself give the learned dynamics access to preceding patient history. We introduce EHRFlow, a multi-marginal flow-matching framework that conditions on encoded patient history, thereby allowing future dynamics to depend on the patient's prior clinical trajectory. Our proposed framework accommodates irregular observation times and supports forecasting at arbitrary horizons. Across controlled synthetic benchmarks, EHRFlow improves clinical-code forecasting and latent-state recovery. On real-world clinical datasets comprising more than one million patients, including an independent external validation cohort, EHRFlow improves horizon-averaged top-5 clinical-code accuracy over autoregressive and history-independent flow-matching baselines. Finally, in a controlled counterfactual simulation, conditional guidance approximates the known effect of an antihypertensive intervention without training a task-specific outcome model.

Figures & tables

Appendix figures & tables15 assets

Supplementary material from the paper’s appendix.

Appendix

Explore similar work

CardsList
  1. ChronoMedicalWorld: A Medical World Model for Learning Patient Trajectories from Longitudinal Care Data

    May 21, 2026Jiangyuan Wang, Xuyong Chen, Junwei He +3Latent Dynamics ModelingHealthcare

  2. Pretraining EHR Foundation Models with Patient-Aware Sampling

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

  3. EHR-RAGp: Prototype-Guided Retrieval of Longitudinal Electronic Health Records for Clinical Prediction Models

    May 12, 2026Saeed Shurrab, Mariam Al-Omari, Dana El Samad +1Long-Context ModelingClinical Prediction