ISSN : 2583-2646

A Deep Capsule Network for Five-Class ECG Rhythm Classification from 1-D Heartbeat Segments

ESP Journal of Engineering & Technology Advancements
© 2026 by ESP JETA
Volume 6  Issue 1
Year of Publication : 2026
Authors : Ali Osman SELVİ, Shamistan HUSEYNOV
:10.5281/zenodo.19508609

Citation:

Ali Osman SELVİ, Shamistan HUSEYNOV, 2026. "A Deep Capsule Network for Five-Class ECG Rhythm Classification from 1-D Heartbeat Segments", ESP Journal of Engineering & Technology Advancements  6(1): 140-149.

Abstract:

This study proposes a deep learning-based Capsule Network (CapsNet) model for five-class ECG rhythm classification using one-dimensional heartbeat segments derived from the MIT-BIH Arrhythmia Database. The analysis focused on five clinically significant rhythm classes: Normal sinus rhythm (N), supraventricular premature beat (S), premature ventricular contraction (V), fusion beat (F), and unclassifiable beat (Q). In the preprocessing stage, raw ECG recordings were segmented into fixed-length heartbeat samples of 300 points based on annotation positions. To reduce the negative impact of class imbalance, the Synthetic Minority Over-sampling Technique (SMOTE) was applied before model training. The Capsule Network architecture proposed in this study is designed to allow feature extraction from ECG data while distorting the structural features of the data. Classification results were evaluated using F1 Score, Sensitivity and Recall, and Accuracy metrics. The studies showed that the proposed architecture achieved an overall success rate of 99% in both training and test datasets. Class-based sensitivity, recall, and F1-score values generally ranged from 0.98 to 1.00. Even with erroneous classification transitions between structurally similar classes, the proposed architecture demonstrated sufficient classification performance for ECG rhythm classification.

References:

[1] Ansari, Y., Mourad, O., Qaraqe, K., & Serpedin, E. (2023). Deep learning for ECG Arrhythmia detection and classification: an overview of progress for period 2017–2023. Frontiers in Physiology, 14, 1246746.

[2] Nahak, S., Pathak, A., & Saha, G. (2023). Evaluation of handcrafted features and learned representations for the classification of arrhythmia and congestive heart failure in ECG. Biomedical Signal Processing and Control, 79, 104230.

[3] Cuenca, D. F. B., Serrezuela, R. R., & Gómez, A. E. R. (2025, September). Arrhythmia Classification from ECG Signals Using LSTM Neural Networks. In 2025 IEEE VIII Congreso Internacional en Inteligencia Ambiental, Ingenieria de Software y Salud Electronica y Movil (AmITIC) (pp. 1-7). IEEE.

[4] Li, Q., Liu, Y., Na, Z., Yuan, Y., & He, R. (2026). A novel ECG QRS complex detection algorithm based on dynamic Bayesian network. Artificial Intelligence in Medicine, 103370.

[5] Xiang, Y., Lin, Z., & Meng, J. (2018). Automatic QRS complex detection using two-level convolutional neural network. Biomedical engineering online, 17(1), 13.

[6] He, R., Liu, Y., Wang, K., Zhao, N., Yuan, Y., Li, Q., & Zhang, H. (2020). Automatic detection of QRS complexes using dual channels based on U-Net and bidirectional long short-term memory. IEEE journal of biomedical and health informatics, 25(4), 1052-1061.

[7] Haq, M. U., Sethi, M. A. J., & Rehman, A. U. (2023). Capsule network with its limitation, modification, and applications—A survey. Machine Learning and Knowledge Extraction, 5(3), 891-921.

[8] Ullah, H., Bin Heyat, M. B., Akhtar, F., Sumbul, Muaad, A. Y., Islam, M. S., ... & Lai, D. (2022). An End‐to‐End Cardiac Arrhythmia Recognition Method with an Effective DenseNet Model on Imbalanced Datasets Using ECG Signal. Computational Intelligence and Neuroscience, 2022(1), 9475162.

[9] Mangaraj, S., Mahapatra, K., & Ari, S. (2025). Cardiac arrhythmia classification system: An optimized HLS-based hardware implementation on PYNQ platform. Microprocessors and Microsystems, 105225.

[10] Daydulo, Y. D., Thamineni, B. L., & Dawud, A. A. (2023). Cardiac arrhythmia detection using deep learning approach and time frequency representation of ECG signals. BMC Medical Informatics and Decision Making, 23(1), 232.

[11] Asif, M. S., Faisal, M. S., Dar, M. N., Hamdi, M., Elmannai, H., Rizwan, A., & Abbas, M. (2023). Hybrid deep learning and discrete wavelet transform-based ECG biometric recognition for arrhythmic patients and healthy controls. Sensors, 23(10), 4635.

[12] Moody, G. B., & Mark, R. G. (2001). The impact of the MIT-BIH arrhythmia database. IEEE engineering in medicine and biology magazine, 20(3), 45-50.

[13] Zhou, Y., Tian, J., & Kang, K. (2026). Multimodal Signal Processing of ECG Signals with Time-Frequency Representations for Arrhythmia Classification. Computer Modeling in Engineering & Sciences, 146(2).

[14] Hammad, M., Kandala, R. N., Abdelatey, A., Abdar, M., Zomorodi‐Moghadam, M., San Tan, R., ... & Pławiak, P. (2021). Automated detection of shockable ECG signals: A review. Information Sciences, 571, 580-604.

[15] Mohammed, A. A., Al-Sulami, Z. A., Abd Zaid, M. M., Abduljabbar, Z. A., Aldarbandee, M., Jaber, H., ... & Neamah, H. A. (2026). Enhanced Arrhythmia Diagnosis Using a Hybrid Deep Learning Model: A CNN-LSTM-GRU Approach on ECG Data. Biosensors and Bioelectronics: X, 100767.

[16] Goldberger, A. L., Amaral, L. A. N., Glass, L., Hausdorff, J. M., Ivanov, P. C., Mark, R. G., Mietus, J. E., Moody, G. B., Peng, C.-K., & Stanley, H. E. (2000). PhysioBank, PhysioToolkit, and PhysioNet: Components of a new research resource for complex physiologic signals. Circulation, 101(23), e215–e220. https://doi.org/10.1161/01.CIR.101.23.e215

[17] Chawla, N. V., Bowyer, K. W., Hall, L. O., & Kegelmeyer, W. P. (2002). SMOTE: synthetic minority over-sampling technique. Journal of artificial intelligence research, 16, 321-357.

[18] Pradipta, G. A., Wardoyo, R., Musdholifah, A., Sanjaya, I. N. H., & Ismail, M. (2021, November). SMOTE for handling imbalanced data problem: A review. In 2021 sixth international conference on informatics and computing (ICIC) (pp. 1-8). IEEE.

[19] Fransico J Blagus, R., & Lusa, L. (2013). SMOTE for high-dimensional class-imbalanced data. BMC bioinformatics, 14(1), 106.

[20] Dombetzki, L. A. (2018). An overview over capsule networks. Network architectures and services, 10.

[21] Marchisio, A., Bussolino, B., Salvati, E., Martina, M., Masera, G., & Shafique, M. (2022, August). Enabling capsule networks at the edge through approximate softmax and squash operations. In Proceedings of the ACM/IEEE International Symposium on Low Power Electronics and Design (pp. 1-6).

[22] Qian, C., Sun, Z., Wang, C., Tian, E., & Hu, X. (2026). Self-Knowledge Distillation from Attention-Enhanced Multi-branch Residual Network for 12-Lead Electrocardiogram Arrhythmia Classification. Digital Signal Processing, 106043.

[23] Yacouby, R., & Axman, D. (2020, November). Probabilistic extension of precision, recall, and f1 score for more thorough evaluation of classification models. In Proceedings of the first workshop on evaluation and comparison of NLP systems (pp. 79-91).

Keywords:

Electrocardiography (ECG), Arrhythmia Classification, Deep Learning, Capsule Network.