A Multitier Deep Learning Model For Arrhythmia Detection
A Multitier Deep Learning Model For Arrhythmia Detection
A Multitier Deep Learning Model For Arrhythmia Detection
Abstract— An electrocardiograph (ECG) is employed as a main cause of deaths globally [1]. An estimated 17.9 million
primary tool for diagnosing cardiovascular diseases (CVDs). ECG succumbed to CVD-related ailments, representing 31% of all
signals provide a framework to probe the underlying properties deaths worldwide in the same year. Two-thirds of these deaths
and enhance the initial diagnosis obtained via traditional tools
and patient–doctor dialogs. Notwithstanding its proven utility, occurred in low-income countries [1] where medical facilities
deciphering large data sets to determine appropriate information for early detection and supports for patients of CVD are
remains a challenge in ECG-based CVD diagnosis and treatment. deemed generally poor.
Our study presents a deep neural network (DNN) strategy to Arrhythmia is a situation that arises when a person’s
ameliorate the aforementioned difficulties. Our strategy consists heart pacemaker does not work properly, or its functions are
of a learning stage where classification accuracy is improved
via a robust feature extraction protocol. This is followed by impaired by ectopic focuses [2]. There are several diagnostic
using a genetic algorithm (GA) process to aggregate the best methods available to detect CVDs. Electrocardiography (ECG)
combination of feature extraction and classification. Comparison is the most well-known and widely applied method for the
of the performance recorded for the proposed technique alongside detection of various heart diseases [3]. ECG is an affirmed
state-of-the-art methods reported the area shows an increase method for the detection of acute coronary syndromes, intra-
of 0.94 and 0.953 in terms of average accuracy and F1 score,
respectively. The outcomes suggest that the proposed model could ventricular conduction disturbances, and arrhythmias [4]. ECG
serve as an analytic module to alert users and/or medical experts lead refers to an imaginary line between two ECG elec-
when anomalies are detected. trodes [5]. The standard ECG has 12 leads, of which six leads
Index Terms— Advancement of medical instrumentation are placed on the arms and/or legs of the individual, and called
(AAMI) standard, arrhythmia detection, cardiovascular diseases limb leads, while the remaining leads are placed on the torso
(CVDs), deep neural network (DNN), E-healthcare devices, elec- and are referred to as precordial leads. The limb leads are
trocardiograph (ECG), genetic algorithm (GA). labeled as I, II, III, aVL, aVR, and aVF, while the precordial
leads are similarly labeled as V1, V2, V3, V4, V5, and V6.
Overall, ECG has valuable potential to reveal hidden disease
I. I NTRODUCTION features. However, the manual analysis of the long-term ECG
signals is a tiresome task even for an expert. Hence, developing
A CCORDING to the World Health Organization (WHO),
as of 2016, cardiovascular diseases (CVDs) are the a computer-aided cardiac diagnosis (CACD) system helps
clinicians in obtaining a second opinion regarding cardiac
Manuscript received May 10, 2020; revised August 6, 2020; accepted diagnosis, and they serve as tools supporting the decline of
October 2, 2020. Date of publication October 26, 2020; date of current
version December 22, 2020. This work was supported in part by Prince diagnostic errors in cardiology [6].
Sattam Bin Abdulaziz University, Saudi Arabia, via the Deanship for Scientific Several CACD systems have been developed to support
Research funding for the Advanced Computational Intelligence and Intelligent different stages of CVD diagnosis and treatment based on
Systems Engineering (ACIISE) Research Group, under Project 2019/01/9862.
The Associate Editor coordinating the review process was Sheng-Fu Liang. machine learning (ML) strategies. Most classical ML methods
(Corresponding author: Abdulhamit Subasi.) are based on the extraction of features from different sig-
Mohamed Hammad is with the Faculty of Computers and Infor- nal types, typically ECG, which are subsequently processed
mation, Menoufia University, Shebeen El-Kom 32511, Egypt (e-mail:
[email protected]). using different algorithms, such as random forest [7] and
Abdullah M. Iliyasu is with the Electrical Engineering Department, College support vector machines (SVMs) [8]. Similarly, employing
of Engineering, Prince Sattam Bin Abdulaziz University, Al-Kharj 11942, convolutional neural networks (CNNs), unsupervised feature
Saudi Arabia, also with the School of Computing, Tokyo Institute of Tech-
nology, Yokohama 226-8502, Japan, and also with the School of Computer extraction mechanisms have been used in the classification
Science and Technology, Changchun University of Science and Technology, of signals. While effective in its use to classify such signals,
Changchun 130022, China (e-mail: [email protected]). little has been invested in understanding the intrigues in CNN’s
Abdulhamit Subasi is with the Institute of Biomedicine, Faculty
of Medicine, University of Turku, 20520 Turku, Finland (e-mail: automated classification of the extracted features.
[email protected]). Meanwhile, advances in terms of available computational
Edmond S. L. Ho is with the Department of Computer and Information Sci- tools and algorithms have revealed that their use in automated
ences, Northumbria University, Newcastle upon Tyne NE1 8QH, U.K. (e-mail:
[email protected]). early detection and diagnosis of cardiac abnormalities is on
Ahmed A. Abd El-Latif is with the Mathematics and Computer Science the rise. Recently, focus on ECG rhythm (ECGr) classification
Department, Faculty of Science, Menoufia University, Shebeen El-Kom has similarly been on the increase. ECGr classification can be
32511, Egypt, and also with the School of Information Technology and Com-
puter Science, Nile University, Giza, Egypt (e-mail: [email protected]). grouped into areas that focus on finding effective extraction
Digital Object Identifier 10.1109/TIM.2020.3033072 methods [9], improving classification outcomes [10]–[14], and
1557-9662 © 2020 IEEE. Personal use is permitted, but republication/redistribution requires IEEE permission.
See https://www.ieee.org/publications/rights/index.html for more information.
Authorized licensed use limited to: VTU Consortium. Downloaded on March 09,2024 at 04:40:48 UTC from IEEE Xplore. Restrictions apply.
2502809 IEEE TRANSACTIONS ON INSTRUMENTATION AND MEASUREMENT, VOL. 70, 2021
Authorized licensed use limited to: VTU Consortium. Downloaded on March 09,2024 at 04:40:48 UTC from IEEE Xplore. Restrictions apply.
HAMMAD et al.: MULTITIER DLM FOR ARRHYTHMIA DETECTION 2502809
Authorized licensed use limited to: VTU Consortium. Downloaded on March 09,2024 at 04:40:48 UTC from IEEE Xplore. Restrictions apply.
2502809 IEEE TRANSACTIONS ON INSTRUMENTATION AND MEASUREMENT, VOL. 70, 2021
TABLE I
D EFAULT C HOICE OF B EST PARAMETERS FOR GA-BASED O PTIMIZATION
Authorized licensed use limited to: VTU Consortium. Downloaded on March 09,2024 at 04:40:48 UTC from IEEE Xplore. Restrictions apply.
HAMMAD et al.: MULTITIER DLM FOR ARRHYTHMIA DETECTION 2502809
Fig. 4. Samples of normal and abnormal classes from the MIT-BIH data set [21].
Authorized licensed use limited to: VTU Consortium. Downloaded on March 09,2024 at 04:40:48 UTC from IEEE Xplore. Restrictions apply.
2502809 IEEE TRANSACTIONS ON INSTRUMENTATION AND MEASUREMENT, VOL. 70, 2021
TABLE III
C OMPARISON OF I NTRAPATIENT ’ S C LASSIFICATION P ERFORMANCE OF U SING THE MIT-BIH D ATABASE
of a padding method can increase the computing complex- D. Results and Performance Analysis
ity of the model, while the truncation method can damage In this section, the results of experiments and performance
the recording integrity. Moreover, 90% of recordings in the of the proposed model are presented and discussed. Especially,
selected database are no longer than 30 s in length. In view of the proposed models are validated via three experiments.
this, as a tradeoff between computing efficiency and recording In the first experiment, the proposed end-to-end model is
integrity, 30-s-long recordings are chosen as the target length. employed without any ML stages. In the second experiment,
Furthermore, a zero-padding value was used because it is the the proposed deep model is used for feature extraction, and an
baseline value of the ECG signals. The padding was positioned external classifier (k-NN classifier) is employed for classifica-
at the head of each recording because LSTM is considered tion. In the last experiment, a comparison of the two proposed
more sensitive to values in the recording tail. Meanwhile, for models (i.e., end-to-end and DLM with external classifier)
the truncation, the model uses the same method that truncates alongside state-of-the-art approaches reported in the literature.
a segment randomly from the original signal. In addition, other As discussed earlier, based on the AAMI specification EC
fixed-length recordings (such as 10 and 20 s) were considered, 57 [33], using the MIT-BIH database [21], arrhythmia is con-
but the 30-s-length recordings remained the optimal choice. sidered as the beat level that can be classified as N, S, V, F, and
The randomness involved in the padding/truncation methods Q classes. Each beat contains 300 sampling points: 100 before
augments and balances the data set during this process. How- and 200 after the R peak (with Fs = 360 Hz). The lead II
ever, considering the additional memory requirements imposed data are used for the classification, so the channel number for
by the augmentation, the data augmentation and balancing are the input is 1. Four residual substructures in the DLM (i.e.,
done in batches. For each model training, a batch is generated ResNet-LSTM) model produce a local feature map of length
by randomly selecting a certain number of recordings from 18. Since this is a multiclass and single-label classification
each class and then padding or truncating these recordings as problem, SoftMax is used as the final activation function.
the case may demand. For example, for an adopted batch size Furthermore, both intrapatient and interpatient models are
of 63 and a class numbers of 5, a batch contains seven record- trained for this problem. For the training of intrapatient mod-
ings from each class. The randomness in the padding (except els, the beats from all recordings are first shuffled and divided
that for the ResNet-LSTM) and truncation ensure that, with into five segments for the cross-validation, whereas, for the
the exception of the ResNet-LSTM, no two training samples training of intrapatient models, the beats from 22 recordings
are the same. Furthermore, no additional memory is required are used for training and another 22 recordings for validation,
for the augmented recordings because they are generated just as stipulated in the AAMI standards. However, since the beat
prior to preparing a batch and discarded immediately after numbers of classes F and Q are small, only the other three
processing of the batch. classes (i.e., N, S, and V) are involved in the interpatient
As stated earlier, the recordings are padded or truncated classifications. The results of the intrapatient and interpatient
to 30 s, which adds up to 15 000 sampling points. The local models are presented in Tables III and IV, respectively.
features learning pipeline of the proposed ResNet-LSTM has From Tables III and IV, it can be deduced that GA optimized
seven residual substructures. As each substructure has a max- the features of the proposed DLM better than other methods.
pooling layer with a pool size of 2, the resulting output length Similarly, it can be inferred that k-NN is better suited for
of the local features learning pipeline is set at 117. Since a GA optimization since it produced better accuracy relative to
recording may have more than one label, the resulting task other classifiers. Figs. 5 and 6 present the graphs showing
is a multilabel classification problem. Consequently, as out- the validation of the proposed k-NN ML model with and
lined in Section III, SoftMax is used as the final activation without using GA-based optimization. A reading of the two
function that generates the predicted probability for each class plots confirms the choice of the GA-optimized strategy as
independently. more efficient.
The models are implemented on the Keras framework
with a Tensorflow back end. The hardware environment is
a workstation equipped with an Intel Core i7-6800K CPU, E. Comparison With Similar State-of-the-Art Methods
an Nvidia GTX 1080ti GPU, and 16-GB memory, while the In this section, the performance of the proposed techniques
training time of each batch for ResNet-LSTM is 307 ms. is evaluated alongside longstanding methods in the area. For
Authorized licensed use limited to: VTU Consortium. Downloaded on March 09,2024 at 04:40:48 UTC from IEEE Xplore. Restrictions apply.
HAMMAD et al.: MULTITIER DLM FOR ARRHYTHMIA DETECTION 2502809
TABLE IV
C OMPARISON OF I NTERPATIENT ’ S C LASSIFICATION P ERFORMANCE OF U SING THE MIT-BIH D ATABASE
TABLE V
C OMPARISON OF P ERFORMANCE P ROPOSED M ODEL A LONGSIDE
R EPORTED S TUDIES T HAT U SE THE MIT-BIH D ATABASE
Authorized licensed use limited to: VTU Consortium. Downloaded on March 09,2024 at 04:40:48 UTC from IEEE Xplore. Restrictions apply.
2502809 IEEE TRANSACTIONS ON INSTRUMENTATION AND MEASUREMENT, VOL. 70, 2021
Authorized licensed use limited to: VTU Consortium. Downloaded on March 09,2024 at 04:40:48 UTC from IEEE Xplore. Restrictions apply.
HAMMAD et al.: MULTITIER DLM FOR ARRHYTHMIA DETECTION 2502809
[12] M. Hammad, A. Maher, K. Wang, F. Jiang, and M. Amrani, “Detection [36] X. Xu, S. Jeong, and J. Li, “Interpretation of electrocardiogram
of abnormal heart conditions based on characteristics of ECG signals,” (ECG) rhythm by combined CNN and BiLSTM,” IEEE Access, vol. 8,
Measurement, vol. 125, pp. 634–644, Sep. 2018. pp. 125380–125388, 2020.
[13] G. Garcia, G. Moreira, E. Luz, and D. Menotti, “Improving automatic
cardiac arrhythmia classification: Joining temporal-VCG, complex net-
works and SVM classifier,” in Proc. Int. Joint Conf. Neural Netw.
(IJCNN), Jul. 2016, pp. 3896–3900. Mohamed Hammad received the M.Sc. degree from the Information Tech-
[14] T. Tuncer, S. Dogan, P. Pàawiak, and U. Rajendra Acharya, “Automated nology Department, Faculty of Computers and Information, Menoufia Univer-
arrhythmia detection using novel hexadecimal local pattern and multi- sity, Shebeen El-Kom, Egypt, in 2015, and the Ph.D. degree from the School
level wavelet transform with ECG signals,” Knowl.-Based Syst., vol. 186, of Computer Science and Technology, Harbin Institute of Technology, Harbin,
Dec. 2019, Art. no. 104923. China, in 2019.
[15] J. Zhang, A. Liu, M. Gao, X. Chen, X. Zhang, and X. Chen, “ECG-based He is currently an Assistant Professor with the Faculty of Computers and
multi-class arrhythmia detection using spatio-temporal attention-based Information, Menoufia University. His research interests include computer
convolutional recurrent neural network,” Artif. Intell. Med., vol. 106, vision, machine learning, pattern recognition, and biometrics.
Jun. 2020, Art. no. 101856.
[16] S. Nurmaini et al., “An automated ECG beat classification system using
deep neural networks with an unsupervised feature extraction technique,”
Appl. Sci., vol. 9, no. 14, p. 2921, Jul. 2019. Abdullah M. Iliyasu (aka Abdul M. Elias) (Senior Member, IEEE) received
[17] U. R. Acharya et al., “A deep convolutional neural network model the M.E., Ph.D., and Dr.Eng. degrees in computational intelligence and
to classify heartbeats,” Comput. Biol. Med., vol. 89, pp. 389–396, intelligent systems engineering from the Tokyo Institute of Technology (Tokyo
Oct. 2017. Tech.), Tokyo, Japan.
[18] M. Amrani, M. Hammad, F. Jiang, K. Wang, and A. Amrani, “Very Concurrently, he is a Research Faculty with the School of Computing,
deep feature extraction and fusion for arrhythmias detectionv,” Neural Tokyo Tech and also the Principal Investigator and the Team Leader of the
Comput. Appl., vol. 30, no. 7, pp. 2047–2057, 2018. Advanced Computational Intelligence and Intelligent Systems Engineering
[19] A. Sedik et al., “Deploying machine and deep learning models for (ACIISE) Research Group, College of Engineering, Prince Sattam Bin Abdu-
efficient data augmented detection of COVID-19 infections,” Viruses, laziz University (PSAU), Saudi Arabia. He is also a Professor with the School
vol. 12, no. 7, p. 769, 2020. of Computer Science and Technology, Changchun University of Science and
[20] A. Alghamdi et al., “Detection of myocardial infarction based on novel Technology, China. In addition to being among the pioneers of research in the
deep transfer learning methods for urban healthcare in smart cities,” emerging quantum image processing (QIP) subdiscipline, he has to his credit
Multimedia Tools Appl., vol. 2020, pp. 1–22, Mar. 2020. more than 120 publications traversing the areas of computational intelligence,
[21] A. Goldberger, L. Amaral, and L. Glass “Physiobank, physiotoolkit, quantum cybernetics, quantum image processing, quantum machine learning,
and physionet: Components of a new research resource for complex cyber and information security, hybrid intelligent systems, the Internet of
physiologic signals,” Circulation, vol. 101, no. 23, p. E215, 2000. Things, 4IR, health informatics, and electronics systems reliability. He is
[22] A. Y. Hannun et al., “Cardiologist-level arrhythmia detection and classi- the Managing Editor of Fuji Technology Press, Japan. He is a member of
fication in ambulatory electrocardiograms using a deep neural network,” editorial board many journals including Journal of Advanced Computational
Nature Med., vol. 25, no. 1, pp. 65–69, Jan. 2019. Intelligence and Intelligent Informatics (JACIII), Quantum Reports Journal,
[23] S. Kiranyaz, O. Avci, O. Abdeljaber, T. Ince, M. Gabbouj, and International Journal of Electrical and Computer Engineering (IJECE), and
D. J. Inman, “1D convolutional neural networks and applications: the Journal of Medical Imaging and Health Informatics (JMIHI). He is
A survey,” 2019, arXiv:1905.03554. [Online]. Available: http://arxiv. also an Associate Editor in many other journals, including IEEE A CCESS ,
org/abs/1905.03554 Telekomnika, and Information Sciences.
[24] D. Whitley, “A genetic algorithm tutorial,” Statist. Comput., vol. 4, no. 2,
pp. 65–85, 1994.
[25] D. P. Rini, S. M. Shamsuddin, and S. S. Yuhaniz, “Particle swarm
Abdulhamit Subasi has been a Professor of medical engineering with the
optimization: Technique, system and challenges,” Int. J. Comput. Appl.,
University of Turku, Turku, Finland, since 2020. He is specialized in machine
vol. 14, no. 1, pp. 19–26, 2011.
learning, data mining, and biomedical signal processing. Concerning the appli-
[26] C. L. Huang and C. J. Wang, “A GA-based feature selection and
cation of machine learning to different fields, he wrote seven book chapters
parameters optimization for support vector machines,” Expert Syst.
and more than 170 published journal articles and conference papers. He is
Appl., vol. 31, no. 2, pp. 231–240, 2006.
also the author of the books: Practical Guide for Biomedical Signals Analysis
[27] S. K. Berkaya, A. K. Uysal, E. S. Gunal, S. Ergin, S. Gunal, and Using Machine Learning Techniques and Practical Machine Learning for
M. B. Gulmezoglu, “A survey on ECG analysis,” Biomed. Signal Data Analysis Using Python. He has worked on several projects related to
Process. Control, vol. 43, pp. 216–235, May 2018. biomedical signal processing and data analysis.
[28] M. Hammad, P. Päawiak, K. Wang, and U. R. Acharya, “ResNet–
attention model for human authentication using ECG signals,” Expert
Syst., vol. 10, Mar. 2020, Art. no. e12547.
[29] M. Hammad and K. Wang, “Fingerprint classification based on a Edmond S. L. Ho received the B.Sc. degree in computer science from
Q-Gaussian multiclass support vector machine,” in Proc. Int. Conf. Hong Kong Baptist University, Hong Kong, in 2003, and the M.Phil. degree
Biometrics Eng. Appl. (ICBEA), 2017, pp. 39–44. in computer science and the Ph.D. degree in informatics from The University
[30] M. T. Hagan and M. B. Menhaj, “Training feedforward networks with of Edinburgh, Edinburgh, U.K., in 2006 and 2011, respectively.
the Marquardt algorithm,” IEEE Trans. Neural Netw., vol. 5, no. 6, He is currently a Senior Lecturer with the Department of Computer
pp. 989–993, 1994. and Information Sciences, Northumbria University, Newcastle upon Tyne,
[31] R. Duda, P. Hart, and D. Stork, Pattern Classification, 2nd ed. U.K. His current research interests include computer graphics and animation,
New York, NY, USA: Wiley, 2001, pp. 55–88. computer vision, machine learning, and robotics.
[32] F. Liu, C. Liu, and L. Zhao, “An open access database for evaluating the
algorithms of electrocardiogram rhythm and morphology abnormality
detection,” J. Med. Imag. Health Inf., vol. 8, no. 7, pp. 1368–1373,
2018. Ahmed A. Abd El-Latif received the B.Sc. degree (Hons.) in mathematics
[33] ANSI/AAMI EC57: 2012-Testing and Reporting Performance Results of and computer science and the M.Sc. degree in computer science from
Cardiac Rhythm and ST Segment Measurement Algorithms, Association Menoufia University, Shebeen El-Kom, Egypt, in 2005 and 2010, respectively.
for the Advancement of Medical Instrumentation, Arlington, VA, USA, He is currently an Associate Professor of computer science with Menoufia
2013. University, Egypt. He is the author or a coauthor of more than 130 ISI articles.
[34] J. Pan and W. J. Tompkins, “A real-time QRS detection algorithm,” IEEE His areas of interests are multimedia content encryption, secure wireless
Trans. Biomed. Eng., vols. BME–32, no. 3, pp. 230–236, Mar. 1985. communication, IoT, applied cryptanalysis, perceptual cryptography, secret
[35] R. Li, X. Zhang, H. Dai, B. Zhou, and Z. Wang, “Interpretability analysis media sharing, information hiding, biometrics, forensic analysis in digital
of heartbeat classification based on heartbeat activity’s global sequence images, and quantum information processing.
features and BiLSTM-attention neural network,” IEEE Access, vol. 7, Dr. Abd El-Latif is also an Associate Editor of the Journal of Cyber
pp. 109870–109883, 2019. Security and Mobility.
Authorized licensed use limited to: VTU Consortium. Downloaded on March 09,2024 at 04:40:48 UTC from IEEE Xplore. Restrictions apply.