Academic Journal of Computing & Information Science, 2026, 9(2); doi: 10.25236/AJCIS.2026.090201.
Chunyan Liu1, Xuande Zhang1, Xin Huang2, Long Xu2
1School of Electronic Information and Artificial Intelligence, Shaanxi University of Science and Technology, Xi'an, China
2School of Electrical Engineering and Computer Science, Ningbo University, Ningbo, China
Electrocardiogram (ECG) analysis based on deep learning models has garnered significant research interest in recent years. Nevertheless, the performance of such models is often constrained by the limited availability of annotated ECG data.This paper proposes a novel self-supervised learning framework for ECG signal classification. Our method combines augmented contrastive learning with ECG-specific temporal augmentations (time truncation and random resized cropping). Experiments conducted on datasets (Cinc2020, Chapman, and Ribeiro) demonstrate that our approach achieves an average accuracy of 89.0%, an average AUC of 77.3%, and an F1-score of 63.3%. This represents improvements of 4.4%, 7.2%, and 3.8% in accuracy, AUC, and F1-score, respectively. When using only 60% of the labeled data, our method outperforms the fully supervised baseline by 7.7%. Ablation studies validate the effectiveness of our data augmentation strategies and contrastive learning design. Our approach offers a promising solution for label-efficient ECG analysis, with potential applications in clinical screening and remote monitoring systems.
ECG, Self-Supervised Learning, Electrocardiogram Signal Classification, Contrastive Learning, Residual Network
Chunyan Liu, Xuande Zhang, Xin Huang, Long Xu. Classification of Electrocardiogram (ECG) Signals Based on Self-Supervised Learning. Academic Journal of Computing & Information Science (2026), Vol. 9, Issue 2: 1-10. https://doi.org/10.25236/AJCIS.2026.090201.
[1] Schneider, S., Baevski, A., Collobert, R., & Auli, M. (2019). wav2vec: Unsupervised pre-training for speech recognition. In Proceedings of the 20th Annual Conference of the International Speech Communication Association (INTERSPEECH 2019) (pp. 3465–3469).
[2] Chen, T., Kornblith, S., Norouzi, M., & Hinton, G. (2020). A simple framework for contrastive learning of visual representations. In Proceedings of the 37th International Conference on Machine Learning (ICML) (pp. 1597–1607).
[3] He, K., Chen, X., Xie, S., Li, Y., Dollár, P., & Girshick, R. (2022). Masked autoencoders are scalable vision learners. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR) (pp. 16000–16009).
[4] Kenton, J. D. M.-W. C., & Toutanova, L. K. (2019). BERT: Pre-training of deep bidirectional transformers for language understanding. In Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies (NAACL-HLT) (pp. 4171–4186).
[5] Hsu, W.-N., Bolte, B., Tsai, Y.-H. H., Lakhotia, K., Salakhutdinov, R., & Mohamed, A. (2021). HuBERT: Self-supervised speech representation learning by masked prediction of hidden units. *IEEE/ACM Transactions on Audio, Speech, and Language Processing, 29*, 3451–3460. https://doi.org/10.1109/TASLP.2021.3122291
[6] Oord, A. v. d., Li, Y., & Vinyals, O. (2018). Representation learning with contrastive predictive coding. arXiv preprint. https://doi.org/10.48550/arXiv.1807.03748
[7] Chen, X., Fan, H., Girshick, R., & He, K. (2020). Improved baselines with momentum contrastive learning. Advances in Neural Information Processing Systems, 33, 20033–20044.
[8] Grill, J.-B., Strub, F., Altché, F., Tallec, C., Richemond, P. H., Buchatskaya, E., Doersch, C., Pires, B. A., Guo, Z. D., Azar, M. G., Piot, B., Kavukcuoglu, R., Munos, R., & Valko, M. (2020). Bootstrap your own latent: A new approach to self-supervised learning. Advances in Neural Information Processing Systems, 33.
[9] Caron, M., Misra, I., Mairal, J., Goyal, P., Bojanowski, P., & Joulin, A. (2020). Unsupervised learning of visual features by contrasting cluster assignments. Advances in Neural Information Processing Systems, 33.
[10] Tsao, C. W., Aday, A. W., Almarzooq, Z. I., Alonso, A., Beaton, A. Z., Bittencourt, M. S., Boehme, A. K., Buxton, A. E., Carson, A. P., Commodore-Mensah, Y., et al. (2022). Heart disease and stroke statistics—2022 update: A report from the American Heart Association. Circulation, 145(8), e153–e639.
[11] Hannun, A. Y., Rajpurkar, P., Haghpanahi, M., Tison, G. H., Bourn, C., Turakhia, M. P., & Ng, A. Y. (2019). Cardiologist-level arrhythmia detection and classification in ambulatory electrocardiograms using a deep neural network. Nature Medicine, 25(1), 65–69. https://doi.org/10.1038/s41591-018-0268-3
[12] Rajpurkar, P., Hannun, A. Y., Haghpanahi, M., Bourn, C., & Ng, A. Y. (2017). Cardiologist-level arrhythmia detection with convolutional neural networks. arXiv preprint. https://doi.org/10.48550/arXiv.1707.01836
[13] Ribeiro, A. H., Ribeiro, M. H., Paixão, G. M. M., Oliveira, D. M., Gomes, P. R., Canazart, J. A., Ferreira, M. P. S., Andersson, C. R., Macfarlane, P. W., Meira Jr., W., Schön, T. B., & Ribeiro, A. L. P. (2020). Automatic diagnosis of the 12-lead ECG using a deep neural network. Nature Communications, 11(1), 1760. https://doi.org/10.1038/s41467-020-15432-4
[14] Attia, Z. I., Noseworthy, P. A., Lopez-Jimenez, F., Asirvatham, S. J., Deshmukh, A. J., Gersh, B. J., Carter, R. E., Yao, X., Rabinstein, A. A., Erickson, B. J., Kapa, S., & Friedman, P. A. (2019). An artificial intelligence-enabled ECG algorithm for the identification of patients with atrial fibrillation during sinus rhythm: A retrospective analysis of outcome prediction. The Lancet, 394(10201), 861–867. https://doi.org/10.1016/S0140-6736(19)31721-0
[15] Petmezas, G., Haris, K., Stefanopoulos, L., Kilintzis, V., Tzavelis, A., Rogers, J. A., Katsaggelos, A. K., & Maglaveras, N. (2021). Automated atrial fibrillation detection using a hybrid CNN-LSTM network on imbalanced ECG datasets. Biomedical Signal Processing and Control, 63, 102194. https://doi.org/10.1016/j.bspc.2020.102194
[16] Jun, T. J., Nguyen, H. M., Kang, D., Kim, D., Kim, D., & Kim, Y.-H. (2018). ECG arrhythmia classification using a 2-D convolutional neural network. arXiv preprint. https://doi.org/10.48550/arXiv.1804.06812
[17] Ullah, A., Rehman, S. U., Tu, S., Mehmood, R. M., & Fawad. (2021). A hybrid deep CNN model for abnormal arrhythmia detection based on cardiac ECG signal. Sensors, 21(3), 951. https://doi.org/10.3390/s21030951
[18] Mousavi, S., Afghah, F., Razi, A., & Acharya, U. R. (2019). ECGNET: Learning where to attend for detection of atrial fibrillation with deep visual attention. In 2019 IEEE-EMBS International Conference on Biomedical and Health Informatics (BHI) (pp. 1-4). IEEE. https://doi.org/10.1109/BHI.2019.8834637
[19] Zihlmann, M., Perekrestenko, D., & Tschannen, M. (2017). Convolutional recurrent neural networks for electrocardiogram classification. In 2017 Computing in Cardiology (CinC) (pp. 1-4). IEEE.
[20] Chen, T., Huang, C., Shih, E. S., Hu, Y., & Hwang, M. (2020). Detection and classification of cardiac arrhythmias by a challenge-best deep learning neural network model. iScience, 23(3), 100886. https://doi.org/10.1016/j.isci.2020.100886
[21] Strodthoff, N., Wagner, P., Schaeffter, T., & Samek, W. (2020). Deep learning for ECG analysis: Benchmarks and insights from PTB-XL. IEEE Journal of Biomedical and Health Informatics, 25(5), 1519–1528. https://doi.org/10.1109/JBHI.2020.3022989
[22] Huang, J., Chen, B., Yao, B., & He, W. (2019). ECG arrhythmia classification using STFT-based spectrogram and convolutional neural network. IEEE Access, 7, 92871–92880. https://doi.org/10.1109/ACCESS.2019.2928017
[23] Liu, H., Zhao, Z., & She, Q. (2021). Self-supervised ECG pre-training. Biomedical Signal Processing and Control, 70, 103010. https://doi.org/10.1016/j.bspc.2021.103010
[24] Yang, S., Lian, C., Zeng, Z., Pan, J., Wang, Y., Luo, L., Du, X., & Lin, B. (2024). Masked self-supervised ECG representation learning via multiview information bottleneck. Neural Computing and Applications, 36, 7625–7637. https://doi.org/10.1007/s00521-024-09486-4
[25] Mehari, T., & Strodthoff, N. (2022). Self-supervised representation learning from 12-lead ECG data. Computers in Biology and Medicine, 141, 105114. https://doi.org/10.1016/j.compbiomed.2021.105114
[26] Lai, J., Tan, H., Wang, J., Wang, M., Li, J., Xiao, J., Liu, B., Yang, X., & Li, G. (2023). Practical intelligent diagnostic algorithm for wearable 12-lead ECG via self-supervised learning on large-scale dataset. Nature Communications, 14, 3741. https://doi.org/10.1038/s41467-023-39472-8
[27] Luo, C., Wang, G., Ding, Z., Zhang, Y., & Li, Y. (2021). Segment origin prediction: A self-supervised learning method for electrocardiogram arrhythmia classification. In 2021 43rd Annual International Conference of the IEEE Engineering in Medicine & Biology Society (EMBC) (pp. 1132–1135). IEEE.
[28] Alday, E. A. P., Gu, A., Shah, A. J., Robichaux, C., Wong, A.-K. I., Liu, C., Liu, F., Rad, A. B., Elola, A., Seyedi, S., Li, Q., Sharma, A., Clifford, G. D., & Reyna, M. A. (2020). Classification of 12-lead ECGs: The PhysioNet/Computing in Cardiology Challenge 2020. Physiological Measurement, 41(12), 124003. https://doi.org/10.1088/1361-6579/abc960
[29] Zheng, J., Zhang, J., Danioko, S., Yao, H., Guo, H., & Rakovski, C. (2020). A 12-lead electrocardiogram database for arrhythmia research covering more than 10, 000 patients. Scientific Data, 7(1), 54. https://doi.org/10.1038/s41597-020-0386-x
[30] Wold, S., Esbensen, K., & Geladi, P. (1987). Principal component analysis. Chemometrics and Intelligent Laboratory Systems, 2(1–3), 37–52.
[31] Bingham, E., & Mannila, H. (2001). Random projection in dimensionality reduction: Applications to image and text data. In Proceedings of the Seventh ACM SIGKDD International Conference on Knowledge Discovery and Data Mining (pp. 245–250).
[32] Bourlard, H., & Kamp, Y. (1988). Auto-association by multilayer perceptrons and singular value decomposition. Biological Cybernetics, 59(4), 291–294.
[33] Oh, J., Chung, H., Kwon, J., Hong, D., & Choi, E. (2022). Lead-agnostic self-supervised learning for local and global representations of electrocardiogram. In Proceedings of the 2022 ACM Conference on Health, Inference, and Learning (CHIL ‘22). https://doi.org/10.48550/arXiv.2203.06889