ECG Arrhythmia Classification using Recurrent Neural Networks and Long Short-Term Memory Recurrent Neural Networks

Sebastian Cajas, Pedro Astaiza, Santiago Garcia, Camilo Segura, Diego Lopez
Universidad del Cauca


Heart arrhythmia classification algorithms are an essential tool for continuous monitoring of patients at risk. By analyzing 12 ECG-lead signals, these algorithms can also support the assessment and diagnosis of cardiac diseases. Early detection is essential for correct management and treatment. Motion artifacts such as low-intensity movements can contaminate the signals, leading to a wrong diagnosis. Thus, we propose a novel approach to denoise ECG signals and classify the nine cardiac arrhythmias as defined in the Physionet Challenge 2020. First, a noise removal process was initially applied to the raw dataset using the symlet wavelets family and Savitzky-Golay smoothing filters. Secondly, we extracted 300 features, clustered in time, frequency, and time-frequency groups, including linear and non-linear characteristics aimed at obtaining hidden information that models specific heart arrhythmia. Thirdly, 59 features were carefully selected to train our model using our feature-selection procedure. Finally, we implemented a combination of a Convolutional Neural Network (CNN) with a Long Short-Term Memory Recurrent Neural Network with 27 layers using window segmentation to reduce the noise-aware signals and bias during our training model. The dataset provided contained 6878 ECG recordings used for the creation of training models. The proposed methodology developed so far was tested with 10-fold cross-validation and yielded an average score of 0.05, 0.018, and 0.031 in F2, G2 scores, and Geometric Mean, respectively, using the Physionet 2020 challenge hidden testing set. Overall, the feature extraction and selection stage can help improve the performance of the heart arrhythmia training model by selecting the best characteristics to avoid noise and enhance the arrhythmia classification. Our model keeps a high level of interpretability, demonstrating a high range of possibilities that can be configured using hybrid CNN.