Cardiovascular disease (CVD) is a leading cause of mortality worldwide. Electrocardiograms (ECGs) are the most widely used non-invasive tool for cardiac assessment, yet large, well-annotated ECG corpora are scarce due to cost, privacy, and workflow constraints. Generating ECGs can be beneficial for the mechanistic understanding of cardiac electrical activity, enable the construction of large, heterogeneous, and unbiased datasets, and facilitate privacy-preserving data sharing. Generating realistic ECG signals from clinical context is important yet underexplored. Recent work has leveraged diffusion models for text-to-ECG generation, but two challenges remain: (i) existing methods often overlook the physiological simulator knowledge of cardiac activity; and (ii) they ignore broader, experience-based clinical knowledge grounded in real-world practice. To address these gaps, we propose SE-Diff, a novel physiological simulator and experience enhanced diffusion model for comprehensive ECG generation. SE-Diff integrates a lightweight ordinary differential equation (ODE)-based ECG simulator into the diffusion process via a beat decoder and simulator-consistent constraints, injecting mechanistic priors that promote physiologically plausible waveforms. In parallel, we design an LLM-powered experience retrieval-augmented strategy to inject clinical knowledge, providing more guidance for ECG generation. Extensive experiments on real-world ECG datasets demonstrate that SE-Diff improves both signal fidelity and text-ECG semantic alignment over baselines, proving its superiority for text-to-ECG generation. We further show that the simulator-based and experience-based knowledge also benefit downstream ECG classification.
Figures & tables
Figure 1: Overview Framework of SE-Diff. (a) Variational Autoencoder : encoder–decoder with a lightweight beat decoder for a single QRS-aligned cycle. (b) Conditional latent diffusion : U-Net denoiser with cross-attention to text, metadata, and retrieved report. (c) Simulator-informed diffusion : Euler and inter-lead constraints on the beat decoder output. (d) Experience retrieval–augmented Conditioning : tri-view EHR similarity with LLM distillation into a concise report. (e) Inference : reverse diffusion and decoding to a 10-second, 12-lead ECG.
Model
PR ↓
QRSd ↓
QT ↓
QTcF ↓
ST@J+60 ↓
P dur ↓
T dur ↓
MIMIC-IV-ECG (internal)
SSSD
7.70±8
32.00±1
25.11±11
23.25±11
0.16±0
5.30±3
23.71±9
WGAN
18.01±9
29.64±9
21.02±5
23.83±2
0.13±0
6.01±0
24.01±4
BeatDiff
10.34±5
18.23±6
14.23±6
9.43±5
0.17±0
7.00±1
30.02±3
DiffuSETS
14.81±6
11.71±7
8.20±3
9.71±4
0.04±0
5.60±1
8.71±7
SE-Diff
7.30±3
10.71±4
4.50±2
7.88±2
0.03±0
2.50±0
6.80±3
Table 2: Beat-level morphology & interval fidelity (MAE) on MIMIC-IV-ECG and PTB-XL datasets. All values are record-level medians; lower is better ( ↓ ).
Model
Male = 10% Female
SVT = 10% Sinus
F1 (%, ↑ )
Acc. (%, ↑ )
AUC (%, ↑ )
F1 (%, ↑ )
Acc. (%, ↑ )
AUC (%, ↑ )
SSSD
42±0
54±1
49±2
56±1
63±2
81±2
WGAN
42±0
54±1
49±2
57±2
63±2
82±2
BeatDiff
44±2
55±2
51±2
60±2
67±2
84±3
DiffuSETS
44±3
54±2
54±1
70±1
68±1
84±2
SE-Diff
58±1
58±1
58±2
72±2
71±0
85±2
Table 3: Downstream ECG classification under severe class imbalance.
Figure 2: Noise scheduling analysis showing the progression of noise and signal factors throughout the diffusion process.
Figure 3: Representative single-cycle ECG waveforms generated from our simulator. Panel A: sinus rhythm (Lead I). Panel B: ventricular pacing (Lead V1). Panel C: sinus rhythm with first-degree AV block (Lead II). Panel D: consider acute ST-elevation MI (Lead V3).
Figure 4: Case Study for ECG Generation.
Appendix figures & tables8 assets
Supplementary material from the paper’s appendix.
Appendix
Figure 5: Prompt examples.
Model
MAE ↓
NRMSE ↓
MAEHR↓
rCLIP Score ↑
rFID Score ↑
SE-Diff
0.0923±0.0021
0.0714±0.0010
8.43±0.42
0.9470±0.0029
0.9509±0.0035
w/o Beat Loss
0.0951±0.0020
0.0743±0.0016
23.48±1.07
0.9393±0.0026
0.9140±0.0055
w/o Spec Loss
0.0942±0.0023
0.0797±0.0014
16.47±1.23
0.9257±0.0030
0.9073±0.0055
Appendix
Table 4: ECG generation performance on MIMIC-IV-ECG dataset.
Batch size
Time / batch (s)
Time / sample (s)
32
13.55
0.425
128
13.65
0.105
256
13.40
0.050
512
15.05
0.0295
1024
24.90
0.0245
2048
45.00
0.0220
Appendix
Table 5: Inference latency of the model for generating one 10-second, 12-lead ECG under different batch sizes. Times are averaged over 3 batches per configuration, with 1000 diffusion sampling steps.
Sampling Steps
NRMSE ↓
MAEHR↓
rCLIP Score ↑
1000
0.0714±0.0010
8.43±0.42
0.9470±0.0029
800
0.0877±0.0011
13.59±1.05
0.8671±0.0040
500
0.1097±0.0010
15.60±1.19
0.7888±0.0084
Appendix
Table 6: ECG generation performance under different sampling steps.
Sampler
NRMSE ↓
MAEHR↓
rCLIP Score ↑
SE-Diff (DDPM)
0.0714±0.0010
8.43±0.42
0.9470±0.0029
DDIM
0.1219±0.0010
9.05±0.44
0.7783±0.0072
Second Order
0.0877±0.0011
13.59±1.05
0.8671±0.0040
SDE
0.0693±0.0106
19.21±1.27
0.9213±0.0028
Appendix
Table 7: ECG generation performance under different samplers.
Sampler
NRMSE ↓
MAEHR↓
rCLIP Score ↑
SE-Diff (Linear)
0.0714±0.0010
8.43±0.42
0.9470±0.0029
Cosine
0.0728±0.0032
8.90±0.78
0.9446±0.0131
Appendix
Table 8: ECG generation performance under different noise schedules.
Config
Model
MAE ↓
MAEHR↓
rCLIP Score ↑
rFID Score ↑
A
DiffuSETS
0.1092±0.0022
13.29±1.13
0.9309±0.0036
0.9209±0.0038
A
SE-Diff
0.0923±0.0021
8.43±0.42
0.9470±0.0029
0.9509±0.0035
B
DiffuSETS
0.1092±0.0022
13.29±1.13
0.9347±0.0032
0.9197±0.0037
B
SE-Diff
0.0923±0.0021
8.43±0.42
0.9472±0.0032
0.9505±0.0035
C
DiffuSETS
0.1092±0.0022
13.29±1.13
0.9242±0.0039
0.9209±0.0038
C
SE-Diff
0.0923±0.0021
8.43±0.42
0.9393±0.0031
0.9509±0.0035
Appendix
Table 9: ECG generation performance comparison between SE-Diff and DiffuSETS under different calibration configurations.
λ1
λ2
λ3
k
LLM Score
1
1
1
3
94.9±2.3
1
1
1
2
94.4±2.1
1
1
1
4
94.8±2.9
2
1
1
3
94.7±2.6
1
2
1
3
93.6±1.5
1
1
2
3
93.5±3.3
Appendix
Table 10: Sensitivity of tri-view weights (λ1,λ2,λ3) and top- k on retrieval performance.
Electrocardiogram (ECG)-based models have achieved strong performance in diagnostic tasks, yet they remain limited in modeling how cardiac dynamics evolve under external interventions. In particular, existing approaches focus primarily on static prediction and lack mechanisms to capture ECG variations under different pharmacological conditions. In this work, we propose an ECG World Model for action-conditioned predictive simulation of cardiac electrophysiology. Moving beyond disjoint pipelines, our framework features a principled integration of physiological ordinary differential equation (ODE) priors into latent diffusion dynamics via energy regularization. This structural constraint enables the synthesis of physiologically plausible post-intervention ECG trajectories while effectively mitigating generative hallucinations. Building on this simulation process, we introduce an uncertainty-aware evaluation strategy that leverages the stochasticity of diffusion sampling to characterize both the expected clinical risk and its variability, allowing a more reliable comparative assessment of candidate interventions. We evaluate our method across diverse settings, including controlled drug-response scenarios and real-world clinical records. Beyond standard waveform metrics, experimental results demonstrate improved risk calibration and strong alignment with expert-informed treatment preferences. These results establish our approach as a robust foundation for safe and intervention-aware clinical decision support.
Zhikang Chen, Yue Wang, Sen Cui +4
University of Oxford · Tsinghua University · Southern University of Science and Technology
Electrocardiograms (ECG) are electrical recordings of the heart that are critical for diagnosing cardiovascular conditions. ECG language models (ELMs) have recently emerged as a promising framework for ECG classification accompanied by report generation. However, current models cannot forecast future cardiac events despite the immense clinical value for planning earlier intervention. To address this gap, we propose CAMEL, the first ELM that is capable of inference over longer signal durations which enables its forecasting capability. Our key insight is a specialized ECG encoder which enables cross-understanding of ECG signals with text. We train CAMEL using established LLM training procedures, combining LoRA adaptation with a curriculum learning pipeline. Our curriculum includes ECG classification, metrics calculations, and multi-turn conversations to elicit reasoning. CAMEL demonstrates strong zero-shot performance across 6 tasks and 9 datasets, including ECGForecastBench, a new benchmark that we introduce for forecasting arrhythmias. CAMEL is on par with or surpasses ELMs and fully supervised baselines both in- and out-of-distribution, achieving SOTA results on ECGBench (+7.0% absolute average gain) as well as ECGForecastBench (+12.4% over fully supervised models and +21.1% over zero-shot ELMs).
Cardiac Magnetic Resonance (CMR) imaging provides a comprehensive assessment of cardiac structure and function but remains constrained by high acquisition costs and reliance on expert annotations, limiting the availability of large-scale labeled datasets. In contrast, electrocardiograms (ECGs) are inexpensive, widely accessible, and offer a promising modality for conditioning the generative synthesis of cine CMR. To this end, we propose ECGFlowCMR, a novel ECG-to-CMR generative framework that integrates a Phase-Aware Masked Autoencoder (PA-MAE) and an Anatomy-Motion Disentangled Flow (AMDF) to address two fundamental challenges: (1) the cross-modal temporal mismatch between multi-beat ECG recordings and single-cycle CMR sequences, and (2) the anatomical observability gap due to the limited structural information inherent in ECGs. Extensive experiments on the UK Biobank and a proprietary clinical dataset demonstrate that ECGFlowCMR can generate realistic cine CMR sequences from ECG inputs, enabling scalable pretraining and improving performance on downstream cardiac disease classification and phenotype prediction tasks.
Xiaocheng Fang, Zhengyao Ding, Guangkun Nie +9
State Key Laboratory of General Artificial Intelligence, Peking University · School of Intelligence Science and Technology, Peking University, Beijing, China · Polytechnic Institute of Zhejiang University, Zhejiang University, Hangzhou, China +4