An Automatic Premature Ventricular Contraction Recognition System Based on Imbalanced Dataset and Pre-Trained Residual Network Using Transfer Learning on ECG Signal

Hadaate Ullah, Md Belal Bin Heyat, Faijan Akhtar, Abdullah Y. Muaad, Chiagoziem C. Ukwuoma, Muhammad Bilal, Mahdi H. Miraz, Mohammad Arif Sobhan Bhuiyan, Kaishun Wu, Robertas Damaševičius, Taisong Pan, Min Gao, Yuan Lin, Dakun LaiDiagnostics 2022 · DOI

TL;DR

This paper presents an automatic system for detecting Premature Ventricular Contractions (PVCs) from ECG signals using a pre-trained ResNet-18 deep learning model and transfer learning. The approach converts ECG beats into images and achieves high accuracy on imbalanced datasets, outperforming existing methods.

What Problem Does This Paper Address?

Premature Ventricular Contractions (PVCs) are a common cardiac abnormality that can indicate more serious heart conditions. Diagnosing PVCs from long-term ECG recordings is a time-consuming and labor-intensive task for cardiologists. While automated detection methods exist, they often struggle with imbalanced datasets (where normal beats far outnumber abnormal ones) and require complex feature engineering. This paper aims to address these challenges by developing an efficient, automatic, and robust PVC recognition system that can handle imbalanced data and reduce the reliance on manual feature extraction.

Methods

The core of the proposed system is a deep learning approach utilizing a pre-trained ResNet-18 model. The key steps are:

  • ECG Beat Segmentation: The Pan-Tompkins algorithm is used to segment individual normal and PVC heartbeats from the ECG signals.
  • Image Transformation: Each segmented heartbeat is converted into a 2D image. This transformation allows the use of powerful 2D Convolutional Neural Networks (CNNs).
  • Transfer Learning with Pre-trained ResNet-18: A ResNet-18 model, pre-trained on the large ImageNet dataset, is employed. This leverages the learned features from general image recognition tasks and transfers them to the specific task of ECG beat classification. The final classification layer of ResNet-18 is replaced with a fully connected layer and a Softmax classifier.
  • Optimization Techniques: To handle the imbalanced dataset and improve model performance, several techniques are used:
  • Weighted Random Samples: This ensures that minority class samples (PVCs) have a greater influence during training.
  • On-the-fly Augmentation: This artificially increases the size and diversity of the training data.
  • Adam Optimizer: A popular and effective optimization algorithm.
  • Early Stopping: A regularization technique to prevent overfitting by halting training when performance on a validation set starts to degrade.
  • Patient-Specific Evaluation: The study emphasizes patient-specific evaluation using Leave-One-Subject-Out Cross-Validation (LOSOCV) to ensure the model's generalizability to unseen individuals.

Datasets

The study utilizes two publicly available ECG arrhythmia datasets:

  • MIT-BIH Arrhythmia Database: This is a well-known dataset containing 48 records from 47 subjects. For this study, 22 records containing PVC beats were selected.
  • Institute of Cardiological Technics (INCART) 12-lead Arrhythmia Database: This dataset comprises 75 annotated recordings. The study used a significant portion of these records, specifically focusing on lead II for its clear QRS complexes.

The paper does not introduce any new benchmarks but uses these established datasets to evaluate the proposed method.

Key Insights and Ideas

  • Transforming Time-Series to Images: Converting 1D ECG signals into 2D images is a powerful strategy that allows the application of advanced 2D CNN architectures, which often excel at capturing complex spatial patterns.
  • Transfer Learning for Data Scarcity: The success of transfer learning from ImageNet to ECG data highlights its effectiveness in overcoming the challenge of limited labeled ECG data, a common issue in medical AI.
  • Patient-Specific Evaluation is Crucial: The study's emphasis on LOSOCV demonstrates that evaluating models on data from entirely new subjects is essential for assessing real-world applicability, as models trained and tested on the same subjects can be biased.
  • Combined Optimization Strategies: The synergistic effect of using weighted sampling, data augmentation, and an effective optimizer (Adam) is key to handling imbalanced datasets and achieving high performance.

Key Results

The proposed method achieved highly impressive results:

  • High Accuracy: Using LOSOCV, the system achieved accuracies of 99.93% on the MIT-BIH dataset and 99.77% on the INCART dataset.
  • State-of-the-Art Performance: The paper claims that these results suppress the performance of state-of-the-art methods for PVC recognition on unseen data.
  • Robustness on Imbalanced Data: The system demonstrated efficacy and generalizability even with imbalanced datasets, a significant challenge in this domain.
  • Simplified Approach: The method avoids complex pre-processing and manual feature extraction, leading to a simpler model design.

Limitations and Future Work

  • Single-Lead ECG: The current study uses single-lead ECG signals. The authors suggest future work to enrich the analysis by incorporating signals from multiple leads.
  • Broader Applications: The proposed method's potential to recognize other types of arrhythmias and be applied to other electrophysiological signals like EEG, EMG, and EOG for detecting different human diseases is highlighted.
  • Lightweight Model: For deployment on resource-constrained devices (like wearables), the authors intend to develop a lightweight modified ResNet model, possibly incorporating micro-attention mechanisms.

Summary updated

Abstract

The development of automatic monitoring and diagnosis systems for cardiac patients over the internet has been facilitated by recent advancements in wearable sensor devices from electrocardiographs (ECGs), which need the use of patient-specific approaches. Premature ventricular contraction (PVC) is a common chronic cardiovascular disease that can cause conditions that are potentially fatal. Therefore, for the diagnosis of likely heart failure, precise PVC detection from ECGs is crucial. In the clinical settings, cardiologists typically employ long-term ECGs as a tool to identify PVCs, where a cardiologist must put in a lot of time and effort to appropriately assess the long-term ECGs which is time consuming and cumbersome. By addressing these issues, we have investigated a deep learning method with a pre-trained deep residual network, ResNet-18, to identify PVCs automatically using transfer learning mechanism. Herein, features are extracted by the inner layers of the network automatically compared to hand-crafted feature extraction methods. Transfer learning mechanism handles the difficulties of required large volume of training data for a deep model. The pre-trained model is evaluated on the Massachusetts Institute of Technology-Beth Israel Hospital (MIT-BIH) Arrhythmia and Institute of Cardiological Technics (INCART) datasets. First, we used the Pan-Tompkins algorithm to segment 44,103 normal and 6423 PVC beats, as well as 106,239 normal and 9987 PVC beats from the MIT-BIH Arrhythmia and IN-CART datasets, respectively. The pre-trained model employed the segmented beats as input after being converted into 2D (two-dimensional) images. The method is optimized with the using of weighted random samples, on-the-fly augmentation, Adam optimizer, and call back feature. The results from the proposed method demonstrate the satisfactory findings without the using of any complex pre-processing and feature extraction technique as well as design complexity of model. Using LOSOCV (leave one subject out cross-validation), the received accuracies on MIT-BIH and INCART are 99.93% and 99.77%, respectively, suppressing the state-of-the-art methods for PVC recognition on unseen data. This demonstrates the efficacy and generalizability of the proposed method on the imbalanced datasets. Due to the absence of device-specific (patient-specific) information at the evaluating stage on the target datasets in this study, the method might be used as a general approach to handle the situations in which ECG signals are obtained from different patients utilizing a variety of smart sensor devices.
BibTeX
@inproceedings{ullah2022automatic,
  author = {Hadaate Ullah and Md Belal Bin Heyat and Faijan Akhtar and Abdullah Y. Muaad and Chiagoziem C. Ukwuoma and Muhammad Bilal and Mahdi H. Miraz and Mohammad Arif Sobhan Bhuiyan and Kaishun Wu and Robertas Damaševičius and Taisong Pan and Min Gao and Yuan Lin and Dakun Lai},
  title = {{An Automatic Premature Ventricular Contraction Recognition System Based on Imbalanced Dataset and Pre-Trained Residual Network Using Transfer Learning on ECG Signal}},
  booktitle = {Diagnostics},
  year = {2022},
  doi = {10.3390/diagnostics13010087},
}
Figure