SE-Diff: Simulator and Experience Enhanced Diffusion Model for Comprehensive ECG Generation

Xiaoda Wang, Kaiqiao Han, Yuhao Xu, Xiao Luo, Yizhou Sun, Wei Wang, Carl YangICLR 2026

Generating synthetic medical data is a high-stakes balancing act. You need the data to be diverse enough to be useful, private enough to protect patients, and—most importantly—realistic enough to be medically valid. In the world of Electrocardiograms (ECGs), standard AI models often struggle with that last part, producing waveforms that look "right" to a casual observer but violate the fundamental laws of cardiac physiology.

A new paper, "SE-Diff: Simulator and Experience Enhanced Diffusion Model for Comprehensive ECG Generation," introduces a framework that addresses these gaps by combining the statistical power of diffusion models with the rigid "guardrails" of physics and the nuanced "intuition" of clinical experience.

TL;DR

SE-Diff is a latent diffusion framework that generates realistic 12-lead, 10-second ECGs from natural language descriptions. It achieves state-of-the-art fidelity by integrating a physiological ODE-based simulator to enforce physical plausibility and an LLM-powered retrieval system to inject real-world clinical context into the generation process.

What Problem Does This Paper Address?

While diffusion models have revolutionized image and video generation, applying them to ECGs is tricky. Existing "text-to-ECG" models face two major hurdles:

  1. Lack of Physiological Grounding: Purely statistical models don't "understand" how a heart actually beats. They might generate a wave that looks like a QRS complex but is physically impossible according to the electrical dynamics of cardiac tissue.
  2. Missing Clinical Context: A simple label like "Sinus Rhythm" doesn't capture the full picture. Real-world clinical practice relies on "experience"—knowing how a patient’s age, medications, and history typically influence their ECG.

Without these elements, synthetic ECGs risk being "hallucinations" that are useless for training medical AI or helping doctors understand cardiac mechanics.

Methods

SE-Diff uses a Conditional Latent Diffusion Model (LDM) as its backbone, but adds two novel "enhancements":

SE-Diff Architecture

1. The Simulator (Mechanistic Priors)

The authors integrate a lightweight Ordinary Differential Equation (ODE) simulator directly into the training loop.

  • Beat Decoder: They attach a small decoder that reconstructs a single, aligned heart cycle from the latent space.
  • Euler & Inter-lead Constraints: The model is penalized if the generated beat deviates from the ODE's physical predictions (Euler loss) or if it violates the mathematical relationships between different leads (e.g., Einthoven’s triangle). This forces the diffusion process to stay within the bounds of human physiology.

2. The Experience (Retrieval-Augmented Conditioning)

To give the model "clinical intuition," the authors designed an LLM-powered RAG (Retrieval-Augmented Generation) pipeline:

  • Tri-view Retrieval: For a given patient profile, the system searches an Electronic Health Record (EHR) database for similar cases based on diagnoses, medications, and procedures.
  • LLM Distillation: An LLM takes these similar cases and distills them into a concise, physiologically grounded clinical report. This report serves as a rich conditioning input for the diffusion model, providing much more guidance than a simple text label.

Datasets

The model was trained and evaluated on two major real-world datasets:

  • MIMIC-IV-ECG: A massive dataset containing over 800,000 12-lead ECGs linked to clinical EHR data.
  • PTB-XL: Used for external validation to ensure the model generalizes across different hospital systems and populations.

Key Insights and Ideas

  • Physics as a Regularizer: You don't need a perfect, complex simulator to improve AI. Even a simplified ODE model provides enough "mechanistic priors" to significantly reduce non-physiological artifacts in the generated signal.
  • RAG for Time Series: Retrieval-augmented generation isn't just for chatbots. In medical time-series generation, "experience" (retrieved similar cases) helps the model bridge the gap between a brief text prompt and a complex, high-dimensional waveform.
  • Inter-lead Consistency is Crucial: By mathematically enforcing the relationships between the 12 leads during training, the model produces signals that are much more useful for downstream diagnostic tasks.

Key Results

SE-Diff consistently outperformed baselines like DiffuSETS and WGAN across several metrics:

Generation Quality Metrics
  • Signal Fidelity: It achieved significantly lower Mean Absolute Error (MAE) and better heart rate accuracy (MAE_HR of ~8.4 bpm vs. ~13.3 bpm for the best baseline).
  • Semantic Alignment: Using a CLIP-style evaluation, SE-Diff showed much stronger alignment between the input text and the generated waveform.
  • Downstream Utility: When used to augment training data for a rare-disease classifier (e.g., Supraventricular Tachycardia), SE-Diff improved the F1-score from 56% to 72%, proving that its synthetic data is high-quality enough to teach other models.

Limitations and Future Work

  • Class-wise Simulators: Currently, the simulator uses parameters pre-fitted to broad diagnostic categories. Future work could involve "personalized" simulators that adapt to individual patient heart-rate variability.
  • Computational Overhead: The RAG pipeline and ODE integration add complexity to the training process, though the authors note the simulator itself is lightweight.
  • Broader Generalization: While tested on PTB-XL, further validation is needed to see how the model handles extremely rare or "long-tail" cardiac conditions not well-represented in the retrieval pool.

Summary updated

BibTeX
@inproceedings{wang2026se,
  author = {Xiaoda Wang and Kaiqiao Han and Yuhao Xu and Xiao Luo and Yizhou Sun and Wei Wang and Carl Yang},
  title = {{SE-Diff: Simulator and Experience Enhanced Diffusion Model for Comprehensive ECG Generation}},
  booktitle = {International Conference on Learning Representations},
  year = {2026},
  url = {https://openreview.net/forum?id=95ZV35sBDm},
}
Figure