Abstract
As cardiac arrhythmia remains one of the leading causes of death worldwide, early and accurate diagnosis of cardiac arrhythmia is critical to improving patient outcomes. Electrocardiogram (ECG) analysis plays a critical role in the diagnosis of these diseases, and recent advances in deep learning have led to significant advances in automated ECG interpretation. However, the “black box” nature of these models limits clinical confidence and highlights the need for explainable artificial intelligence methods. This study presents an innovative MM-GradCAM method that combines two different data formats, providing explainability for both 1D ECG signal and 2D ECG image data. Using a dataset of more than 10,000 patients, a 17-layer CNN model capable of four-class arrhythmia detection was developed and separate explainability outputs were obtained for each data form. The resulting explainability maps were evaluated by a cardiologist and the interpretability and clinical significance of the model were verified. The signal form achieved 93.07% accuracy, while the image form achieved 97.44% accuracy. As a pioneering approach for explainability in medical diagnosis, MM-GradCAM has the potential to increase reliability and transparency in medical AI applications.
Similar content being viewed by others
Data availability
The dataset utilized in this study originates from the article "A 12-lead electrocardiogram database for arrhythmia research covering more than 10,000 patients" published in Scientific Data (Zheng et al., 2020). This dataset includes electrocardiogram (ECG) recordings of 10,646 patients, annotated with rhythm labels and additional cardiovascular conditions by professional experts. The dataset is publicly available and can be accessed via the figshare repository at: https://doi.org/10.6084/m9.figshare.c.4560497.v2
Code availability
All source code and implementations for the MM-GradCAM framework (including 1D CNN, 2D CNN and fusion modules) are publicly available on GitHub at https://github.com/FatmaMurat/MM_GradCAM to enable full transparency and reproducibility of our study.
References
Huang, J., Chen, B., Yao, B. & He, W. ECG arrhythmia classification using STFT-based spectrogram and convolutional neural network. IEEE Access https://doi.org/10.1109/ACCESS.2019.2928017 (2019).
Yao, Q., Wang, R., Fan, X., Liu, J. & Li, Y. Multi-class Arrhythmia detection from 12-lead varied-length ECG using attention-based time-incremental convolutional neural network. Inf. Fusion https://doi.org/10.1016/j.inffus.2019.06.024 (2020).
Hannun, A. Y. et al. Cardiologist-level arrhythmia detection and classification in ambulatory electrocardiograms using a deep neural network. Nat. Med. https://doi.org/10.1038/s41591-018-0268-3 (2019).
Murat, F. et al. Application of deep learning techniques for heartbeats detection using ECG signals-analysis and review. Comput. Biol. Med. 120, 103726. https://doi.org/10.1016/j.compbiomed.2020.103726 (2020).
Yildirim, Ö. A novel wavelet sequences based on deep bidirectional LSTM network model for ECG signal classification. Comput. Biol. Med. https://doi.org/10.1016/j.compbiomed.2018.03.016 (2018).
Jiang, J., Zhang, H., Pi, D. & Dai, C. A novel multi-module neural network system for imbalanced heartbeats classification. Expert Syst. with Appl. X. https://doi.org/10.1016/j.eswax.2019.100003 (2019).
Oh, S. L., Ng, E. Y. K., Tan, R. S. & Acharya, U. R. Automated diagnosis of arrhythmia using combination of CNN and LSTM techniques with variable length heart beats. Comput. Biol. Med. https://doi.org/10.1016/j.compbiomed.2018.06.002 (2018).
Acharya, U. R. et al. Automated detection of arrhythmias using different intervals of tachycardia ECG segments with convolutional neural network. Inf. Sci. (Ny) 405, 81–90. https://doi.org/10.1016/j.ins.2017.04.012 (2017).
Selvaraju, R. R., Cogswell, M., Das, A., Vedantam, R., Parikh, D. & Batra, D. Grad-Cam: Visual explanations from deep networks via gradient-based localization. In Proceedings of the IEEE International Conference on Computer Vision (2017)
Yoo, J., Jun, T. J. & Kim, Y. H. xECGNet: Fine-tuning attention map within convolutional neural network to improve detection and explainability of concurrent cardiac arrhythmias. Comput. Methods Programs Biomed. 208, 106281. https://doi.org/10.1016/j.cmpb.2021.106281 (2021).
Ozturk, T. et al. Automated detection of COVID-19 cases using deep neural networks with X-ray images. Comput. Biol. Med. 121, 103792. https://doi.org/10.1016/j.compbiomed.2020.103792 (2020).
Alhusseini, M. I. et al. Machine learning to classify intracardiac electrical patterns during atrial fibrillation: Machine learning of atrial fibrillation. Circ. Arrhythmia Electrophysiol. 13, E008160. https://doi.org/10.1161/CIRCEP.119.008160 (2020).
Kuo, B. I. et al. Keratoconus screening based on deep learning approach of corneal topography. Transl. Vis Sci. Technol. 9, 1–11. https://doi.org/10.1167/tvst.9.2.53 (2020).
Brunese, L., Mercaldo, F., Reginelli, A. & Santone, A. Explainable deep learning for pulmonary disease and coronavirus COVID-19 detection from X-rays. Comput. Methods Programs Biomed. 196, 105608. https://doi.org/10.1016/j.cmpb.2020.105608 (2020).
Murat-Duranay, F. et al. Arrhythmia detection in multi-channel ECG images: vision transformer and explainable approaches. Knowl.-Based Syst. 331, 114889. https://doi.org/10.1016/j.knosys.2025.114889 (2025).
Wang, J. et al. Automated ECG classification using a non-local convolutional block attention module. Comput. Methods Programs Biomed. https://doi.org/10.1016/j.cmpb.2021.106006 (2021).
Kim, J. K., Jung, S., Park, J. & Han, S. W. Arrhythmia detection model using modified DenseNet for comprehensible Grad-CAM visualization. Biomed. Signal Process. Control. 73, 103408. https://doi.org/10.1016/j.bspc.2021.103408 (2022).
Kondo, T. et al. Prediction of short-term mortality of cardiac care unit patients using image-transformed ECG waveforms. IEEE J. Transl. Eng. Heal. Med. 11, 191–198. https://doi.org/10.1109/JTEHM.2023.3250352 (2023).
Le, K. H. et al. LightX3ECG: A lightweight and eXplainable deep learning system for 3-lead electrocardiogram classification. Biomed. Signal Process. Control. 85, 104963. https://doi.org/10.1016/j.bspc.2023.104963 (2023).
Varandas, R., Gonçalves, B., Gamboa, H. & Vieira, P. Quantified explainability: Convolutional neural network focus assessment in arrhythmia detection. BioMedInformatics 2, 124–138. https://doi.org/10.3390/biomedinformatics2010008 (2022).
Zheng, J. et al. A 12-lead electrocardiogram database for arrhythmia research covering more than 10,000 patients. Sci. Data. https://doi.org/10.1038/s41597-020-0386-x (2020).
Cho, Y. et al. Artificial intelligence algorithm for detecting myocardial infarction using six-lead electrocardiography. Sci. Rep. 10, 1–10. https://doi.org/10.1038/s41598-020-77599-6 (2020).
Hicks, S. A. et al. Explaining deep neural networks for knowledge discovery in electrocardiogram analysis. Sci. Rep. 11, 1–11. https://doi.org/10.1038/s41598-021-90285-5 (2021).
Jahmunah, V., Ng, E. Y. K., Tan, R. S., Oh, S. L. & Acharya, U. R. Explainable detection of myocardial infarction using deep learning models with Grad-CAM technique on ECG signals. Comput. Biol. Med. https://doi.org/10.1016/j.compbiomed.2022.105550 (2022).
Anand, A., Kadian, T., Shetty, M. K. & Gupta, A. Explainable AI decision model for ECG data of cardiac disorders. Biomed. Signal Process. Control. 75, 103584. https://doi.org/10.1016/j.bspc.2022.103584 (2022).
Han, C., Sun, J., Bian, Y., Que, W. & Shi, L. Automated Detection and Localization of Myocardial Infarction With Interpretability Analysis Based on Deep Learning. IEEE Trans. Instrum. Meas. 72, 1–12. https://doi.org/10.1109/TIM.2023.3258521 (2023).
Ma, G. et al. Evaluating and visualizing the contribution of ECG characteristic waveforms for PPG-based blood pressure estimation. Micromachines 13, 1438. https://doi.org/10.3390/mi13091438 (2022).
Sangha, V. et al. Automated multilabel diagnosis on electrocardiographic images and signals. Nat. Commun. https://doi.org/10.1038/s41467-022-29153-3 (2022).
Fang, R., Lu, C. C., Chuang, C. T. & Chang, W. H. A visually interpretable detection method combines 3-D ECG with a multi-VGG neural network for myocardial infarction identification. Comput. Methods Programs Biomed. 219, 106762. https://doi.org/10.1016/j.cmpb.2022.106762 (2022).
Ao, R. & He, G. Image based deep learning in 12-lead ECG diagnosis. Front. Artif. Intell. https://doi.org/10.3389/frai.2022.1087370 (2023).
Makimoto, H. et al. Performance of a convolutional neural network derived from an ECG database in recognizing myocardial infarction. Sci. Rep. 10, 1–9. https://doi.org/10.1038/s41598-020-65105-x (2020).
Singh, P. & Sharma, A. Interpretation and classification of arrhythmia using deep convolutional network. IEEE Trans. Instrum. Meas. 71, 1–12. https://doi.org/10.1109/TIM.2022.3204316 (2022).
Loh, H. W. et al. Deep neural network technique for automated detection of ADHD and CD using ECG signal. Comput. Methods Programs Biomed. 241, 107775. https://doi.org/10.1016/j.cmpb.2023.107775 (2023).
Funding
Open access funding provided by Manipal Academy of Higher Education, Manipal
Author information
Authors and Affiliations
Contributions
F.M.D. prepared and wrote the main manuscript text. E.M. interpreted and discussed the results from the medical perspective. Ö.Y. and Y.D. provided supervisory support during the study. R.-S.T. critically reviewed and refined the medical interpretations. N.S. and U.R.A. provided overall guidance, critical revisions, and expert supervision. All authors read and approved the final manuscript.
Corresponding author
Ethics declarations
Competing interests
The authors declare no competing interests.
Additional information
Publisher’s note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Rights and permissions
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article’s Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article’s Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by/4.0/.
About this article
Cite this article
Murat Duranay, F., Murat, E., Yıldırım, Ö. et al. MM-GradCAM: an improved multimodal GradCAM method with 1D and 2D ECG data for detection of cardiac arrhythmia. Sci Rep (2026). https://doi.org/10.1038/s41598-026-38654-w
Received:
Accepted:
Published:
DOI: https://doi.org/10.1038/s41598-026-38654-w


