A Cost-Based Dual ConvNet-Attention Transfer Learning Model for ECG Heartbeat Classification

Main Article Content

Johnson Olanrewaju Victor
XinYing Chew
Khai Wah Khaw
Ming Ha Lee

Abstract

The heart is a very crucial organ of the body. Concerted efforts are constantly put forward to provide adequate monitoring of the heart. A heart disorder is reported to cause a lot of hidden ailments resulting in numerous deaths. Early heart monitoring using an electrocardiogram (ECG) through the advancement of computer-aided diagnostic (CAD) systems is widely used. Meanwhile, the use of human reading of ECG results are faced with many challenges of inaccurate and unreliable interpretations. Over two decades, studies provided artificial intelligence (AI) technique using machine learning (ML) algorithms as a fast and reliable technique for ECG heartbeat classification. Moreover, in recent times, deep learning (DL) techniques have been focused on providing automatic feature extraction and better classification performance. On the other hand, the challenge with the ECG data is its imbalance nature. Therefore, this paper proposes a cost-based dual convolutional attention transfer DL model for ECG classification. The proposed model uses PhysionNet-MIT-BIH and Physikalisch-Technische Bundesanstalt (PTB) Diagnostics datasets. The first part uses the MIT-BIH for ECG categorization, while representations learned from the first classifier are used for PTB analysis through transfer learning (TL). The proposed model is evaluated and compared with well-performing conventional ML models based on their F1-score and accuracy scores. Our experimental finding show that the proposed model outperformed the well-performing ML models as well as competitive with past studies for both the classification and TL part, having obtained 98.45% for both F1-score and accuracy. The proposed model is applicable to real-life trials and experiments for ECG heartbeat and other similar domains.

Article Details

How to Cite
Johnson Olanrewaju Victor, Chew, X., Khaw, K. W., & Lee, M. H. (2023). A Cost-Based Dual ConvNet-Attention Transfer Learning Model for ECG Heartbeat Classification. Journal of Informatics and Web Engineering, 2(2), 90–110. https://doi.org/10.33093/jiwe.2023.2.2.7
Section
Regular issue

References

T. T. Mayabee, K. T. Haque, S. B. Alam, R. Rahman, M. A. Amin, and S. Kobashi, “ECG Signal Classification Using Transfer Learning and Convolutional Neural Networks,” M. S. Kaiser, S. Waheed, A. Bandyopadhyay, M. Mahmud, and K. Ray, Eds., in Lecture Notes in Networks and Systems, vol. 618. Singapore: Springer Nature Singapore, 2023. doi: 10.1007/978-981-19-9483-8.

Mohebbanaaz, L. V. R. Kumar, and Y. P. Sai, “A new transfer learning approach to detect cardiac arrhythmia from ECG signals,” Signal Image Video Process, vol. 16, no. 7, pp. 1945–1953, 2022, doi: 10.1007/s11760-022-02155-w.

B.-T. Pham, P. T. Le, T.-C. Tai, Y.-C. Hsu, Y.-H. Li, and J.-C. Wang, “Electrocardiogram Heartbeat Classification for Arrhythmias and Myocardial Infarction,” Sensors, vol. 23, no. 6, p. 2993, 2023, doi: 10.3390/s23062993.

F. Khan, X. Yu, Z. Yuan, and A. U. Rehman, “ECG classification using 1-D convolutional deep residual neural network,” PLoS One, vol. 18, no. 4, p. e0284791, 2023, doi: 10.1371/journal.pone.0284791.

M. Alfaras, M. C. Soriano, and S. Ortín, “A Fast Machine Learning Model for ECG-Based Heartbeat Classification and Arrhythmia Detection,” Front Phys, vol. 7, no. July, pp. 1–11, 2019, doi: 10.3389/fphy.2019.00103.

S. Tiwari et al., “A smart decision support system to diagnose arrhythymia using ensembled ConvNet and ConvNet-LSTM model,” Expert Syst Appl, vol. 213, no. PA, p. 118933, 2023, doi: 10.1016/j.eswa.2022.118933.

K. Y. Ngiam and I. W. Khor, “Big data and machine learning algorithms for healthcare delivery,” Lancet Oncol, vol. 20, no. 5, pp. e262–e273, May 2019, doi: 10.1016/S1470-2045(19)30149-4.

M. A. Ahamed, K. A. Hasan, K. F. Monowar, N. Mashnoor, and M. A. Hossain, “ECG heartbeat classification using ensemble of efficient machine learning approaches on imbalanced datasets,” 2020 2nd International Conference on Advanced Information and Communication Technology, ICAICT 2020, no. November, pp. 140–145, 2020, doi: 10.1109/ICAICT51780.2020.9333534.

M. S. Bin Sinal and E. Kamioka, “Early abnormal heartbeat multistage classification by using decision tree and K-nearest neighbor,” ACM International Conference Proceeding Series, pp. 29–34, 2018, doi: 10.1145/3299819.3299848.

Z. Ahmad, A. Tabassum, L. Guan, and N. Khan, “ECG heartbeat classification using multimodal image fusion,” ICASSP, IEEE International Conference on Acoustics, Speech and Signal Processing - Proceedings, vol. 2021-June, pp. 1330–1334, 2021, doi: 10.1109/ICASSP39728.2021.9414709.

Y. Zhang, J. Li, S. Wei, F. Zhou, and D. Li, “Heartbeats Classification Using Hybrid Time-Frequency Analysis and Transfer Learning Based on ResNet,” IEEE J Biomed Health Inform, vol. 25, no. 11, pp. 4175–4184, 2021, doi: 10.1109/JBHI.2021.3085318.

T. F. Romdhane, H. Alhichri, R. Ouni, and M. Atri, “Electrocardiogram heartbeat classification based on a deep convolutional neural network and focal loss,” Comput Biol Med, vol. 123, no. July, p. 103866, 2020, doi: 10.1016/j.compbiomed.2020.103866.

E. Essa and X. Xie, “An Ensemble of Deep Learning-Based Multi-Model for ECG Heartbeats Arrhythmia Classification,” IEEE Access, vol. 9, pp. 103452–103464, 2021, doi: 10.1109/ACCESS.2021.3098986.

F. I. Alarsan and M. Younes, “Analysis and classification of heart diseases using heartbeat features and machine learning algorithms,” J Big Data, vol. 6, no. 1, 2019, doi: 10.1186/s40537-019-0244-x.

A. L. Goldberger et al., “PhysioBank, PhysioToolkit, and PhysioNet: Components of a new research resource for complex physiologic signals,” Circulation, vol. 101, no. 23, pp. e215--e220, 2000, [Online]. Available: https://www.physionet.org/content/physiobank

F. Zhuang et al., “A Comprehensive Survey on Transfer Learning,” Proceedings of the IEEE, vol. 109, no. 1, pp. 43–76, 2021, doi: 10.1109/JPROC.2020.3004555.

K. Weiss, T. M. Khoshgoftaar, and D. D. Wang, A survey of transfer learning, vol. 3, no. 1. Springer International Publishing, 2016. doi: 10.1186/s40537-016-0043-6.

A. Choudhury, S. Vuppu, S. Pratap Singh, M. Kumar, and S. Nakharu Prasad Kumar, “ECG-based heartbeat classification using exponential-political optimizer trained deep learning for arrhythmia detection,” Biomed Signal Process Control, vol. 84, no. January, p. 104816, 2023, doi: 10.1016/j.bspc.2023.104816.

F. S. Butt, L. La Blunda, M. F. Wagner, J. Schäfer, I. Medina-Bulo, and D. Gómez-Ullate, “Fall detection from electrocardiogram (ECG) signals and classification by deep transfer learning,” Information (Switzerland), vol. 12, no. 2, pp. 1–22, 2021, doi: 10.3390/info12020063.

Q. U. A. Mastoi et al., “Novel DERMA Fusion Technique for ECG Heartbeat Classification,” Life, vol. 12, no. 6, pp. 1–13, 2022, doi: 10.3390/life12060842.

S. Nurmaini, A. Darmawahyuni, A. N. S. Mukti, M. N. Rachmatullah, F. Firdaus, and B. Tutuko, “Deep learning-based stacked denoising and autoencoder for ECG heartbeat classification,” Electronics (Switzerland), vol. 9, no. 1, pp. 1–17, 2020, doi: 10.3390/electronics9010135.

S. Aziz, S. Ahmed, and M. S. Alouini, “ECG-based machine-learning algorithms for heartbeat classification,” Sci Rep, vol. 11, no. 1, pp. 1–14, 2021, doi: 10.1038/s41598-021-97118-5.

A. M. Alqudah, S. Qazan, L. Al-Ebbini, H. Alquran, and I. A. Qasmieh, ECG heartbeat arrhythmias classification: a comparison study between different types of spectrum representation and convolutional neural networks architectures, vol. 13, no. 10. Springer Berlin Heidelberg, 2022. doi: 10.1007/s12652-021-03247-0.

F. Murat, O. Yildirim, M. Talo, U. B. Baloglu, Y. Demir, and U. R. Acharya, “Application of deep learning techniques for heartbeats detection using ECG signals-analysis and review,” Comput Biol Med, vol. 120, no. March, p. 103726, 2020, doi: 10.1016/j.compbiomed.2020.103726.

Q. Xie, S. Tu, G. Wang, Y. Lian, and L. Xu, “Feature enrichment based convolutional neural network for heartbeat classification from electrocardiogram,” IEEE Access, vol. 7, pp. 153751–153760, 2019, doi: 10.1109/ACCESS.2019.2948857.

M. K. Gajendran, M. Z. Khan, and M. A. K. Khattak, “ECG classification using deep transfer learning,” Proceedings - 2021 4th International Conference on Information and Computer Technologies, ICICT 2021, pp. 1–5, 2021, doi: 10.1109/ICICT52872.2021.00008.

I. Moran, D. T. Altilar, M. K. Ucar, C. Bilgin, and M. R. Bozkurt, “Deep Transfer Learning for Chronic Obstructive Pulmonary Disease Detection Utilizing Electrocardiogram Signals,” IEEE Access, vol. 11, no. March, pp. 40629–40644, 2023, doi: 10.1109/ACCESS.2023.3269397.

A. Pal, R. Srivastva, and Y. N. Singh, “CardioNet: An Efficient ECG Arrhythmia Classification System Using Transfer Learning,” Big Data Research, vol. 26, p. 100271, 2021, doi: 10.1016/j.bdr.2021.100271.

M. Kachuee, S. Fazeli, and M. Sarrafzadeh, “ECG heartbeat classification: A deep transferable representation,” Proceedings - 2018 IEEE International Conference on Healthcare Informatics, ICHI 2018, pp. 443–444, 2018, doi: 10.1109/ICHI.2018.00092.

A. Bizzego, G. Gabrieli, and G. Esposito, “Deep neural networks and transfer learning on a multivariate physiological signal dataset,” Bioengineering, vol. 8, no. 3, pp. 1–12, 2021, doi: 10.3390/bioengineering8030035.

Y. Cui, M. Jia, T. Y. Lin, Y. Song, and S. Belongie, “Class-balanced loss based on effective number of samples,” Proceedings of the IEEE Computer Society Conference on Computer Vision and Pattern Recognition, vol. 2019-June, pp. 9260–9269, 2019, doi: 10.1109/CVPR.2019.00949.

J. M. Johnson and T. M. Khoshgoftaar, “Survey on deep learning with class imbalance,” J Big Data, vol. 6, no. 1, 2019, doi: 10.1186/s40537-019-0192-5.

M. Togacar, K. B. Ozkurt, B. Ergen, and Z. Comert, “BreastNet: A novel convolutional neural network model through histopathological images for the diagnosis of breast cancer,” Physica A: Statistical Mechanics and its Applications, vol. 545, p. 123592, 2020, doi: 10.1016/j.physa.2019.123592.

H. He, W. Zhang, and S. Zhang, “A novel ensemble method for credit scoring: Adaption of different imbalance ratios,” Expert Syst Appl, vol. 98, pp. 105–117, 2018, doi: 10.1016/j.eswa.2018.01.012.

A. C. Kae, C. Xinying, J. O. Victor, and K. K. Wah, “Employee Turnover Prediction by Machine Learning Techniques,” Journal of Telecommunication, Electronic and Computer Engineering, vol. 13, no. 4, pp. 49–56, 2021, [Online]. Available: https://jtec.utem.edu.my/jtec/article/view/6148/4063

S. Wang, W. Liu, J. Wu, L. Cao, Q. Meng, and P. J. Kennedy, “Training deep neural networks on imbalanced data sets,” Proceedings of the International Joint Conference on Neural Networks, vol. 2016-Octob, pp. 4368–4374, 2016, doi: 10.1109/IJCNN.2016.7727770.

M. Zubair and C. Yoon, “Cost-Sensitive Learning for Anomaly Detection in Imbalanced ECG Data Using Convolutional Neural Networks,” Sensors, vol. 22, no. 11, 2022, doi: 10.3390/s22114075.

J. Liu, M. Zeng, K. Shan, and L. Tian, “Loss Optimization Based Algorithm for Multi-classification of ECG Signal,” ACM International Conference Proceeding Series, pp. 537–541, 2022, doi: 10.1145/3570773.3570856.

E. K. Wang, X. Zhang, and L. Pan, “Automatic Classification of CAD ECG Signals with SDAE and Bidirectional Long Short-Term Network,” IEEE Access, vol. 7, no. Ld, pp. 182873–182880, 2019, doi: 10.1109/ACCESS.2019.2936525.

S. H. Khan, M. Hayat, M. Bennamoun, F. A. Sohel, and R. Togneri, “Cost-sensitive learning of deep feature representations from imbalanced data,” IEEE Trans Neural Netw Learn Syst, vol. 29, no. 8, pp. 3573–3587, 2018, doi: 10.1109/TNNLS.2017.2732482.

S. M. Mathews, C. Kambhamettu, and K. E. Barner, “A novel application of deep learning for single-lead ECG classification,” Comput Biol Med, vol. 99, no. May 2017, pp. 53–62, 2018, doi: 10.1016/j.compbiomed.2018.05.013.

M. L. Talbi, A. Charef, F. Abdelliche, and P. Ravier, “Heartbeat Classification Using ANFIS System and QRS Complex Features Extraction,” ACM International Conference Proceeding Series, 2020, doi: 10.1145/3432867.3432892.

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, 2001, doi: 10.1109/51.932724.

L. Kersey, K. Lilly, and N. Park, “ECG heartbeat classification: An exploratory study,” ACM International Conference Proceeding Series, pp. 20–27, 2018, doi: 10.1145/3314487.3314491.

A. Vaid et al., “A foundational vision transformer improves diagnostic performance for electrocardiograms,” NPJ Digit Med, vol. 6, no. 1, 2023, doi: 10.1038/s41746-023-00840-9.

Y. Dong, M. Zhang, L. Qiu, L. Wang, and Y. Yu, “An Arrhythmia Classification Model Based on Vision Transformer with Deformable Attention,” Micromachines (Basel), vol. 14, no. 6, p. 1155, 2023, doi: 10.3390/mi14061155.

Z. Niu, G. Zhong, and H. Yu, “A review on the attention mechanism of deep learning,” Neurocomputing, vol. 452, pp. 48–62, 2021, doi: 10.1016/j.neucom.2021.03.091.

S. N. Chakravarthy, H. Singhal, and N. R. P. Yadav, “DR-NET: A Stacked Convolutional Classifier Framework for Detection of Diabetic Retinopathy,” Proceedings of the International Joint Conference on Neural Networks, vol. 2019-July, no. 1, 2019, doi: 10.1109/IJCNN.2019.8852011.

M. Abadi et al., “TensorFlow: A system for large-scale machine learning,” in Proceedings of the 12th USENIX Symposium on Operating Systems Design and Implementation, OSDI 2016, 2016, pp. 265–283.

T. Agrawal, Hyperparameter Optimization in Machine Learning. 2021. doi: 10.1007/978-1-4842-6579-6.

R. Turner et al., “Bayesian Optimization is Superior to Random Search for Machine Learning Hyperparameter Tuning: Analysis of the Black-Box Optimization Challenge 2020,” Proc Mach Learn Res, vol. 133, pp. 3–26, 2020.