Real Time Detection of Anomalies in ECG Signals Using Semi-supervised and Unsupervised Learning on Autoencoder Architectures

Ayon Dey, Garima Sharma, Akhilesh Mishra
MathWorks


Abstract

The anomaly detection in ECG signals is a crucial milestone in diagnosing cardiovascular diseases. Traditionally, the time-series ECG data is analyzed manually by a medical professional to detect any anomalies present. Much work has been done to automatically classify healthy ECG and arrhythmia signals but does not detect and label the region in ECG signals where anomalies are present. In this work, we have proposed an algorithm that is suitable for real-time detection of abnormal regions in ECG, and identify wholes signals as anomalous using autoencoder. The autoencoder with long short-term memory (LSTM) model has been utilized to detect anomalies and for classification. The autoencoder is trained on the unlabeled data consisting of normal ECG samples and samples with anomalies. The algorithm is trained on BIDMN congestive heart failure database having normal ECG samples, anomalies in R-T wave premature ventricular contraction, and premature ventricular contraction. The proposed algorithm is successfully trained to reconstruct normal ECG signals but cannot adequately reconstruct abnormal signals which makes it even more suitable for labeling and classification applications. The deep learning algorithm is deployed on an edge device for real-time detection of anomalies in ECG signals. During the training of the autoencoder, an accuracy rate of up to 97.4% and for testing an accuracy rate of up to 96.1% has been observed.