Advanced deep learning framework for ECG arrhythmia classification using 1D-CNN with attention mechanism - Guhdar, Mohammed; Mohammed, Abdulhakeem O.; Mstafa, Ramadhan J. (Knowledge-based systems, 2025)
Cardiovascular diseases, particularly cardiac arrhythmias, remain a leading cause of global mortality, necessitating efficient and accurate diagnostic tools. Despite advances in deep learning for ECG analysis, current models face challenges in cross-population performance, signal noise robustness, limited training data efficiency, and clinical result interpretability. Additionally, most current approaches struggle to generalize across different ECG databases and require extensive computational resources for real-time analysis. This paper presents a novel hybrid deep learning framework for automated ECG analysis, combining one-dimensional convolutional neural networks (1D-CNN) with a specialized attention mechanism. The proposed architecture implements a four-stage CNN backbone enhanced with a squeeze-and-excitation attention block, enabling adaptive feature selection across multiple scales. The model incorporates advanced regularization techniques, including focal loss, L2 regularization, and an ensemble approach with mixed precision training. We conducted extensive experiments across multiple datasets to evaluate generalization capabilities. This study utilizes two standard databases: the MIT-BIH Arrhythmia Database (48 half-hour recordings sampled at 360 Hz) and the PTB Diagnostic ECG Database (549 records from 290 subjects sampled at 1000 Hz). Through rigorous validation including five-fold cross-validation and statistical significance testing, our model attained remarkable performance, achieving 99.48% accuracy on MIT-BIH, 99.83% accuracy on PTB, and 99.64% accuracy on the combined dataset, with corresponding F1-scores of 0.99, 1.00, and 1.00 respectively. The findings demonstrate robust generalization across varied ECG morphologies and recording conditions, with particular effectiveness in handling class imbalance without data augmentation. The model’s reliable performance across multiple datasets indicates significant potential for clinical applications in automated cardiac diagnostics.