Multi-Label Classification of 12-lead ECGs by Using Residual CNN and Class-Wise Attention

Yang Liu1, Yongfeng Yuan1, Kuanquan Wang1, Henggui Zhang2
1Harbin Institute of Technology, 2University of Manchester


Abstract

Cardiovascular diseases have become the leading cause of morbidity and mortality worldwide. Due to their chronic nature, early screening and follow-up management will effectively improve the prevention and treatment of cardiovascular diseases, where automatic ECG classification plays an important role. In practice, factors, such as multifarious categories, varying lengths, imbalanced classes and multi-label cases, make the automatic classification of ECGs very challenging. In this work, we pro-pose a novel deep neural network architecture for the multi-label classification of 12-lead ECG recordings. The input ECG, which is padded or truncated to a specified length (60 seconds in our experiment), is first processed by the residual CNN which is constituted by a separate convolutional layer and a stack of residual blocks to extract a sequence of local features of the input. Then, the extracted feature sequence is fed to a set of parallel attention layers each corresponds to a category of the classifier - a class-wise attention. The output of each attention layer is a feature vector that summarizes the whole input recording and focuses on the stratification of the corresponding category. As the network has an individual attention mechanism for each category, the divergence of concerns among the different categories will be well addressed, which is especially desirable for the multi-label classification. Furthermore, to deal with the imbalanced classes, we use focal loss in the training of our model. The model is trained and tested in a 5-fold cross validation by using the dataset of 2020 PhysioNet - CinC Challenge with resulting F2 measure of 0.816 ± 0.009 and G2 measure of 0.557 ± 0.019. The online test scores for our Phase I entry (the ECG Master team) are 0.77 (F2), 0.572 (G2), and 0.664 (Geometric Mean), demonstrating a promising method for the classification of ECGs.