Source-linked AI summary

ECG Heartbeat Classification: A Deep Transferable Representation

Mohammad Kachuee, Shayan Fazeli, Majid Sarrafzadeh

arXiv:1805.00794v2cs.CYcs.LGstat.ML

TL;DR

Manual ECG analysis is time-consuming and error-prone, while prior work has made limited use of transferable knowledge across health-informatics tasks. The paper trains a deep convolutional representation for arrhythmia classification and transfers it to myocardial infarction prediction, achieving accuracies comparable to state-of-the-art methods on both tasks.

  • Problem

    Manual ECG waveform analysis is time-consuming and prone to errors, and transfer learning has seen limited use in health informatics despite the need for scalable representations.

  • Method

    The paper trains a deep convolutional neural network on arrhythmia classification, then uses its learned representation to train an MI predictor while freezing earlier layers.

  • Results

    The learned representation supports accurate classifiers for both arrhythmia and MI classification, with accuracies comparable to state-of-the-art methods.

  • Takeaways & Limitations

    A representation learned from ECG arrhythmia classification can serve as a transferable base for MI classification using ECG signals.

Abstract

from arXiv · show

Electrocardiogram (ECG) can be reliably used as a measure to monitor the functionality of the cardiovascular system. Recently, there has been a great attention towards accurate categorization of heartbeats. While there are many commonalities between different ECG conditions, the focus of most studies has been classifying a set of conditions on a dataset annotated for that task rather than learning and employing a transferable knowledge between different tasks. In this paper, we propose a method based on deep convolutional neural networks for the classification of heartbeats which is able to accurately classify five different arrhythmias in accordance with the AAMI EC57 standard. Furthermore, we suggest a method for transferring the knowledge acquired on this task to the myocardial infarction (MI) classification task. We evaluated the proposed method on PhysionNet's MIT-BIH and PTB Diagnostics datasets. According to the results, the suggested method is able to make predictions with the average accuracies of 93.4% and 95.9% on arrhythmia classification and MI classification, respectively.

I. INTRODUCTION

ECG analysis is difficult and error-prone manually, motivating automated methods that learn transferable representations across cardiovascular classification tasks.

  • Motivation: Manual ECG waveform detection and categorization are time-consuming and prone to errors, despite the importance of cardiovascular diagnosis.Cardiovascular diseases account for about one-third of global deaths, and irregular heartbeats can be lethal.
  • Prior approaches: Earlier ECG machine-learning pipelines typically preprocess signals, extract handcrafted statistical features, and apply conventional classifiers.Examples include band-pass filtering, support vector machines, multilayer perceptrons, and decision trees.
  • Motivation: End-to-end deep learning can learn task-specific ECG representations and improve scalability, but its many parameters require large training datasets.This data requirement motivates methods that can reuse learned knowledge.
  • Research gap: Transfer learning has been widely used in computer vision and sentence categorization but has seen limited use in health informatics.The paper positions cross-task knowledge transfer as an underused strategy for healthcare data.
  • Contribution: The proposed framework learns ECG representations from arrhythmia detection and transfers them to myocardial infarction prediction.The authors use the arrhythmia task because it provides substantial labeled data and may capture shape-related ECG features.

II. DATASETS

The study uses MIT-BIH for five-category arrhythmia learning and PTB Diagnostics for myocardial infarction analysis, with lead II ECG as the common input.

  • Datasets: The study uses PhysioNet’s MIT-BIH Arrhythmia and PTB Diagnostic ECG Databases as labeled data sources.All experiments use ECG lead II resampled to 125 Hz.
  • MIT-BIH: MIT-BIH contains recordings from 47 subjects sampled at 360 Hz, with beats annotated by at least two cardiologists.The annotations are mapped into five beat categories according to the AAMI EC57 standard.
  • PTB Diagnostics: PTB Diagnostics contains records from 290 subjects, including 148 diagnosed with myocardial infarction and 52 healthy controls.The analysis uses only lead II and the myocardial infarction and healthy-control categories.

A. Preprocessing

The preprocessing pipeline converts continuous ECG recordings into normalized, fixed-length beats by detecting R-peak candidates within 10-second windows.

  • Windowing and normalization: The method splits continuous ECG signals into 10-second windows and normalizes amplitudes between zero and one.These operations prepare each window for local-maximum and R-peak detection.
  • Peak detection: R-peak candidates are identified from local maxima using first-derivative zero crossings and a normalized-amplitude threshold of 0.9.The threshold is applied after local maxima are detected.
  • Beat extraction: The median R-R interval defines the nominal heartbeat period T, and each beat segment has length 1.2T before zero padding.The full extraction procedure is illustrated with a 10-second ECG window and an extracted beat.
  • Design rationale: The extraction method avoids filtering and morphology or spectrum assumptions while producing identical-length beats for subsequent processing.The authors describe this as simple and effective across different signal morphologies.

B. Training the Arrhythmia Classifier

The arrhythmia classifier is a deep one-dimensional residual convolutional network that predicts five beat categories from extracted ECG beats.

  • Classifier objective: The classifier is trained on MIT-BIH beat types and also produces an informative heartbeat representation for later transfer.The network is intended to support both beat classification and representation learning.
  • Architecture: Extracted beats enter one-dimensional temporal convolutions with 32 kernels of size 5 and max pooling of size 5 with stride 2.The architecture uses these settings throughout its convolutional and pooling layers.
  • Architecture: Each residual block contains two convolutional layers, two ReLU nonlinearities, a skip connection, and a pooling layer.The network has five residual blocks followed by two 32-neuron fully connected layers and a softmax output.
  • Architecture: The resulting classifier has 13 weight layers and outputs predicted class probabilities.Residual connections support the deeper architecture used for the arrhythmia task.

C. Training the MI Predictor

The MI predictor uses the learned representation from the last convolutional layer and trains a small classifier while freezing earlier network layers.

  • The last convolutional layer’s output activations serve as the input representation for MI prediction.
  • A two-layer fully connected network with 32 neurons per layer predicts MI from the learned heartbeat representation.
  • During MI training, only the final two network layers are trained, while the remaining layers’ weights are frozen.

D. Implementation Details

The supplied implementation section specifies the optimization setup and identifies the result tables for heartbeat and MI classification comparisons.

  • TensorFlow, cross-entropy loss, and softmax outputs are used for model training and evaluation.
  • Adam optimization uses a learning rate of 0.001, beta-1 of 0.9, and beta-2 of 0.999, with exponential decay factor 0.75 every 10000 iterations.
  • Training all networks took less than two hours on a GeForce GTX 1080Ti processor.
  • Table II compares heartbeat classification results, while Table III compares MI classification results.

IV. RESULTS

The results evaluate arrhythmia classification on held-out heartbeats and report competitive accuracy relative to other methods, with residual connections identified as a possible contributor.

  • 4079 held-out heartbeats, approximately 819 from each class, were used to evaluate the arrhythmia classifier.The dataset was augmented to balance the number of beats across categories.
  • The classifier makes accurate predictions and distinguishes different heartbeat classes on the test set.
  • The proposed method achieves heartbeat-classification accuracies competitive with state-of-the-art methods.The authors suggest residual connections may help by enabling deeper networks than traditional convolutional architectures.

B. MI Classification using the learned representation

The learned representation is transferred from arrhythmia classification to MI prediction, where it provides class separation and performs better than most compared methods under a single-lead setting.

  • The MI predictor uses 80% of the PTB dataset for training and the remaining 20% for testing.
  • The proposed method performs better than all compared works except Sharma et al., whose method reports higher accuracy and precision.The comparison uses average accuracy, precision, and recall for MI classification.
  • The transferred representation provides reasonable separation for MI classification on PTB samples.The representation was trained on MIT-BIH for heartbeat classification and visualized with t-SNE in two dimensions.

V. CONCLUSION

The study presents a transferable ECG representation learned with a deep convolutional network for arrhythmia classification and reused for accurate myocardial infarction classification.

  • A deep convolutional neural network with residual connections learns a transferable representation for ECG heartbeat classification.
  • The representation learned on arrhythmia classification can serve as a basis for training accurate myocardial infarction classifiers.
  • The method achieves accuracies comparable to state-of-the-art methods on both classification tasks.
  • t-SNE visualizations illustrate the effectiveness of the learned representation.
Loading 1805.00794v2…