A novel transformer-based ECG dimensionality reduction stacked auto-encoders for arrhythmia beat detection

Med Phys. 2023 Sep;50(9):5897-5912. doi: 10.1002/mp.16534. Epub 2023 Jul 20.

Abstract

Background: Electrocardiogram (ECG) is a powerful tool for studying cardiac activity and diagnosing various cardiovascular diseases, including arrhythmia. While machine learning and deep learning algorithms have been applied to ECG interpretation, there is still room for improvement. For instance, the commonly used Recurrent Neural Networks (RNNs), reply on its previous state to update and is therefore ineffective for parallel computing. RNN also struggles to efficiently address the issue of long-distance reliance.

Purpose: To reduce computational complexity by dimensionality reduction of ECG signals we constructed a Stacked Auto-encoders model using Transformer for ECG-based arrhythmia detection. And overcome the challenges of long-term dependencies and limited parallelizability in traditional RNNs when applied to ECG signal processing.

Methods: In this paper, a Transformer-Based ECG Dimensionality Reduction Stacked Auto-encoders model is proposed for ECG-based arrhythmia detection. The transformer is used to encode ECG signals into a feature matrix, which is then dimensionally reduced using unsupervised greedy training through the four linear layers. This resulted in a low-dimensional representation of ECG features, which are subsequently classified using support vector machines (SVM) to minimize overfitting.

Results: The proposed method is benchmarked on the MIT-BIH Arrhythmia database. In the 10-fold cross validation of beat-based arrhythmia detection, the average accuracy, sensitivity, specificity and F1 score of the proposed method are 99.83%, 98.84%, 99.84% and 99.13%, respectively, for the record-based arrhythmia detection which refers to the approach where the training and testing sets use ECG data from independent recorded patients are 88.10%, 49.79%, 91.56% and 39.95%, respectively.

Conclusions: Compared to other existing ECG-based arrhythmia detection methods, our proposed approach exhibits improved detection accuracy and stronger generalization for arrhythmia beats. Additionally, the use of the record-based data division method makes our approach more suitable for clinical practice.

Keywords: Stacked auto-encoders (SAE); arrhythmia; electrocardiogram (ECG); support vector machine (SVM); transformer.

MeSH terms

  • Algorithms*
  • Arrhythmias, Cardiac / diagnosis
  • Electrocardiography*
  • Humans
  • Neural Networks, Computer
  • Signal Processing, Computer-Assisted