CNN-T-NiN: A Hybrid Deep Learning Model for ECG Signal Classification and Rare Arrhythmia Detection
Year: 2026
Type: article
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.
Source: Applied Sciences
DOI: 10.3390/app162211397
Language: English
Topic: ECG Monitoring and Analysis
Subfield: Cardiology and Cardiovascular Medicine
Field: Medicine
Domain: Health Sciences
Open Access status: gold
Estimated APC paid: $2,896
OpenAlex ID: W7235151773
