Automated Heart Disease Detection Using Swin Transformer and ECG Signal Processing: A High-Accuracy Approach

Read the full article See related articles

Listed in

This article is not in any list yet, why not save it to one of your lists.
Log in to save this article

Abstract

Cardiovascular diseases (CVDs) are a leading cause of global mortality, necessitating early and accurate detection for improved 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.

Article activity feed