Synthetic electrocardiograms (ECGs), obtained with Generative Artificial Intelligence (GenAI), are currently used to support the training of other AI algorithms, most often decision support systems, by augmenting the dataset for the minority classes. In this study, we proposed a Text-to-ECG (T2ECG) framework, which could generate synthetic ECG beats from textual data. The framework made use of two components. The first, Bio\_ClinicalBERT, produced an embedded vector from the input text (e.g., ``left ventricular hypertrophy''). Then, a second component leveraged such representation to generate a 12-lead ECG heartbeat by means of a Wasserstein Generative Adversarial Network with gradient penalty. The training was performed on the PTB-XL dataset, freely available on Physionet. The framework was designed to generate five different diagnostic classes: i) normal sinus rhythm; ii) inferior myocardial infarction (IMI); iii) antero-septal myocardial infarction (ASMI); iv) left anterior fascicular block (LAFB); and v) left ventricular hypertrophy (LVH). The realism of the generated signals was assessed through three different methodologies, involving both visual inspection and quantitative analyses. Our results show that the T2ECG framework was able to generate heartbeats of sufficient quality, except for the the ASMI class. In conclusion, the framework proposed does not only support data augmentation but also facilitates the creation of ECGs by non-technical users, offering a textual interface to the GenAI model.

Text-to-ECG: a Framework to Generate 12-Lead ECG from Text Reports / F. Cattozzo, S. Battiston, M.W. Rivolta, R. Sassi (ANNUAL INTERNATIONAL CONFERENCE OF THE IEEE ENGINEERING IN MEDICINE AND BIOLOGY SOCIETY). - In: 2025 47th Annual International Conference of the IEEE Engineering in Medicine and Biology Society (EMBC)[s.l] : IEEE, 2025. - ISBN 979-8-3315-8619-5. - pp. 1-7 (( 47. Annual International Conference of the IEEE Engineering in Medicine and Biology Society (EMBC) Copenhagen 2025 [10.1109/EMBC58623.2025.11254939].

Text-to-ECG: a Framework to Generate 12-Lead ECG from Text Reports

S. Battiston
Secondo
;
M.W. Rivolta
Penultimo
;
R. Sassi
Ultimo
2025

Abstract

Synthetic electrocardiograms (ECGs), obtained with Generative Artificial Intelligence (GenAI), are currently used to support the training of other AI algorithms, most often decision support systems, by augmenting the dataset for the minority classes. In this study, we proposed a Text-to-ECG (T2ECG) framework, which could generate synthetic ECG beats from textual data. The framework made use of two components. The first, Bio\_ClinicalBERT, produced an embedded vector from the input text (e.g., ``left ventricular hypertrophy''). Then, a second component leveraged such representation to generate a 12-lead ECG heartbeat by means of a Wasserstein Generative Adversarial Network with gradient penalty. The training was performed on the PTB-XL dataset, freely available on Physionet. The framework was designed to generate five different diagnostic classes: i) normal sinus rhythm; ii) inferior myocardial infarction (IMI); iii) antero-septal myocardial infarction (ASMI); iv) left anterior fascicular block (LAFB); and v) left ventricular hypertrophy (LVH). The realism of the generated signals was assessed through three different methodologies, involving both visual inspection and quantitative analyses. Our results show that the T2ECG framework was able to generate heartbeats of sufficient quality, except for the the ASMI class. In conclusion, the framework proposed does not only support data augmentation but also facilitates the creation of ECGs by non-technical users, offering a textual interface to the GenAI model.
Generative AI; synthetic ECG; NLP; Wasserstein GAN; data augmentation
Settore INFO-01/A - Informatica
Settore IBIO-01/A - Bioingegneria
2025
Book Part (author)
File in questo prodotto:
File Dimensione Formato  
EMBC_Cattozzo.pdf

accesso aperto

Tipologia: Post-print, accepted manuscript ecc. (versione accettata dall'editore)
Licenza: Creative commons
Dimensione 671.81 kB
Formato Adobe PDF
671.81 kB Adobe PDF Visualizza/Apri
Text-to-ECG_a_Framework_to_Generate_12-Lead_ECG_from_Text_Reports.pdf

accesso riservato

Tipologia: Publisher's version/PDF
Licenza: Nessuna licenza
Dimensione 1.39 MB
Formato Adobe PDF
1.39 MB Adobe PDF   Visualizza/Apri   Richiedi una copia
Pubblicazioni consigliate

I documenti in IRIS sono protetti da copyright e tutti i diritti sono riservati, salvo diversa indicazione.

Utilizza questo identificativo per citare o creare un link a questo documento: https://hdl.handle.net/2434/1189718
Citazioni
  • ???jsp.display-item.citation.pmc??? 1
  • Scopus 0
  • ???jsp.display-item.citation.isi??? 0
  • OpenAlex ND
social impact