Article 1
Explainable Lightweight Swin Transformer for ECG Classification
Kazi Nusrat Jahan Suchi, Nusrat N. Suzana, Md. Maynul Islam
Pages: 1-22
Cardiovascular diseases are a leading cause of death worldwide and require accurate, efficient, and interpretable diagnostic tools. Although electrocardiography (ECG) is widely used for non-invasive cardiac assessment, manual interpretation can be time-consuming and subjective. In addition, many deep learning approaches provide limited interpretability and may not adequately capture long-range dependencies in ECG signals. This study proposes an explainable ECG image classification framework based on a customized Tiny Swin Transformer. Structured preprocessing enhances waveform visibility, while shifted-window self-attention captures local morphology and broader rhythm patterns. LIME provides superpixel-based attribution maps that identify image regions contributing to the model's predictions. The framework was evaluated on a public 12-lead ECG image dataset containing four classes: myocardial infarction (MI), previous myocardial infarction (PMI), arrhythmia, and normal. The model achieved 98.22% accuracy with 28.29 million parameters and strong precision, recall, and F1-score. The LIME maps highlighted regions associated with ST-segment variation and rhythm irregularity. These results indicate that the framework offers a promising balance of predictive performance, computational efficiency, and interpretability; however, external clinical validation is required before deployment.


