Model predicts continuous patient health changes using clinical history

Learning Continuous Patient Trajectories from Electronic Health Records

Machine Learning

Summary

Electronic health records capture patients' health over time, but the data is irregular and incomplete. The authors created a new model called EHRFlow that uses patient history to better predict future health events continuously over time. This model works even when observations are irregular and can forecast health conditions at any future time. Tests using both simulated and real patient data showed EHRFlow improves accuracy compared to previous methods. It can also simulate how treatments might affect a patient's health without needing a separate outcome model.

What this means in practice

  • For hospital data teams: Forecast patient diagnoses and clinical events more accurately using past health records and continuous-time modeling.
  • For pharmaceutical analytics teams: Simulate the effects of drug treatments on patient health trajectories without needing task-specific outcome models.

Authors

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

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.