- Rating
- 3(+1)
- Confidence
- 3
- Informativeness
- 2
- Presentation
- 3
- Soundness
- 2
Read review
Paper summary
Predicting future EHR data can be critical for the survivability of a patient. The paper presents a new approach to condition the generation of the multi-marginal flow to predict future EHR data using the patient's past history. This allows the method to distinguish similar EHR information of different patients at a given timestamp and use the history to guide prediction of future EHR trends, allowing the prior information to guide the prediction.
Critical strengths
-
The proposed approach is intuitive and clearly written and provides good intuition of why considering past history to predict the EHR data can be beneficial.
-
The paper is largely well written; however, the authors should consider improving the flow, especially in the methods section, to improve readability.
Critical weaknesses
-
While the approach provides a good intuition about the need to consider past historical data, the idea about the relevance of the patient's past history is well known in the field. The overall contribution seems incremental and an extension of well known flow based model with a new conditional variable.
-
There is limited clarity about the relevance of the synthetic experiment conducted by the authors and how likely it is to occur in a real-world setting, especially in healthcare.
-
The theoretical analysis provided little insight into the unique role history plays in improving the performance of the model.
-
Experiment section is relatively weak, with not through experiment on real world setting and little justification for synthetic dataset.
Questions for authors
-
[Lines 200–201] Why do the authors use log-normalized timestamps for conditioning? Could this make the model less sensitive to changes over short time intervals and affect its ability to capture rapid changes in a patient's condition? This seems particularly important in critical hospital settings, where changes over short periods can be important for accurate predictions.
-
Why are the same set of baselines not considered in Table 2 and Table 1 ? The baselines used for synthetic datasets are relatively more exhaustive than those used for real-world datasets.
-
Why is the relative improvement on (synthea) publicly available synthetic data lower than the data simulated by the author, and how practical is the simulation process used by the author to be present in a real-world scenario?
-
Can you explain Ablation in table 3 in detail? Why doesn't conditioning on history improve the performance of CFM. Also, how do you isolate the advantage of conditioning on patient history in the model's performance? As per the table, the main advantage comes from the end-to-end training of the model
-
How sensitive is EHRFLOW's prediction to hyperparameters?
-
can you explain the theoretical significance of Theorem 1, the result seems to be generic for any conditioning variable; what's unique about history in it ? I can use any conditioning variable instead of patient history (H) and reach the same conclusion.
-
How to interpret the result in Theorem 2 ? What is its significance, and how to interpret the role of points 1, 2, 3, and 4 ?
-
Synthetic data in Appendix D uses many functional approximations for different diseases; how valid are these assumptions, and how likely is it that real-world EHR data follow a similar pattern
5 comments
[W3], [Q6], [Q7] Theoretical analysis
We agree that Theorem 1 applies to other conditioning variables. In our setting, conditioning on history is particularly relevant because longitudinal data captures aspects of patient evolution -- such as disease progression rates and cumulative treatment exposure -- that are likely not encoded in the current state alone. Theorem 1 explicitly characterizes when such historical information reduces the optimal flow-matching loss: the improvement is strictly positive when history changes the expected velocity conditional on the current state and time, on a set of positive probability..
Theorem 2 complements Theorem 1 by demonstrating a specific setting where history conditioning is beneficial, i.e., specifically for individual trajectory forecasting. We consider a setting where patients with identical current states may have different health progression related to historical states. Point 1 derives the population-optimal vector fields with and without history conditioning, and point 2 quantifies the reduction in flow-matching loss by incorporating history. Point 3 shows that both models recover the correct population marginals. However, accurately modeling population-level distributions does not necessarily translate to accurate individual forecasting. Point 4 shows that the history-conditioned field produces strictly more accurate individual forecasts.
[W4] and [Q2] Experimental evaluation on real-world data
We have made three additions to address this concern:
- Added the remaining baselines from the synthetic experiments to the real-world evaluation.
- Included MIMIC-IV as a third EHR dataset, following Reviewer 3nMc’s suggestion.
- Added TrajGPT as a new baseline.
Our results (Table R1) indicate EHRFlow achieves the highest mean top-5 code accuracy on each of the three real-world datasets. Together, these datasets include well over one million patients, with external validation on CPRD Gold.
Table R1. Top-5 code accuracy averaged over forecast horizons.
| Method | CPRD | AMC-EHR | MIMIC-IV |
|---|---|---|---|
| TrajGPT | 0.310 ± 0.015 | 0.242 ± 0.018 | 0.441 ± 0.052 |
| GRU-ODE-Bayes | 0.409 ± 0.021 | 0.191 ± 0.017 | 0.518 ± 0.027 |
| Neural CDE | 0.472 ± 0.028 | 0.241 ± 0.007 | 0.544 ± 0.013 |
| CFM (adjacent) | 0.546 ± 0.012 | 0.221 ± 0.005 | 0.273 ± 0.025 |
| Metric FM | 0.501 ± 0.007 | 0.216 ± 0.011 | 0.255 ± 0.057 |
| EHRFlow (GP-CFM) | 0.640 ± 0.006 | 0.283 ± 0.013 | 0.553 ± 0.022 |
| EHRFlow (MMFM) | 0.625 ± 0.011 | 0.302 ± 0.016 | 0.553 ± 0.018 |
[Q1] Log transformation
The in fact is intended to make the model more sensitive to changes over short time intervals: its derivative decreases with . Replacing it with linear elapsed time changed mean top-5 accuracy by at most 0.3 percentage points at 90 and 180 days (Table R2).
Table R2. Top-5 code accuracy at forecasting 90 and 180 days, averaged over the six synthetic datasets.
| Method | Time input (years) | 90 days | 180 days |
|---|---|---|---|
| EHRFlow (GP-CFM) | log(1 + Δt) (paper) | 0.935 ± 0.003 | 0.919 ± 0.002 |
| EHRFlow (GP-CFM) | Linear | 0.932 ± 0.001 | 0.917 ± 0.001 |
| EHRFlow (MMFM) | log(1 + Δt) (paper) | 0.935 ± 0.001 | 0.918 ± 0.002 |
| EHRFlow (MMFM) | Linear | 0.934 ± 0.002 | 0.919 ± 0.001 |
[Q3] Synthea results
We test two claims in our experiments. First, continuous flow-based trajectory modelling improves forecasting on synthetic and real-world EHR datasets compared with the evaluated baselines. Second, the benefit of history conditioning depends on how much information the preceding history provides beyond the current state. The smaller gains on Synthea are consistent with a weaker dependence on historical information beyond the current state, as compared to the stronger dependence in our controlled simulations. On real-world data, we observe benefits from both continuous flow-based modelling and history conditioning.
[Q4] Ablation table
Adding history to adjacent CFM increases mean top-5 accuracy from 0.755 to 0.776. Using the same anchor–target windows as MMFM increases history-conditioned CFM accuracy to 0.808. For EHRFlow (GP-CFM), replacing history with zeros while retaining the same architecture reduces accuracy from 0.899 to 0.868, while matching parameter count preserves 0.897. Full end-to-end training achieves 0.876, which is below the proposed multi-stage training procedure.
[Q5] Hyperparameter sensitivity
Across the tested settings, mean top-5 accuracy remained within 0.7 percentage points of the corresponding default (Table R3).
Table R3. EHRFlow hyperparameter sensitivity. Top-5 code accuracy averaged over the six synthetic datasets.
| Setting | EHRFlow (GP-CFM) | EHRFlow (MMFM) |
|---|---|---|
| Paper default | 0.899 ± 0.001 | 0.897 ± 0.002 |
| Learning rate = 3 × 10⁻⁴ | 0.894 ± 0.003 | 0.896 ± 0.001 |
| Learning rate = 3 × 10⁻³ | 0.894 ± 0.003 | 0.898 ± 0.001 |
| GP lengthscale = 90 days | 0.893 ± 0.003 | — |
| GP lengthscale = 365 days | 0.896 ± 0.005 | — |
| GP noise = 10⁻³ | 0.897 ± 0.002 | — |
| GP noise = 10⁻¹ | 0.899 ± 0.002 | — |
| MMFM path variance = 10⁻² | — | 0.897 ± 0.002 |
| MMFM path variance = 1 | — | 0.890 ± 0.002 |
References
[1] Kazmi et al. Disease progression in chronic heart failure is linear. Eur J Heart Fail, 2025.
[2] Kazmi et al. Dynamic risk stratification using Markov chain modelling in chronic heart failure. ESC Heart Fail, 2022.
[3] Smolen et al. EULAR recommendations for rheumatoid arthritis management: 2022 update. Ann Rheum Dis, 2023.
[4] Kovesdy et al. Past Decline Versus Current eGFR and Subsequent ESRD Risk. J Am Soc Nephrol, 2016.
[5] Madill et al. Multiple sclerosis relapse risk factors across treatment eras. Mult Scler J Exp Transl Clin, 2025.
[6] Swain et al. Congestive heart failure in patients treated with doxorubicin. Cancer, 2003.
We thank the reviewer again for the constructive feedback. We believe the clarified positioning, added baselines and benchmarks materially strengthen the paper. We would be happy to discuss these results further.
We thank the reviewer for the careful assessment of our work. We address each comment with clarifications and new experiments below.
[W1] Contributions
We agree with the reviewer that the predictive value of patient history is well-established in clinical medicine. Our work studies how to model continuously evolving patient states from sparse, irregular EHR observations. Autoregressive transformers have achieved state-of-the-art performance on many tasks in this field, but the application of diffusion and flow-matching models remains underexplored.
Our work investigates how to learn continuous patient trajectories with flow matching. Empirically, we find that flow matching combined with a suitable latent space produces more accurate models that can be trained at a fraction of the computational cost of autoregressive or neural ODE models. We also study how to improve the basic CFM formulation for this task. Established multi-marginal approaches achieve higher performance but do not give the learned dynamics access to patient history before the landmark, which we address through explicit history conditioning. Our ablations show that alternative ways of incorporating this information yield inferior results. Additionally, we find that keeping the pretrained encoders frozen while continuing to train the decoder with a linear endpoint surrogate improves performance (Table 3 in the manuscript).
[W2] and [Q8] Synthetic data validity
We clarify that the objective of the synthetic experiments is to systematically evaluate different clinically relevant data-generating mechanisms, under varying levels of history-dependent progression. We further demonstrate real-world clinical relevance in our three EHR experiments. We have clarified the clinical motivations of these synthetic experiments in the revised manuscript.
We designed the simplified functional forms and parameters to isolate mechanisms motivated by established clinical findings, rather than fitting clinical models or deriving equations from the cited studies. Specifically:
Markovian disease progression: Prior work successfully modeled heart failure progression using Markov models [1,2].
Delayed treatment response: Therapeutic effects of DMARDs for rheumatoid arthritis have been shown to develop over time, and clinical guidelines recommend reassessment of DMARD response after several months [3], thereby representing a "lagged effect".
Patient-specific progression rate: Historical eGFR decline provides prognostic information beyond current eGFR [4], motivating our use of a patient-specific progression rate inferred from preceding observations.
Relapse history: Prior relapse activity can inform future relapse risk in relapsing-remitting multiple sclerosis (RRMS) [5], motivating our use of a simplified renewal process for modelling relapses.
Cumulative exposure: Doxorubicin-associated heart-failure risk increases with cumulative dose [6], highlighting the relevance of prior treatment exposure beyond current treatment status.
[W3], [Q6], [Q7] Theoretical analysis
We agree that Theorem 1 applies to other conditioning variables. In our setting, conditioning on history is particularly relevant because longitudinal data captures aspects of patient evolution -- such as disease progression rates and cumulative treatment exposure -- that are likely not encoded in the current state alone. Theorem 1 explicitly characterizes when such historical information reduces the optimal flow-matching loss: the improvement is strictly positive when history changes the expected velocity conditional on the current state and time, on a set of positive probability..
Theorem 2 complements Theorem 1 by demonstrating a specific setting where history conditioning is beneficial, i.e., specifically for individual trajectory forecasting. We consider a setting where patients with identical current states may have different health progression related to historical states. Point 1 derives the population-optimal vector fields with and without history conditioning, and point 2 quantifies the reduction in flow-matching loss by incorporating history. Point 3 shows that both models recover the correct population marginals. However, accurately modeling population-level distributions does not necessarily translate to accurate individual forecasting. Point 4 shows that the history-conditioned field produces strictly more accurate individual forecasts.