Generative adversarial networks (GANs) to produce synthetic 12-lead electrocardiogram signals for specific and rare diseases: a novel, powerful tool towards clinical advancements
Authors: Pantelidis P , Oikonomou E , Bampa M , Gialamas I , Goliopoulou A , Mystakidi V C , Papamikroulis G A , Spartalis M , Tsiachris D , Papaioannou T , Kalogeras K , Vavouranakis M , Papapetrou P , Siasos G 
Published: October 2024

Background

Remarkable technological advancements in electrocardiogram (ECG) analysis face challenges due to insufficiently diverse and extensive real-world datasets. This limitation hampers both the development of sophisticated deep learning (DL) models for ECG analysis and the exposure of new physicians to substantial training examples.

Purpose

To leverage Generative Adversarial Networks (GANs), a novel AI algorithm type, to generate synthetic yet realistic ECG signals resembling specific diseases.

Methods

We initially employed a general-purpose GAN on more than 21,000 ECG samples from the PTB-XL database, encompassing normal and abnormal ECGs across various diseases. The GAN outputs served as inputs for training "DeceptionECG", a novel GAN model inspired by the InceptionTime architecture (code available online). DeceptionECG focused on generating disease-specific ECG signals, trained on annotated ECGs validated by two electrophysiologists. Post-training, we generated synthetic ECGs for common diseases like atrial fibrillation (AF) and anterior ST-segment elevation myocardial infarction (STEMI), as well as rarer conditions like Wolf-Parkinson White (WPW) syndrome. Authentication involved an independent discriminator DL model and two cardiologists who were asked to distinguish real from synthetic ECGs. Additionally, a DL model, a variant of the InceptionTime architecture, discerned specific diseases in the ECG signals to assess their realism. Finally, we trained a DL model for detecting abnormalities in ECGs with the augmented dataset to evaluate potential performance improvement.

Results

We generated sets of 5,000 synthetic ECGs for various abnormalities, at a rate of 2,500 12-lead ECG signals per minute. The generated ECGs were indistinguishable from real ones, evidenced by low accuracy (Accuracy, ACC: 48.9%) of the discriminator model and two clinicians (ACC: 56% and 51%), on test sets with anterior STEMI. A DL model trained on real ECGs accurately differentiated between synthetic normal ECGs and those hosting the target disease in nearly 9 out of 10 cases (ACC: 88.7%). Furthermore, the employed DL model detector trained on the augmented dataset, encompassing both real (n=1,589) and synthetic (n=5,000) ECGs, outperformed its counterpart trained solely on real ECGs, when tested on a 1,000-sample set of real signals (ACC: 94.6% vs. 89.3%).

Conclusion

Our GAN-based approach showcases the potential of generating high-quality synthetic ECGs tailored for specific diseases, overcoming data scarcity challenges, and enhancing the training and performance of machine learning models. Additionally, it holds promise in advancing medical professional training by providing diverse signals with distinct "disease stamps" at massive amounts, addressing privacy concerns associated with extensive data exposure. Further testing is warranted for the applicability of the approach, especially in exceedingly rare conditions with limited available training data.Project workflow and outcomesGAN-generated ECGs: Which is fake?