spot_img
HomeResearch & DevelopmentNext Event Prediction: Enhancing AI's Understanding of Patient Journeys...

Next Event Prediction: Enhancing AI’s Understanding of Patient Journeys in Electronic Health Records

TLDR: Next Event Prediction (NEP) is a new framework that improves Large Language Models’ (LLMs) ability to understand and predict sequential clinical events in Electronic Health Records (EHRs). By treating EHRs as timestamped event chains and training LLMs to predict future medical events, NEP explicitly models disease progression and causal relationships. It achieves superior accuracy in tasks like oncology survival prediction and clinical diagnosis, demonstrates high versatility, and is significantly more data-efficient than existing methods, offering clinically interpretable insights.

Electronic Health Records (EHRs) are a treasure trove of patient data, but unlocking their full potential has been a challenge. Traditional methods often struggle to capture the dynamic, sequential nature of clinical events, treating patient information as static snapshots rather than evolving stories. Even advanced Large Language Models (LLMs), while powerful, have found it difficult to reason about the precise order and timing of medical events, especially for complex disease progressions.

A new research paper, “Building the EHR Foundation Model via Next Event Prediction,” introduces an innovative framework called Next Event Prediction (NEP). Developed by Zekai Chen, Arda Pekis, and Kevin Brown from Standard Model Biomedicine, NEP aims to significantly enhance LLMs’ ability to understand and predict the temporal dynamics within EHRs. You can read the full paper here: https://arxiv.org/pdf/2509.25591.

Understanding Next Event Prediction (NEP)

NEP redefines how we look at EHRs. Instead of static records, it views them as continuous, timestamped chains of clinical events. Imagine a patient’s journey as a series of events – a diagnosis, a medication prescribed, a lab test result, a procedure – each with a specific time. NEP trains LLMs to predict the *next* event in this sequence, given all the preceding events. This autoregressive approach forces the model to learn not just what events are likely, but also *when* they are likely to occur and their relationship to past events.

The core idea is to fine-tune LLMs using this “next event” prediction task. This process explicitly models disease progression patterns and the causal relationships between different medical observations. The researchers used a diverse dataset of over 1.2 million patients and 200 million clinical events, primarily focusing on oncology, to train their models.

How NEP Works

The framework treats each patient’s record as a chronological sequence of events, where each event has a type (e.g., diagnosis, medication), a value (e.g., specific ICD code, drug name), and a timestamp. To ensure the model learns from all types of events, even rare ones, a smart sampling strategy is used during training. This prevents common events like routine lab tests from overshadowing more critical but less frequent diagnoses or procedures.

The LLMs, specifically Llama-3.1 and Qwen2.5 series, are fine-tuned using a technique called parameter-efficient fine-tuning (LoRA). This makes the training process more computationally efficient while still allowing the models to adapt effectively to the complex EHR data. The training involves presenting the LLM with a patient’s history and asking it to predict the subsequent clinical event, effectively turning clinical trajectories into a language modeling problem.

Impressive Results and Benefits

NEP has demonstrated remarkable superiority across various clinical prediction tasks:

  • Survival Prediction: In oncology survival prediction, NEP-8B (an 8-billion parameter version of the model) showed significant improvements, outperforming previous state-of-the-art models and general-purpose LLM embeddings. It was particularly strong in predicting outcomes for metastatic cancers, where understanding temporal progression is crucial.
  • Clinical Task Versatility: The model excelled in diverse clinical diagnosis tasks, achieving state-of-the-art performance in conditions like hypertension and celiac disease, even though it wasn’t specifically trained on these targets. This highlights its ability to generalize temporal reasoning across different medical domains.
  • Label Efficiency: One of the most significant advantages is its data efficiency. NEP-8B required significantly less training data (5-10 times less) than conventional methods to achieve comparable or better performance. This means it can learn robust patterns of clinical progression without needing vast amounts of task-specific labeled data.

The analysis also revealed that NEP provides clinically interpretable attention patterns, meaning the model’s focus aligns with known disease pathways, offering insights that clinicians can understand and trust.

Also Read:

Looking Ahead

The Next Event Prediction framework represents a significant step forward in building more intelligent and temporally aware EHR foundation models. By focusing on the fundamental temporal structure of healthcare data, NEP achieves strong generalization capabilities and reduces the reliance on extensive labeled training data. The researchers acknowledge ethical considerations, including patient re-identification risks, potential biases in healthcare delivery reflected in the data, and the need for models to adapt to evolving medical practices. Addressing these challenges through technical safeguards and continuous monitoring will be crucial for responsible clinical AI deployment.

Karthik Mehta
Karthik Mehtahttps://blogs.edgentiq.com
Karthik Mehta is a data journalist known for his data-rich, insightful coverage of AI news and developments. Armed with a degree in Data Science from IIT Bombay and years of newsroom experience, Karthik merges storytelling with metrics to surface deeper narratives in AI-related events. His writing cuts through hype, revealing the real-world impact of Generative AI on industries, policy, and society. You can reach him out at: [email protected]

- Advertisement -

spot_img

Gen AI News and Updates

spot_img

- Advertisement -