TrustECG-DG: An Explainable, Uncertainty-Calibrated and Domain-Generalized Deep Learning Framework for Reliable Cardiac Abnormality Detection across Heterogeneous ECG Datasets
Authors
Research Scholar, Department of ECE, Mizoram University, Aizawl, Mizoram, India-796004. (India)
Professor, Department of ECE, Mizoram University, Aizawl, Mizoram, India-796004. (India)
Article Information
DOI: 10.51583/IJLTEMAS.2026.151000077
Subject Category: Computer Science
Volume/Issue: 15/10 | Page No: 917-958
Publication Timeline
Submitted: 2026-09-26
Accepted: 2026-10-01
Published: 2026-11-07
Abstract
While deep learning has made significant advances in cardiac abnormality detection using electrocardiograms (ECG), current achievements are based on landmark classification accuracy, which may not necessarily translate to reliable performance on heterogeneous datasets, calibrated confidence or clinically interpretable predictions. Current ECG learning methods are often domain-dependent, and they treat explainability and uncertainty estimation as separate components. To address these drawbacks, this study proposes TrustECG-DG, an explainable, uncertainty-calibrated, and domain-generalised deep learning framework for reliable cardiac abnormality detection from multi-lead ECG signals. It combines a multi-scale convolutional neural network to learn morphological features with a temporal Transformer to model long-range rhythm dependencies. Cross-attention between morphological and temporal representations is used bidirectionally. The framework jointly learns domain-invariant features, class-aware contrastive alignment, and covariance-based feature alignment to improve domain robustness. A deep ensemble of 5 models is then used, along with temperature scaling, to quantify prediction uncertainty and improve probability calibration. To facilitate interpretation, Integrated Gradients and Transformer attention rollout methods explain the ECG regions the model relies on for its predictions, and an attentive prediction mechanism is designed to pass uncertain cases to an expert for evaluation. Experimental results show that the proposed framework achieves 98.7% accuracy on the test set. Beyond classification performance, the framework is assessed using class-wise predictive metrics, cross-dataset generalisation, ablation analysis, calibration, uncertainty estimation, and explanation analysis. The resulting framework offers a unified solution that integrates accurate ECG classification, robustness, calibrated confidence, interpretability, and selective decision-making, providing a more reliable basis for intelligently detecting cardiac abnormalities using an ECG.
Keywords
Electrocardiogram, ECG classification, deep learning, Transformer, domain generalisation, uncertainty estimation, explainable artificial intelligence, Integrated Gradients, contrastive learning, cardiac abnormality detection.
This article is licensed under a Creative Commons Attribution 4.0 International License (CC BY 4.0).
Downloads
References
1. Aladhadh, S., (2026). Explainable and High-Performance ECG-Informed Machine Learning and Deep Learning Framework for Cardiovascular Risk Prediction. Life, 16(8), p.1-20. [Google Scholar] [Crossref]
2. https://doi.org/10.3390/life16081259 [Google Scholar] [Crossref]
3. Seoni, S., Molinari, F., Acharya, U.R., Lih, O.S., Barua, P.D., García, S. and Salvi, M., (2024). Application of spatial uncertainty predictor in CNN-BiLSTM model using coronary artery disease ECG signals. Information Sciences, 665, p.1-15. https://doi.org/10.1016/j.ins.2024.120383 [Google Scholar] [Crossref]
4. Li, X., Zheng, Q., Zhang, S., Fu, S., Chen, Y. and Ye, K., (2025). A reliable deep learning model for ECG interpretation: Mitigating overconfidence and direct uncertainty quantification. Symmetry, 17(5), p.1-16. https://doi.org/10.3390/sym17050794 [Google Scholar] [Crossref]
5. Tenepalli, D. and Navamani, T.M., (2025). Design of an Explainable Deep Learning Framework for ECG-Based Arrhythmia Prediction. IEEE Access, 13, pp.200754-200768. Digital Object Identifier 10.1109/ACCESS.2025.3636481 [Google Scholar] [Crossref]
6. Oladunni, T. and Aneni, E., (2025). Explainable deep neural network for multimodal ECG signals: Intermediate versus late fusion. IEEE Access, 13, pp.202700-202736. Digital Object Identifier 10.1109/ACCESS.2025.3631544 [Google Scholar] [Crossref]
7. Talukder, M.A., Talaat, A.S., Muna, N.J., Alazab, A., Kazi, M. and Das, U.K., (2025). An explainable deep learning framework for trustworthy arrhythmia detection from ECG signals. Scientific Reports, 15(1), p.1-28. https://doi.org/10.1038/s41598-025-22986-0 [Google Scholar] [Crossref]
8. Abdullah, Fatima, Z., Abadian, A., Mejorada, C.G.S., Ruiz, M.J.T. and Téllez, R.Q., (2026). Integration of Machine Learning Techniques in ECG-Based Multiclass Arrhythmia Classification with Explainability Analysis. Biosensors, 16(6), p.1-33. https://doi.org/10.3390/bios16060326 [Google Scholar] [Crossref]
9. Vallabhuni, S., Naganjaneyulu, P.V. and Renuka, N., (2026). Explainable Deep Learning with Transfer Learning for Scalable ECG-based Cardiac Abnormality Detection. International Journal of Computational Intelligence Systems. Pp.1-57. Int J ComputIntell Syst https://doi.org/10.1007/s44196-026-01396-8 [Google Scholar] [Crossref]
10. Oporto, E., Mauricio, D., Maculan, N. and Uribe, G., (2026). Challenges in the classification of cardiac arrhythmias and ischemia using end-to-end deep learning and the electrocardiogram: A systematic review. Diagnostics, 16(1), p.1-40. https://doi.org/10.3390/diagnostics16010161 [Google Scholar] [Crossref]
11. Preanto, S.A., Bijoy, M.H.I., Paul, T., Khan, F., Hasan, M.Z., Arefin, M.S., Dhar, P.K., Ohidujjaman and Samad, M.A., (2026). A systematic review of machine learning and explainable artificial intelligence for electrocardiogram based cardiovascular disease prediction. Discover Artificial Intelligence, 6(1), p.1-55. https://doi.org/10.1007/s44163-026-02070-w [Google Scholar] [Crossref]
12. Rani, J., Gupta, S. and Mittal, V., (2026). Robust and Calibrated ECG Heartbeat Classification via Hybrid Convolutional, Temporal and Attention-Based Learning. Applied Sciences, 16(9), p.1-30. [Google Scholar] [Crossref]
13. https://doi.org/10.3390/app16094393 [Google Scholar] [Crossref]
14. Li, R., Aierken, Y., Xu, Y., Liu, J. and Tang, Y., (2025). Research on cross-dataset cardiac signal domain generalization and feature interpretability. Scientific Reports, 16(1), p.1-23. [Google Scholar] [Crossref]
15. https://doi.org/10.1038/s41598-025-33057-9 [Google Scholar] [Crossref]
16. Kim, M. and Shin, M., (2026). Enhancing ECG Classification Generalization Through Unified Multi-Dataset Training. Sensors, 26(6), p.1-22. https://doi.org/10.3390/s26061830 [Google Scholar] [Crossref]
17. Murali, P. and Meenatchi, S., (2026). A Review on Explainable, Federated Multimodal AI for Heart Disease Detection Using ECG, Cardiac Imaging, and Electronic Health Records. Engineering Reports, 8(4), p.1-30. https://doi.org/10.1002/eng2.70687 [Google Scholar] [Crossref]
18. Islam, M.M. and Alawad, M., (2025). Resource-aware ECG classification with heterogeneous models in federated learning. Future Internet, 17(3), p.1-15. https://doi.org/10.3390/fi17030130 [Google Scholar] [Crossref]
19. Khan, M.R., Haider, Z.M., Hussain, J., Khan, M.A. and Abdullah, S., (2026). AI based ECG data recovery and cardiovascular diseases classification (CEDRC-network). Scientific Reports. p.1-18. [Google Scholar] [Crossref]
20. https://doi.org/10.1038/s41598-026-46232-3 [Google Scholar] [Crossref]
21. Majid, M.D., Anwar, M., Bilal, S.F., Hussain, M., Zubair, M., Sultana, J. and Habib, M.A., (2026). A hybrid learning framework for automated multiclass electrocardiogram classification with SimCardioNet. Scientific reports, 16(1), p.1-32. https://doi.org/10.1038/s41598-026-36932-1 [Google Scholar] [Crossref]
22. Bulbul, A.A.M., Awal, M.A., Mahendran, N., Islam, S.M.S., Pogrebna, G., Ross, A.G. and Moni, M.A., (2026). Deep learning for ECG-based cardiovascular disease diagnosis: a systematic review and meta-analysis. Artificial Intelligence Review, 59(6), p.1-42. [Google Scholar] [Crossref]
23. https://doi.org/10.1007/s10462-025-11479-1 [Google Scholar] [Crossref]
24. Naeem, M., (2026). Demographic-aware temporal graph attention for fair and accurate cardiac abnormality detection in 12-lead ECG. Scientific Reports, 16(1), p.1-25. [Google Scholar] [Crossref]
25. https://doi.org/10.1038/s41598-026-54206-8 [Google Scholar] [Crossref]
26. Dade, D., Bergquist, J.A., MacLeod, R.S., Steinberg, B.A. and Tasdizen, T., (2026). Self-supervised contrastive learning enables robust ECG-based cardiac classification. Heart Rhythm O2. [Google Scholar] [Crossref]
27. Pp.1-14. https://doi.org/10.1016/j.hroo.2026.01.016 [Google Scholar] [Crossref]
28. Jiang, H., Mutahira, H., Wei, S. and Muhammad, M.S., (2025). ECG-Mamba: cardiac abnormality classification with non-uniform-mix augmentation on 12-lead ECGs. IEEE Journal of Translational Engineering in Health and Medicine. Pp.1-10. Digital Object Identifier 10. 1109/ JTEHM.2025 .3613609 [Google Scholar] [Crossref]
29. Wagner, P., Strodthoff, N., Bousseljot, R., Samek, W., and Schaeffter, T. (2022) 'PTB-XL, a large publicly available electrocardiography dataset' (version 1.0.3), PhysioNet. RRID:SCR_007345. [Google Scholar] [Crossref]
30. Available at: https://doi.org/10.13026/kfzx-aw45 [Google Scholar] [Crossref]
31. Reyna, M., Sadr, N., Gu, A., Perez Alday, E. A., Liu, C., Seyedi, S., Shah, A., and Clifford, G. D. (2021) 'Will Two Do? Varying Dimensions in Electrocardiography: The PhysioNet/Computing in Cardiology Challenge 2021' (version 1.0.2), PhysioNet. RRID:SCR_007345. Available at: https://doi.org/10.13026/jz9p-0m02 [Google Scholar] [Crossref]
Metrics
Views & Downloads
Similar Articles
- Explainable 3D Convolutional Neural Networks Spatiotemporal Learning for Human Handshake Interaction Recognition
- Comprehensive Empirical Benchmarking of Twelve Sorting Algorithms Across Comparison-Based, Non-Comparison-Based, and Hybrid Paradigms: A Multi-Dimensional Performance Model for Algorithm Selection at Practical Data Scales (n up to 100,000)
- Reinforcement Learning for Personalized Insulin Dosing: A Comparative Study of A2C, SAC and PPO on Real-World Clinical Data
- Faculty Milestone Manager and Appraisal System: A Web-Based Solution Part 1
- Improving Diabetes Prediction Through IQR Outlier Treatment an Evaluation of XGBoost And LightGBM Models
This work is licensed under CC BY 4.0