Automatic 12-lead ECG Classification Using a Convolutional Network Ensemble

Antônio H. Ribeiro, Daniel Gedon, Daniel Martins Teixeira, Manoel Horta Ribeiro, Thomas B. Schön, Wagner Meira Jr.

Abstract

Automated classification of 12-lead electrocardiograms (ECG) is critical for reducing human error in cardiac diagnostics. This paper describes a deep learning approach developed for the 2020 PhysioNet Challenge, utilizing an ensemble of seven 1D Residual Networks (ResNet) to classify 27 cardiovascular abnormalities. Our method addresses challenges in data heterogeneity and variable signal lengths through a robust batch-processing and logit-averaging strategy. Results demonstrate that ensembling multiple models significantly improves classification stability and performance, achieving a validation score of 0.657.

Introduction

The 12-lead ECG remains a primary tool for diagnosing cardiac conditions. However, manual interpretation is labor-intensive and subject to variability. The 2020 PhysioNet Challenge presented a complex multi-label classification task involving 27 distinct clinical classes across diverse datasets from four countries. Key difficulties included handling the scale of abnormalities, the heterogeneity of recording equipment, and the inherent variability in signal lengths.

Methods

Model Architecture

The core of our approach is a 1D ResNet architecture. The network begins with an initial convolutional layer followed by five residual blocks. Each block employs two convolutional layers with skip connections to mitigate vanishing gradient issues in deeper layers. We utilized a filter length of 17, progressively increasing the number of filters throughout the network.

Figure 1: The 1D ResNet architecture featuring five residual blocks and skip connections.

Signal Processing and Ensembling

To accommodate variable-length ECG recordings, signals were re-sampled to 400 Hz and partitioned into fixed-length segments of 4,096 samples (~10 seconds). For inference, raw model outputs (logits) were averaged across all segments of a recording.

To enhance robustness, we employed an ensemble of seven identical architectures, each initialized with different random weights. The final prediction is derived by averaging the logits of all seven models before applying a sigmoid activation function. This strategy reduces the impact of individual model "blind spots" and improves overall confidence.

Results

The ensemble approach yielded a validation score of 0.657 on the challenge dataset. A critical finding was the monotonic relationship between the number of models in the ensemble and the resulting performance score. As the ensemble size increased from one to seven, the classification accuracy and stability improved consistently, as shown in Figure 2. Additionally, heuristic constraints were applied to limit the model to a maximum of six simultaneous diagnoses, aligning with clinical common sense and the challenge's scoring penalties for over-diagnosis.

Figure 2: Classification score as a function of the number of models in the ensemble, showing monotonic improvement.

In the official challenge ranking, our submission (Team "Code Team") placed 28th out of 41 teams with a hidden test score of 0.132. The discrepancy between validation and test scores highlights the significant challenge of "domain shift" when applying models to entirely unseen clinical environments.

Discussion and Conclusion

This work demonstrates that 1D ResNet ensembles are effective for large-scale ECG classification. The use of logit averaging and segment-based processing provides a scalable solution for variable-length clinical data. However, the performance drop on the hidden test set underscores the need for better generalization techniques. Future research should explore advanced model aggregation methods, such as stacking, and data augmentation to improve robustness against the diverse noise profiles and recording standards found in global clinical practice.

Summary updated

BibTeX
@inproceedings{ribeiro2020automatic,
  author = {Antônio H. Ribeiro and Daniel Gedon and Daniel Martins Teixeira and Manoel Horta Ribeiro and Antônio Luiz Pinho Ribeiro and Thomas B. Schön and Wagner Meira Jr.},
  title = {{Automatic 12-lead ECG Classification Using a Convolutional Network Ensemble}},
  booktitle = {CinC},
  year = {2020},
  doi = {10.22489/cinc.2020.130},
}
Figure