A framework for cardiac arrhythmia detection from
IoT-based ECGs
This is the Accepted version of the following publication
He, Jinyuan, Rong, Jia, Sun, Le, Wang, Hua, Zhang, Yanchun and Ma,
Jiangang (2020) A framework for cardiac arrhythmia detection from IoT-based
ECGs. World Wide Web: Internet and Web Information Systems. ISSN 1386-
145X
The publisher’s official version can be found at
https://link.springer.com/article/10.1007%2Fs11280-019-00776-9
Note that access to this version may require subscription.
Downloaded from VU Research Repository https://vuir.vu.edu.au/41028/
A Framework for Cardiac Arrhythmia Detection
from IoT-based ECGs
Jinyuan He
1
, Jia Rong(
)
1
, Le Sun
2
, Hua Wang
1
, Yanchun Zhang
1
, and
Jiangang Ma
3
1
Institute of Sustainable Industries & Liveable Cities,
Victoria University, Melbourne, Australia
jinyuan.he@live.vu.edu.au
jia.rong@vu.edu.au
{hua.wang,yanchun.zhang}@vu.edu.au
2
School of computer and software,
Nanjing University of Information Science and Technology, Nanjing, China
sunle2009@gmail.com
3
College of Science and Engineering,
James Cook University, Queensland, Australia
jiangang.ma@jcu.edu.au
Abstract. Cardiac arrhythmia has been identified as a type of cardio-
vascular diseases (CVDs) that causes approximately 12% of all deaths
globally. The development of Internet-of-Things has spawned novel ways
for heart monitoring but also presented new challenges for manual ar-
rhythmia detection. An automated method is highly demanded to pro-
vide support for physicians. Current attempts for automatic arrhythmia
detection can roughly be divided as feature-engineering based and deep-
learning based methods. Most of the feature-engineering based meth-
ods are suffering from adopting single classifier and use fixed features
for classifying all five types of heartbeats. This introduce difficulties in
identification of the problematic heartbeats and limits the overall classi-
fication performance. The deep-learning based methods are usually not
evaluated in a realistic manner and report overoptimistic results which
may hide potential limitations of the models. Moreover, the lack of con-
sideration of frequency patterns and the heart rhythms can also limit
the model performance. To fill in the gaps, we propose a framework
for arrhythmia detection from IoT-based ECGs. The framework consists
of two modules: a data cleaning module and a heartbeat classification
module. Specifically, we propose two solutions for the heartbeat classifi-
cation task, namely Dynamic Heartbeat Classification with Adjusted Fea-
tures (DHCAF) and Multi-channel Heartbeat Convolution Neural Net-
work (MCHCNN). DHCAF is a feature-engineering based approach, in
which we introduce dynamic ensemble selection (DES) technique and de-
velop a result regulator to improve classification performance. MCHCNN
is deep-learning based solution that performs multi-channel convolutions
to capture both temporal and frequency patterns from heartbeat to as-
sist the classification. We evaluate the proposed framework with DHCAF
and with MCHCNN on the well-known MIT-BIH-AR database, respec-
2 Jinyuan He et al.
tively. The results reported in this paper have proven the effectiveness
of our framework.
Keywords: Internet-of-Things · ECG · Cardiac Arrhythmia Detection
· ResNet · Dynamic Ensemble Selection · Deep Learning
1 Introduction
Cardiac arrhythmia is a type of cardiovascular diseases (CVDs) that threatens
millions of people’s lives around the world. The easiest way to identify arrhyth-
mia is to perform a manual inspection on 24 to 72 hours electrocardiograms
(ECG). Traditionally, to have such long-term ECG recordings, patients need to
wear a Holter Monitor for a continuous time period, which is a very uncomfort-
able experience. The rapid growth of Internet-of-Things (IoT) techniques has
spawned novel ways, like Fitbit, Apple Watch, or Android Wear, for heart sta-
tus tracking [47]. In comparison to the Holter Moniter, the IoT-based devices
are more human-friendly because they have fewer cords and smaller-sizes, and
cause fewer disruptions to patient’s daily routines. However, on the other hand,
the prevalence of IoT-based devices has also resulted in a dramatic increase of
ECG data, posing a great challenge to the ECG interpretation. Manual inspec-
tions become time-consuming and error-prone, which is no longer possible. An
automated method is highly demanded to provide a cost-effective screening for
arrhythmia and allow at-risk patients to receive timely treatments.
Heartbeat classification plays a crucial role in identification of arrhythmia.
Basically, heartbeats can be classified into five classes: Normal(N ), Supra-ventricular
(S ) ectopic, Ventricular (V ) ectopic, Fusion (F ) and Unknown (Q) beats [6].
Particularly, most arrhythmias are found in S and V beats. Fig.1 presents a
sample ECG segment, where the problematic heartbeats are highlighted by cir-
cles. It can be seen that the S beat exhibits a great morphological similarity in
temporal dimension to the normal heartbeats. Since ECG recordings are mostly
dominated by normal heartbeats for the majority of patients [22], such similarity
bring a great difficulty in distinguishing the S beats from the normal ones.
Fig. 1. A sample ECG recording that contains N, S and V heartbeats. Note: RR-
intervals denote the time distance between two successive R peaks.
A Framework for Cardiac Arrhythmia Detection 3
Many research attempts have been made to provide solutions for automated
heartbeat classification. The existing methods are roughly divided as feature-
engineering based and deep-learning based methods. However, none of these
methods has achieved a clinical significance. Most feature-engineering methods
are facing a bottleneck of applying a standalone classifier and using a static
feature set to classify all heartbeat samples [11, 15, 16, 31, 50]. This has been
shown to cause huge impacts on identification of the problematic heartbeats.
The deep-learning based methods are commonly limited by learning temporal
patterns from the raw ECG heartbeats only. The frequency patterns and the RR-
intervals have not been well considered to assist the classification. Moreover,
to supply sufficient training data for driving the deep neural networks, many
works [2, 3, 26, 49, 51, 54] followed a biased evaluation procedure, in which they
synthesized heartbeat samples from the whole dataset and then randomly split
all heartbeats for model training, validation and test. Consequently, heartbeats
from the same patient are likely to appear in both the training and test datasets,
leading to an over estimation of the model performance. The overoptimistic
results may hide potential limitations of the neural networks.
Besides, data quality also present challenges for an IoT-based arrhythmia
detection method. First, the IoT-based heart rate sensors may vary the rate of
measurement for battery preservation [7]. Second, the collected ECG recordings
are likely interrupted by background noises and baseline wonders (the effect that
the base axis (X-axis) of individual heartbeats appear to move up or down rather
than being straight all the time).
To solve these problems, we propose a framework for arrhythmia detection
from IoT-based ECGs. The framework consists of a data cleaning module and
a heartbeat classification module. Specifically, we provide two novel solutions
for the heartbeat classification task. The first one is a feature-engineering based
method, in which we introduce the Dynamic Ensemble Selection (DES) tech-
nique and specially design a result regulator to improve the problematic heart-
beats detection. The other one is a deep neural network that performs multi-
channel convolutions in parallel to manage both temporal and frequency pat-
terns to assist the classification. To remedy the impact brought by the lack
of consideration of heart rhythms, the proposed network accepts heart rhythms
(RR-intervals) as part of the input. In order to reveal the performance of the pro-
posed methods in real-world practices, we evaluate the models on the benchmark
MIT-BIH arrhythmia database following the inter-patient evaluation paradigm
proposed in [16]. The paradigm divides the benchmark database into a train-
ing and a test dataset at patient level, making the heartbeat classification a
significantly more difficult task.
The rest of this paper is structured as follows. Section 2 reviews current
methods in heartbeat classification. Section 3 presents the proposed framework
and the two embedded solutions for heartbeat classification. The experiment
results and discussion are presented in Section 4. Section 5 concludes this paper
and discusses the future work.
4 Jinyuan He et al.
Table 1. Comparison between Feature-engineering based and Deep-learning based
methods
Feature Engineering Deep Learning
Work flow Feature extraction, selection and
classifier determination
End-to-end processing
Commonly used features RR-intervals, higher-order
statistics, wavelet, signal energy
coefficients, etc.
Learned by networks, includ-
ing CNN, RNN, LSTM, etc.
Feature selection PCA, floating sequential search,
weighted LD model
N.A.
Commonly used classifiers SVM, nearest neighbors, artifi-
cial neural networks, weighted
linear discriminant, optimum-
path forest
N.A.
Training data Less More
Parameters Less More
Explainability High Low
Current limitations Use of fixed features for all heart-
beat types classification; Limita-
tion of static classifiers to han-
dle both intra- and inter patients
variations
Lack of considerations of fre-
quency patterns and heart
rhythms; A biased evalua-
tion is followed.
2 Related Work
This section provides a comprehensive review of current methods for heartbeat
classification. As mentioned before, the existing methods can be roughly allo-
cated to either the feature-engineering based or the deep-learning based category.
The differences between them are summarized in Table 1.
The feature-engineering based methods focus on signal feature extraction
and classifier selection. Commonly used features includes RR-intervals [4, 11, 52],
samples or segments of ECG curves [35], higher-order statistics [4, 17], wavelet
coefficients [15, 20, 37], and signal energy [50]. They are mostly extracted from
cardiac rhythm, or time/frequency domains. Feature correlation and effective-
ness are important concerns for this type of methods. To avoid negative im-
pacts of noisy data, techniques, like the floating sequential search [29] and the
weighted LD model [18], must be employed to reduce the feature space. Re-
garding the selection of classifiers, the support vector machine (SVM) is the
most widely used for its robustness, good generalization and computationally
efficiency [1, 14]. Besides, the nearest neighbors (NN) and artificial neural net-
works (ANN) are also frequently found in the literature. The performances of
current feature-engineering based methods are mainly limited by the application
of single classifiers and the use of fixed features to classify all heartbeat types.
On one hand, in consideration of the intra- and inter-subjects variations of the
feature values, it is difficult for a single classifier to well handle a wide region of
the feature space [53]. Although some ensemble methods, such as random forest
[4] and ensemble of support vector machine [24], have been employed to remedy
the disadvantages, the problem is still open because the diversity of the tradi-
tional ensembles is relatively low. On the other hand, using fixed features tends