Authors’ overview
We introduce a predictive world model for electronic health records (EHR) that represents patient histories as action conditioned latent trajectories. Rather than modeling clinical events solely through autoregressive token prediction, our framework explicitly separates patient states from observed clinical actions and learns their evolution through a state and action conditioned transition operator. At its core is a state dependent linearization predictor that propagates local changes in latent patient state, enabling time resolved prediction, multi step rollout, and action conditioned simulation. Empirically, we show that generated latent trajectories preserve downstream predictive signal, temporal structure, and subgroup level statistical relationships present in encoder derived representations. We further decode free running rollouts into the original clinical feature space and evaluate future clinical measurements against observed values using task matched forecasting baselines, demonstrating that the learned dynamics retain predictive information beyond latent space agreement. Across binary classification and time to event tasks, EHR WM achieves competitive, though task dependent, performance relative to substantially larger EHR foundation models while using a 30x smaller parameter footprint. Finally, perturbing observed action sequences produces corresponding changes in generated trajectories, demonstrating the action sensitivity of the learned dynamics. Together, these results support world modeling as a complementary framework for learning explicit, time indexed representations of patient evolution from longitudinal EHR.
Introduction
In this work, we introduce a predictive world model tailored to electronic health records, formalizing patient histories as sequences of states and clinical actions in a latent dynamical system. Existing EHR foundation models provide powerful representations of longitudinal records, and autoregressive EHR foundation models can produce time-specific representations or generate trajectories by conditioning on observed event prefixes. Our distinction is therefore not that existing models are incapable of temporal prediction or simulation, but rather in the modeling objective: instead of representing patient evolution implicitly through autoregressive event prediction, we explicitly learn an action-conditioned transition operator over a time-indexed latent patient state. This formulation separates endogenous patient state from exogenous clinical actions and provides a representation whose primary object is the trajectory itself rather than a pooled summary of the record.
At the core of the model is a state-dependent linearization operator that propagates local changes in latent patient state while conditioning on observed clinical actions. This construction provides a lightweight inductive bias for incremental physiological evolution and supports multi-step rollout without directly regressing each future state independently. Importantly, the resulting intervention-conditioned trajectories should not be interpreted as causal estimates of treatment effects; rather, they characterize how the learned observational dynamics respond to alternative action sequences and provide a substrate for future decision-aware modeling under appropriate causal assumptions.
We evaluate the learned dynamics at multiple levels. First, we measure latent trajectory fidelity by comparing predicted rollouts with encoder-derived trajectories and assess whether temporal ordering and task-relevant structure are preserved. Second, we decode free-running latent rollouts back into the original clinical feature space and evaluate forecasting accuracy directly against observed future measurements, providing a complementary measure of trajectory fidelity beyond latent-space agreement. We compare these forecasts against task-matched temporal baselines, including regularized linear models, GRU-D, Latent ODE, and Transformer-based forecasting models, across increasing prediction horizons. We further evaluate downstream representations using classification and time-to-event tasks, with complementary metrics for class imbalance and calibration, and examine how alternative clinical action sequences perturb the learned trajectories.
Together, these experiments support a more specific claim than predictive superiority alone: a compact latent dynamics model can retain clinically relevant predictive information while exposing an explicit, time-resolved representation of patient evolution. More broadly, our results suggest that world modeling provides a useful framework for clinical machine learning in which patient histories are treated not only as records to summarize, but as trajectories whose evolution can be forecasted, interrogated, and simulated under varying observed clinical actions.
Related Work
World Models Predictive world models emerged from model-based reinforcement learning, which aims to learn forward models of agent-environment dynamics. Early approaches based on recurrent neural networks focused on compressing sensory streams into predictive state representations that could be rolled forward to support planning and control. Over time, this perspective converged with advances in deep generative modeling, leading to architectures that learn compact spatiotemporal representations and use them as substrates for downstream decision-making. The modern formulation popularized by Ha and Schmidhuber demonstrated that learned latent dynamics could support policy optimization within imagined rollouts, separating representation and dynamics learning from downstream control. More broadly, this perspective treats predictive state modeling as a mechanism for learning representations sufficient to anticipate future observations and support sequential decision-making.
Another family of predictive models, Joint-Embedding Predictive Architectures (JEPA), has evolved from static representation learning toward modeling structured dynamics directly in latent space. Early variants such as I-JEPA and subsequent extensions such as V-JEPA demonstrate that predicting latent embeddings from context can produce high-level semantic and temporal representations without explicit reconstruction. This paradigm has since been extended across a range of applications and modalities. More recent work, such as Causal JEPA, extends this framework with intervention-aware objectives that encourage representations to distinguish changes induced by interventions from naturally occurring variation, providing a basis for reasoning over action-conditioned futures.
Recent advances such as LeWorldModel (LeWM) further improve the stability of latent predictive world models through regularization mechanisms such as SIGReg, enabling end-to-end learning of predictive latent dynamics without reconstructing the observation space. Our work builds directly on this predictive representation-learning framework, but specializes it to longitudinal EHR by introducing an explicit decomposition between patient state and clinical action and a state- and action-conditioned transition operator over latent increments. Thus, the contribution is not a new general-purpose world-model training framework, but a controlled latent-dynamics formulation designed for intervention-conditioned patient trajectories.
EHR foundation models and longitudinal representations: Foundation models for health have emerged as a rapidly growing area of research, with large-scale pretraining increasingly applied across clinical text, medical imaging, physiological signals, genomics, and structured data like electronic health records to learn transferable representations for downstream clinical tasks. Within structured EHR, foundation modeling often adopts the language-modeling abstraction, representing medical codes and clinical events as tokens within longitudinal sequences. Early unsupervised approaches learned fixed-dimensional patient representations that compressed heterogeneous records into compact embeddings. More recently, Transformer-based models have adapted BERT- and GPT-style pretraining objectives to structured EHR, producing representations that support transfer across a wide range of downstream clinical prediction tasks. Subsequent approaches incorporate temporal information, visit structure, and event timing directly into the representation while retaining a general-purpose pretrained interface for downstream prediction.
In parallel, autoregressive EHR FM modeling has emerged as a general-purpose strategy for longitudinal EHR, using next-event or time-to-event prediction to learn transferable representations. These models have substantially advanced scale, transfer, and benchmarking for longitudinal EHR. Importantly, autoregressive EHR models are not restricted to static patient summaries: representations can be extracted at intermediate timepoints, and generative models can produce future clinical trajectories by conditioning on observed prefixes or inserted events. The distinction we draw is therefore one of modeling objective rather than capability. Whereas autoregressive approaches primarily model the distribution of future clinical events or tokens, our formulation directly parameterizes the evolution of a latent patient state under an explicit clinical action sequence.
This construction provides an inductive bias toward incremental patient evolution while maintaining a lightweight transition model suitable for multi-step rollout. The resulting representation exposes the evolving latent patient state directly, enabling time-resolved prediction, rollout-based forecasting, and controlled perturbation of action sequences within a common representation space. Empirically, we evaluate this formulation through latent trajectory fidelity, forecasting in the original clinical feature space, downstream classification and time-to-event prediction, and intervention-conditioned simulation.
Cohort construction and temporal discretization
The ICU provides a particularly suitable setting for piloting trajectory-based world modeling because patient state is observed and acted upon at relatively high temporal frequency. Critically ill patients undergo repeated measurement of vital signs and laboratory values, while medications and other treatments are administered throughout the admission in response to evolving clinical status. This produces comparatively dense sequences of both physiological observations and clinical actions, making the ICU a useful environment for studying whether a model can learn state transitions that remain sensitive to changes in treatment. At the same time, the ICU setting should be viewed as a controlled starting point rather than a complete representation of longitudinal healthcare, since outpatient and chronic disease trajectories are substantially sparser and unfold over much longer timescales.
Experiments
Within the latent space, we evaluate rollout fidelity along several complementary axes, including preservation of downstream predictive signal, temporal ordering, and trajectory-level distributional structure. Rather than treating any single metric as evidence of exact patient reconstruction, these analyses test whether free-running rollouts preserve properties of the encoder-derived trajectories despite compounding prediction error.
Temporal Structure Preservation We next probe whether the learned world model preserves temporal structure using a discriminator-based evaluation between encoder-derived Oracle trajectories and predicted Rollout trajectories (Assess whether a linear classifier can tell between real and model generated trajectories). We consider three comparisons: (i) ordered Oracle trajectories versus ordered Rollout trajectories, (ii) ordered Oracle trajectories versus randomly permuted versions of the same trajectories, and (iii) ordered Oracle trajectories versus randomly permuted Rollout trajectories. The latter two explicitly perturb temporal order while preserving the underlying set of latent states, allowing us to test whether sequence structure itself contributes to discriminability.
This evaluation complements the latent-space fidelity analyses above by measuring forecasting performance directly against observed clinical values rather than encoder-derived representations. It therefore tests whether the temporal information preserved by the latent dynamics remains recoverable in the original observation space. We compare EHR-WM against task-matched forecasting baselines, including global mean, last observation carried forward (LOCF), ridge regression, GRU-D, Latent ODE, and a Transformer forecaster, using the same input context, prediction horizons, target variables, and evaluation protocol.
Benchmark comparison across modeling paradigms We next compare EHR-WM against established baselines across binary classification and time-to-event prediction. These include traditional tabular methods (XGBoost ), large-scale EHR foundation models (CLMBR, MOTOR ), and dedicated survival models (CoxPH, DeepHit, DeepSurv ). These models are trained under different objectives and expose different representational interfaces: XGBoost operates on engineered tabular features, CLMBR and MOTOR learn general-purpose representations from large longitudinal EHR corpora, survival models directly optimize time-to-event objectives, and EHR-WM is trained to predict action-conditioned latent trajectories. We therefore interpret this comparison as a benchmark of downstream predictive utility across modeling paradigms rather than a controlled architectural comparison.
The goal of this evaluation is not to demonstrate uniform superiority over specialized baselines. Instead, we ask whether representations learned through a trajectory-prediction objective retain sufficient information to support standard clinical prediction tasks while also exposing an explicit latent state trajectory for forecasting and action-conditioned simulation. The paired Oracle/Rollout evaluation further separates the predictive information available in the encoder-derived representation from degradation introduced during autoregressive rollout.
For representation-based methods, we use linear probes to assess how readily downstream information can be recovered from the learned representations. For EHR-WM, the probe is evaluated independently at each valid latent state along the trajectory and performance is averaged across prediction timepoints; the same procedure is applied to both Oracle and Rollout states. CLMBR and MOTOR are evaluated using their latent representations.
Discussion
This work reframes EHR modeling as learning a action-conditioned latent trajectory, with patient states evolving over time under observed intervention. Rather than treating this as a replacement for autoregressive EHR models, we view EHR-WM as a complementary formulation whose primary object is an explicit latent state process. Across latent-space evaluations, downstream tasks, and decoded forecasting in the original clinical feature space, the model preserves substantial predictive and temporal structure under multi-step rollout. Importantly, the raw-space forecasting results provide a stronger validation than latent agreement alone, showing that generated trajectories remain connected to observed future clinical measurements.
Performance is heterogeneous across tasks rather than uniformly superior. EHR-WM is competitive on several classification and time-to-event outcomes while specialized baselines remain stronger on others. Its main advantage is therefore not universal predictive dominance, but the combination of useful downstream representations with an explicit trajectory interface that supports forecasting and action-conditioned simulation. Similarly, changing the supplied clinical action sequence alters subsequent rollouts, demonstrating action-sensitive dynamics.
Limitations and Future Work Several limitations remain. First, evaluation is restricted to MIMIC-IV, a single predominantly acute-care setting, so external validation is needed to establish generalization across institutions and more longitudinal patient populations. Second, EHR-WM operates on a restricted set of high-frequency features, which improves tractability but may omit clinically important long-tail information and partly contributes to its smaller parameter footprint relative to foundation models.
Classification Evaluation
For disease incidence, we define a binary label over a 365-day horizon. A patient is positive if their first ICD code for a condition appears within one year after admission. Patients with no such code in that window are labeled negative. Those with a prior diagnosis before admission are excluded to ensure the model predicts new onset rather than existing disease.
We also include three operational outcomes tied to the hospital stay. Long length of stay is defined as a stay of at least 7 days. ICU transfer indicates whether any ICU-related event occurs during the admission. Thirty-day readmission indicates whether a new admission occurs within 30 days after discharge.
Patient representations are obtained by applying linear probes across the full trajectory and averaging the performance. We do this separately for embeddings derived from observed data and from predicted trajectories. For each task, we train a logistic regression classifier with standard regularization and balanced class weights. Models are evaluated on a held-out test set using AUROC, with bootstrap confidence intervals. Patients with missing or inapplicable labels are excluded per task.
Model Predictive Control via Action Perturbations
To evaluate whether the learned dynamics encode actionable, intervention-dependent structure, we conduct an experiment based on controlled perturbations of the action sequence. Given an observed trajectory, we first train a linear probe on the latent states induced by the original sequence to predict a downstream clinical target, ensuring that the probe reflects the predictive content of the representation under observed dynamics. We then generate alternative trajectories by perturbing the action variable while holding the initial latent state fixed and rolling out the model under the modified intervention sequence. The same probe, without retraining, is applied to these simulated trajectories. Because the probe is fixed, any change in predicted risk or outcome can be attributed solely to the effect of the action perturbation on the latent dynamics. This setup isolates the sensitivity of the learned transition operator to interventions, providing a functional test of whether the model captures coherent, action-conditioned evolution rather than merely encoding static correlations. Consistent shifts in probe outputs across perturbed trajectories indicate that the world model induces structured, controllable changes in the latent trajectory aligned with downstream predictive semantics.
Training Setup
All models were trained on a single Apple MacBook Pro equipped with an Apple M4 chip and 48 GB of unified memory, using the Metal Performance Shaders (MPS) backend for hardware acceleration. This setup reflects a deliberate design constraint: the model is optimized for stability and efficiency under modest compute, rather than relying on large-scale distributed training.
Despite the absence of GPU clusters, the curriculum-based training procedure remained stable across all stages, with no observed divergence or collapse. Empirically, the combination of gradient clipping, teacher forcing, and staged rollout scheduling was sufficient to maintain well-conditioned optimization dynamics throughout training. This suggests that the proposed world model formulation is not only parameter-efficient but also compute-efficient, making it practical for deployment in resource-constrained research settings. Training the full model end to end took roughly 13 hours to converge.
Velocity matrix statistics
At the same time, the spectral norm remains uniformly below 1, indicating that the local linearization is contractive in expectation. This implies that small perturbations in latent space do not amplify under rollout, providing a mechanism for controlling error accumulation over long horizons. Notably, this contractive behavior emerges without explicit global stability constraints, suggesting that the combination of spectral normalization and training objectives implicitly biases the system toward stable regimes.
The large variance observed in the condition number reflects the presence of small singular values, indicating that certain directions in latent space are weakly propagated. Rather than signaling instability, this reveals an anisotropic structure in the learned dynamics, where the model selectively attenuates variation along less informative directions while preserving dominant modes. This behavior is consistent with an implicit regularization effect, in which the transition operator balances expressivity with controlled contraction, yielding trajectories that are both rich and numerically stable over extended rollouts.
From a dynamical systems perspective, this combination of high effective rank and bounded operator norm places the model in a regime that is neither degenerate nor chaotic. Instead, it operates in a structured intermediate regime, where trajectories can explore a large portion of latent space while remaining well-conditioned. This provides a plausible explanation for the empirical stability observed in multi-step forecasting and rollout generation.


