Hybrid CNN–BiLSTM Model for ECG Signal Classification and Accurate Arrhythmia Detection (MIT-BIH and PTB-XL Validation)

Authors

  • Gaurav Kumar Jaiswal
  • Saurabh Mitra

DOI:

https://doi.org/10.22399/ijcesen.4575

Keywords:

ECG, Classification, CNN-BiLSTM, Arrhythmia detection, MIT-BIH, Deep learning

Abstract

Reliable and generalizable classification of electrocardiogram (ECG) record which is present in the form of signals. This is utmost important for early stage arrhythmia recognition and improved patient outcomes. We contribute a Bidirectional Long Short-Term Memory (BiLSTM) layers are combined with the multi-scale Convolutional Neural Networks (CNN) in hybrid deep learning architecture to restrict morphological and temporal ECG data. Bandpass filtering (0.5–40 Hz) is associated with the pre-conditioning pipeline, Pan–Tompkins R-peak segmentation, normalization, and targeted data augmentation (time-warping and jittering). To address class imbalance, minority-class oversampling and a class-weighted categorical cross-entropy loss were used during training. The model undergoes assessment using MIT-BIH Database and it was further validated by PTB-XL dataset. On MIT-BIH the hybrid model achieved 98.0% accuracy, 97.5% precision, 98.2% recall, and 97.8% F1-score, on PTB-XL it achieved 96.8% accuracy, 96.2% precision, 96.5% recall, and 96.3% F1-score. An ablation study shows CNN-only (94.5%) and BiLSTM-only (95.2%) baselines are outperformed by the hybrid model (98.0%); paired t-tests confirm the improvements are statistically significant (p < 0.01). Grad-CAM saliency maps indicate the parts of waveform to which model mainly directs its responsiveness, particularly those that are clinically significant (QRS complex and T-wave), refining interpretability. The trained model has a footprint of ≈15 MB and inference time ≈4 ms per beat on an NVIDIA RTX-class GPU (≈20 ms on CPU), indicating feasibility for near-real-time deployment after minor optimizations. Source code and trained weights are made available to support continuous calculation. These results illustrate the proposed CNN-BiLSTM approach is more accurate, interpretable, and generalizes across datasets -promising for automated, real-time ECG disease classification.

References

[1] G. B. Moody and R. G. Mark, “The MIT-BIH Arrhythmia Database,” IEEE Engineering in Medicine and Biology Magazine, vol. 20, no. 3, pp. 45–50, 2001.

[2] Y. H. Hu, S. Palreddy, and W. J. Tompkins, “A patient-adaptable ECG beat classifier using a mixture of experts approach,” IEEE Transactions on Biomedical Engineering, vol. 44, no. 9, pp. 891–900, 1997.

[3] P. de Chazal, M. O’Dwyer, and R. B. Reilly, “Automatic classification of heartbeats using ECG morphology and heartbeat interval features,” IEEE Transactions on Biomedical Engineering, vol. 51, no. 7, pp. 1196–1206, 2004.

[4] U. R. Acharya et al., “A deep convolutional neural network model to classify heartbeats,” Computers in Biology and Medicine, vol. 89, pp. 389–396, 2017.

[5] S. Kiranyaz, T. Ince, and M. Gabbouj, “Real-time patient-specific ECG classification by 1-D convolutional neural networks,” IEEE Transactions on Biomedical Engineering, vol. 63, no. 3, pp. 664–675, 2016.

[6] H. Yildirim, E. Baloglu, R. Tan, and U. R. Acharya, “A new approach for arrhythmia classification using deep coded features and LSTM networks,” Computer Methods and Programs in Biomedicine, vol. 176, pp. 121–133, 2019.

[7] P. Rajpurkar et al., “Cardiologist-level arrhythmia detection with convolutional neural networks,” Nature Medicine, vol. 25, pp. 65–69, 2019.

[8] A. Y. Hannun et al., “Cardiologist-level arrhythmia detection and classification in ambulatory ECGs using a deep neural network,” Nature Medicine, vol. 25, pp. 65–69, 2019.

[9] X. Zhang, H. Ding, and X. Wang, “Residual attention network for ECG classification,” Sensors, vol. 20, no. 18, p. 5298, 2020.

[10] A. Vaswani et al., “Attention is all you need,” in Advances in Neural Information Processing Systems, 2017, pp. 5998–6008.

[11] C. Lin, C. Yang, Y. Zhang, and J. Chen, “ECG signal classification with transfer learning and data augmentation,” Biomedical Signal Processing and Control, vol. 62, p. 102074, 2021.

[12] Y. Zhang, J. Zhou, and X. Wang, “Ensemble ECG beat classification using SVM and KNN with feature selection,” Biomedical Signal Processing and Control, vol. 62, p. 102115, 2021.

[13] L. Sharma and R. K. Sunkaria, “Wavelet transform based noise removal and classification of ECG signals using decision trees,” Engineering Science and Technology, an International Journal, vol. 22, no. 1, pp. 152–161, 2019.

[14] A. Talo, U. R. Acharya, S. E. Hassanien, and R. San Tan, “1D-CNN with lightweight design for real-time ECG classification in edge devices,” Computers in Biology and Medicine, vol. 135, p. 104576, 2021.

[15] J. Zheng, X. Luo, and H. Yang, “ECG classification using EMD-based feature extraction and deep belief networks,” Expert Systems with Applications, vol. 96, pp. 443–451, 2018.

[16] S. Zhang, W. Wang, and Z. Zhao, “ECG arrhythmia classification using VMD and deep neural networks,” Neural Computing and Applications, vol. 33, no. 11, pp. 5897–5910, 2021.

[17] Y. Li, C. Xiong, and Z. Wu, “Transformer-based ECG classification for arrhythmia detection,” in Proc. of IEEE EMBC, pp. 3654–3658, 2022.

[18] C. Chen, H. Lin, and Q. Yu, “ECG-Transformer: A self-attention model for arrhythmia detection,” IEEE Transactions on Instrumentation and Measurement, vol. 71, pp. 1–10, 2022.

[19] Z. Attia et al., “Explainable artificial intelligence for ECG interpretation: Current status and future directions,” Heart Rhythm, vol. 19, no. 5, pp. 801–813, 2022.

[20] M. Singh and P. Kumar, “Multi-modal deep learning for cardiovascular event prediction using ECG and contextual data,” Artificial Intelligence in Medicine, vol. 132, p. 102386, 2022.

[21] U. R. Acharya et al., “A deep convolutional neural network model to classify heartbeats,” Computers in Biology and Medicine, vol. 89, pp. 389–396, 2017.

[22] S. Kiranyaz, T. Ince, and M. Gabbouj, “Real-time patient-specific ECG classification by 1-D convolutional neural networks,” IEEE Transactions on Biomedical Engineering, vol. 63, no. 3, pp. 664–675, Mar. 2016.

[23] O. Yildirim, “A novel wavelet sequence based on deep bidirectional LSTM network model for ECG signal classification,” Computers in Biology and Medicine, vol. 96, pp. 189–202, May 2018.

[24] P. Rajpurkar et al., “Cardiologist-level arrhythmia detection with convolutional neural networks,” arXiv preprint arXiv:1707.01836, 2017.

[25] A. Hannun et al., “Cardiologist-level arrhythmia detection and classification in ambulatory electrocardiograms using a deep neural network,” Nature Medicine, vol. 25, pp. 65–69, 2019.

[26] A. Isin and S. Ozdalili, “Cardiac arrhythmia detection using deep learning,” Procedia Computer Science, vol. 120, pp. 268–275, 2017.

[27] T. J. Jun et al., “ECG arrhythmia classification using deep learning with 2D convolutional neural networks,” in Proc. IEEE Biomedical Circuits and Systems Conference (BioCAS), pp. 1–4, 2018.

Downloads

Published

2025-12-29

How to Cite

Gaurav Kumar Jaiswal, & Mitra , S. (2025). Hybrid CNN–BiLSTM Model for ECG Signal Classification and Accurate Arrhythmia Detection (MIT-BIH and PTB-XL Validation). International Journal of Computational and Experimental Science and Engineering, 11(4). https://doi.org/10.22399/ijcesen.4575

Issue

Section

Research Article