Related Experiment Video
Updated: Jan 11, 2026

Patient Directed Recording of a Bipolar Three-Lead Electrocardiogram using a Smartwatch with ECG Function
Published on: December 11, 2019
Automated heart disease detection using Swin Transformer and ECG signal processing: a high-accuracy approach
Muhammad Faisal Abrar1, Muhammad Saqib2, Sikandar Ali3
1Department of Software Engineering, College of Computer Science and Engineering, University of Ha'il, 55211, Ha'il, Saudi Arabia.
Insights
The Swin Transformer model significantly improves automated heart disease detection from electrocardiograms (ECG), achieving near-perfect accuracy. This deep learning approach offers a more reliable and scalable solution for diagnosing cardiovascular diseases (CVDs).
Area of Science:
- Cardiology
- Artificial Intelligence
- Biomedical Engineering
Background:
- Cardiovascular diseases (CVDs) are a primary cause of global mortality, underscoring the need for early and accurate detection.
- Electrocardiography (ECG) is crucial for diagnosing cardiac conditions, but traditional interpretation and machine learning (ML) methods face limitations in feature extraction and handling long-range dependencies.
- Deep learning (DL) advancements, particularly transformer architectures, show promise for enhanced ECG classification.
Purpose of the Study:
- To propose and evaluate the Swin Transformer, a hierarchical vision transformer, for automated ECG-based heart disease detection.
- To compare the Swin Transformer's performance against conventional ML models (Random Forest, Gradient Boosting, SVM, Neural Networks).
Main Methods:
- Utilized a Swin Transformer model with shifted window self-attention mechanisms to capture local and global ECG dependencies.
- Evaluated the model on benchmark ECG datasets.
- Compared performance metrics including accuracy, precision, recall, and AUC against established ML algorithms.
Main Results:
- The Swin Transformer achieved superior performance, reaching 99.8% accuracy, 99.72% precision, 99.91% recall, and 99.99% AUC.
- Demonstrated significant outperformance compared to Random Forest, Gradient Boosting, SVM, and Neural Networks.
- Eigenvalue analysis confirmed the model's ability to retain essential features and generalize across diverse ECG patterns.
Conclusions:
- The Swin Transformer presents a highly effective, scalable, and clinically viable solution for automated ECG-based cardiac disease detection.
- This DL approach establishes a new benchmark in ECG classification accuracy and reliability over traditional methods.
- Future research should address computational complexity and interpretability using Explainable AI (XAI) and explore real-time optimization.
Abstract:
Cardiovascular diseases (CVDs) are a leading cause of global mortality, necessitating early and accurate detection to improve patient outcomes. Electrocardiography (ECG) is a fundamental diagnostic tool for identifying cardiac abnormalities; however, traditional methods rely on manual interpretation and conventional machine learning (ML) models, which often struggle with feature extraction and long-range dependencies. Recent advancements in deep learning (DL) have led to the adoption of transformer-based architectures for ECG classification. In this study, we propose the Swin Transformer a hierarchical vision transformer model for automated ECG-based heart disease detection. By leveraging shifted window self-attention mechanisms, the Swin Transformer effectively captures both local and global dependencies, overcoming the limitations of convolutional and recurrent architectures. The proposed approach was evaluated on benchmark ECG datasets and compared with traditional ML models, including Random Forest, Gradient Boosting, Support Vector Machine (SVM), and Neural Networks. Experimental results demonstrate that the Swin Transformer significantly outperforms existing methods, achieving 99.8% accuracy, 99.72% precision, 99.91% recall, and an AUC of 99.99%, establishing a new benchmark in ECG classification. Additionally, eigenvalue analysis confirms the model's ability to retain essential features while minimizing redundancy, ensuring robust generalization across diverse ECG patterns. Despite its superior performance, challenges such as computational complexity and interpretability remain, necessitating future research into Explainable AI (XAI) techniques, model optimization for real-time applications, and hybrid deep learning frameworks. Overall, our findings suggest that the Swin Transformer is a highly effective, scalable, and clinically viable solution for automated ECG-based cardiac disease detection, offering unprecedented accuracy and reliability over traditional approaches.
More Related Videos
04:23A Swin Transformer-Based Model for Thyroid Nodule Detection in Ultrasound Images
Published on: April 21, 2023
18:11A Research Method For Detecting Transient Myocardial Ischemia In Patients With Suspected Acute Coronary Syndrome Using Continuous ST-segment Analysis
Published on: December 28, 2012
Related Concept Videos
Pulse rhythm
Conversely, an irregular pulse pattern is termed dysrhythmia, stemming from disruptions in cardiac...
Electrocardiogram
Three major waveforms are present in a typical ECG recording: the P wave, the QRS complex, and...
Holter Monitor: 24-Hour Monitoring
Instrumentation Amplifier
To overcome this challenge, an ECG machine utilizes an instrumentation amplifier. This specialized amplifier is...
Dysrhythmias V: Evaluating Dysrhythmias
Electrocardiogram Fundamentals
An electrocardiogram (ECG) is a diagnostic tool for identifying cardiac conditions such as arrhythmias, conduction abnormalities, and myocardial ischemia.
Definition
An electrocardiogram (ECG) visualizes the heart's electrical activity by tracing the electrical movement associated with each heartbeat on a graph or monitor. As the heart beats, an electrical wave passes through it, correlating with the cardiac cycle events.
Parts of an ECG
An ECG utilizes electrodes on the skin...