Cross-Lead Attention Transformers with GAN Oversampling for Robust ECG Arrhythmia Detection
Accurate detection of cardiac arrhythmias from electrocardiograms remains challenging for rare rhythm classes due to class imbalance and morphological variability. We present a hybrid deep learning framework combining per-lead convolutional encoders with a cross-lead transformer that models relationships across different lead signals through self-attention, accepting variable lead configurations. To address minority-class scarcity, a generative adversarial network synthesizes physiologically plausible beat segments for underrepresented arrhythmias. Attention-based visualizations localize influential waveform regions aligned with clinically meaningful structures. Post-training pruning and INT8 quantization enable efficient deployment with minimal performance loss. Extensive experiments on the MIT-BIH Arrhythmia Database across sixteen heartbeat classes from two-lead recordings yield exceptional results over ten independent runs: accuracy of 99.67%, F1-score of 99.66%, and AUC of 99.8%. External validation on the ECG5000 single-lead dataset and the St Petersburg INCART twelve-lead dataset confirms robust generalizability with F1-scores of 97.6% and 98% respectively. Our framework delivers accurate, interpretable, stable, and deployable arrhythmia detection across diverse clinical settings.
Authors
- Ahmed Tibermacine (ORCID: https://orcid.org/0000-0001-7021-1194)
- Mustapha Habib (ORCID: https://orcid.org/0000-0003-0912-2314)
- Ilyes Naidji (ORCID: https://orcid.org/0000-0001-8747-0766)
- Abdelaziz Rabehi (ORCID: https://orcid.org/0000-0001-8684-4754)
- M’hamed Mancer (ORCID: https://orcid.org/0009-0002-6586-7724)
- Imad Eddine Tibermacine (ORCID: https://orcid.org/0009-0004-4729-7128)
- Lahcene Mamen
Institutions
- University of Biskra (DZ)
- Ziane Achour University of Djelfa (DZ)
- Sapienza University of Rome (IT)
- KTH Royal Institute of Technology (SE)
Publication Details
- Journal
- Electronics
- Published
- 2026-03-17
- DOI
- https://doi.org/10.3390/electronics15061258
- Primary Topic
- ECG Monitoring and Analysis
- Type
- article
- Field-Weighted Citation Impact
- 0.00