Explainable Swin transformer with clinically constrained ECG–vital signs fusion for cardiovascular disease detection from real-world ECG images

Authors:

Abstract
Cardiovascular disease detection from real-world ECG images remains difficult due to noise, scanning artifacts, and strong morphological similarity between cardiac conditions, particularly in clinically ambiguous cases such as post-MI patterns. This work presents an explainable two-stage model: a fine-tuned Swin Transformer with clinically constrained ECG–vital signs fusion to enhance the robustness of the model in low-resource clinical settings. The proposed approach learns discriminative ECG representations while preserving clinical interpretability through saliency visualization and SHAP-based feature attribution. A constrained gating mechanism folds in physiological vital signs to reduce this ambiguity-driven misclassification while keeping ECG as the dominant modality. Paired real-world vital signs were not available for this dataset, so the vital signs used at the fusion stage were synthetically generated from diagnosis-conditioned physiological distributions rather than measured directly from patients. Accordingly, Stage 2 results demonstrate architectural feasibility rather than validated multimodal clinical performance, and require confirmation on real paired data. On a Pakistani clinical ECG image dataset, the resulting model shows improved classification reliability and handles challenging boundary cases better than existing image-based approaches. This work is a proof-of-concept for explainable, ECG-biased multimodal fusion aimed at clinically critical ambiguity pathways in low-resource South Asian healthcare settings.
Funding Information
  • Deanship of Scientific Research, Prince Sattam bin Abdulaziz University (2025/01/34589)

This publication has 25 references indexed in Scilit: