NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

EHR2Path: Scalable Modeling of Longitudinal Health Trajectories with LLMs

Chantal Pellegrini, Ege Özsoy, David Bani-Harouni, Matthias Keicher, Nassir NavabOpenReview 2026 · Submission to ICLR 2026 · Rejected

TL;DR

EHR2Path is a novel framework that uses Large Language Models (LLMs) to simulate entire "patient pathways"—the longitudinal trajectory of a patient's health during a hospital stay. By introducing a Masked Summarization Bottleneck, the authors compress massive, heterogeneous medical histories into a few "summary tokens," allowing the model to predict future vitals, lab results, and clinical outcomes with 625x more context efficiency than standard text-based models.

What Problem Does This Paper Address?

Electronic Health Records (EHRs) are a chaotic mix of structured data (vitals, labs), categorical codes (diagnoses), and unstructured text (clinical notes). Most existing AI models in healthcare are "narrow": they are trained to predict a single outcome, like mortality or a specific diagnosis, often ignoring the rich temporal context of the patient's journey.

Furthermore, modeling a patient's full history is a "long-context" nightmare. A single hospital stay can generate thousands of data points. Standard LLMs have token limits and quadratic scaling costs that make processing a patient's entire history computationally prohibitive. The gap the authors tackle is creating a holistic, scalable simulation of health trajectories that can handle diverse data types over long periods.

Methods

The authors propose a two-stage architecture centered around a unified natural language representation:

  1. Unified Text Representation: Instead of using abstract medical codes, all data (vitals, medications, reports) is converted into structured text (e.g., "Heart Rate: 1: 80"). This allows the LLM to leverage its pre-trained semantic understanding of medical concepts.
  2. Masked Summarization Bottleneck: This is the core innovation. To handle long histories, the model divides the record into sections. A Summary Model processes these sections and compresses them into a small set of embedding tokens ($N=8$). A custom attention mask ensures that the final "Pathway Model" can only see these summary tokens, forcing the model to learn a task-relevant, highly compressed representation of the past.
  3. The Pathway Model: Based on the Qwen-0.5B architecture, this model takes the current state and the summary embeddings to predict the state at time $t+1$.
  4. Iterative Simulation: Because the model predicts the next step in the same text format as the input, it can be "rolled forward" to simulate a patient's future (e.g., forecasting the next 24 hours of a stay).
  5. Length-of-Stay (LOS) Indicator: To prevent the model from simulating "infinite" hospital stays, they append a countdown timer that helps the model learn when a discharge event is likely.

Datasets

The study uses the MIMIC-IV database, one of the largest and most comprehensive publicly available EHR datasets.

  • Scope: It covers ~300,000 patients across Emergency Departments (ED), general hospital wards, and Intensive Care Units (ICU).
  • Complexity: The authors integrated 22 different tables and 20 ICU chart event categories, preserving real-world noise and missing data rather than over-cleaning the set.

Key Insights and Ideas

  • Semantic > Symbolic: By using natural language names for features instead of ID codes, the model treats "Heart Rate" as a concept it already "knows" from its pre-training, rather than a random variable it has to learn from scratch.
  • Task-Focused Compression: Unlike standard autoencoders that try to compress data so it can be perfectly reconstructed, the Masked Summarization Bottleneck is trained to keep only the information necessary to predict the future. This "information bottleneck" approach discards noise and focuses on clinical relevance.
  • Simulation as a Foundation Task: The authors argue that if you can simulate a trajectory accurately, you can derive any specific outcome (like mortality or length of stay) from that simulation. This makes the model a "foundation" for many downstream clinical tasks.
  • Extreme Efficiency: The summary mechanism achieves up to 625x compression. This allows the model to "remember" weeks of data that would otherwise exceed the token limit of almost any standard LLM.

Key Results

  • Next-Step Accuracy: EHR2Path-Summ (the summary-based variant) outperformed text-only models in predicting the next hour of clinical events, particularly for frequent events.
  • Superior Simulation: In 24-hour "rollouts," the combined model (E2P-S+T) consistently ranked first or second across nine different clinical tasks, including forecasting lab values and ICU vitals.
  • Crushing Baselines: It significantly outperformed ETHOS (a specialized timeline transformer) on the full MIMIC-IV dataset, largely because ETHOS struggled with the high-dimensional, heterogeneous nature of the data that the LLM-based EHR2Path handled with ease.
  • Outcome Prediction: When fine-tuned for specific tasks like "Imminent Mortality" or "ED Admission," EHR2Path outperformed specialized state-of-the-art models like MEME and REMed.

Limitations and Future Work

  • Single-Center Data: The model was developed and tested solely on MIMIC-IV (Beth Israel Deaconess Medical Center). The authors acknowledge that generalizability to other hospital systems with different demographics or protocols remains to be proven.
  • Short-Term Focus: The current work focuses on acute hospital stays. Expanding this to "lifetime" health trajectories (chronic disease progression over decades) is the next logical, albeit much more difficult, step.
  • Compounding Errors: Like all autoregressive simulators, small errors in the first few hours of a simulation can "snowball" over a 24-hour window, though the authors found this degradation to be moderate.

Summary updated

BibTeX
@misc{pellegrini2026ehr,
  author = {Chantal Pellegrini and Ege Özsoy and David Bani-Harouni and Matthias Keicher and Nassir Navab},
  title = {{EHR2Path: Scalable Modeling of Longitudinal Health Trajectories with LLMs}},
  year = {2026},
  url = {https://openreview.net/forum?id=SEkfuZtf75},
  howpublished = {OpenReview},
  note = {Submitted to ICLR 2026},
}
Figure