Skip to main content
Log in

Joint spatio-temporal features constrained self-supervised electrocardiogram representation learning

  • Original Article
  • Published:
Biomedical Engineering Letters Aims and scope Submit manuscript

Abstract

The electrocardiogram (ECG) measurements with clinical diagnostic labels are intrinsically limited. We propose a generative learning based self-supervised method for general ECG representations applicable to various downstream tasks, thus achieving the goal of reducing the dependence on labeled data. However, existing self-supervised methods either fail to provide satisfactory ECG representations or require too much effort to curate a large amount of expert-annotated datasets. We propose a spatio-temporal joint detection based self-supervised method with little or no human supervision to label massive datasets. Considering the spatio-temporal characteristics of ECG signals, we dynamically randomly mask the original signal (temporal detection) and disrupt the order of leads (spatial detection) to complete the learning through reconstructing the original signal and predicting the lead numbers. To validate the effectiveness of the proposed method, we use several publicly available ECG databases as well as a private ECG data of ventricular tachycardia to pre-train our model. We use diagnostic classification of 27 arrhythmia types and localization of ventricular tachycardia origin sites as two downstream tasks, respectively. The results show that learning ECG representations with this method is effective. This effort demonstrates the feasibility of learning representations from ECG data by self-supervised learning. Our self-supervised method uses only 60% of the labeled data used by the supervised method to achieve the same performance. Using the same amount of data, our self-supervised approach shows 1.3% and 8.6% improvement in classification and localization accuracy compared to the model with random initialization on two types of downstream tasks, respectively.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5

Similar content being viewed by others

References

  1. Hannun AY, Rajpurkar P, Haghpanahi M, Tison GH, Bourn C, Turakhia MP, Ng AY. Cardiologist-level arrhythmia detection and classification in ambulatory electrocardiograms using a deep neural network. Nat Med. 2019;25(1):65–9.

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  2. Ribeiro AH, Ribeiro MH, Paixão GM, Oliveira DM, Gomes PR, Canazart JA, Ferreira MP, Andersson CR, Macfarlane PW, Meira W Jr, et al. Automatic diagnosis of the 12-lead ECG using a deep neural network. Nat Commun. 2020;11(1):1–9.

    Google Scholar 

  3. Malik J, Devecioglu OC, Kiranyaz S, Ince T, Gabbouj M. Real-time patient-specific ECG classification by 1d self-operational neural networks. IEEE Trans Biomed Eng. 2021;69(5):1788–801.

    Article  Google Scholar 

  4. Hammad M, Alkinani MH, Gupta B, El-Latif A, Ahmed A. Myocardial infarction detection based on deep neural network on imbalanced data. Multimedia Syst. 2022;28(4):1373–85.

    Article  Google Scholar 

  5. Mu L, Liu H. Noninvasive electrocardiographic imaging with low-rank and non-local total variation regularization. Pattern Recognit Lett. 2020;138:106–114. https://doi.org/10.1016/j.patrec.2020.07.007.

  6. Labati RD, Muñoz E, Piuri V, Sassi R, Scotti F. Deep-ECG: convolutional neural networks for ECG biometric recognition. Pattern Recogn Lett. 2019;126:78–85.

    Article  ADS  Google Scholar 

  7. Li Y, Pang Y, Wang K, Li X. Toward improving ECG biometric identification using cascaded convolutional neural networks. Neurocomputing. 2020;391:83–95.

    Article  Google Scholar 

  8. Zhang Y, Zhao Z, Deng Y, Zhang X, Zhang Y. Human identification driven by deep CNN and transfer learning based on multiview feature representations of ECG. Biomed Signal Process Control. 2021;68:102689.

    Article  Google Scholar 

  9. Puri DV, Nalbalwar SL, Nandgaonkar AB, Gawande JP, Wagh A. Automatic detection of Alzheimer’s disease from EEG signals using low-complexity orthogonal wavelet filter banks. Biomed Signal Process Control. 2023;81:104439. https://doi.org/10.1016/j.bspc.2022.104439.

    Article  Google Scholar 

  10. Rasti-Meymandi A, Ghaffari A. A deep learning-based framework For ECG signal denoising based on stacked cardiac cycle tensor. Biomed Signal Process Control. 2022;71:103275.

    Article  Google Scholar 

  11. Xu B, Liu R, Shu M, Shang X, Wang Y. An ECG denoising method based on the generative adversarial residual network. Comput Math Methods Med. 2021;2021:69.

    Article  Google Scholar 

  12. Parkale YV, Nalbalwar SL. Application of compressed sensing (CS) for ECG signal compression: a review. Science. 2017;6:53–65. https://doi.org/10.1007/978-981-10-1678-3_5.

    Article  Google Scholar 

  13. Zhang Y, Li J, Wei S, Zhou F, Li D. Heartbeats classification using hybrid time-frequency analysis and transfer learning based on ResNet. IEEE J Biomed Health Inform. 2021;25(11):4175–84.

    Article  PubMed  Google Scholar 

  14. Xiong Z, Nash MP, Cheng E, Fedorov VV, Stiles MK, Zhao J. ECG signal classification for the detection of cardiac arrhythmias using a convolutional recurrent neural network. Physiol Meas. 2018;39(9):094006.

    Article  PubMed  PubMed Central  Google Scholar 

  15. Xiong P, Xue Y, Zhang J, Liu M, Du H, Zhang H, Hou Z, Wang H, Liu X. Localization of myocardial infarction with multi-lead ECG based on DenseNet. Comput Methods Programs Biomed. 2021;203:106024.

    Article  PubMed  Google Scholar 

  16. Yildirim Ö. A novel wavelet sequence based on deep bidirectional LSTM network model for ECG signal classification. Comput Biol Med. 2018;96:189–202.

    Article  PubMed  Google Scholar 

  17. Zhang J, Liu A, Gao M, Chen X, Zhang X, Chen X. ECG-based multi-class arrhythmia detection using spatio-temporal attention-based convolutional recurrent neural network. Artif Intell Med. 2020;106:101856.

    Article  PubMed  Google Scholar 

  18. Kenton J.D.M.-W.C, Toutanova L.K. Bert: Pre-training of deep bidirectional transformers for language understanding. In: Proceedings of naacL-HLT, 2019; pp. 4171–4186.

  19. Hsu W-N, Bolte B, Tsai Y-HH, Lakhotia K, Salakhutdinov R, Mohamed AI. Transactions on audio, speech, and language processing. Science. 2021;29:3451–60.

    Google Scholar 

  20. Schneider S, Baevski A, Collobert R, Auli M. wav2vec: Unsupervised Pre-Training for Speech Recognition. In: INTERSPEECH 2019.

  21. Chen T, Kornblith S, Norouzi M, Hinton G. A simple framework for contrastive learning of visual representations. In: International Conference on Machine Learning, 2020; pp. 1597–1607. PMLR

  22. He K, Chen X, Xie S, Li Y, Dollár P, Girshick R. Masked autoencoders are scalable vision learners. In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, 2022; pp. 16000–16009.

  23. Sarkar P, Etemad A. Self-supervised ECG representation learning for emotion recognition. IEEE Trans Affect Comput. 2020;2:96.

    Google Scholar 

  24. Zhang W, Geng S, Hong S. A simple self-supervised ECG representation learning method via manipulated temporal-spatial reverse detection. Biomed Signal Process Control. 2023;79:104194.

    Article  Google Scholar 

  25. Kiyasseh D, Zhu T, Clifton D.A. Clocs: Contrastive learning of cardiac signals across space, time, and patients. In: International Conference on Machine Learning, 2021; pp. 5606–5615. PMLR

  26. Kachuee M, Fazeli S, Sarrafzadeh M. ECG heartbeat classification: A deep transferable representation. In: 2018 IEEE International Conference on Healthcare Informatics (ICHI), 2018; pp. 443–444. IEEE

  27. Yan G, Liang S, Zhang Y, Liu F. Fusing transformer model with temporal features for ECG heartbeat classification. In: 2019 IEEE International Conference on Bioinformatics and Biomedicine (BIBM), 2019; pp. 898–905. IEEE

  28. Manju B.R, Nair A.R. Classification of cardiac arrhythmia of 12 lead ecg using combination of smoteenn, xgboost and machine learning algorithms. In: 2019 9th International Symposium on Embedded Computing and System Design (ISED) 2019. https://doi.org/10.1109/ised48680.2019.9096244.

  29. Chen J, Zheng X, Yu H, Chen D.Z, Wu J. Electrocardio panorama: synthesizing new ECG views with self-supervision. In: Zhou, Z.-H. (ed.) Proceedings of the Thirtieth International Joint Conference on Artificial Intelligence, IJCAI-21, pp. 3597–3605. International Joint Conferences on Artificial Intelligence Organization, ??? 2021. https://doi.org/10.24963/ijcai.2021/495. Main Track.

  30. Lee B.T, Kong S.T, Song Y, Lee Y. Self-supervised learning with electrocardiogram delineation for arrhythmia detection. In: 2021 43rd Annual International Conference of the IEEE Engineering in Medicine & Biology Society (EMBC), 2021; pp. 591–594. IEEE

  31. Alday EAP, Gu A, Shah AJ, Robichaux C, Wong A-KI, Liu C, Liu F, Rad AB, Elola A, Seyedi S, et al. Classification of 12-lead ECGs: the physionet/computing in cardiology challenge 2020. Physiol Meas. 2020;41(12):124003.

    Article  Google Scholar 

  32. Vaswani A, Shazeer N, Parmar N, Uszkoreit J, Jones L, Gomez AN, Kaiser Ł, Polosukhin I. Attention is all you need. Adv Neural Inf Process Syst. 2017;30:63.

    Google Scholar 

  33. Wold S, Esbensen K, Geladi P. Principal component analysis. Chemom Intell Lab Syst. 1987;2(1–3):37–52.

    Article  CAS  Google Scholar 

  34. Chen T, Kornblith S, Norouzi M, Hinton G. A simple framework for contrastive learning of visual representations. Cornell University - arXiv, Cornell University - arXiv, 2020.

  35. Oh J, Chung H, Kwon J.-m, Hong D.-g, Choi E. Lead-agnostic self-supervised learning for local and global representations of electrocardiogram2

  36. Hochreiter S, Schmidhuber J. Long short-term memory. Neural Comput. 1997;9(8):1735–80.

    Article  CAS  PubMed  Google Scholar 

  37. Lynn HM, Kim P, Pan SB. Data independent acquisition based bi-directional deep networks for biometric ECG authentication. Appl Sci. 2021;11(3):1125.

    Article  CAS  Google Scholar 

  38. Pourbabaee B, Roshtkhari MJ, Khorasani K. Deep convolutional neural networks and learning ECG features for screening paroxysmal atrial fibrillation patients. IEEE Trans Syst Man Cybern Syst. 2018;48(12):2095–104.

    Article  Google Scholar 

  39. He K, Zhang X, Ren S, Sun J. Deep residual learning for image recognition. In: Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 2016; pp. 770–778.

  40. Loni M, Sinaei S, Zoljodi A, Daneshtalab M, Sjödin M. DeepMaker: a multi-objective optimization framework for deep neural networks in embedded systems. Microprocess Microsyst. 2020;73:102989.

    Article  Google Scholar 

Download references

Funding

This work is supported in part by the National Natural Science Foundation of China (No: U1809204, 61525106), and by the Talent Program of Zhejiang Province (No: 2021R51004).

Author information

Authors and Affiliations

Authors

Contributions

All authors contributed to the study conception and design. Material preparation, data collection and analysis were performed by Ao Ran and Huafeng Liu. The first draft of the manuscript was written by Ao Ran and all authors commented on previous versions of the manuscript. All authors read and approved the final manuscript.

Corresponding author

Correspondence to Huafeng Liu.

Ethics declarations

Competing interest

The authors have no relevant financial or non-financial interests to disclose.

Ethical approval

Not required.

Consent to participate

Not applicable.

Consent to publish

Nothing to obtain consent to publish

Additional information

Publisher's Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Rights and permissions

Springer Nature or its licensor (e.g. a society or other partner) holds exclusive rights to this article under a publishing agreement with the author(s) or other rightsholder(s); author self-archiving of the accepted manuscript version of this article is solely governed by the terms of such publishing agreement and applicable law.

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Ran, A., Liu, H. Joint spatio-temporal features constrained self-supervised electrocardiogram representation learning. Biomed. Eng. Lett. 14, 209–220 (2024). https://doi.org/10.1007/s13534-023-00329-0

Download citation

  • Received:

  • Revised:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s13534-023-00329-0

Keywords

Navigation