A hierarchical transformer for electrocardiogram classification and diagnosis

Authors

  • Pedro Robles Dutenhefner Universidade Federal de Minas Gerais
  • Turi Andrade Vasconcelos Rezende Universidade Federal de Minas Gerais
  • Gisele Lobo Pappa Universidade Federal de Minas Gerais
  • Gabriela Miana de Matos Paixão Universidade Federal de Minas Gerais
  • Antônio Luiz Pinho Ribeiro Universidade Federal de Minas Gerais
  • Wagner Meira Jr. Universidade Federal de Minas Gerais

DOI:

https://doi.org/10.59681/2175-4411.v16.iEspecial.2024.1311

Keywords:

Electrocardiogram, Automatic Diagnosis, Neural networks

Abstract

Objective: Electrocardiogram (ECG) is an important tool to assess cardiac conditions. The advancement of artificial intelligence has enabled progress in the automatic analysis of ECGs. Aiming to improve the predictive performance of automatic diagnosis, this paper presents a new hierarchical transformer model (HiT) for classifying 12-lead ECGs. Method: The HiT model integrates convolutional and transformer blocks - specifically designed with local attention mechanisms - to guide the learning of local and global features of ECG signals. Results: Using a subset of CODE, a broad ECG database from Brazil, the model was developed for classifying six cardiac conditions and achieved an average f1-score over 0.84, surpassing the state of the art for the same data. Conclusion: Therefore, this work demonstrates the potential of a multi-level hierarchical transformer for more accurate automatic diagnosis of heart diseases.

Author Biographies

Pedro Robles Dutenhefner, Universidade Federal de Minas Gerais

Aluno de graduação, Universidade Federal de Minas Gerais (UFMG), Belo Horizonte (MG), Brasil.

Turi Andrade Vasconcelos Rezende, Universidade Federal de Minas Gerais

Aluno de graduação, Universidade Federal de Minas Gerais (UFMG), Belo Horizonte (MG), Brasil.

Gisele Lobo Pappa, Universidade Federal de Minas Gerais

Professor Doutor, Universidade Federal de Minas Gerais (UFMG), Belo Horizonte (MG), Brasil.

Gabriela Miana de Matos Paixão, Universidade Federal de Minas Gerais

Doutor, Centro de telessaúde do Hospital das Clínicas da Universidade Federal de Minas Gerais (UFMG), Belo Horizonte (MG), Brasil.

Antônio Luiz Pinho Ribeiro, Universidade Federal de Minas Gerais

Professor Doutor, Centro de telessaúde do Hospital das Clínicas da Universidade Federal de Minas Gerais (UFMG), Belo Horizonte (MG), Brasil.

Wagner Meira Jr., Universidade Federal de Minas Gerais

Professor Doutor, Universidade Federal de Minas Gerais (UFMG), Belo Horizonte (MG), Brasil.

References

World Health Organization. Cardiovascular diseases (CVDs) [Internet]. Disponível em: https://www.who.int/news-room/fact-sheets/detail/cardiovascular-diseases-(cvds), acessado em 29 de maio de 2024.

Liu X, Wang H, Li Z, Qin L. Deep learning in ECG diagnosis: A review. Knowledge-Based Systems. 2021;227:107187.

Ribeiro ALP, Paixao GMM, Gomes PR, Ribeiro MH, Ribeiro AH, Canazart JA, Oliveira DM, Ferreira MP, Lima EM, de Moraes JL, et al. Tele-electrocardiography and bigdata: the CODE (Clinical Outcomes in Digital Electrocardiography) study. J Electrocardiol. 2019;57

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

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.

Dosovitskiy A, Beyer L, Kolesnikov A, Weissenborn D, Zhai X, Unterthiner T, Dehghani M, Minderer M, Heigold G, Gelly S, et al. An image is worth 16x16 words: Transformers for image recognition at scale. arXiv preprint arXiv:2010.11929. 2020.

Dong L, Xu S, Xu B. Speech-transformer: a no-recurrence sequence-to-sequence model for speech recognition. In: 2018 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP); 2018. p. 5884-5888.

Radford A, Wu J, Child R, Luan D, Amodei D, Sutskever I, et al. Language models are unsupervised multitask learners. OpenAI blog. 2019;1(8):9.

Liu Z, Lin Y, Cao Y, Hu H, Wei Y, Zhang Z, et al. Swin transformer: Hierarchical vision transformer using shifted windows. In: Proceedings of the IEEE/CVF international conference on computer vision. 2021. p. 10012-22.

Lyon A, Mincholé A, Martínez JP, Laguna P, Rodriguez B. Computational techniques for ECG analysis and interpretation in light of their contribution to medical advances. J R Soc Interface. 2018;15(138):20170821.

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-69.

Hu R, Chen J, Zhou L. A transformer-based deep neural network for arrhythmia detection using continuous ECG signals. Comput Biol Med. 2022;144:105325.

Li X, Li C, Wei Y, Sun Y, Wei J, Li X, et al. Bat: Beat-aligned transformer for electrocardiogram classification. In: 2021 IEEE International Conference on Data Mining (ICDM). IEEE; 2021. p. 320-9.

Wagner P, Strodthoff N, Bousseljot R-D, Kreiseler D, Lunze FI, Samek W, Schaeffter T. PTB-XL, a large publicly available electrocardiography dataset. Scientific Data. 2020;7(1):1-15.

Moody GB, Mark RG, Goldberger AL. PhysioNet: a web-based resource for the study of physiologic signals. IEEE Eng Med Biol Mag. 2001;20(3):70-75.

Loshchilov I, Hutter F. Decoupled weight decay regularization. arXiv preprint arXiv:1711.05101. 2017.

Loshchilov I, Hutter F. SGDR: Stochastic gradient descent with warm restarts. arXiv preprint arXiv:1608.03983. 2016.

Davison AC, Hinkley DV. Bootstrap methods and their application. 1st ed. Cambridge: Cambridge University Press; 1997.

Published

2024-11-19

How to Cite

Dutenhefner, P. R., Rezende, T. A. V., Pappa, G. L., Paixão, G. M. de M., Ribeiro, A. L. P., & Meira Jr., W. (2024). A hierarchical transformer for electrocardiogram classification and diagnosis. Journal of Health Informatics, 16(Especial). https://doi.org/10.59681/2175-4411.v16.iEspecial.2024.1311

Similar Articles

<< < 1 2 3 4 5 6 7 8 9 10 > >> 

You may also start an advanced similarity search for this article.

Most read articles by the same author(s)