Source-linked AI summary

EHRWorld: A Patient-Centric Medical World Model for Long-Horizon Clinical Trajectories

Linjie Mu, Zhongzhen Huang, Yannian Gu, Shengqian Qin, Shaoting Zhang, Xiaofan Zhang

arXiv:2602.03569v1cs.AIcs.LG

TL;DR

Medical world models could simulate patient trajectories under clinical actions, but whether medically knowledgeable LLMs can maintain coherent states over sequential interventions remains an open question. EHRWorld combines a causal sequential model with longitudinal EHR data and is reported to outperform naive LLM baselines in long-horizon simulation. The authors identify autoregressive rollout error and unassessed downstream clinical utility as limitations.

  • Problem

    Whether LLMs with medical knowledge can simulate evolving clinical indicators and treatment outcomes remains open, while sequential interventions expose difficulties maintaining consistent patient states.

    Source: §1 · p. 2
  • Method

    EHRWorld is a patient-centric world-model family trained under a causal sequential paradigm, paired with EHRWorld-110K, a longitudinal dataset of clinical care trajectories.

    Source: §1 · p. 2
  • Results

    EHRWorld outperforms naive LLM-based baselines in long-horizon clinical simulation, with reduced error accumulation, improved stability on clinically sensitive events, and favorable reasoning efficiency.

    Source: §1 · p. 2
  • Takeaways & Limitations

    The findings underscore the importance of causally grounded, temporally evolving clinical trajectory data for reliable medical world modeling.

    Source: §1 · p. 2

    Autoregressive generation can propagate residual inaccuracies over extended rollouts, and the evaluation does not directly assess downstream clinical utility such as treatment optimization or real-world decision support.

    Source: Limitations · p. 9

Abstract

from arXiv · show

World models offer a principled framework for simulating future states under interventions, but realizing such models in complex, high-stakes domains like medicine remains challenging. Recent large language models (LLMs) have achieved strong performance on static medical reasoning tasks, raising the question of whether they can function as dynamic medical world models capable of simulating disease progression and treatment outcomes over time. In this work, we show that LLMs only incorporating medical knowledge struggle to maintain consistent patient states under sequential interventions, leading to error accumulation in long-horizon clinical simulation. To address this limitation, we introduce EHRWorld, a patient-centric medical world model trained under a causal sequential paradigm, together with EHRWorld-110K, a large-scale longitudinal clinical dataset derived from real-world electronic health records. Extensive evaluations demonstrate that EHRWorld significantly outperforms naive LLM-based baselines, achieving more stable long-horizon simulation, improved modeling of clinically sensitive events, and favorable reasoning efficiency, highlighting the necessity of training on causally grounded, temporally evolving clinical data for reliable and robust medical world modeling.

1 Introduction

The introduction frames medical world modeling as the challenge of simulating patient trajectories under interventions, which medical-knowledge LLMs struggle to do consistently. EHRWorld combines a causal sequential training paradigm with longitudinal EHR data and is reported to improve long-horizon simulation.

1 Introduction

  • Although LLMs perform well on static medical tasks, they struggle to maintain consistent patient states during sequential interventions, leading to accumulated errors in multi-step simulations.The introduction also motivates trajectory modeling by the need to reason about outcomes under alternative treatment plans for personalized care.Source: §1 · p. 2
  • EHRWorld-110K captures complete patient-care trajectories from admission to discharge, providing longitudinal data for learning patient-state evolution and intervention-conditioned transitions.The dataset comprises approximately 110,000 hospitalization episodes and 17.5 million clinical events.Source: §1 · p. 2
  • EHRWorld models clinical trajectories as a continuous sequential process, learning intervention-driven physiological transitions and updating patient states in response to clinical actions.The model is presented as a family of patient-centric medical world models trained under a causal sequential paradigm.Source: §1 · p. 2
  • EHRWorld significantly outperforms naive LLM-based baselines in long-horizon simulation, with reduced error accumulation, improved stability on clinically sensitive events, and favorable reasoning efficiency.The authors present these as results of their comprehensive evaluation.Source: §1 · p. 2

2 Related Work

Prior patient simulators and EHR models offer interaction, prediction, or trajectory generation, but the described approaches generally lack dynamic, intervention-aware state transitions. EHRWorld is positioned as a causal, dynamic model of patient-state evolution under sequential clinical interventions.

2.1 Naive LLM-based Simulation

  • Prompt-based virtual-patient systems support multiturn clinical interaction, but fixed case descriptions leave patient states static and do not model intervention-driven disease progression over time.The related-work discussion names AgentClinic, AutoMedic, CP-Env, and MAQuE as representative systems.Source: §2.1 · p. 3

2.2 EHR World Models

  • BEHRT and Med-BERT use longitudinal histories for risk estimation, but predict from fixed sequences rather than modeling state changes caused by clinical interventions.These models are characterized as passive observers in this discussion.Source: §2.2 · p. 3
  • Prior synthetic trajectory methods typically do not support state transitions conditioned on therapeutic actions, whereas EHRWorld models patient-state evolution as a causal, dynamic process under sequential interventions.The cited contrast includes rule-based Synthea and data-driven PatientSim.Source: §2.2 · p. 3

3 Data Construction Pipeline

The data pipeline turns real-world EHR records into hospitalization-level trajectories by combining static patient context with chronologically ordered clinical events. Quality filtering and diagnostic-category stratification produce the dataset and a held-out test partition.

3.1 Data Sources and Preprocessing

  • Discharge summaries are parsed for demographics and hierarchical diagnoses, while time-stamped events are organized into hospital-stay sequences and classified as inquiries or interventions.Inquiries yield explicit values; interventions aim to modify patient state without directly generating observable outcomes.Source: §3.1 · p. 3

3 Data Construction Pipeline

  • The pipeline constructs EHRWorld-110K from MIMIC-IV records by integrating static patient context with longitudinal clinical events at the hospitalization-episode level.The figure overview depicts the data-construction pipeline alongside the model’s sequential simulation loop.Source: §3 · p. 3, §3.1 · p. 3, Figure 2 · p. 4

3.2 Data Filtering and Partition

  • After quality filtering, EHRWorld-110K contains 110,513 hospitalization episodes and approximately 17.5 million clinical events, with episode events ordered chronologically.Admissions with insufficient clinical activity or incomplete records are excluded.Source: §3.2 · p. 4
  • The held-out test set contains 579 episodes, 84,010 inquiry events, 25,798 intervention events, and 1,043 unique primary and secondary diagnostic conditions.The remaining episodes are used for model training.Source: §3.2 · p. 4

4 The EHRWorld Model

EHRWorld represents simulation as sequential updates to a patient state conditioned on concurrent clinical actions. It generates observable inquiry results, records interventions as state-altering events, and conditions later predictions on the accumulated history.

4 The EHRWorld Model

  • EHRWorld formulates patient simulation as a conditional world model that explicitly tracks patient states and updates them under sequential inquiries and interventions.Simulation steps correspond to physiological timestamps, and actions may occur concurrently.Source: §4 · p. 4

4.1 Patient State Representation

  • The patient state includes a physiological timestamp, static demographics, an episode-level diagnostic profile, and the interaction history of prior clinical events.The diagnostic profile is extracted from discharge summaries and supplies episode-level clinical context.Source: §4.1 · pp. 4–5

4.2 Set-Based Conditional Generation

  • At each step, the model conditions on a set of concurrent clinical orders and generates corresponding outcomes for those actions from a shared patient state.The set-based formulation is intended to capture clinical actions that influence patient states in parallel.Source: §4.2 · p. 5

4.3 Dual-Mode Prediction Mechanism

  • EHRWorld uses dual-mode prediction: inquiries such as tests or examinations produce explicit observed values, while interventions are recorded without an immediate observable outcome.Intervention events update simulation context and can influence future clinical predictions.Source: §4.3 · p. 5

4.4 Deterministic State Transition

  • After outcomes are generated, the interaction history is deterministically updated so subsequent predictions condition on prior inquiries and interventions.The passage describes this history update as supporting consistent long-horizon simulation of disease progression under clinical decision-making.Source: §4.4 · p. 5

5 Experiments

Across five evaluations, EHRWorld is assessed for full-trajectory fidelity, stability against rollout errors and abrupt shifts, and qualitative trajectory accuracy. It outperforms baselines on long-horizon simulation, with the strongest reported retention and smaller performance degradation under high-sensitivity shifts.

5.1 Experimental Setup

  • The experiment fine-tunes EHRWorld-4B, -8B, and -14B on EHRWorld-110K and compares them with closed-source, general-purpose, and medical LLM baselines.Evaluation covers continuous-variable S@k and SMAPE, clinical-status F1, and classification precision, recall, and F1; baselines use default inference configurations without task-specific fine-tuning.Source: §5.1 · pp. 5–6

5.2 Main Results: Full Trajectory Prediction

  • EHRWorld achieves Avg Scores of 0.755–0.765 versus 0.618 for GPT-5.2 and 0.574 for Gemini-3.0-Pro-Preview in full-trajectory simulation.The full-trajectory comparison is reported in Table 1; the paper also reports lower Avg Scores of 0.401–0.506 for medical baselines MedGemma and Baichuan-M2.Source: Table 1 · p. 6, §5.2 · p. 7
  • Scaling Qwen3-30B-A3B-Instruct to Qwen3-235B-A22B-Instruct raises S@25 only from 0.645 to 0.647, while EHRWorld-4B reaches 0.703 and exceeds Gemini-3.0-Pro-Preview at 0.681.The authors interpret this contrast as evidence that causal sequential training matters more than parameter scaling for patient-dynamics modeling.Source: §5.2 · p. 7

5.3 Next-Step vs. Full Trajectory Prediction

  • EHRWorld-14B retains 92.6% overall performance from next-step to full-trajectory prediction, versus 86.2% for the best baseline, GPT-5.2.Next-step performance gaps are narrow, with Numer. S@25 ranging from 0.752 to 0.806, while the full-trajectory gap widens.Source: §5.3 · pp. 7–8, Table 2 · p. 7

5.4 High-Sensitivity Stability Analysis

  • EHRWorld-14B’s S@25 falls from 71.6% to 69.7% (−1.9 points) and SMAPE rises by +0.030 (0.262 → 0.292) on high-sensitivity shifts.The subset comprises consecutive steps with relative change exceeding 50%; Figure 3 compares degradation on global and high-sensitivity data.Source: Figure 3 · p. 7, §5.4 · p. 8

5.5 Case Study

  • In the case study, most EHRWorld-14B predictions are precise (relative error ≤10%), while dynamic Hematocrit predictions remain acceptable (10–20%).Figure 4 compares ground truth with predictions for a 69-year-old patient with left femoral artery stenosis.Source: §5.5 · p. 8, Figure 4 · p. 8

6 Conclusion

The conclusion frames state inconsistency and error drift under sequential interventions as the challenge, then presents EHRWorld and EHRWorld-110K as the response. Experiments show EHRWorld outperforming proprietary and open-source baselines in long-horizon trajectory prediction.

  • Models incorporating medical knowledge struggle with state inconsistency and error drift under sequential interventions.Source: §6 · pp. 8–9
  • EHRWorld and EHRWorld-110K support causally aligned clinical-trajectory modeling, and EHRWorld outperforms proprietary and open-source baselines in long-horizon prediction.Source: §6 · p. 9

Limitations

EHRWorld reduces but does not eliminate long-horizon error accumulation, and its evaluation does not directly establish downstream clinical utility.

  • Autoregressive generation can propagate residual inaccuracies over extended rollouts despite reducing long-horizon error accumulation.Source: Limitations · p. 9
  • The evaluation focuses on trajectory fidelity, stability, and consistency, not treatment optimization, policy learning, or real-world decision support.Source: Limitations · p. 9

Ethical Considerations

The paper identifies risks from bias in observational clinical data and limits EHRWorld to research-oriented simulation rather than autonomous or real-time decisions. Its data pipeline extracts static patient context, filters and partitions episodes, and preserves chronological event sequences.

Ethical Considerations

  • Observational clinical data may reflect existing practice patterns and implicit biases that influence simulated outcomes if interpreted without caution.The authors state that EHRWorld-110K uses de-identified data processed under privacy and data-protection standards.Source: Ethical Considerations · p. 9
  • EHRWorld is intended for research simulation and analysis, not autonomous or real-time clinical decision-making; broader use requires validation, transparency, and human oversight.Source: Ethical Considerations · p. 9

A Details on Data Construction

  • EHRWorld-110K is assembled by extracting episode-level profiles, ordering event sequences, integrating them at the hospitalization level, and applying quality filtering.Source: A Details on Data Construction · p. 11

A.1 Static Information Extraction

  • Static extraction from MIMIC-IV discharge summaries captures age, gender, allergy history, chief complaint, and admission-relevant diagnoses in a standardized schema.Source: §A.1 · p. 11

Static Information Extraction

  • The extraction instructions distinguish primary from secondary diagnoses and exclude historical conditions unless actively treated during the stay.Source: §A.1 · p. 11

A.2 Data Filtering and Partitioning

  • Filtering excludes episodes with metrics above the 90th percentile, event counts outside the 10th–90th percentile range, or no medication-administration records; patient-level splitting keeps each subject in one partition.Source: §A.2 · p. 11

A.3 Data Statistics and Distribution

EHRWorld-110K contains heterogeneous hospitalization episodes, with concentrated middle-aged representation, long-tailed stays and event counts, and varying event intensity. The appendix also outlines sequential simulation and numerical evaluation procedures.

A.3 Data Statistics and Distribution

  • The dataset centers on patients aged 50–60, while most stays last 1–3 days and a long tail exceeds 100 days.The mean length of stay is approximately 5 days, versus a maximum above 100 days.Source: §A.3 · pp. 11–12
  • Laboratory and medication events are most numerous, procedural events are sparse, and event intensity normalizes total events by length of stay.High-intensity episodes are often associated with longer hospitalizations.Source: §A.3 · p. 12

B EHRWorld Simulation Algorithm

  • The simulation algorithm updates patient states over discrete steps in response to clinical actions, using dual-mode prediction for inquiry and intervention events.It is presented as an execution-flow description, not as an additional modeling assumption.Source: B EHRWorld Simulation Algorithm · p. 13

C Detailed Evaluation Metrics

  • The evaluation framework separates numerical precision for continuous variables from semantic accuracy for discrete clinical events.The numerical metrics include Success Rate at threshold X and SMAPE, which is designed for symmetric penalties and numerical stability.Source: C Detailed Evaluation Metrics · p. 13, §C.1 · p. 13

C.1 Numerical Metrics

  • Success Rate measures the share of predictions within a clinically acceptable relative-error threshold; higher values indicate greater accuracy.The reported thresholds are S@10, S@15, and S@25.Source: §C.1 · p. 13

C.2 High-Sensitivity Analysis

High-sensitivity analysis evaluates model responsiveness to acute clinical changes, while label-event metrics assess categorical output correctness using classification measures.

C.2 High-Sensitivity Analysis

  • High-sensitivity events are substantial ground-truth deviations from the preceding time step, with S@25 and SMAPE used to assess transitions above 50%.The analysis targets acute changes that global aggregate metrics may obscure.Source: §C.2 · p. 13

C.3 Label Event Metrics

  • Discrete clinical outputs, including microbiology results and nursing assessments, are evaluated for semantic correctness using classification metrics based on precision and recall.Precision, recall, and F1 are used for categorical outputs.Source: §C.3 · p. 14

D.1 Inference Efficiency

EHRWorld-14B is benchmarked for generation latency and throughput, and the appendix reports sensitivity to learning rate and training duration. It delivers lower latency and higher throughput than the compared models, while performance plateaus after three epochs.

D.1 Inference Efficiency

  • 1.29 seconds per case and 23,318 tokens/second give EHRWorld-14B the lowest latency and highest throughput among the compared models.It is faster than MedGemma-27B-IT at 2.60 seconds per case and exceeds GPT-OSS-120B at 14,571 tokens/second throughput.Source: §D.1 · p. 14

D.2 Hyperparameter Sensitivity

  • Performance plateaus at 3 epochs, while further training yields minimal gains and increases computational cost.The reported optimal learning rate is 1 × 10−6; higher rates cause instability and lower rates slow convergence.Source: §D.2 · p. 14
Loading 2602.03569v1…