A subscription to JoVE is required to view this content. Sign in or start your free trial.

Research Article

A Computationally Efficient Hybrid Approach for Electrocardiogram-Based Arrhythmia Prediction

99 views

⸱

DOI:

10.3791/69541

⸱

May 22nd, 2026

In This Article

Summary

The model in this study is built to classify early arrhythmias in electrocardiogram (ECG) datasets from several databases into five main heartbeat types. Compared to other models, this model performs better in terms of accuracy, sensitivity, precision, and recall.

Abstract

Cardiovascular diseases, especially arrhythmias, are a leading cause of death worldwide. This highlights the need for automated systems that can detect and diagnose these conditions early. This research introduces a deep learning model that identifies arrhythmias using electrocardiogram (ECG) signals. The model focuses on five main types of heartbeats: Normal (N), Left Bundle Branch Block (L), Right Bundle Branch Block (R), Atrial Premature Beat (A), and Premature Ventricular Contraction (V). The system uses Lead I signals from several databases, including MIT-BIH Arrhythmia, Supraventricular, INCART 12-lead, and Sudden Cardiac Death Holter. This provides more than 3.9 million training segments and 112,575 testing segments.

The data is preprocessed by dividing it into fixed windows of 180 samples, scaling it using Min-Max normalization, and balancing the classes with the Synthetic Minority Over-sampling Technique. The model combines 1D Convolutional Neural Networks to extract spatial features and transformer layers to capture time-based patterns. It uses the Adam optimizer and includes dropout and batch normalization to enhance performance. The system achieves 99.99% accuracy, precision, and F1-score across all classes, which is better than the TN4 model and other top-performing models. The use of Convolutional Neural Networks and deep hybrid architectures improves the robustness of features. This model shows great potential for scalable and real-time arrhythmia detection and contributes to the advancement of AI-driven, personalized digital healthcare.

Introduction

Cardiovascular disease is the most significant cause of human health issues, with more than 17 million deaths every year. Nearly three-quarters of all cardiovascular disease (CVD) cases live in low- income countries of the world, as stated by the World Heart Federation. An electrocardiogram (ECG) captures the electrical activity generated by the heart's depolarization. The electrical signals propagate to the skin. ECG signals convey at least two pieces of vital information. One is health-related biomedicine. The other is person-related credentials or biometrics. Because of its simplicity, various methods for classifying ECG signals have been considered, including ....

Access restricted. Please log in or start a trial to view this content.

Protocol

Ethical statement
This study relied entirely on public, anonymized ECG data downloaded from PhysioNet. All datasets used in this study were originally collected with the subjects' consent and with ethics approval from the respective data owners. This research did not require any data gathering, experimental work with either human or animal subjects, or patient personal identity information. Hence, no additional ethics review was requested.

Methodology
Figure 2 illustrates the workflow of the proposed architecture.

Data gathering

Access restricted. Please log in or start a trial to view this content.

Results

This section introduces a hybrid deep learning model designed to categorize arrhythmias from ECG data. The model is evaluated on its ability to recognize five clinically significant heartbeat classifications: Atrial Premature Contraction, Normal, Left Bundle Branch Block, Right Bundle Branch Block, and Premature Ventricular Contraction. Comprehensive assessment is essential given the clinical relevance of these arrhythmia classes and the challenges posed by imbalanced datasets and signal variability.

Access restricted. Please log in or start a trial to view this content.

Discussion

In recognizing and categorizing arrhythmias from ECG bio signals, the proposed deep learning hybrid model combines transformer structures and 1D Convolutional Neural Networks (CNNs) and shows excellent performance. This combination takes advantage of the transformer's ability to learn global time dependencies through self-attention mechanisms and the CNN's capability to identify localized spatial features from raw ECG waveforms. The model was tested using five important heartbeat classes: Normal, Left Bundle Bran.......

Access restricted. Please log in or start a trial to view this content.

Disclosures

The authors have no conflicts of interest to declare.

Materials

List of materials used in this article
NameCompanyCatalog NumberComments
Adam OptimizerOpen-source (PyTorch)https://pytorch.org/docs/stable/optim.htmlOptimization algorithm used to train the deep learning model by adapting learning rates during backpropagation.
Hardware (Computational System)AMD; NVIDIAhttps://www.amd.com/en/products/processors/laptop/ryzen/7000-series/amd-ryzen-7-7840hs ; https://www.nvidia.comProcessor: AMD Ryzen 7 7840HS; CPU RAM: 16 GB; GPU: NVIDIA GeForce RTX 3050 (6 GB VRAM). Used for model training and evaluation.
Imbalanced-learnImbalanced-learnhttps://imbalanced-learn.orgPython library used for class balancing with Synthetic Minority Over-sampling Technique (SMOTE).
MatplotlibMatplotlibhttps://matplotlib.orgPython library used for plotting ECG signals, confusion matrices, and performance graphs.
PhysioNet ECG DatabasesPhysioNethttps://physionet.orgPublic ECG datasets used in the study, including MIT-BIH Arrhythmia, MIT-BIH Supraventricular Arrhythmia, INCART 12-lead, and Sudden Cardiac Death Holter databases.
PyTorchPyTorchhttps://pytorch.orgPython deep learning framework used to implement CNN and Transformer models, training pipeline, and inference.
PythonPython Software Foundationhttps://www.python.orgProgramming language used for data preprocessing, model development, training, and evaluation.
SeabornSeabornhttps://seaborn.pydata.orgPython data visualization library used for statistical plots and result visualization.
WFDBWFDBhttps://wfdb.readthedocs.ioPython package used for reading, writing, processing, and plotting physiological signals and annotations from PhysioNet databases.

References

  1. Ullah, A., et al. A hybrid deep CNN model for abnormal arrhythmia detection based on cardiac ECG signal. Sensors (Basel). 21 (3), 951(2021).
  2. Oh, S. L., Ng, E. Y. K. Automated diagnosis of arrhythmia usi....

Access restricted. Please log in or start a trial to view this content.

Reprints and Permissions

Tags

Electrocardiogram SignalsDeep Learning ModelConvolutional Neural NetworksTransformer LayersHeartbeat ClassificationLead I ECGData NormalizationSynthetic OversamplingReal-Time Detection