Abstract
Cardiac arrhythmias, especially premature beats and atrial fibrillation, pose substantial clinical risks and detection hurdles. While deep learning has shown promise for automated arrhythmia diagnosis, single-model architectures often lack sufficient performance in distinguishing these two arrhythmia types. This study seeks to address the limitations of individual deep learning models and boost classification accuracy for premature beats and atrial fibrillation. It proposes an arrhythmia classification model integrating multiscale feature enhancement and bidirectional temporal dependency. First, a four-layer convolutional residual module with skip connections extracts multiscale local electrocardiogram (ECG) features. Then, multi-head self-attention strengthens critical feature global correlations. Next, a bidirectional long-term temporal de-pendency network captures sequence contextual dependencies. Finally, a Dropout-regularized fully connected layer enables six-type arrhythmia classification. Experiments on a fused dataset (MIT-BIH arrhythmia, MIT-BIH atrial fibrillation, and CODE datasets) yield an overall accuracy of 98.55% and F1-score of 0.9531. Notably, the F1-scores for premature beats (0.9916) and atrial fibrillation (0.9888) outperform recent literature by 2.16% and 4.39%, respectively. The model demonstrates robust classification performance with effective identification of the target arrhythmias, highlighting its potential as a supportive tool for automated ECG diagnosis.