UCTECG-Net: Uncertainty-aware Convolution Transformer ECG Network for Arrhythmia Detection
Organizations: Deakin University, Australia . · School of Mathematics, Physics and Computing, University of Southern Queensland, Toowoomba, QLD, Australia .
Abstract
Deep learning has improved automated electrocardiogram (ECG) classification, but limited insight into prediction reliability hinders its use in safety-critical settings. This paper proposes UCTECG-Net, an uncertainty-aware hybrid architecture that combines one-dimensional convolutions and Transformer encoders to process raw ECG signals and their spectrograms jointly. Evaluated on the MIT-BIH Arrhythmia and PTB Diagnostic datasets, UCTECG-Net outperforms LSTM, CNN1D, and Transformer baselines in terms of accuracy, precision, recall and F1 score, achieving up to 98.58% accuracy on MIT-BIH and 99.14% on PTB. To assess predictive reliability, we integrate three uncertainty quantification methods (Monte Carlo Dropout, Deep Ensembles, and Ensemble Monte Carlo Dropout) into all models and analyze their behavior using an uncertainty-aware confusion matrix and derived metrics. The results show that UCTECG-Net, particularly with Ensemble or EMCD, provides more reliable and better-aligned uncertainty estimates than competing architectures, offering a stronger basis for risk-aware ECG decision support.
Figures & tables
| Correctness | |||
| Correct | Incorrect | ||
| Confidence | Certain | CC | IC |
| Uncertain | CU | IU | |
| Research | Dataset | Year | Approach | Metrics | UAcc |
| Evaluation of uncertainty quantification methods in multi-label classification Barandas et al. (2024) | CPSC, G12EC, PTB-XL | 2024 | BNN-Dropout, BNN-Laplace, Deep Ensemble, Bootstrap | AUROC, F1 Score, ECE | Reported |
| Fatigue Detection with Multimodal Physiological Signals via Uncertainty-Aware Deep Transfer Learning Kakhi et al. (2026) | Multimodal physiological dataset (EEG, ECG, EDA, PPG, RESP) | 2026 | Deep transfer learning MC-Dropout, Deep Ensembles, EMCD | Accuracy, F1 Score, Precision, Recall, AUC | Reported |
| Uncertainty quantification in DenseNet model using myocardial infarction ECG signals Jahmunah et al. (2023) | PTB (MI subset) | 2023 | Dirichlet DenseNet | Confusion Matrix, Uncertainty Confusion Matrix | Reported |
| A Reliable Deep Learning Model for ECG Interpretation: Mitigating Overconfidence and Direct UQ Li et al. (2025) | PhysioNet Challenge 2017 | 2025 | Residual CNN, Dirichlet-based uncertainty, Subjective Logic | Accuracy, F1 Score, PR-AUC, ROC-AUC | Not reported |
| A novel inference system for detecting cardiac arrhythmia using deep learning framework Sai et al. (2025) | MIT-BIH | 2025 | DeepBiLSTMnet with wavelet sequence layer, Bi-LSTM | Accuracy, F1 Score, Precision, Recall | Not reported |
| This Research UCTECG-Net | MIT-BIH and PTB Arrhythmia | - | Multimodal Spectrum/Signal CNN, Transformer MC-Dropout, Deep Ensembles, EMCD | Accuracy, Sensitivity, Specificity, F1 Score | Reported |
| Dataset | MIT-BIH | PTB |
| Total Samples | 109,446 | 14,552 |
| Train Samples | 87,554 (80%) | 11,641 (80%) |
| Total Samples | 21,892 (20%) | 2,911 (20%) |
| Resampled Frequency | 125 Hz | 125 Hz |
| Time Steps 187 | 187 | 187 |
| Number of Classes | 5 | 2 |
| Model | Model | Accuracy | Precision | Recall | F1 Score |
| LSTM | 96.16 ± 2.92 | 95.57 ± 3.74 | 96.16 ± 2.92 | 95.56 ± 3.74 | |
| MIT-BIH | CNN1D | 97.87 ± 0.08 | 97.79 ± 0.09 | 97.87 ± 0.08 | 97.77 ± 0.08 |
| Transformer | 98.53 ± 0.02 | 98.50 ± 0.02 | 98.53 ± 0.02 | 98.49 ± 0.02 | |
| UCTECG-Net | 98.58 ± 0.02 | 98.54 ± 0.02 | 98.58 ± 0.02 | 98.54 ± 0.02 | |
| LSTM | 79.57 ± 4.12 | 78.91 ± 5.11 | 79.57 ± 4.12 | 78.16 ± 6.83 | |
| PTB | CNN1D | 98.65 ± 0.32 | 98.65 ± 0.32 | 98.65 ± 0.32 | 98.65 ± 0.32 |
| Dataset | Model | Method | CU | IC | IU | CC | UAcc | USen | USpe | UPre |
| LSTM | MCD | 998 | 926 | 2719 | 17249 | 83.35 | 51.87 | 86.38 | 26.85 | |
| LSTM | Ensemble | 315 | 142 | 1862 | 19573 | 90.85 | 68.93 | 91.31 | 14.47 | |
| LSTM | EMCD | 329 | 128 | 2012 | 19423 | 90.22 | 71.99 | 90.61 | 14.05 | |
| CNN1D | MCD | 439 | 205 | 1139 | 20109 | 93.86 | 68.17 | 94.64 | 27.82 | |
| MIT-BIH | CNN1D | Ensemble | 190 | 267 | 293 | 21142 | 97.44 | 41.58 | 98.63 | 39.34 |
| CNN1D | EMCD | 434 | 224 | 870 | 20364 | 95.0 | 65.96 | 95.9 | 33.28 |
Electrocardiogram Classification
Electrocardiogram classification uses machine learning to identify heart rhythms and cardiac conditions from ECG waveforms for screening, diagnosis, and monitoring.
See all 106 papers