This is a preview and has not been published. View submission

Explainable AI-Powered ECG Anomaly Detection Using SHAP and LSTM Autoencoders

Authors

  • K. Nayana Department of Computer Science and Engineering, GMIT Davanagere Visvesvaraya Technological University, Belagavi, Karnataka, India
  • S. Vinay Department of Computer Science and Engineering, PESCE Mandya, Visvesvaraya Technological University, Belagavi, Karnataka, India
Volume: 16 | Issue: 3 | Pages: 34998-35005 | June 2026 | https://doi.org/10.48084/etasr.17734

Abstract

Cardiovascular diseases are the leading cause of mortality, underscoring the need for accurate and early detection of cardiac abnormalities. This study proposes a Long Short-Term Memory (LSTM) autoencoder framework for automated Electrocardiogram (ECG) anomaly detection, integrated with SHapley Additive exPlanations (SHAP) to ensure transparent and clinically interpretable decision-making. Using the ECG5000 dataset, the model learns the intrinsic characteristics of normal cardiac cycles and identifies deviations through reconstruction error analysis. The proposed framework achieved an accuracy of 97.6%, a precision of 95.8%, and an F1-score 96.7%, outperforming traditional machine-learning baselines and earlier deep-learning approaches. SHAP-based visualization highlights the specific temporal segments influencing anomaly predictions, enhancing clinical trust and applicability. This work demonstrates a robust, explainable, and efficient approach, suitable for real-time cardiac monitoring.

Keywords:

ECG anomaly detection, LSTM autoencoders, explainable AI, SHAP

Downloads

Download data is not yet available.

References

A. Y. Hannun et al., "Cardiologist-Level Arrhythmia Detection and Classification in Ambulatory Electrocardiograms Using a Deep Neural Network," Nature Medicine, vol. 25, no. 1, pp. 65–69, Jan. 2019.

C.-H. Hsieh, Y.-S. Li, B.-J. Hwang, and C.-H. Hsiao, "Detection of Atrial Fibrillation Using 1D Convolutional Neural Network," Sensors, vol. 20, no. 7, Apr. 2020, Art. no. 2136.

P. Malhotra, L. Vig, G. Shroff, and P. Agarwal, "Long Short-Term Memory Networks for Anomaly Detection in Time Series," in Proceedings of the European Symposium on Artificial Neural Networks, Computational Intelligence and Machine Learning, Bruges, Belgium, Apr. 2015, pp. 89–94.

S. Lundberg and S.-I. Lee, "A Unified Approach to Interpreting Model Predictions." arXiv, 2017.

U. R. Acharya, H. Fujita, S. L. Oh, Y. Hagiwara, J. H. Tan, and M. Adam, "Application of Deep Convolutional Neural Network for Automated Detection of Myocardial Infarction Using ECG Signals," Information Sciences, vol. 415–416, pp. 190–198, Nov. 2017.

G. B. Moody and R. G. Mark, "The Impact of the MIT-BIH Arrhythmia Database," IEEE Engineering in Medicine and Biology Magazine, vol. 20, no. 3, pp. 45–50, May 2001.

S. Osowski, L. T. Hoai, and T. Markiewicz, "Support Vector Machine-Based Expert System for Reliable Heartbeat Recognition," IEEE Transactions on Biomedical Engineering, vol. 51, no. 4, pp. 582–589, Apr. 2004.

O. AlZoubi, N. AlAbabneh, I. Hmeidi, and M. Bani Yassein, "A Deep Learning System for the Diagnosis of Heart Problems from ECG Media Files," International Journal on Communications Antenna and Propagation, vol. 11, no. 5, Oct. 2021, Art. no. 363.

Haibo He and E. A. Garcia, "Learning from Imbalanced Data," IEEE Transactions on Knowledge and Data Engineering, vol. 21, no. 9, pp. 1263–1284, Sep. 2009.

Y. Xia, N. Wulan, K. Wang, and H. Zhang, "Detecting Atrial Fibrillation by Deep Convolutional Neural Networks," Computers in Biology and Medicine, vol. 93, pp. 84–92, Feb. 2018.

T. Chen and C. Guestrin, "XGBoost: A Scalable Tree Boosting System," in Proceedings of the 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, San Francisco, CA, USA, Aug. 2016, pp. 785–794.

C. K. N., Neelappa, M. T. Sreedevi, and R. Asha, "Hybrid Deep Learning Models for Accurate ECG Classification in Cardiovascular Disease Diagnosis," Engineering, Technology & Applied Science Research, vol. 15, no. 5, pp. 26683–26688, Oct. 2025.

S. M. Lundberg et al., "From Local Explanations to Global Understanding with Explainable AI for Trees," Nature Machine Intelligence, vol. 2, no. 1, pp. 56–67, Jan. 2020.

Y. Chen and E. Keogh, "Dataset: ECG5000." Time Series Classification, Mar. 2020, [Online]. Available: https://www.timeseriesclassification.com/description.php?Dataset=ECG5000.

Downloads

How to Cite

[1]
K. Nayana and S. Vinay, “Explainable AI-Powered ECG Anomaly Detection Using SHAP and LSTM Autoencoders”, Eng. Technol. Appl. Sci. Res., vol. 16, no. 3, pp. 34998–35005, Jun. 2026.

Metrics

Abstract Views: 38
PDF Downloads: 8

Metrics Information