*Result*: Exploring latent diffusion models for ECG generation on the minute scale.
Original Publication: Amsterdam : Elsevier Science Publishers, c1984-
*Further Information*
*Background and Objective: Artificial Intelligence (AI) models for electrocardiogram (ECG) interpretation rely on large, diverse datasets, but existing clinical datasets are often skewed, overrepresenting normal rhythms and lacking rare pathologies. This limits model performance and generalizability. While generative AI has shown promise in other domains, its application to biosignals has so far been restricted to short segments, reducing clinical utility. Additionally, potentially promising tools like inpainting for artefact removal have not yet been explored in the biosignal domain. To overcome these limitations, we propose ECGEN, a latent diffusion model (LDM) designed to synthesize long-duration, realistic ECGs for data augmentation, rhythm-specific generation, and signal restoration.
Methods: We developed ECGEN in three configurations: (1) ECGEN-Small, a 30-second conditional generator for sinus rhythm and atrial fibrillation (AFib); (2) ECGEN-Medium, a 90-second model for inpainting tasks; and (3) ECGEN-Large, an unconditional model for generating 320-second ECGs. Models were trained on real clinical ECGs from stroke patients using a vector quantized-variational autoencoder (VQ-VAE) for encoding and a denoising diffusion implicit model (DDIM) as the latent space backbone. We evaluated model outputs using heart rate (HR), heart rate variability (HRV), and morphological coherence.
Results: ECGEN-Small achieved an AUC of 0.98 for the AFib vs. sinus rhythm classification. ECGEN-Medium successfully inpainted missing segments with plausible HR dynamics. ECGEN-Large generated long ECGs with consistent morphology but showed distributional shifts in HRV (e.g., inflated standard deviation of normal-to-normal intervals, SdNN), indicating incomplete modeling of global temporal dependencies. Network depth was found to significantly influence output quality and training stability.
Conclusions: ECGEN demonstrates the feasibility of long-duration ECG generation using LDMs, offering applications in dataset augmentation and signal restoration. However, distributional mismatches and occasional artefacts highlight challenges in unsupervised biosignal synthesis. Future work should address long-range temporal modeling and refine realism through conditioning or adversarial training.
(Copyright © 2025. Published by Elsevier B.V.)*
*Declaration of competing interest The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper.*