Source-linked AI summary
Interpretable Deep Learning for Automatic Diagnosis of 12-lead Electrocardiogram
Dongdong Zhang, Xiaohui Yuan, Ping Zhang
TL;DR
The paper addresses automatic multilabel diagnosis of cardiac arrhythmias from ECGs amid growing examination volumes and limited cardiologist availability. It develops a 1D CNN for 12-lead ECGs, evaluates it against expert-feature baselines and single-lead inputs, and applies SHAP for interpretation. The model achieved average AUC above 0.95 and an average F1 score of 0.813, outperforming the baseline classifiers.
Problem
Growing ECG volumes and limited cardiologist availability motivate accurate automatic diagnosis of cardiac arrhythmias.
Method
A 1D convolutional neural network performs multilabel classification on 12-lead ECGs, with SHAP used for patient- and population-level interpretation.
Results
The model achieved an average F1 score of 0.813 and outperformed four baseline classifiers trained on expert features.
Takeaways & Limitations
Using all 12 leads outperformed single-lead models on average, while leads I, aVR, and V5 were the best-performing individual leads.
Abstract
from arXiv · showhide
Electrocardiogram (ECG) is a widely used reliable, non-invasive approach for cardiovascular disease diagnosis. With the rapid growth of ECG examinations and the insufficiency of cardiologists, accurate and automatic diagnosis of ECG signals has become a hot research topic. Deep learning methods have demonstrated promising results in predictive healthcare tasks. In this paper, we developed a deep neural network for multi-label classification of cardiac arrhythmias in 12-lead ECG recordings. Experiments on a public 12-lead ECG dataset showed the effectiveness of our method. The proposed model achieved an average area under the receiver operating characteristic curve (AUC) of 0.970 and an average F1 score of 0.813. The deep model showed superior performance than 4 machine learning methods learned from extracted expert features. Besides, the deep models trained on single-lead ECGs produce lower performance than using all 12 leads simultaneously. The best-performing leads are lead I, aVR, and V5 among 12 leads. Finally, we employed the SHapley Additive exPlanations (SHAP) method to interpret the model's behavior at both patient level and population level. Our code is freely available at https://github.com/onlyzdd/ecg-diagnosis.
I. INTRODUCTION
The paper develops an interpretable deep neural network for automatic multilabel diagnosis of cardiac arrhythmias from 12-lead ECG recordings. It compares deep learning with expert-feature baselines and examines lead requirements and model behavior.
- The work addresses ECG interpretation challenges arising from growing examination volumes and limited cardiologist availability.
- The study develops a 1D convolutional neural network for multilabel cardiac-arrhythmia classification using 12-lead ECG recordings.
- The model outperformed four baseline classifiers trained on expert features.
- Single-lead models had F1 scores 4.4% to 11.8% lower than the 12-lead model, with leads I, aVR, and V5 performing best.
- SHAP was used to interpret predictions at both patient and population levels.
II. RELATED WORKS
Prior ECG diagnosis methods fall into two broad categories: traditional pipelines that require engineered features and end-to-end deep learning methods that learn features directly from signals.
- Existing automatic ECG diagnosis models comprise traditional machine-learning methods and end-to-end deep-learning methods.
- Traditional methods use expert-engineered or signal-processed features before training machine-learning classifiers.
- Traditional approaches are limited by data quality and domain knowledge and require additional effort for expert-feature extraction.
- Prior work applied neural, convolutional, recurrent, and attention-based models to cardiac-arrhythmia detection and 12-lead abnormality diagnosis.
III. METHODS
The proposed method processes raw 12-lead ECG signals with a residual 1D CNN and produces multilabel predictions for nine diagnostic classes.
- The CPSC2018 database contains 6,877 12-lead ECGs collected from 11 hospitals, with recordings lasting 6 to 60 seconds at 500 Hz.
- The architecture uses 1D CNNs with shortcut-connected residual blocks for deep-feature extraction.
- The network uses raw ECG signals shaped as n_steps × 12 and outputs a nine-class multilabel prediction.
- Convolution, batch normalization, ReLU, dropout, and pooling layers extract and combine features before sigmoid-based prediction.
C. Evaluation Metrics
The study evaluates each diagnostic class with precision, recall, F1, AUC, and accuracy, then averages metrics across nine classes to assess multilabel performance.
- Each diagnostic class is evaluated using Precision, Recall, F1 score, AUC, and accuracy score.The classes include one normal class and eight abnormal classes.
- Average scores are computed across the nine diagnostic classes for multilabel evaluation.The nine classes comprise one normal and eight abnormal classes.
- Average F1 score is used to select the best-performing model, with the final score averaged over classes.
D. Interpretability
The paper uses SHAP to make deep-learning predictions more interpretable, examining model behavior at both patient and population levels.
- SHAP is adopted to interpret predictions from the deep model, addressing the limited human traceability of nonlinear black-box decisions.SHAP assigns an additive feature-importance value to each feature for a particular prediction.
- The model’s interpretability is examined at both patient level and population level using SHAP values.
1) Patient Level Interpretation:
Patient-level interpretation explains contributions for a specific 12-lead ECG, while population-level analysis aggregates these contributions to characterize lead importance across diagnoses.
- Patient Level Interpretation: For an ECG input x ∈R15000×12, the model produces a nine-class output and a SHAP-value matrix with dimensions 9×15000×12.Each SHAP value represents an input feature’s contribution toward a diagnostic class.
- Population Level Interpretation: Population-level interpretation summarizes patient-level explanations across D patients and diagnostic classes.It uses a population SHAP matrix to evaluate lead contributions over the dataset.
- Population Level Interpretation: The contribution of lead k to diagnostic class i is defined by summing SHAP values across the population.
- Population Level Interpretation: Normalized contribution rates identify important leads for particular arrhythmias, while average contribution rates reflect overall lead importance and possible feature interactions.
IV. RESULTS AND DISCUSSION
The study standardizes ECG input length and applies augmentation to address variable recording durations, imbalance, and limited data for arrhythmia diagnosis.
- ECG recordings are standardized to 15000 samples, corresponding to 30 seconds at 500 Hz, because the network requires equal-length inputs.Recordings longer than 30 seconds are cropped, retaining the last 30 seconds.
- Scaling and shifting are used for data augmentation to address severe class imbalance and data insufficiency.The paper states that augmentation can reduce overfitting and encourage robustness against adversarial examples.
3) Training and Evaluation:
The study used 10-fold cross-validation to evaluate a deep model and compare it with expert-feature machine-learning baselines. The deep model achieved strong overall performance but remained weaker for some arrhythmia classes.
- Training and evaluation: 10-fold cross-validation averaged the deep model’s test performance across repeated training, validation, and testing splits.Each round used 8 folds for training, 1 for validation, and 1 for testing, with class thresholds selected on validation data.
- 12-lead model performance: 0.813 average F1 score accompanied average AUC and accuracy above 0.95, with precision of 0.821 and recall of 0.812.AF and RBBB exceeded 0.9 F1, whereas STE reached 0.535 F1.
- Confusion-matrix analysis: The model showed low false-negative and high true-negative rates across all 9 classes, but PAC, STD, and STE had high false-negative rates.AF, RBBB, and PVC also showed low false-positive and false-negative rates.
- Comparison with traditional methods: 0.813 average F1 score for the deep model exceeded GBT’s 0.619 and RF’s 0.515 among the expert-feature baselines.The deep model particularly improved IVAB and PAC classification, while baselines struggled with IVAB, PAC, and STE.
D. Single-lead Model Performance
Single-lead models generally performed worse than the 12-lead model, although some individual leads were especially predictive for particular arrhythmias. Lead I, aVR, and V5 were the strongest single leads overall in the reported comparison.
- Single-lead versus 12-lead performance: 4.4% to 11.8% lower F1 score was observed for single-lead models than for the model using all 12 leads.The comparison was based on F1 scores across diagnostic classes.
- Best-performing leads: Lead I, aVR, and V5 were the top-performing single leads in the comparison.Lead I and lead II also showed very good average performance, while lead I was the best predictive lead for LBBB.
- Class-specific lead performance: 0.94 F1 score for RBBB using lead V1 exceeded the performance of the other individual leads.The authors identified V1 as important for RBBB diagnosis.
- Class-specific lead performance: Lead I for LBBB and lead V1 for RBBB outperformed the 12-lead model for those specific diagnostic classes.The authors speculate that unexpected feature interactions may reduce the 12-lead model’s performance in these cases.
E. Model Interpretability
The study used SHAP to interpret ECG predictions at patient and population levels. Patient-level explanations highlight influential waveform regions, while population-level analysis summarizes the contribution of each lead to diagnostic classes.
- Interpretability approach: SHAP explanations were applied to clarify the deep model’s behavior for individual ECG instances and across the population.The method was motivated by the limited traceability of multilayer nonlinear models in clinical applications.
- Patient-level interpretation: At patient level, SHAP highlights waveform regions that contribute to the top-predicted arrhythmia class.The visualizations display only the last 10 seconds of the two most influential leads because of space limitations.
- Patient-level interpretation: For atrial fibrillation, highlighted regions included the P wave and R peak, consistent with missing P waves and irregular RR intervals.Other examples emphasized PR intervals for IAVB and sporadic PVC periods.
- Population-level interpretation: Population-level contribution rates identified leads II, aVR, V1, V2, V5, and V6 as most important on average.V1 and V2 had contribution rates around 0.3 for LBBB and were also important for RBBB.
- Population-level interpretation: Low contribution from leads III and aVL may reflect feature interactions among ECG leads.The paper gives lead III’s relationship to leads II and I as an example of such interaction.
V. CONCLUSION
The paper concludes that its 12-lead deep model effectively classified cardiac arrhythmias, outperformed expert-feature baselines, and benefited from lead-level and patient-level SHAP interpretation. The authors identify generalization and adversarial robustness as future directions.
- Conclusion: The stacked-residual-block deep network effectively performed multilabel classification of cardiac arrhythmias in 12-lead ECG recordings.Performance was evaluated on the CPSC2018 dataset.
- Conclusion: The deep model significantly outperformed baseline classifiers trained on expert features.The baselines used engineered features rather than the end-to-end deep representation.
- Conclusion: Lead I, aVR, and V5 were the best-performing single leads in the reported experiments.The conclusion also notes SHAP interpretation at patient and population levels.
- Future directions: The authors plan to investigate generalization to patients from different ethnicities and robustness to adversarial examples.These topics define the stated future scope of the work.