Generating Realistic Multi-Beat ECG Signals

Paul Pöhl, Viktor Schlegel, Hao Li, Anil A. Bharath · DOI

Abstract

Researchers have developed a novel three-layer framework that generates realistic, multi-minute ECG signals by combining high-fidelity diffusion models with a modular "feature-guided" assembly process. By generating individual heartbeats and inter-beat features separately before stitching them together, the approach overcomes the "blurring" and temporal instability common in end-to-end generative models, significantly outperforming existing baselines in arrhythmia classification tasks.

Introduction

Electrocardiograms (ECGs) are vital for diagnosing cardiac conditions, but high-quality, labeled datasets are often scarce due to strict privacy regulations. While generative models like GANs and Diffusion Models have become adept at creating short snippets of ECG data (single beats), they struggle with "long-form" sequences.

Generating a continuous, multi-minute ECG is difficult because the model must maintain two things simultaneously: local morphological fidelity (the sharp, distinct shapes of the P-QRS-T waves) and global temporal coherence (the mathematically complex rhythm and variability between beats, such as R-R intervals). Existing end-to-end models often suffer from "mode collapse," where they produce repetitive, unrealistic patterns, or they "blur" the signal over long durations, losing the clinical markers necessary for diagnosis.

Methodology

The authors propose a modular, three-layer synthesis framework designed to decouple local morphology from global rhythm:

  1. Beat-Level Diffusion: A diffusion model generates a large library of high-fidelity "single-beat" segments (approximately 100 samples each, centered on the R-peak). This ensures the sharp features of the QRS complex are preserved.
  2. Multivariate Feature Generation: Clinical features—such as wave amplitudes, durations, and inter-beat (R-R) intervals—are extracted from real ECGs. A separate time-series model then generates "scaffolds" of these features to simulate how a heart's rhythm and wave heights evolve over time.
  3. Long-Sequence Assembly: A matching algorithm (the "Matcher") takes the generated feature scaffold and selects the best-fitting beats from the synthetic library. These beats are "stitched" together using feature-guided alignment and minor smoothing to ensure realistic transitions.

Key Results and Evaluation

The framework was evaluated using the Train on Synthetic, Test on Real (TSTR) protocol using the MIT-BIH Supraventricular Arrhythmia Database.

Arrhythmia Classification

Classifiers trained on the "Synthetic-long" ECGs achieved an accuracy of 0.94 for normal beats and 0.52 for abnormal beats. This performance is remarkably close to models trained on real data (0.93/0.73) and vastly outperforms end-to-end baselines like BRIDGE, which only achieved 0.28 accuracy on normal beats.

Morphological Accuracy

Statistical tests (DTW and Frechet distance) confirmed that the synthetic beats were structurally and distributionally similar to real ones. As shown in the comparison of average beats, the synthetic signals closely mirror the voltage and timing of original recordings, with 89% of assembled beats matching target amplitudes within a margin of <0.03mV.

Discussion and Conclusion

The most significant insight of this work is that long-form ECG generation is better handled as a modular assembly task rather than a single end-to-end generation task. By separating "what a beat looks like" from "how beats are spaced," the system avoids the cumulative errors that typically ruin long-form synthetic signals. Furthermore, this approach enables the generation of multi-hour sequences that would otherwise cause "Out of Memory" errors in standard diffusion models.

While interval features (timing) were replicated with high accuracy, modeling amplitude features (specifically the R-peak height) remains a challenge. Future work will focus on including more complex synthetic features and enhancing matching functions to support multi-lead ECG generation.

Summary updated

BibTeX
@inproceedings{pohl2025generating,
  author = {Paul Pöhl and Viktor Schlegel and Hao Li and Anil A. Bharath},
  title = {{Generating Realistic Multi-Beat ECG Signals}},
  booktitle = {DSP},
  year = {2025},
  doi = {10.1109/dsp65409.2025.11074944},
}
Figure