Combining a ResNet Model with Handcrafted Temporal Features for ECG Classification with Varying Number of Leads

Stefano Magni, Andrea Sansonetti, Chiara Salvi, Tiziana Tabiadon, Guadalupe García Isla
Politecnico di Milano


Introduction: An automatic electrocardiogram (ECG) classifier could aid in ECG recordings evaluation. This study presents PhysioNauts Team’s contribution to the PhysioNet/CinC Challenge 2021 on ECG classification for variable leads.

Materials and Methods: A model was developed for the identification of 24 cardiac rhythms and electrophysiological disorders in a multi-label problem for 12, 6, 3 and 2-lead ECGs. The data used was provided by the challenge. Three types of labels were identified, those affecting cardiac rhythm, ECG morphology or both. The proposed approach was based on a deep learning extraction of complex implicit ECG morphological features, the handcrafting of explicit rhythm features and on an emphasis for the proper integration of both sources of information. The full model was a residual neural network (ResNet) with a squeeze and excitation module and a wide 10-neuron single-layer fully connected (FC) branch to leverage the learning of deep and hand-crafted features. The ResNet inputs were ECG segments of 4096 samples downsampled to 257 Hz. The FC inputs were standard rhythm features ex-tracted from the RR-series. Class imbalance was mitigated by deriving three data subsets, each of them containing one third of normal sinus rhythm signals and all the other ECG traces. A full model was obtained from each subset and an ensemble was built using the three of them. To maximize the challenge metric (CM) and further reduce class imbalance effects, threshold optimization was per-formed based on a grid search and the Nelder-Mead method.

Results: A first version of the model described was submitted, obtaining a CM of 0.579, 0.562, 0.576, and 0.555 on 12-lead, 6-lead, 3-lead, 2-lead validation datasets respectively. The complete model obtained CM on local data 5-fold cross-validation of 0.614 ± 0.007, 0.598 ± 0.004, 0.634 ± 0,003, and 0,599 ± 0,006 on 12-lead, 6-lead, 3-lead, 2-lead.