Comparing CNN, Recurrent, Hybrid, and Transformer Models for Multi-Label ECG Classification on PTB-XL
DOI:
https://doi.org/10.31224/7898Keywords:
Healthcare AI, Healthcare, Healthcare Analytics, 1D CNN, CNN-LSTM, LSTM, GRU, Transformer, Public healthAbstract
Electrocardiograms (ECGs) are widely used to detect cardiovascular abnormalities, but manual ECG interpretation requires clinical expertise and is time-consuming. This project investigates whether deep learning models can accurately classify diagnostic ECG superclasses from 12-lead waveforms using the PTB-XL dataset. Five PyTorch models were compared: 1D CNN, LSTM, GRU, CNN-LSTM, and Transformer Encoder. The task was treated as multi-label classification using five PTB-XL diagnostic superclasses: normal, myocardial infarction, ST/T change, conduction disturbance, and hypertrophy. Models were evaluated using macro precision, macro recall, macro F1-score, micro F1-score, and macro ROC-AUC. The best model was a 1D CNN trained for 30 epochs with a learning rate of 5e-4, achieving a macro F1-score of 0.718 and macro ROC-AUC of 0.916. These results suggest that convolutional models are effective for learning local ECG waveform patterns and may provide a lightweight approach for automated ECG classification.
Downloads
Downloads
Posted
License
Copyright (c) 2026 Huey Phan

This work is licensed under a Creative Commons Attribution 4.0 International License.