Automated heart disease detection using Swin Transformer and ECG signal processing: a high-accuracy approach

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.

Authors

Institutions

Publication Details

Journal
Scientific Reports
Published
2025-11-10
DOI
https://doi.org/10.1038/s41598-025-23097-6
Citations
1
Primary Topic
ECG Monitoring and Analysis
Type
article
Field-Weighted Citation Impact
1.39

Funders

Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Automated heart disease detection using Swin Transformer and ECG signal processing: a high-accuracy approach

It Ee Lee, Sikandar Ali, Muhammad Faisal Abrar, Salman Jan et al.
1 citations
Scientific Reports
ECG Monitoring and Analysis
1.39
article

Automated heart disease detection using Swin Transformer and ECG signal processing: a high-accuracy approach

It Ee Lee, Sikandar Ali, Muhammad Faisal Abrar, Salman Jan, Arshad Khan, Ahmed Alkhayyat, Muhammad Saqib
article en
1 citations

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.

Scientific ReportsVol. 15(1)
New Zealand College of Chiropractic (NZ), University of Babylon (IQ), Multimedia University (MY), University of Haripur (PK), Iraqi University (IQ), University of Ha'il (SA), Arab Open University (BH), University of Engineering and Technology Peshawar (PK)
Multimedia University
Openalex Percentile: Top 13%
ECG Monitoring and Analysis
1.39
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.