Professional Documents
Culture Documents
(Journal Q4 2023) Ensemble of Deep Learning Models For Classification of Heart Beats Arrhythmias Detection
(Journal Q4 2023) Ensemble of Deep Learning Models For Classification of Heart Beats Arrhythmias Detection
ABSTRACT
Arrhythmias are one of the top causes of death worldwide, and due to changing lifestyles, their prevalence
is rising dramatically. Due to their non-invasive nature, ECG signals have often been used to detect
arrhythmias. The manual technique, however, takes a long time and is prone to error. Utilizing deep
learning models for early automatic identification of cardiac arrhythmias is a preferred alternative to
improve diagnosis and management. This paper proposes a unique ensemble deep structured learning
model for categorizing arrhythmias that integrates attention mechanisms, bi-directional long short-term
memory, and a convolutional neural network. It classifies beats into five categories: non-ectopic (N),
supraventricular ectopic (S), ventricular ectopic (V), fusion (F), and unknown (Q). MIT-BIH and St.
Petersburg data sets are integrated as multi-model datasets for training, validating, and testing the suggested
model. The model's performance was also tested with the f1-score, recall, accuracy, and precision. Based
on the ensemble of all of these approaches, this model is 99% accurate.
Keywords: Artificial Neural Networks, Deep Structured Learning Models, Arrhythmia Detection,
Ensemble Models
detected automatically. In order to proceed with
1. INTRODUCTION feature extraction and classification, it is
According to the WHO, more than 18.9 million necessary to first remove any existing noise
people [1] in the country have atrial fibrillation components. Major sources of noise in an
(AFib), an arrhythmia that affects the heart. electrocardiogram are baseline drift, power line
The risk for such cardiovascular disease is interference, and moving artifacts [4]. Pre-
raised by factors such as elevated lipid profiles, processing methods that include filtering
high triglycerides, hypertension, obesity, video techniques aid in the elimination of noise
games, COVID, and others [2]. Clinical experts components, allowing for rapid processing,
can detect AF by analyzing ECG beat signals while various signal compression procedures
recorded by the Holter system. Recent years reduce the computational load by favoring
have seen an increase in the [3] use of effective signal characteristics. ECG feature
computer-based automatic heart arrhythmia extraction [5] is the primary method for
detection systems by cardiologists and diagnosing arrhythmias through the
physicians, highlighting the importance of classification of the resulting feature vectors.
automatic detection of arrhythmia in Feature classification is the second factor that
facilitating prompt and accurate treatment. The employs various different methods for
computer-based ECG signals follow the steps classifying ECG patterns, such as neural
of pre-processing, feature extraction, and networks, statistical methods, machine learning
classification of abnormal signals and are algorithm classifiers, and fuzzy interference [6].
Using a one-of-a-kind selection model that
3175
Journal of Theoretical and Applied Information Technology
30th April 2023. Vol.101. No 8
© 2023 Little Lion Scientific
makes use of the best data distribution improves computational efficiency, and a long-
mechanism, the ECG pattern is classified time series monitoring deep learning technique
statistically. Here, a neural network approach is are introduced.
taken for ECG data classification, taking into
account a large learning ECG dataset with a The essential contributions of this study are as
lengthy learning time and a substantial follows:
computational burden. In order to improve
1. The dataset used for this work has been taken
ECG feature extraction and classification
from multiple datasets provided by
accuracy, dimension reduction is used Deep
PhysioNet.org, MIT-BIH AD, and the PTB
learning methods are well known and can be
Diagnostic ECG database, which contains a total
used for automatic feature extraction and
of 597 patient records.
dimensioning techniques for large volumes of
data. There are several deep-learning 2. This work generated a new combined deep
techniques for arrhythmia detection, including structured learning model based on CNN, Bi-
CNN, LSTM, BI-LSTM, and the advanced LSTM, and attention approaches to identify
attention model mechanism. Recently, it has arrhythmias from long-term follow-up ECG
come to light that ensemble learning is a data.
significant factor in improving the
effectiveness of deep learning models. In 3. This work contributes to two distinct
summary, the goal of deep ensemble models is mechanisms: a hybrid CNN + Bi-LSTM model
to build a model that combines the best and an ensemble of CNN + Bi-LSTM + RNN-
qualities of both ensemble and deep-structured based attention.
learning models. The second phase of ECG
4. First, the dataset was normalized, and then
arrhythmia detection includes the accuracy of
heart rate segmentation was performed using the
the classification, which is determined by the
annotation files.
quality of the ECG signal processing and the
features extracted [7]. Several of the currently 5. The dataset is divided into three parts:
available works utilize a classical signal training, validation, and testing. First, the
processing approach based on morphological balanced dataset is used to train the newly
characteristics, wherein an old-fashioned signal implemented ensemble deep-structured learning
processing algorithm is implemented. Since model. After training, the models were evaluated
there is a great deal of variation in the shapes on an indeterminate dataset (the test dataset) to
of P waves and the QRS complex, Mitta et al. quantify heart rate in five groups.
[8] proposed working with the morphological
characteristics of the ECG signal. A perfect 2. RECENT DEEP STRUCTURED ECG
signal classification accuracy for arrhythmia SIGNALS LEARNING:
detection cannot be achieved with just this This section looked at a comprehensive survey
feature. The authors of this study address this of deep, structured learning methods for
issue by taking into account morphological, processing and classifying ECG arrhythmia
temporal, and statistical features, which signals. The ECG arrhythmia detection based on
deep structured learning has been organized into
together will result in maximum effectiveness
two parts: feature extraction and classification
for all heart patients. Kachuee et al. [9] are
and time-series classification. Each classification
considered one example of prior works in the has a different algorithmic methodology. Also,
field of deep learning, and both of them are the limitations of various deep structured
computationally intensive, requiring a great learning methods incorporated in this survey
deal of processing power. Thus, in this paper, paper are discussed and tabulated in Table [1],
various deep, structured, related learning and some of them are listed below.
models for ECG signals are reviewed. Bringing
constant monitoring to individual wearable 2.1 Convolutional Neural Network (CNN):
devices is central to the solution we propose In the case of ECG arrhythmia detection, the
CNN technique is widely used as a feature
here: an efficient classification method, which
extraction and classification technique. Mishra
3176
Journal of Theoretical and Applied Information Technology
30th April 2023. Vol.101. No 8
© 2023 Little Lion Scientific
et al. [10] present a comparison of different processing techniques and deep-learning models.
ECG filters and classifications with customized Limitations:
CNNs (CCNNs). The dataset includes 1. In order to achieve greater accuracy, the
electrocardiogram (ECG) signals, which are model is tested with a test split range of
used to conduct one-hot encoding. After the Z- 70–30, which will generally give higher
score is applied to these readings, heartbeats accuracy output.
can be separated. Several filters, including the 2. High Computational cost.
wavelet transform, the low-pass Butterworth
filter, the Savitzky-Golay filter, the moving 2.3 Auto Encoders :
average filter, the median filter, and the Autoencoders are a type of artificial neural
Gaussian filter, are used to deny the data. After network (ANN)-based architecture that can be
the data has been cleaned up and separated into used to learn unsupervised data encoding
training and testing sets, CCNNs are used to efficiently. They are commonly used to discover
classify the heartbeats. This system achieves commonalities among data sets with the same
94.90% accuracy in the classification of normal characteristics. In addition to reducing the number
and abnormal signals. The system's of dimensions, an auto-encoder will attempt to
implementation of the CCNN framework, produce a new class that is analogous to the one it
which enables feature extraction, selection, and is being fed. In the previous investigations, the
classification, is its greatest strength. author presented several variants of auto-encoder-
Limitations: based architecture.[Ojha et al. 2022] [13] This
1. CCNN has a far better training period. paper suggests using a CAD system to identify
2. The training requirements can only be and categorize arrhythmias from ECG data
met with a massive database. automatically. To begin, an auto-encoder
3. Since CCNN requires a static ECG convolutional network (ACN) model is
signal, the length of the ECG signal implemented. The ACN is founded on a one-
must be kept constant during both the dimensional convolutional neural network (1D-
training and testing phases. CNN) that can be trained to discover the optimal
features from raw ECG signals. The ACN model's
2.2 Recurrent Neural Network (RNN): learned features are then used as input to a
The RNN is a type of neural network with its support vector machine (SVM) classifier, which
own specific architecture. Using an RNN, data aids in the detection of irregular heartbeats.
can be stored in loops between layers. One of Limitations:
the variants used in the RNN model is LSTM 1. Auto encoder’s classification fails to
(Long Short-Term Memory). Neurons in a feed- classify different types of arrhythmia
forward network only have forward diseases.
connections, but LSTM uses reversal feedback.
LSTM may process individual data points, such 2.4 Transformer-Based Deep Neural
as pictures, or it can handle data sequences, Networks:
such as ongoing video or audio streams. LSTM Transformer, in the context of deep learning,
can also decode ECG signals and hear heart refers to a sequence-to-sequence design of
sounds. In this paper [Kaya et al.] [11], ECG neural networks that uses the self-attention
signals were classified using a hybrid of the process to capture global dependencies [15].
long short-term memory (LSTM) and angle Since the transformer was made to accept
transform (AT) neural network architectures. sequence data as input, it piqued the interest of
When classifying ECG signals, the AT many scientists working in the field of natural
considers the angular information of signals on language processing (NLP). Bidirectional
both sides of the target signal. The range of the Encoder Representations from Transformers
resulting signals after AT conversion is 0-359. (BERT) [16] is one of the most popular
The LSTM technique takes its inputs from a transformer-based models that has attained
histogram of recent signals. LSTM utilizes state-of-the-art performance in several NLP
histograms to differentiate between atrial tasks. The transformer has become an
refractory rhythm (ARR), ventricular increasingly beautiful standard in the field of
fibrillation (CHF), and normal sinus rhythm computer vision recently. Dosovitskiy et al. [17]
(NSR). The strength of this paper lies in suggested a method for picture classification
achieving the best combination of signal- using a transformer that accepts image patches
as input. The detection transformer (DETR) is
3177
Journal of Theoretical and Applied Information Technology
30th April 2023. Vol.101. No 8
© 2023 Little Lion Scientific
the result of one of the successful projects for research to present an edge-based innovative
an end-to-end object detection framework technique for ECG signal reduction. Instead of
based on the transformer. By eliminating including numerous convolutional filters and
spatial anchoring and non-maximal pooling layers at the conclusion of the encoder
suppression, two examples of manually created section of the CDAE, a single-layered LSTM
components that contain past knowledge, network is added. It results in a decrease in the
DETR streamlines the object detection model's trainable parameters, which in turn speeds
pipeline. As a result, the transformer-based up computation. Additionally, the LSTM network
deep neural network is another viable learns the order dependencies between the data,
mechanism for managing AI tasks, including which aids in decompressing and reassembling the
natural language processing and computer data. The suggested algorithm, which makes use of
vision. a denoising autoencoder architecture, denoises the
Limitations: signal in the interim. The greatest strength of this
1. Coming to real time for arrhythmia paper's usage of the LSTM network is its ability to
detection the transformer model is still increase computational efficiency.
lack to compute . Limitations :
2. An automated transformer model for a 1. Not applicable for real time datasets.
hybrid combination-based pipeline 2. Lacks of joint compression of multiple
model is one of the gaps to be designed. ECG signals.
3178
Journal of Theoretical and Applied Information Technology
30th April 2023. Vol.101. No 8
© 2023 Little Lion Scientific
Table 1: Deep Arrhythmia structured learning methods and its research gaps
3179
Journal of Theoretical and Applied Information Technology
30th April 2023. Vol.101. No 8
© 2023 Little Lion Scientific
3180
Journal of Theoretical and Applied Information Technology
30th April 2023. Vol.101. No 8
© 2023 Little Lion Scientific
3181
Journal of Theoretical and Applied Information Technology
30th April 2023. Vol.101. No 8
© 2023 Little Lion Scientific
3182
Journal of Theoretical and Applied Information Technology
30th April 2023. Vol.101. No 8
© 2023 Little Lion Scientific
important features and classify the ECG 4.1 Confusion Matrix for ECG arrhythmias :
abnormal signals outputs. Confusion matrix of this method comes under
four cases
3.4.4 Ensemble of models : Case 1 : True ECG Positive(TEP) :The
Ensemble of deep structured learning model that abnormal ECG signal is correctly detected as an
combines the various different algorithms for arrhythmia ECG signal.
Case 2 : False ECG Positive (FEP): The normal
predictions. On this proposed model, the
ECG signal is incorrectly detected as an
ensemble works based on the combination of
arrhythmic ECG signal.
CNN, BI-LSTM, and the attention mechanism. Case 3 : False ECG Negative (FCN):An
The working mechanism of the proposed model abnormal ECG signal that is not correctly
is given in the algorithm [1]. detected is an arrhythmia ECG signal.
Case 4 : True ECG Negative(TEN) : The
Algorithm 1: Ensemble of deep ECG ensemble Normal ECG signal is detected exactly as normal
classifier ECG signal.
Input : Training ECG signals data Based on the following cases ,the figure [6]
(ECG_DATA) shows the classification report of the ensemble
Base Level classifiers (BL1-CNN and model .From the figure, the fusion of ventricular
BL2 - LSTM) and normal ECG signals shows a high rate of
Meta Level classifiers( Attention having arrhythmia diseases .
mechanism )
Output : Trained deep ensemble model
(Trained_ECG_DATA)
BEGIN
Step 1 : Train the base learners model by
applying classifiers CNN and LSTM to the
ECG_DATA
for i = 1…..n do
Base_Learners = BL (ECG_DATA_n) Figure 6 :Confusion Matrix Report
End for
Step 2 : Construct new dataset for predictions 4.2 Loss Function :
ECG_DATA Using the loss function, we can assess how
Step 3 : Train a meta level classifier (Attention effectively this ensemble algorithm models our
mechanism ) from constructed new dataset balanced dataset. Cross-entropy loss is used in
Return attended values our work. Cross-entropy works based on
END adjusting the model weights during training to
Thus by using the attention will find the minimise the loss values. Our model performed
better when the loss was smaller. Figure [7]
important features that the features may be from
shows the loss function graph of three pipelines.
recurrent layers or convoluted . From the graph, we inferred that loss is
4. EXPERIMENTAL AND RESULTS: decreasing slowly over 100 epochs.
3183
Journal of Theoretical and Applied Information Technology
30th April 2023. Vol.101. No 8
© 2023 Little Lion Scientific
3184
Journal of Theoretical and Applied Information Technology
30th April 2023. Vol.101. No 8
© 2023 Little Lion Scientific
5. CONCLUSION: REFERENCES:
The processing of ECG segment data can be used [1] Al-Naami, B., Fraihat, H., Owida, H. A.,
to predict arrhythmia, a severe cardiovascular Al-Hamad, K., De Fazio, R., & Visconti,
disease. To reverse heart disease, arrhythmias P. (2022). Automated Detection of Left
must be accurately recognised and prevented Bundle Branch Block from ECG Signal
early. Our proposed system model achieved the Utilizing the Maximal Overlap Discrete
primary research goal of helping physicians Wavelet Transform with ANFIS.
quickly identify the type of ECG or confirm their Computers, 11(6), 93.
diagnosis in a medical setting while maintaining a [2] Townsend, M. J., Claridy, M. D., Bajaj, S.
high level of accuracy. High and affordable. To S., Tu, L., & Stanford, F. C. (2022).
build an efficient and robust stand-alone Obesity and Eligibility for Obesity
computer-aided diagnostic system, a deep Treatments Among Adults With Disabilities
in the US. American Journal of Preventive
aggregation model is presented in this study to
Medicine.
classify five types of ECG segments. Using a [3] Li, Hongqiang, et al. "Automatic
multi-model dataset for training, validation, and electrocardiogram detection and
testing, the network achieved a maximum classification using bidirectional long
accuracy of 99%. short-term memory network improved by
This study demonstrated a number of benefits, Bayesian optimization." Biomedical
including its capacity to support doctors in Signal Processing and Control 73 (2022):
making decisions about clinical procedures that 103424.
involve ECG recordings. Additionally, it was [4] Vijayakumar, V., Ummar, S., Varghese, T.
designed to be as straightforward as possible J., & Shibu, A. E. (2022). ECG noise
while providing the best performance. For health classification using deep learning with
professionals, the presented method is simple and feature extraction. Signal, Image and Video
does not need feature extraction or signal Processing, 1-7.
modification. Additionally, this study only [5] Annam, J. R., Sujatha, R., Somala, J.,
examined one type of CVD, namely arrhythmia, Prasad, G. V., Satyala, N., & Surampudi,
despite the fact that the symptoms of cardiac B. R. (2022). ECG Feature Extraction. In
disease are frequently complex and variable. Innovative Trends in Computational
Therefore, additional ECG data types will be Intelligence (pp. 177-195). Springer,
required to increase the network'spotential Cham.
[6] Serhal, H., Abdallah, N., Marion, J. M.,
Chauvet, P., Oueidat, M., & Humeau-
Heurtier, A. (2022). Overview on
prediction, detection, and classification of
3185
Journal of Theoretical and Applied Information Technology
30th April 2023. Vol.101. No 8
© 2023 Little Lion Scientific
atrial fibrillation using wavelets and AI on detection using continuous ECG signals.
ECG. Computers in Biology and Medicine, Comput. Biol. Med. 2022, 144, 105325.
105168. [16] Devlin, J.; Chang, M.W.; Lee, K.;
[7] Chen, X., Cheng, Z., Wang, S., Lu, G., Xv, Toutanova, K. Bert: Pre-training of deep
G., Liu, Q., & Zhu, X. (2021). Atrial bidirectional transformers for language
fibrillation detection based on multi- understanding. arXiv 2018,
feature extraction and convolutional arXiv:1810.04805.
neural network for processing ECG [17] Dosovitskiy, A.; Beyer, L.; Kolesnikov,
signals. Computer Methods and Programs A.; Weissenborn, D.; Zhai, X.;
in Biomedicine, 202, 106009. Unterthiner, T.; Dehghani, M.; Minderer,
[8] Mittal, Sandeep S., Jack Rothberg, and M.; Heigold, G.; Gelly, S.; et al. An image
Kanad Ghose. "Deep Learning for is worth 16x16 words: Transformers for
Morphological Arrhythmia Classification image recognition at scale. arXiv 2020,
in Encoded ECG Signal." 2021 20th IEEE arXiv:2010.11929.
International Conference on Machine [18] Bhatia S, Pandey SK, Kumar A, Alshuhail
Learning and Applications (ICMLA). A. Classification of Electrocardiogram
IEEE, 2021. Signals Based on Hybrid Deep Learning
[9] Kachuee, M., Fazeli, S., & Sarrafzadeh, Models. Sustainability. 2022;
M. (2018, June). Ecg heartbeat 14(24):16572.
classification: A deep transferable https://doi.org/10.3390/su142416572.
representation. In 2018 IEEE international [19] Oh, Shu Lih, et al. "Automated diagnosis
conference on healthcare informatics of arrhythmia using combination of CNN
(ICHI) (pp. 443-444). IEEE. and LSTM techniques with variable
[10] Mishra, Abhinav, et al. "ECG Data length heart beats." Computers in biology
Analysis with Denoising Approach and and medicine 102 (2018): 278-287.
Customized CNNs." Sensors 22.5 (2022): [20] Petmezas, Georgios, et al. "Automated
1928. atrial fibrillation detection using a hybrid
[11] Kaya, Yılmaz, Fatma Kuncan, and CNN-LSTM network on imbalanced ECG
Ramazan Tekin. "A New Approach for datasets." Biomedical Signal Processing
Congestive Heart Failure and Arrhythmia and Control 63 (2021): 102194.
Classification Using Angle [21] Ma, Fengying, et al. "An automatic
Transformation with LSTM." Arabian system for atrial fibrillation by using a
Journal for Science and Engineering CNN-LSTM Model." Discrete Dynamics
(2022): 1-17. in Nature and Society 2020 (2020).
[12] Ullah, Wusat, et al. "Classification of [22] He, Runnan, et al. "Automatic cardiac
arrhythmia in heartbeat detection using arrhythmia classification using
deep learning." Computational Intelligence combination of deep residual network and
and Neuroscience 2021 (2021). bidirectional LSTM." Ieee Access 7
[13] Dasan, Evangelin, and Ithayarani (2019): 102119-102135.
Panneerselvam. "A novel dimensionality [23] Wang, Jiacheng, and Weiheng Li. "Atrial
reduction approach for ECG signal via fibrillation detection and ECG
convolutional denoising autoencoder with classification based on CNN-BILSTM."
LSTM." Biomedical Signal Processing and arXiv preprint arXiv:2011.06187 (2020).
Control 63 (2021): 102225. [24] Jiang, Mingfeng, et al. "HADLN: Hybrid
[14] Ojha, Manoj Kumar, et al. "Automatic attention-based deep learning network for
detection of arrhythmias from an ECG automated arrhythmia classification."
signal using an auto-encoder and SVM Frontiers in Physiology 12 (2021).
classifier." Physical and Engineering [25] Jin, Yanrui, et al. "A novel attentional
Sciences in Medicine (2022): 1-10. deep neural network-based assessment
[15] Hu, R.; Chen, J.; Zhou, L. A transformer- method for ECG quality." Biomedical
based deep neural network for arrhythmia Signal Processing and Control 79
(2023):104064.
3186