A hierarchical transformer for electrocardiogram classification and diagnosis
DOI:
https://doi.org/10.59681/2175-4411.v16.iEspecial.2024.1311Keywords:
Electrocardiogram, Automatic Diagnosis, Neural networksAbstract
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.
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. DOI: https://doi.org/10.1016/j.knosys.2021.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 DOI: https://doi.org/10.1016/j.jelectrocard.2019.09.008
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. DOI: https://doi.org/10.1038/s41467-020-15432-4
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. DOI: https://doi.org/10.1109/ICASSP.2018.8462506
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. DOI: https://doi.org/10.1109/ICCV48922.2021.00986
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. DOI: https://doi.org/10.1098/rsif.2017.0821
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. DOI: https://doi.org/10.1038/s41591-018-0268-3
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. DOI: https://doi.org/10.1016/j.compbiomed.2022.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. DOI: https://doi.org/10.1109/ICDM51629.2021.00043
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. DOI: https://doi.org/10.1038/s41597-020-0495-6
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. DOI: https://doi.org/10.1109/51.932728
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. DOI: https://doi.org/10.1017/CBO9780511802843
Downloads
Published
How to Cite
Issue
Section
License
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
Submission of a paper to Journal of Health Informatics is understood to imply that it is not being considered for publication elsewhere and that the author(s) permission to publish his/her (their) article(s) in this Journal implies the exclusive authorization of the publishers to deal with all issues concerning the copyright therein. Upon the submission of an article, authors will be asked to sign a Copyright Notice. Acceptance of the agreement will ensure the widest possible dissemination of information. An e-mail will be sent to the corresponding author confirming receipt of the manuscript and acceptance of the agreement.