ECG anomaly class identification using LSTM and error profile modeling. (June 2019) - Chauhan, Sucheta; Vig, Lovekesh; Ahmad, Shandar
Abstract: Automatic diagnosis of cardiac events is a current problem of interest in which deep learning has shown promising success. We have earlier reported the use of Long Short Term Memory (LSTM) networks-trained on normal ECG patterns-to the detection of anomalies from the prediction errors for real-time diagnostic applications. In this work, we extend our anomaly detection algorithm by introducing a second stage predictor that can identify the actual anomaly class from the error outputs of the first stage model. Results from seven types of anomalies have been presented including Atrial Premature Contraction (APC), Paced Beat (PB), Premature Ventricular Contraction (PVC), Right Bundle Branch Block (RBBB), Ventricular Bigeminy (VB), Ventricular Couplets (VCs) and Ventricular Tachycardia (VT). To optimize anomaly class prediction performance, multiple choices of second stage models such as multilayer perceptron (MLP), support vector machine (SVM) and logistic regression have been employed. A featurization scheme for LSTM prediction errors in the form of overall summaries has been proposed and a successful predictor for the same was developed with good performance. Our results indicate that the error vectors represented by their summary features carry useful predictive information about actual ECG anomaly type. We discuss how the accuracy scores without attention to inherent class imbalances and paucity of data instances may produce misleading performance estimates and hence accurate background models are needed to estimate true predictive performance of multi-class predictors such as those presented in this work. The training data sets and related resources for this study are provided athttp://ecg.sciwhylab.org . Highlights: A two-stage pipeline to predict seven types of ECG anomaly classes have been developed and benchmarked. Stage-1 LSTM models have been trained on 1-min long sequences of normal ECG rhythms and stage 2 is trained by LR, MLP and SVM.