Cardiac Abnormalities Recognition in ECG Using a Convolutional Network with Attention and Input with an Adaptable Number of Leads

Tomas Vicar1, Petra Novotna1, Jakub Hejc2, Oto Janousek3, Marina Ronzhina1
1Department of Biomedical Engineering, Brno University of Technology, 2International Clinical Research Center, St. Anne’s University Hospital, Brno, Czech Republic, 3Department of Biomedical Engineering, Brno University of Technology, Brno, Czech Republic


Abstract

Aims: Deep learning-based ECG classifiers speed up diagnostics, save medical specialists’ time and reduce human diagnostic inconsistency. The recent boom of low-cost and easy to use reduced-lead ECG systems challenges us to develop AI-based ECG classification working with fewer leads but achieving nearly the same results as standard twelve-lead ECG classifiers. In this entry, we present 12, 6, 3 and 2-lead ECG classification into nine categories, including normal sinus rhythm and eight cardiac arrhythmias. Methods: A Convolution Neural Network (CNN) based on ResNet architecture was used for data classification. Instead of common 2D convolution for images, 1D convolution was used in the ResNet network. The specialized input attention layer was included in the model, automatically adapting the number of input leads (12, 6, 3, 2). The whole network is trained together with batches containing all numbers of input leads. At the end of the network, another attention layer is applied for better aggregation of information from the whole signal. Shorter signals were replicated in order to achieve the same size of the input. Furthermore, specialized loss function optimizing directly challenge metric was used. Results and Conclusion: Our algorithm based on modified ResNet CNN with the attention layer automatically identifies the cardiac abnormalities in 12, 6, 3 and 2-lead ECG recordings. In an early phase challenge entry, our BUTTeam reached 4-5 place and achieving 0.59-0.61 of challenge metric for a different number of leads. In our challenge entry, we have achieved 0.61, 0.59, 0.60 and 0.59 of challenge metric for 12, 6, 3 and 2 leads, respectively. For cross-validation on the training dataset, this metric reached 0.63, 0.62, 0.59 and 0.57 of challenge metric for 12, 6, 3 and 2 leads, respectively.