Skip to content
xai-ecgnet:-an-explainable-hybrid-cnn-bilstm-framework-for-multi-label-cardiac-diagnosis-classification-from-12-lead-ecg-signals-using-the-ptb-xl-dataset-–-scientific-reports

XAI-ECGNet: an explainable hybrid CNN-BiLSTM framework for multi-label cardiac diagnosis classification from 12-lead ECG signals using the PTB-XL dataset – Scientific Reports

  • Prakash B Metre1,
  • Vinay K2,
  • Deepa B G2 &
  • …
  • Gauri Kalnoor1 

We’re sharing this article early to provide faster access to peer-reviewed, accepted research. It is citable and carries a permanent DOI. This version is subject to further edits and will be replaced automatically by the final Version of Record. All legal disclaimers apply.

Abstract

Cardiovascular disorders cause approximately 17.9 million deaths annually, and the 12-lead electrocardiogram remains the primary non-invasive diagnostic tool, yet interpretable deep-learning ECG classifiers remain limited, restricting clinical adoption. We present XAI-ECGNet, which is based on 1D residual CNNs, squeeze-and-excitation (SE) channel attention on learned, lead-derived feature channels, and bidirectional LSTM (BiLSTM) temporal modelling. On PTB-XL (21,799 ECGs, 18,885 patients), XAI-ECGNet outperforms all of the top performing baselines in terms of macro-AUROC, which is 0.9337, within the range of the baselines’ bootstrap confidence intervals, and four of five diagnostic superclasses have AUROC above 0.90. Ablation results indicate that the full model is within five-seed variability (σ = 0.0023) of the CNN-only backbone (0.9333); per-class analysis reveals that SE attention is crucial for BiLSTM to offer benefit, as it recovers and surpasses CNN-only performance on four out of five classes after BiLSTM alone fails to do so. Three post-hoc methods (Grad-CAM, SHAP, Integrated Gradients) show the model learns clinically consistent representations without explicit clinical priors. We also report quantitative faithfulness evaluation, SHAP background-sample-size justification, and zero-shot cross-dataset validation on CPSC 2018, demonstrating genuine generalisation for NORM and CD, and interpretable label-taxonomy mismatch for STTC. XAI-ECGNet combines accurate multi-label ECG classification with a rigorously and quantitatively assessed explainability framework, but prospective cardiologist validation is required before any claim to clinical use can be made.

Similar content being viewed by others

Acknowledgements

The authors thank the PTB-XL and CPSC 2018 dataset creators for making these large-scale clinical ECG datasets publicly available. The authors acknowledge the use of Google Colab and Kaggle Notebook GPU compute resources used in this study. The authors also sincerely thank Manipal Academy of higher Education and Christ University for helping the authors in successfully completing this research paper by offering academic support and resources.

Funding

Open access funding provided by Manipal Academy of Higher Education, Manipal. The author received No Funding for this work.

Author information

Authors and Affiliations

  1. Manipal Institute of Technology Bengaluru, Manipal Academy of Higher Education, Manipal, India

    Prakash B Metre & Gauri Kalnoor

  2. Department of Computer Science, Christ University, Bengaluru, Karnataka, India

    Vinay K & Deepa B G

Authors

  1. Prakash B Metre
  2. Vinay K
  3. Deepa B G
  4. Gauri Kalnoor

Corresponding authors

Correspondence to Prakash B Metre or Gauri Kalnoor.

Ethics declarations

Competing interests

The authors declare no competing interests.

Ethical approval

This study did not involve new data collection from human or animal subjects. All analyses were conducted on the publicly available, de-identified PTB-XL6 and CPSC 201840 electrocardiography datasets. Both datasets were collected and ethically approved by their original data providers, with informed consent and ethical oversight described in the respective dataset publications, and are distributed for secondary research use without further identifying information. No additional ethical approval was required for the secondary analyses reported here.

Declaration of generative AI and AI-assisted technologies in the writing process

During the preparation of this work, the authors used AI-assisted tools, including Cursor with Claude (Anthropic) and ChatGPT (OpenAI), to support project organization, debugging, code refactoring, and other development-related tasks. These tools were also used to improve the language, clarity, and readability of the manuscript. The authors reviewed the AI-assisted suggestions and revisions and take full responsibility for the final content of the work.

Additional information

Publisher’s note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Metre, P.B., K, V., G, D.B. et al. XAI-ECGNet: an explainable hybrid CNN-BiLSTM framework for multi-label cardiac diagnosis classification from 12-lead ECG signals using the PTB-XL dataset. Sci Rep (2026). https://doi.org/10.1038/s41598-026-76799-w

Download citation

  • Received:

  • Accepted:

  • Published:

  • DOI: https://doi.org/10.1038/s41598-026-76799-w

Keywords

colind88

Back To Top