Abstract— Electrocardiogram (ECG) is one of the fundamental
markers to detect different cardiovascular diseases (CVDs).
Owing to the widespread availability of ECG sensors (single
lead) as well as smartwatches with ECG recording capability,
ECG classification using wearable devices to detect different
CVDs has become a basic requirement for a smart healthcare
ecosystem. In this paper, we propose a novel method of model
compression with robust detection capability for CVDs from
ECG signals such that the sophisticated and effective baseline
deep neural network model can be optimized for the resource
constrained micro-controller platform suitable for wearable
devices while minimizing the performance loss. We employ
knowledge distillation-based model compression approach
where the baseline (teacher) deep neural network model is
compressed to a TinyML (student) model using piecewise linear
approximation. Our proposed ECG TinyML has achieved ~156x
compression factor to suit to the requirement of 100KB memory
availability for model deployment on wearable devices. The
proposed model requires ~5782 times (estimated) less
computational load than state-of-the-art residual neural
network (ResNet) model with negligible performance loss (less
than 1% loss in test accuracy, test sensitivity, test precision and
test F1-score). We further feel that the small footprint model size
of ECG TinyML (62.3 KB) can be suitably deployed in
implantable devices including implantable loop recorder (ILR).
I. INTRODUCTION
With the advent of off-the-shelf sensor technologies
coupled with advancement and rapid developments of
Artificial Intelligence (AI) techniques, Cardiovascular Disease
(CVD) detection using single lead ECG is becoming
increasingly popular. Proposed techniques are proven to be
helpful in diagnosing CVDs including transient infrequently
arrhythmias especially Atrial Fibrillation (AF) and rhythm
monitoring. Portable ECG devices currently offer an efficient
screening option for AF; generating comparable performance
to 24 hours Holter monitoring [1]. A study using Kardia band
(single lead ECG) demonstrated moderate diagnostic accuracy
when compared to 12-lead ECG analysis. The study also
concluded that combining the automated device diagnosis with
Electrophysiologists’ (EP) interpretation of unclassified
tracings yielded improved accuracy. Future improvements in
automated algorithms were required with physicians’
involvement when exploring the utility of these devices [2].
Such diagnostic inference on single lead ECG often requires
sophisticated deep learning (DL) models. We find two critical
problems of running such DL based ECG diagnostics natively
on the typical resource-constrained wearables: 1. Depending
on the number of layers, size of a DL model may become too
high. In order to be wearable ready, the model size requires to
be as small as possible (preferably sub-100 KB) 2. The
associated battery drain which also in turn demands for smaller
and less compute heavy models. In this paper, we propose a
piecewise linear approximation of a ResNet [3] based ECG
diagnostic inferencing model (ECG TinyML) that takes 156
times less memory than the original Resnet model. The
proposed ECG TinyML is 5782 times less computationally
intensive compared to the baseline ResNet model, with almost
no compromise in classification performance. The final
reduced model takes less than 70 KB of memory, making it
suitable for embedding into cardiac implantable devices like
ILR.
II. ON THE PROBLEM OF ECG CLASSIFICATION MODEL FOR
WEARABLE DEVICES
A. The Application Landscape
As illustrated in [4], cardiac rhythm monitoring and
management devices have had a large proliferation over the
past decade, and hence the on-device detection of cardiac
rhythm anomalies is an important problem to solve. Further,
[5] provides overview of methods and challenges of analyzing
single lead ECG (e.g. KardiaMobile [6]) for clinical outcome,
which proves that the problem is non-trivial. The problem is
further amplified if we need to perform the detection on a
resource constrained device like a wearable or an implantable
device that have limited memory and battery power. [4]
provides an analysis different cardiac rhythm management
devices and associated therapies in Australian market.
Though 75% of those devices are traditional pace makers,
other devices capable of defibrillation and cardiac
resynchronization have found their places in the list.
B. The Hardware Landscape
ILRs and wearable devices are generally composed of tiny
microcontroller units (MCU) and specific sensors [7]. The
block diagram of a typical hardware system is shown in Fig. 1.
It consists of a main MCU which reads data from connected
sensors. A separate MCU or System-On-Chip (SoC) does the
communication with external world using Bluetooth Low
Energy (BLE) or other low energy communication protocols.
Such a hardware setup will have both costlier and faster
volatile memory (RAM) and slower but cheaper non-volatile
memory such as an external flash.
The main MCU in these devices is often severely resource
constrained. They typically range from low-end 32-bit ARM
Resource Constrained CVD Classification Using Single Lead ECG
On Wearable and Implantable Devices
Arijit Ukil
1
, Ishan Sahu
1
, Angshul Majumdar
2
, Sai Chander Racha
1
, Gitesh Kulkarni
1
, Anirban Dutta
Choudhury
1
, Sundeep Khandelwal
1
, Avik Ghose
1
, Arpan Pal
1
1
TATA Consultancy Services, India,
2
Indraprastha Institute of Information Technology, Delhi, India
e-mail
1
: (arijit.ukil, ishan.sahu, sai.racha, gitesh.k, anirban.duttachoudhury, sundeep.khandelwal,
avik.ghose, arpan.pal)@tcs.com; email
2
: angshul@iiitd.ac.in
2021 43rd Annual International Conference of the
IEEE Engineering in Medicine & Biology Society (EMBC)
Oct 31 - Nov 4, 2021. Virtual Conference
978-1-7281-1178-0/21/$31.00 ©2021 IEEE 886