Abstract / Summary
Early detection of arrhythmia can prevent stroke and other cardiovascular complications. However, inter-patient variability in ECG signals makes developing a generalizable and accurate automated diagnostic method challenging. This paper presents an effective hierarchical deep learning framework for inter-patient heartbeat classification by combining convolutional neural network (CNN), autoencoder (AE), RR interval features, residual bidirectional long short-term memory (ResBiLSTM), and multi-head self-attention (MSA) to improve feature representation and classification performance. The proposed framework comprises two stages. In the first stage, VEBs are distinguished from non-VEB beats using a jointly trained morphology-oriented network that combines a simplified ResNet (sResNet) for discriminative feature extraction with an autoencoder for reconstruction-constrained latent representation learning. The second stage classifies supraventricular ectopic beats (SVEBs) and normal (N) beats using a two-step strategy. An RR-based MLP first performs preliminary SVEB screening, while heartbeats initially classified as normal are subsequently evaluated by a verification network that integrates CNN-ResBiLSTM-MSA-based ECG representations with an auxiliary RR feature branch. A bagging-based ensemble strategy has been implemented to address class imbalance by improving the reliability of the minority class. Our proposed method is evaluated on benchmark datasets, namely the MIT-BIH arrhythmia database, SVDB, and INCART. Our model achieves competitive performance on the MIT-BIH Arrhythmia database, achieving an overall accuracy of 97.23%. For VEB detection, it attains 97.07% sensitivity and 99.05% specificity, while for SVEB classification, it achieves 93.23% sensitivity and 98.35% specificity. Cross-database evaluation without retraining on the SVDB and INCART datasets demonstrated that the proposed framework retained a reasonable ability to detect SVEB and VEB beats across unseen databases. However, the lower positive predictive value for SVEB, particularly on INCART, indicates that additional efforts are required to reduce false-positive detections and further improve cross-database generalization.