Classification of ECG Signals Using CNNs: An Improved Model for Cardiac Disease Diagnosis
DOI:
https://doi.org/10.59746/kxbg0r45Keywords:
Deep learning, ECG signal, Atrial fibrillation, Convolutional neural network, Heart rate variabilityAbstract
The analysis of ECG signals poses significant challenges as a result of the complex electrical patterns of the heart and issues related to the imbalanced data. Addressing such challenges requires having advanced methods and models for the purpose of ensuring accurate diagnoses and improving the results of the treatments. The combination of the ECG analysis with the approaches of artificial intelligence (AI) became a priority for the health-care improvement, especially as the prevalence of heart diseases keeps rising worldwide. In the present study, Convolutional Neural Networks (CNNs) have been used for creating a classification model for the ECG signals, tested across the balanced as well as the imbalanced data structures from MIT-BIH Arrhythmia data-sets. Results have shown consistently high accuracy of classification, which exceeds 98% in all of the cases. For example, the model has been able to achieve 98.36% accuracy with the unbalanced data after 20 cycles (epochs) of training with the use of the early stopping. When the number of the cycles has been increased to 104, with extended patience setting of 25, accuracy has been increased to 98.76%. Balanced data had produced outcomes that are slightly better, with the model reaching an accuracy level of 98.88% in 25 cycles and 98.45% in 20 cycles. These findings have highlighted the importance of the training cycle count as well as the data balance in increasing the accuracy of the model. Moreover, early stopping proved beneficial in maintaining high performance and training efficiency in ECG signal classification.
References
[1] R. Morello, F. Ruffa, I. Jablonski, L. Fabbiano, and C. De Capua, ‘An IoT based ECG system to diagnose cardiac pathologies for healthcare applications in smart cities’, Measurement, vol. 190, p. 110685, Feb. 2022, doi: 10.1016/j.measurement.2021.110685.
[2] A. Gour, M. Gupta, R. Wadhvani, and S. Shukla, ‘ECG Based Heart Disease Classification: Advancement and Review of Techniques’, Procedia Comput. Sci., vol. 235, pp. 1634–1648, 2024, doi: 10.1016/j.procs.2024.04.155.
[3] S. Yuan, S. Fan, Z. Deng, and P. Pan, ‘Heart Rate Variability Monitoring Based on Doppler Radar Using Deep Learning’, Sensors, vol. 24, no. 7, p. 2026, Mar. 2024, doi: 10.3390/s24072026.
[4] H. V. Denysyuk et al., ‘Algorithms for automated diagnosis of cardiovascular diseases based on ECG data: A comprehensive systematic review’, Heliyon, vol. 9, no. 2, p. e13601, Feb. 2023, doi: 10.1016/j.heliyon. 2023.e13601.
[5] D. Li, J. Zhang, Q. Zhang, and X. Wei‘Classification of ECG signals based on 1D convolution neural network’,in Proceedings of the IEEE 19th International Conference on e-Health Networking, Applications and Services (Healthcom), Oct. 2017, pp. 1–6.
[6] T. Anbalagan, M. K. Nath, D. Vijayalakshmi, and A. Anbalagan, ‘Analysis of various techniques for ECG signal in healthcare, past, present, and future’, Biomedical Engineering Advances, vol. 6, p. 100089, Nov. 2023, doi: 10.1016/j.bea.2023.100089.
[7] S. Celin and K. Vasanth, ‘ECG Signal Classification Using Various Machine Learning Techniques’, J. Med. Syst., vol. 42, no. 12, p. 241, Dec. 2018, doi: 10.1007/s10916-018-1083-6.
[8] S. Ansari, J. Gryak, and K. Najarian,‘Noise detection in electrocardiography signal for robust heart rate variability analysis: A deep learning approach’,in Proceedings of the 40th Annual International Conference of the IEEE Engineering in Medicine and Biology Society (EMBC), Jul. 2018, pp. 5632–5635.
[9] A. Iftene, A. Burlacu, and D. Gifu, ‘Atrial Fibrillation Detection Based on Deep Learning Models’, Procedia Comput. Sci., vol. 207, pp. 3752–3760, 2022, doi: 10.1016/j.procs.2022.09.436.
[10] Z. Ebrahimi, M. Loni, M. Daneshtalab, and A. Gharehbaghi, ‘A review on deep learning methods for ECG arrhythmia classification’, Expert Systems with Applications: X, vol. 7, p. 100033, Sep. 2020, doi: 10.1016/j.eswax.2020.100033.
[11] S. K., S. V., G. E.A., and S. K.P., ‘Explainable artificial intelligence for heart rate variability in ECG signal’, Healthc. Technol. Lett., vol. 7, no. 6, pp. 146–154, Dec. 2020, doi: 10.1049/htl.2020.0033.
[12] A. A. Ahmed, W. Ali, T. A. A. Abdullah, and S. J. Malebary, ‘Classifying Cardiac Arrhythmia from ECG Signal Using 1D CNN Deep Learning Model’, Mathematics, vol. 11, no. 3, p. 562, Jan. 2023, doi: 10.3390/math11030562.
[13] G. B. Moody and R. G. Mark,‘The impact of the MIT-BIH arrhythmia database’, IEEE Engineering in Medicine and Biology Magazine, vol. 20, no. 3, pp. 45–50, Jun. 2001
[14] A. L. Goldberger et al., ‘PhysioBank, PhysioToolkit, and PhysioNet’, Circulation, vol. 101, no. 23, Jun. 2000, doi: 10.1161/01.CIR.101.23.e215.
[15] M. E. Kilic, O. A. Tufekcioglu, Y. R. Yilancioglu, O. E. Turan, and E. E. Ozcan, ‘Explainable AI for Specific Arrhythmia Detection: SHAP-Based Insights from Multi-Lead ECG Data’, J. Med. Biol. Eng., vol. 45, no. 2, pp. 314–324, Apr. 2025, doi: 10.1007/s40846-025-00949-0.
[16] Z. Mei, X. Gu, H. Chen, and W. Chen,‘Automatic atrial fibrillation detection based on heart rate variability and spectral features’,IEEE Access, vol. 6, pp. 53566–53575, Sep. 2018.
[17] J. Pestana, D. Belo, and H. Gamboa, ‘Detection of Abnormalities in Electrocardiogram (ECG) using Deep Learning’, in Proceedings of the 13th International Joint Conference on Biomedical Engineering Systems and Technologies, SCITEPRESS - Science and Technology Publications, 2020, pp. 236–243. doi: 10.5220/0008967302360243
[18] P. Cao et al., ‘A novel data augmentation method to enhance deep neural networks for detection of atrial fibrillation’, Biomed. Signal Process. Control, vol. 56, p. 101675, Feb. 2020, doi: 10.1016/j.bspc.2019.101675.
.[19] G. Hirsch, S. H. Jensen, E. S. Poulsen, and S. Puthusserypady, ‘Atrial fibrillation detection using heart rate variability and atrial activity: A hybrid approach’, Expert Syst. Appl., vol. 169, p. 114452, May 2021, doi: 10.1016/j.eswa.2020.114452.
[20] M. Wu, Y. Lu, W. Yang, and S. Y. Wong, ‘A Study on Arrhythmia via ECG Signal Classification Using the Convolutional Neural Network’, Front. Comput. Neurosci., vol. 14, Jan. 2021, doi: 10.3389/fncom.2020.564015.
