Skip to main content
Top
Published in: BMC Medical Informatics and Decision Making 1/2021

Open Access 01-12-2021 | Research

Constrained transformer network for ECG signal processing and arrhythmia classification

Authors: Chao Che, Peiliang Zhang, Min Zhu, Yue Qu, Bo Jin

Published in: BMC Medical Informatics and Decision Making | Issue 1/2021

Login to get access

Abstract

Background

Heart disease diagnosis is a challenging task and it is important to explore useful information from the massive amount of electrocardiogram (ECG) records of patients. The high-precision diagnostic identification of ECG can save clinicians and cardiologists considerable time while helping reduce the possibility of misdiagnosis at the same time.Currently, some deep learning-based methods can effectively perform feature selection and classification prediction, reducing the consumption of manpower.

Methods

In this work, an end-to-end deep learning framework based on convolutional neural network (CNN) is proposed for ECG signal processing and arrhythmia classification. In the framework, a transformer network is embedded in CNN to capture the temporal information of ECG signals and a new link constraint is introduced to the loss function to enhance the classification ability of the embedding vector.

Results

To evaluate the proposed method, extensive experiments based on real-world data were conducted. Experimental results show that the proposed model achieve better performance than most baselines. The experiment results also proved that the transformer network pays more attention to the temporal continuity of the data and captures the hidden deep features of the data well. The link constraint strengthens the constraint on the embedded features and effectively suppresses the effect of data imbalance on the results.

Conclusions

In this paper, an end-to-end model is used to process ECG signal and classify arrhythmia. The model combine CNN and Transformer network to extract temporal information in ECG signal and is capable of performing arrhythmia classification with acceptable accuracy. The model can help cardiologists perform assisted diagnosis of heart disease and improve the efficiency of healthcare delivery.
Literature
1.
go back to reference Feigin VL, Roth GA, Naghavi M, Parmar P, Krishnamurthi R, Chugh S, Mensah GA, Norrving B, Shiue I, Ng M, et al. Global burden of stroke and risk factors in 188 countries, during 1990–2013: a systematic analysis for the global burden of disease study 2013. Lancet Neurol. 2016;15(9):913–24.CrossRef Feigin VL, Roth GA, Naghavi M, Parmar P, Krishnamurthi R, Chugh S, Mensah GA, Norrving B, Shiue I, Ng M, et al. Global burden of stroke and risk factors in 188 countries, during 1990–2013: a systematic analysis for the global burden of disease study 2013. Lancet Neurol. 2016;15(9):913–24.CrossRef
2.
go back to reference Rubin J, Parvaneh S, Rahman A, Conroy B, Babaeizadeh S. Densely connected convolutional networks for detection of atrial fibrillation from short single-lead ECG recordings. J Electrocardiol. 2018;51(6):18–21.CrossRef Rubin J, Parvaneh S, Rahman A, Conroy B, Babaeizadeh S. Densely connected convolutional networks for detection of atrial fibrillation from short single-lead ECG recordings. J Electrocardiol. 2018;51(6):18–21.CrossRef
3.
go back to reference Teijeiro T, Félix P, Presedo J, Castro D. Heartbeat classification using abstract features from the abductive interpretation of the ECG. IEEE J Biomed Health Inform. 2018;22(2):409–20.CrossRef Teijeiro T, Félix P, Presedo J, Castro D. Heartbeat classification using abstract features from the abductive interpretation of the ECG. IEEE J Biomed Health Inform. 2018;22(2):409–20.CrossRef
4.
go back to reference Ince T, Kiranyaz S, Gabbouj M. A generic and robust system for automated patient-specific classification of ECG signals. IEEE Trans Biomed Eng. 2009;56(5):1415–26.CrossRef Ince T, Kiranyaz S, Gabbouj M. A generic and robust system for automated patient-specific classification of ECG signals. IEEE Trans Biomed Eng. 2009;56(5):1415–26.CrossRef
5.
go back to reference Kiranyaz S, Ince T, Gabbouj M. Real-time patient-specific ECG classification by 1-D convolutional neural networks. IEEE Trans Biomed Eng. 2015;63(3):664–75.CrossRef Kiranyaz S, Ince T, Gabbouj M. Real-time patient-specific ECG classification by 1-D convolutional neural networks. IEEE Trans Biomed Eng. 2015;63(3):664–75.CrossRef
6.
go back to reference Hoekema R, Uijen GJ, Van Oosterom A. Geometrical aspects of the interindividual variability of multilead ECG recordings. IEEE Trans Biomed Eng. 2001;48(5):551–9.CrossRef Hoekema R, Uijen GJ, Van Oosterom A. Geometrical aspects of the interindividual variability of multilead ECG recordings. IEEE Trans Biomed Eng. 2001;48(5):551–9.CrossRef
9.
go back to reference De Chazal P, Reilly RB. A patient-adapting heartbeat classifier using ECG morphology and heartbeat interval features. IEEE Trans Biomed Eng. 2006;53(12):2535–43.CrossRef De Chazal P, Reilly RB. A patient-adapting heartbeat classifier using ECG morphology and heartbeat interval features. IEEE Trans Biomed Eng. 2006;53(12):2535–43.CrossRef
10.
go back to reference De Chazal P, O’Dwyer M, Reilly RB. Automatic classification of heartbeats using ECG morphology and heartbeat interval features. IEEE Trans Biomed Eng. 2004;51(7):1196–206.CrossRef De Chazal P, O’Dwyer M, Reilly RB. Automatic classification of heartbeats using ECG morphology and heartbeat interval features. IEEE Trans Biomed Eng. 2004;51(7):1196–206.CrossRef
11.
go back to reference Varatharajan R, Manogaran G, Priyan M. A big data classification approach using LDA with an enhanced SVM method for ECG signals in cloud computing. Multimed Tools Appl. 2018;77(8):10195–215.CrossRef Varatharajan R, Manogaran G, Priyan M. A big data classification approach using LDA with an enhanced SVM method for ECG signals in cloud computing. Multimed Tools Appl. 2018;77(8):10195–215.CrossRef
12.
go back to reference Shadmand S, Mashoufi B. A new personalized ECG signal classification algorithm using block-based neural network and particle swarm optimization. Biomed Signal Process Control. 2016;25:12–23.CrossRef Shadmand S, Mashoufi B. A new personalized ECG signal classification algorithm using block-based neural network and particle swarm optimization. Biomed Signal Process Control. 2016;25:12–23.CrossRef
13.
go back to reference Zhang J-w, Wang L-P, Liu X, Zhu H-H, Dong J. Chinese cardiovascular disease database (CCDD) and its management tool. In: IEEE international conference on bioinformatics and bioengineering. IEEE; 2010. p. 66–2 Zhang J-w, Wang L-P, Liu X, Zhu H-H, Dong J. Chinese cardiovascular disease database (CCDD) and its management tool. In: IEEE international conference on bioinformatics and bioengineering. IEEE; 2010. p. 66–2
14.
go back to reference Jin L, Dong J. Deep learning research on clinical electrocardiogram analysis. Sci Sin Inform. 2015;45(3):398.CrossRef Jin L, Dong J. Deep learning research on clinical electrocardiogram analysis. Sci Sin Inform. 2015;45(3):398.CrossRef
15.
go back to reference 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.CrossRef 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.CrossRef
16.
go back to reference Shashikumar SP, Shah AJ, Clifford GD, Nemati S. Detection of paroxysmal atrial fibrillation using attention-based bidirectional recurrent neural networks. In: Proceedings of the 24th ACM SIGKDD international conference on knowledge discovery and data mining. ACM; 2018. p. 715–23 Shashikumar SP, Shah AJ, Clifford GD, Nemati S. Detection of paroxysmal atrial fibrillation using attention-based bidirectional recurrent neural networks. In: Proceedings of the 24th ACM SIGKDD international conference on knowledge discovery and data mining. ACM; 2018. p. 715–23
17.
go back to reference Ribeiro AH, Ribeiro MH, Paixão G, Oliveira D, Gomes PR, Canazart JA, Pifano M, Meira Jr W, Schön TB, Ribeiro AL. Automatic diagnosis of short-duration 12-lead ECG using a deep convolutional network. 2018. arXiv preprint arXiv:1811.12194 Ribeiro AH, Ribeiro MH, Paixão G, Oliveira D, Gomes PR, Canazart JA, Pifano M, Meira Jr W, Schön TB, Ribeiro AL. Automatic diagnosis of short-duration 12-lead ECG using a deep convolutional network. 2018. arXiv preprint arXiv:1811.12194
18.
go back to reference Yao Q, Wang R, Fan X, Liu J, Li Y. Multi-class arrhythmia detection from 12-lead varied-length ECG using attention-based time-incremental convolutional neural network. Inform Fusion. 2020;53:174–82.CrossRef Yao Q, Wang R, Fan X, Liu J, Li Y. Multi-class arrhythmia detection from 12-lead varied-length ECG using attention-based time-incremental convolutional neural network. Inform Fusion. 2020;53:174–82.CrossRef
19.
go back to reference Jun TJ, Nguyen HM, Kang D, Kim D, Kim D, Kim Y-H. ECG arrhythmia classification using a 2-d convolutional neural network. 2018. arXiv preprint arXiv:1804.06812 Jun TJ, Nguyen HM, Kang D, Kim D, Kim D, Kim Y-H. ECG arrhythmia classification using a 2-d convolutional neural network. 2018. arXiv preprint arXiv:1804.06812
20.
go back to reference Li P, Wang Y, He J, Wang L, Tian Y, Zhou T-S, Li T, Li J-S. High-performance personalized heartbeat classification model for long-term ECG signal. IEEE Trans Biomed Eng. 2016;64(1):78–86.CrossRef Li P, Wang Y, He J, Wang L, Tian Y, Zhou T-S, Li T, Li J-S. High-performance personalized heartbeat classification model for long-term ECG signal. IEEE Trans Biomed Eng. 2016;64(1):78–86.CrossRef
21.
go back to reference Mostayed A, Luo J, Shu X, Wee W. Classification of 12-lead ECG signals with bi-directional LSTM network. 2018. arXiv preprint arXiv:1811.02090 Mostayed A, Luo J, Shu X, Wee W. Classification of 12-lead ECG signals with bi-directional LSTM network. 2018. arXiv preprint arXiv:1811.02090
22.
go back to reference Saadatnejad S, Oveisi M, Hashemi M. LSTM-based ECG classification for continuous monitoring on personal wearable devices. IEEE J Biomed Health Inform. 2019;24:515–23.CrossRef Saadatnejad S, Oveisi M, Hashemi M. LSTM-based ECG classification for continuous monitoring on personal wearable devices. IEEE J Biomed Health Inform. 2019;24:515–23.CrossRef
23.
go back to reference Chen T-M, Huang C-H, Shih ES, Hu Y-F, Hwang M-J. Detection and classification of cardiac arrhythmias by a challenge-best deep learning neural network model. Iscience. 2020;23(3):100886.CrossRef Chen T-M, Huang C-H, Shih ES, Hu Y-F, Hwang M-J. Detection and classification of cardiac arrhythmias by a challenge-best deep learning neural network model. Iscience. 2020;23(3):100886.CrossRef
24.
go back to reference Rajpurkar P, Hannun AY, Haghpanahi M, Bourn C, Ng AY. Cardiologist-level arrhythmia detection with convolutional neural networks. 2017. arXiv preprint arXiv:1707.01836 Rajpurkar P, Hannun AY, Haghpanahi M, Bourn C, Ng AY. Cardiologist-level arrhythmia detection with convolutional neural networks. 2017. arXiv preprint arXiv:1707.01836
25.
go back to reference Liu F, Liu C, Zhao L, Zhang X, Wu X, Xu X, Liu Y, Ma C, Wei S, He Z, et al. An open access database for evaluating the algorithms of electrocardiogram rhythm and morphology abnormality detection. J Med Imaging Health Inform. 2018;8(7):1368–73.CrossRef Liu F, Liu C, Zhao L, Zhang X, Wu X, Xu X, Liu Y, Ma C, Wei S, He Z, et al. An open access database for evaluating the algorithms of electrocardiogram rhythm and morphology abnormality detection. J Med Imaging Health Inform. 2018;8(7):1368–73.CrossRef
27.
go back to reference Qin C, Schlemper J, Caballero J, Price AN, Hajnal JV, Rueckert D. Convolutional recurrent neural networks for dynamic MR image reconstruction. IEEE Trans Med Imaging. 2019;38(1):280–90.CrossRef Qin C, Schlemper J, Caballero J, Price AN, Hajnal JV, Rueckert D. Convolutional recurrent neural networks for dynamic MR image reconstruction. IEEE Trans Med Imaging. 2019;38(1):280–90.CrossRef
28.
go back to reference Hershey S, Chaudhuri S, Ellis DP, Gemmeke JF, Jansen A, Moore RC, Plakal M, Platt D, Saurous RA, Seybold B, et al. CNN architectures for large-scale audio classification. In: IEEE international conference on acoustics, speech and signal processing (ICASSP). IEEE; 2017. p. 131–35 Hershey S, Chaudhuri S, Ellis DP, Gemmeke JF, Jansen A, Moore RC, Plakal M, Platt D, Saurous RA, Seybold B, et al. CNN architectures for large-scale audio classification. In: IEEE international conference on acoustics, speech and signal processing (ICASSP). IEEE; 2017. p. 131–35
29.
go back to reference Shang L, Yang Q, Wang J, Li S, Lei W. Detection of rail surface defects based on CNN image recognition and classification. In: 20th International conference on advanced communication technology (ICACT). IEEE; 2018. p. 45–51 Shang L, Yang Q, Wang J, Li S, Lei W. Detection of rail surface defects based on CNN image recognition and classification. In: 20th International conference on advanced communication technology (ICACT). IEEE; 2018. p. 45–51
30.
go back to reference Ioffe S, Szegedy C. Batch normalization: accelerating deep network training by reducing internal covariate shift. 2015. arXiv preprint arXiv:1502.03167 Ioffe S, Szegedy C. Batch normalization: accelerating deep network training by reducing internal covariate shift. 2015. arXiv preprint arXiv:1502.03167
31.
go back to reference Vaswani A, Shazeer N, Parmar N, Uszkoreit J, Jones L, Gomez AN, Kaiser Ł, Polosukhin I. Attention is all you need. In: Advances in neural information processing systems. 2017. p. 5998–6008 Vaswani A, Shazeer N, Parmar N, Uszkoreit J, Jones L, Gomez AN, Kaiser Ł, Polosukhin I. Attention is all you need. In: Advances in neural information processing systems. 2017. p. 5998–6008
32.
go back to reference Qin C, Schlemper J, Caballero J, Price AN, Hajnal JV, Rueckert D. Convolutional recurrent neural networks for dynamic MR image reconstruction. IEEE Trans Med Imaging. 2018;38(1):280–90.CrossRef Qin C, Schlemper J, Caballero J, Price AN, Hajnal JV, Rueckert D. Convolutional recurrent neural networks for dynamic MR image reconstruction. IEEE Trans Med Imaging. 2018;38(1):280–90.CrossRef
33.
go back to reference Vinyals O, Toshev A, Bengio S, Erhan D. Show and tell: a neural image caption generator. In: Proceedings of the IEEE conference on computer vision and pattern recognition. 2015, p. 3156–3164 Vinyals O, Toshev A, Bengio S, Erhan D. Show and tell: a neural image caption generator. In: Proceedings of the IEEE conference on computer vision and pattern recognition. 2015, p. 3156–3164
34.
go back to reference Widrow B, Hoff ME. Adaptive switching circuits. Cambridge: MIT Press; 1988. p. 123–34. Widrow B, Hoff ME. Adaptive switching circuits. Cambridge: MIT Press; 1988. p. 123–34.
35.
go back to reference Cheng S, Keyes MJ, Larson MG, McCabe EL, Newton-Cheh C, Levy D, Benjamin EJ, Vasan RS, Wang TJ. Long-term outcomes in individuals with prolonged PR interval or first-degree atrioventricular block. JAMA. 2009;301(24):2571–7.CrossRef Cheng S, Keyes MJ, Larson MG, McCabe EL, Newton-Cheh C, Levy D, Benjamin EJ, Vasan RS, Wang TJ. Long-term outcomes in individuals with prolonged PR interval or first-degree atrioventricular block. JAMA. 2009;301(24):2571–7.CrossRef
Metadata
Title
Constrained transformer network for ECG signal processing and arrhythmia classification
Authors
Chao Che
Peiliang Zhang
Min Zhu
Yue Qu
Bo Jin
Publication date
01-12-2021
Publisher
BioMed Central
Published in
BMC Medical Informatics and Decision Making / Issue 1/2021
Electronic ISSN: 1472-6947
DOI
https://doi.org/10.1186/s12911-021-01546-2

Other articles of this Issue 1/2021

BMC Medical Informatics and Decision Making 1/2021 Go to the issue