Classifying 12-Lead ECG Using Convolutional Recurrent Neural Network

Bjørn-Jostein Singstad1 and Christian Tronstad2
1University of Oslo, 2Oslo University Hospital


Abstract

Objectives and Background: The increasing number of ECGs recorded has led to a need for better algorithms for automated interpretation. Many of the current algorithms in commercial electrocardiographs are rule-based with poor performance in detecting arrhythmias and particular morphologies. This study aims to develop an algorithm for automatic identification of cardiac abnormalities based on “The China Physiological Signal Challenge 2018”, containing 6877 12-lead ECG recordings, sampled at 500 Hz with a length between 6 and 60 seconds and labeled with 9 classes.

Methods: Python was used to develop a deep convolutional neural network followed by one long-short term memory layer and two dense layers. ECG-signals was padded and truncated to 20 seconds. The model architecture and hyperparameters were tuned according to performance in 10-fold cross-validation, where the distribution between classes in the validation folds was kept equal to the total training set. For each fold, the model was trained for 10 epochs. The final model was selected using early stopping with respect to categorical cross-entropy on the validation set. The selected model was used to provide a probability score for each class on all the training data. The downhill simplex algorithm was used to optimize the probability threshold for each class. Final model performance was evaluated based on the F2 and G2 scores on an unknown test dataset.

Results: Our model produced an F2 score of 0.83 and a G2 score of 0.61 by cross-validation on the training data, and an F2 score of 0.75 and a G2 score of 0.51 on the test data. Precision and recall for each class, on training data, are presented in the table.

Conclusion: These results show that the classification of short 12-lead ECG recordings from various categories of cardiac abnormalities may be assisted by automated algorithms developed by deep learning.