Deep Residual Transfer Learning and Transformer Architectures for ECG Signal–Based Heart Disease Detection

ECG Signal Classification Cardiac Arrhythmia Detection Residual Transfer Learning Transformer Networks Deep Learning

Authors

Vol. 7 No. 2 (2026): June
Research Articles

Downloads

The purpose of this research was to create a fully automatic deep-learning method to accurately classify different types of cardiac arrhythmias based on patterns observed in electrocardiograms (ECGs). There are several challenges that arise when manually interpreting cardiac arrhythmias. These include variability in how different observers interpret arrhythmias and variability in the diagnostic results obtained by different clinicians. To address these issues, we propose an architecture that includes both residual transfer learning and transformer encoder blocks. In our proposed architecture, the residual learning block uses Conv1D layers with skip connections to learn hierarchical representations of features in the ECG signal. The transformer block uses multi-head self-attention to identify longer-range dependencies in the ECG sequence. Our proposed model is tested on two publicly available benchmark databases of ECG recordings, namely the MIT-BIH Arrhythmia Database and the PTBDB Diagnostic ECG Database. We evaluate the performance of our model using a stratified 10-fold cross-validation procedure as well as Receiver Operating Characteristic (ROC) analysis. The proposed model achieved a classification accuracy of 99% on both datasets, with precision scores of 0.88 to 0.99 and recall scores of 0.87 to 0.99 for each arrhythmia class. Furthermore, the AUC values of the ROC analysis ranged from 0.98 to 1.0, indicating high levels of discrimination against minority classes, including supraventricular ectopic beats and fusion beats.