ECA-ECGNet: An Efficient Channel Attention-Enhanced 1D CNN for ECG Arrhythmia Detection
Abstract
Cardiovascular diseases remain a major cause of mortality worldwide, with cardiac arrhythmias representing a potentially serious condition. Although deep learning has improved automated electrocardiogram (ECG) analysis, many recent models rely on recurrent, residual, transformer-based, or multi-input architectures, thereby increasing computational complexity. Moreover, reported classification performance can vary substantially according to the adopted data-partitioning strategy. This study proposes an Efficient Channel Attention ECG Network, termed ECA-ECGNet, for automated five-class ECG beat classification using the MIT-BIH Arrhythmia Database. ECG beats were segmented, normalized, and grouped into five AAMI categories: Normal (N), Supraventricular (S), Ventricular (V), Fusion (F), and Unknown (Q). The ECA-ECGNet integrates three Conv1D-based feature-extraction blocks with lightweight ECA modules to emphasize informative channel features. To mitigate the severe class imbalance inherent in clinical ECG data, categorical focal loss was implemented during model training to dynamically scale the loss based on prediction confidence. ECA-ECGNet was assessed under complementary intra-patient and inter-patient evaluation settings. The model achieved an accuracy of 99.20%, a macro F1-score of 0.953, and a weighted F1-score of 0.992. In the inter-patient setting, complete subject groups were separated between model development and testing, resulting in an accuracy of 97.96%, a macro F1-score of 0.9165, and a weighted F1-score of 0.9798. The implementation of focal loss substantially narrowed the performance gap between majority and minority classes, demonstrating enhanced generalization for Supraventricular and Ventricular arrhythmias. Ultimately, the principal novelty of ECA-ECGNet is the synergistic application of structural channel attention and dynamic focal loss. This framework shows that diagnostic accuracy on unseen patients is achievable without high computational overhead, supporting real-time arrhythmia screening on low-resource clinical devices