Automatic PAC and PVC Arrhythmia Detection in Single-Lead ECG Signals Using Specialized ResNet-Based Models
Mehrshad Goljarian
1
(
Department of Electrical Engineering, Sharif University of Technology, Tehran, Iran
)
Vania Shayestehfar
2
(
Department of Electrical Engineering, Sharif University of Technology, Tehran, Iran
)
Mohammad Mahdi Moeini Maenesh
3
(
Department of Electrical Engineering, Sharif University of Technology, Tehran, Iran
)
Ali Fotowat-Ahmady
4
(
Department of Electrical Engineering, Sharif University of Technology, Tehran, Iran
)
Keywords: Electrocardiogram, Deep Learning, Cardiac arrhythmia, Convolutional Neural Networks, ResNet, iCentia11k database, Holter,
Abstract :
This study presents a deep learning system for the simultaneous detection of two cardiac arrhythmias: Premature Ventricular Contractions (PVCs) and Premature Atrial Contractions (PACs). Our approach employs specialized ResNet-inspired 1D-CNN architectures, in which separate expert models are trained for the detection of each specific arrhythmia type. This ensemble-based strategy allows each network to learn distinctive features associated with its target class. The proposed system was trained on the iCentia11k dataset and evaluated on data collected from multiple databases. The data preprocessing pipeline includes heartbeat segmentation, resampling to a uniform frequency of 250 Hz, and Z-score normalization. To address class imbalance, a class-weighted loss function is employed. Our proposed model for PVC detection achieves a recall of 95.53% and an F1-score of 90.37% on the test set. The corresponding expert model for PAC detection achieves a recall of 98.00% and an F1-score of 90.13%. The overall accuracy of the proposed framework is reported as 96.11%.
M. A. Scrugli, D. Loi, L. Raffo, and P. Meloni, “A runtime-adaptive cognitive iot node for healthcare monitoring,” in Proceedings of the 16th ACM International Conference on Computing Frontiers, ser. CF ’19. New York, NY, USA: Association for Computing Machinery, 2019, p. 350–357. [Online]. Available: https://doi.org/10.1145/3310273.3323160
M. S. Thaler, The only EKG book you’ll ever need. Wolters Kluwer Health/Lippincott Williams et Wilkins, 2012.
U. B. Baloglu, M. Talo, O. Yildirim, R. S. Tan, and U. R. Acharya, “Classification of myocardial infarction with multi-lead ecg signals and deep cnn,” Pattern Recognition Letters, vol. 122, pp. 23–30, 2019. [Online]. Available: https://www.sciencedirect.com/science/article/pii/S016786551930056X
Özal 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, 2018. [Online]. Available: https://www.sciencedirect.com/science/article/pii/S0010482518300738
S. Mehta and A. Aneja, “Enhanced ecg signal analysis using hybrid cnn-lstm and augmentation techniques,” in 2025 International Conference on Automation and Computation (AUTOCOM), 2025, pp. 1657–1661.
K. He, X. Zhang, S. Ren, and J. Sun, “Deep residual learning for image recognition,” in Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2016.
A. Natarajan, Y. Chang, S. Mariani, A. Rahman, G. Boverman, S. Vij, and J. Rubin, “A wide and deep transformer neural network for 12-lead ecg classification,” in 2020 Computing in Cardiology, 2020, pp. 1–4.
S. Osowski and T. H. Linh, “Ecg beat recognition using fuzzy hybrid neural network,” IEEE Transactions on Biomedical Engineering, vol. 48, no. 11, pp. 1265–1271, 2001.
S. Tan, S. Ortiz-Gagné, N. Beaudoin-Gagnon, P. Fecteau, A. Courville, Y. Bengio, and J. P. Cohen, “Icentia11k Single Lead Continuous Raw Electrocardiogram Dataset,” PhysioNet, Apr. 2022, version 1.0. [Online]. Available: https://doi.org/10.13026/kk0v-r952
F. Khodami, “Investigating the effect of motion artifacts on the impedance between chest electrodes and skin,” M.S. thesis, Sharif University of Technology, Tehran, Iran, 2021.
A. Zhang, X. Yang, T. Li, M. Dou, and H. Yang, “Classification method of ecg signals based on ranet,” Cardiovascular Engineering and Technology, vol. 15, no. 5, pp. 561–571, Oct 2024. [Online]. Available: https://doi.org/10.1007/s13239-024-00730-5
N. Srivastava, G. Hinton, A. Krizhevsky, I. Sutskever, and R. Salakhutdinov, “Dropout: A simple way to prevent neural networks from overfitting,” Journal of Machine Learning Research, vol. 15, no. 56, pp. 1929–1958, 2014. [Online]. Available: http://jmlr.org/papers/v15/srivastava14a.html
D. P. Kingma and J. Ba, “Adam: A method for stochastic optimization,” 2017. [Online]. Available: https://arxiv.org/abs/1412.6980
J. Johnson and T. Khoshgoftaar, “Survey on deep learning with class imbalance,” Journal of Big Data, vol. 6, p. 27, 03 2019.
J. Pan and W. J. Tompkins, “A real-time qrs detection algorithm,” IEEE Transactions on Biomedical Engineering, vol. BME-32, no. 3, pp. 230–236, 1985.
V. Tihonenko, A. Khaustov, S. Ivanov, and A. Rivin, “St.-petersburg institute of cardiological technics 12-lead arrhythmia database,” 2007. [Online]. Available: https://physionet.org/content/incartdb/
G. Moody and R. Mark, “The impact of the mit-bih arrhythmia database,” IEEE Engineering in Medicine and Biology Magazine, vol. 20, no. 3, pp. 45–50, 2001.
A. L. Goldberger, L. A. N. Amaral, L. Glass, J. M. Hausdorff, P. C. Ivanov, R. G. Mark, J. E. Mietus, G. B. Moody, C.-K. Peng, and H. E. Stanley, “The mit-bih long term database,” 1992. [Online]. Available: https://physionet.org/content/ltdb/
M. Kapsecker, M. C. Möller, and S. M. Jonas, “Disentangled representational learning for anomaly detection in single-lead electrocardiogram signals using variational autoencoder,” Computers in Biology and Medicine, vol. 184, p. 109422, Jan. 2025. [Online]. Available: http://dx.doi.org/10.1016/j.compbiomed.2024.109422
H. Hamami, Y. Solewicz, D. Zur, Y. Kleerekoper, and J. A. Behar, “upvc-net: A universal premature ventricular contraction detection deep learning algorithm,” IEEE Transactions on Biomedical Engineering, p. 1–10, 2026. [Online]. Available: http://dx.doi.org/10.1109/TBME.2026.3655531
M. Kapsecker and S. M. Jonas, “Cross-device federated unsupervised learning for the detection of anomalies in single-lead electrocardiogram signals,” PLOS Digital Health, vol. 4, no. 4, p. e0000793, Apr. 2025. [Online]. Available: http://dx.doi.org/10.1371/journal.pdig.0000793
K. A. Purtova, V. A. Moskalenko, L. A. Smirnov, G. V. Osipov, and N. Y. Zolotykh, “Problem analysis of the experiment formulation correctness in the task of ecg diagnostics using machine learning methods,” SSRN preprint, no. 4947212, 2024.
K. Tateno and L. Glass, “A method for detection of atrial fibrillation using rr intervals,” in Computers in Cardiology 2000. Vol.27 (Cat. 00CH37163), 2000, pp. 391–394.