CNN-T-NiN: A Hybrid Deep Learning Model for ECG Signal Classification and Rare Arrhythmia Detection
Wajahat Ahmad, Ahmad Kamran Malik, Nafees Qamar, Muhammad Wajid, Aleem Ahmed
Key points
From the paper's conclusion- Accurate Electrocardiogram (ECG) signal classification is essential for automated arrhythmia detection, timely clinical intervention, and improved cardiovascular health outcomes.
Abstract
Accurate Electrocardiogram (ECG) signal classification is essential for automated arrhythmia detection, timely clinical intervention, and improved cardiovascular health outcomes. ECG arrhythmia classification remains challenging because of subtle morphological differences among heartbeat classes, temporal dependencies, and severe class imbalance, particularly for rare arrhythmias. Existing approaches may provide limited minority-class sensitivity or insufficient integration of morphological and temporal feature learning. To address these challenges, this study proposes CNN–T–NiN, a hybrid deep learning framework that integrates one-dimensional convolutional layers (CNN), Network-in-Network (NiN) blocks, and temporal attention (T). The ECG signal is processed through hierarchical NiN stages comprising one-dimensional convolutions, batch normalization, GELU activations, and pointwise convolutions to extract and refine local morphological features. A temporal-attention module is applied after the initial feature-extraction stage to model relationships among temporal positions and emphasize diagnostically informative regions of the heartbeat signal. The attended features are subsequently refined by deeper NiN blocks and aggregated for final heartbeat classification. On the predefined beat-level intra-dataset MIT-BIH evaluation, which does not employ strict patient-wise separation, CNN–T–NiN achieved 98.90% accuracy and 92.41% macro recall, with a macro F1-score of 84.46%, weighted F1-score of 96.73%, macro AUC of 98.95%, and specificity of 98.82%. Compared with the implemented models, these results indicate competitive performance rather than universal superiority. ResNet1D achieved stronger aggregate metrics but required 0.95 million parameters compared with 0.363 million for CNN–T–NiN, demonstrating a trade-off between model size and predictive performance. Weighted Random Sampling prioritizes minority-class sensitivity and improves macro recall, but this comes at the expense of precision and macro F1-score. On the patient-wise INCART evaluation, CNN–T–NiN achieved a balanced accuracy of 47.67% and macro AUC of 87.09%, while its macro precision of 32.26%, overall accuracy of 73.55%, and weighted F1-score of 80.01% remained lower than those of several simpler baselines.
Read the paper
Discussion
Science Skim's AI key points, plus readers' public thoughts
Readers' thoughts
No reader thoughts yet.
Related papers
- An attention-enhanced CNN-BiLSTM framework with confidence-gated inference for arrhythmia detection using ECG signalsDiscover Computing · 2026
- Hybrid Parallel Twin-Tower Model Advances Arrhythmia Detection in ECG Signals: Integrating Convolutional Neural Networks and Kolmogorov-Arnold Networks.Bioengineering (Basel, Switzerland) · 2026
- Patient-adaptive and clinically interpretable arrhythmia detection from ECG using lightweight hybrid deep learning.Biomedical engineering letters · 2026
- HCTG-Net: A Hybrid CNN–Transformer Network with Gated Fusion for Automatic ECG Arrhythmia DiagnosisBioengineering · 2025
- A deep learning framework for arrhythmia classification: mitigating data leakage and class imbalance in ECG analysis.Journal of medical engineering & technology · 2026
- Deep learning for ECG-based cardiovascular diagnosis: a review of model architecturesEvolutionary Intelligence · 2026