TL;DR
This paper introduces a novel "segment label" feature, derived from a pre-trained ECG recording classifier, to improve the accuracy of individual heartbeat classification. By incorporating broader ECG context, their Random Forest model achieves competitive performance, particularly excelling in classifying Supra-Ventricular Ectopic Beats (SVEB).
What Problem Does This Paper Address?
Diagnosing cardiac abnormalities often relies on electrocardiograms (ECGs). While overall ECG classification is important, precisely identifying individual abnormal heartbeats (heartbeat classification) is crucial for more sophisticated diagnoses. Existing methods often struggle with heartbeats that require contextual information beyond the immediate signal, such as Supra-Ventricular Ectopic Beats (SVEB). This paper aims to enhance heartbeat classification accuracy, especially for these context-dependent cases, by developing a more informative feature.
Methods
The core innovation is the "segment label," a novel feature generated by a pre-trained Convolutional Neural Network (CNN) ECG recording classifier. This classifier analyzes a segment of ECG data (including the heartbeat of interest and its surrounding beats) and outputs a label representing the overall rhythm. This segment label is then fed as an additional feature into a Random Forest (RF) model, alongside traditional heartbeat features.
The process involves:
- ECG Preprocessing: Resampling ECG signals to 150 Hz and identifying fiducial points (like R peaks).
- Feature Extraction:
- Conventional Features: Includes RR interval features (e.g., current, previous, and post RR intervals), medical morphology features (e.g., amplitudes of P, Q, R, S waves, and QRS width), and mathematical signal morphology features (Kurtosis, skewness, DWT coefficients).
- Segment Label: Extracted by a pre-trained ECG recording classifier (either a custom CNN,
ecgclf_c, or a ResNet,ecgclf_b). This label is assigned to each heartbeat within the analyzed ECG segment. - Feature Selection: Mutual Information (MI) score is used to select the most informative conventional features.
- Heartbeat Classification: A Random Forest classifier is trained using the selected conventional features and the segment label. The RF model uses balanced sample weights, inversely proportional to class frequencies, to handle imbalanced datasets.
Datasets
- Dataset A (MIT-BIH Arrhythmia): Used for training and validating the heartbeat classifier. It contains 48 half-hour excerpts with 109,449 heartbeats, grouped into 5 classes (Normal, Ventricular Ectopic Beat, Supra-Ventricular Ectopic Beat, Fusion, Unknown). The dataset is split into 22 training and 22 testing recordings.
- Dataset B (PhysioNet/CinC Challenge 2017): Used for pre-training the ECG recording classifier. It includes 8,528 ECG recordings, augmented with additional segments and noisy ECGs.
- Dataset C (PhysioNet/CinC Challenge 2020): Also used for pre-training the ECG recording classifier. It consists of 6,877 ECGs.
Key Insights and Ideas
- Context is King for Heartbeats: The paper strongly supports the idea that classifying individual heartbeats often requires understanding the broader ECG context, not just the immediate waveform.
- Leveraging ECG Recording Classifiers: A pre-trained ECG recording classifier can serve as a powerful feature extractor for heartbeat classification, bridging a gap between different levels of ECG analysis.
- Segment Label as a Bridge: The "segment label" effectively transfers rhythm information from the ECG recording level to the heartbeat level, providing valuable context.
- Random Forest's Robustness: The Random Forest, a traditional machine learning model, proves effective when augmented with this novel contextual feature, especially for challenging classes.
- SVEB Detection Improvement: The proposed method shows a significant improvement in detecting SVEB, a class known to be difficult due to its reliance on rhythm context.
Key Results
The proposed method, particularly the RF model trained with the segment label from the ResNet-based ECG classifier (RFSb), achieved:
- Overall Accuracy: 0.96
- F1-scores:
- Normal beats (N): 0.98
- Ventricular Ectopic Beats (VEB): 0.93
- Supra-Ventricular Ectopic Beats (SVEB): 0.74
- SVEB Performance: Precision of 0.76 and Recall of 0.78, outperforming state-of-the-art methods.
- Comparison: The proposed methods (
RFSbandRFSc) achieved the highest F1-score for SVEB compared to other works. The overlap mechanism for segmentation did not significantly improve performance.
Limitations and Future Work
- Data Imbalance: Performance on classes with fewer samples (like F and Q) remains suboptimal due to data imbalance.
- ECG Classifier Quality: The performance of the heartbeat classifier is directly dependent on the quality of the segment label, which in turn depends on the accuracy of the ECG recording classifier.
- Single Lead vs. 12-Lead: The current work focuses on single-lead ECGs. Algorithms based on 12-lead ECGs might offer greater improvements.
- Simple Segment Assignment: The current approach assigns the same segment label to all heartbeats within a segment. Future work could explore attention mechanisms to assign context more dynamically based on individual heartbeat contributions.
- Exploring Architectures: Testing more advanced CNN architectures for segment label extraction (e.g., EfficientNet, SE-Net, bi-directional RNN, Transformers) is a promising direction.
- Real-time Application: The method is well-suited for real-time deployment, automatically labeling heartbeats by running both classifiers simultaneously.
Summary updated