ScaHybNet: a scalogram-based hybrid ensemble network for ECG arrhythmia classification.
Journal:
Scientific reports
Published Date:
Jun 3, 2026
Abstract
Cardiovascular diseases are the leading cause of death in the world, requiring the accurate and timely detection of arrhythmias to prevent sudden cardiac death. In this work, ScaHybNet, a deep learning ensemble model is proposed for multi-class arrhythmia classification using the widely adopted ECG Heartbeat Categorization Dataset. The dataset comprises 109,446 samples across five heartbeat classes (N, S, V, F, Q), enabling comprehensive arrhythmia analysis. The proposed method first transforms the ECG signals to 224 × 224 RGB-scalogram images using CWT with the Morlet wavelet. Then, a hybrid model is developed, which is composed of (1) a residual block-based CNN with skip connections to learn spatial features, (2) a BiLSTM layer for learning temporal features from the CNN feature maps and (3) a Transformer encoder layer with a custom-built multi-head self-attention mechanism to capture long-term dependencies. Thus, to address the extreme class imbalance within the data, stratified balancing of the data among normal beat, supraventricular ectopic beat, ventricular ectopic beat, fusion beat, and unknown beat, and inverse-frequency class weighting were performed. They assessed model robustness using fivefold cross-validation. Hyperparameters set to final values included a batch size of 2, 150 epochs, and an Adam optimizer. Ensemble train accuracy 99.81% and the mean accuracy on the fivefold cross validation set was 90.42% ± 1.26 (std) for ScaHybNet. On the test set (unseen data), it showed a total ensemble test accuracy of 94.73%, precision of 76.51%, recall of 82.93%, and F1-score of 77.40%. The ablation test proved the joint efficacy of each part of the model, and state-of-the-art analysis revealed better or equal results on current standards regarding ECG data with noise and imbalance. ScaHybNet appears to offer the potential to act as a more patient-centric tool that could offer considerable benefits to the medical field.
Authors
Keywords
No keywords available for this article.