DCETEN: a lightweight ECG automatic classification network based on Transformer model

Fan Jiang , Jiayi Xiao , Lei Liu , Chaowei Wang

›› 2026, Vol. 12 ›› Issue (5) : 789 -801.

PDF (2372KB)
›› 2026, Vol. 12 ›› Issue (5) :789 -801. DOI: 10.1016/j.dcan.2024.11.003
Research article
research-article
DCETEN: a lightweight ECG automatic classification network based on Transformer model
Author information +
History +
PDF (2372KB)

Abstract

Currently, Cardiovascular Disease (CVD) remains a significant contributor to premature mortality and escalating health care expenses. Early and accurate detection is crucial for the successful treatment, intervention, and monitoring of heart health. Electrocardiograms (ECGs) are essential for diagnosing and monitoring cardiovascular diseases. However, the increasing demand for ECG signal detection, coupled with a shortage of specialized ECG doctors, has made automatic classification and diagnosis of ECG signals a prominent research area. Traditional ECG signal classification models often involve numerous parameters, rendering them unsuitable for resource-limited IoT devices in smart healthcare scenarios. In response, this paper proposes a novel lightweight ECG signal classification network based on the Transformer model, named DCETEN. Specifically, we introduce a lightweight Efficient Channel Attention (ECA) module, integrating it with Depthwise Separable Convolution (DSC) to design a One-dimensional Convolutional Neural Network (1D-CNN) that enhances feature extraction capabilities. Additionally, we fuse hand-crafted RR interval features and features learned by the Transformer to comprehensively capture the ECG signal characteristics. Finally, to make the proposed method suitable for resource-constrained IoT-based edge devices, we employ pruning techniques to reduce the number of model parameters. We validated the proposed model on the MIT-BIH Arrhythmia Database, achieving 99.84% accuracy and a 99.67% F1 score with low computational and memory requirements, making it suitable for deployment in smart healthcare settings with prevalent resource limitations.

Keywords

Electrocardiogram / Arrhythmia classification / Transformer model / Lightweight / Weight pruning

Cite this article

Download citation ▾
Fan Jiang, Jiayi Xiao, Lei Liu, Chaowei Wang. DCETEN: a lightweight ECG automatic classification network based on Transformer model. , 2026, 12 (5) : 789-801 DOI:10.1016/j.dcan.2024.11.003

登录浏览全文

4963

注册一个新账户 忘记密码

CRediT authorship contribution statement

Fan Jiang: Writing – review & editing. Jiayi Xiao: Writing – original draft. Lei Liu: Methodology. Chaowei Wang: Data curation.

Declaration of competing interest

No potential conflict of interest was reported by the authors.

Acknowledgements

This research was supported by National Natural Science Foundation of China (Grant No. 62071377, 62201456); Natural Science Foundation of Shaanxi Province (Grant No. 2023-YBGY-036, 2023-YBNY-222, 2022JQ-687); The Graduate Student Innovation Foundation Project of Xi’an University of Posts and Telecommunications under Grant CXJJYL2023007.

References

[1]

G.A. Roth, G.A. Mensah, C.O. Johnson, G. Addolorato, E. Ammirati, L.M. Baddour, N.C. Barengo, A.Z. Beaton, E.J. Benjamin, C.P. Benziger, et al., Global burden of cardiovascular diseases and risk factors, 1990—2019: update from the gbd 2019 study, J. Am. Coll. Cardiol. 76 (25) (2020) 2982-3021.

[2]

W.H. Federation, World Heart Report 2023: Confronting the World’s Number One Killer, Geneva, Switzerland, 2023.

[3]

D. Wu, S. Si, S. Wu, R. Wang, Dynamic trust relationships aware data privacy protection in mobile crowd—sensing, IEEE Int. Things J. 5 (4) (2017) 2958-2970.

[4]

D. Wu, H. Shi, H. Wang, R. Wang, H. Fang, A feature—based learning system for Internet of Things applications, IEEE Int. Things J. 6 (2) (2018) 1928-1937.

[5]

D. Wu, J. Yan, H. Wang, D. Wu, R. Wang, Social attribute aware incentive mechanism for device—to—device video distribution, IEEE Trans. Multimed. 19 (8) (2017) 1908-1920.

[6]

D. Wu, Q. Liu, H. Wang, D. Wu, R. Wang, Socially aware energy—efficient mobile edge collaboration for video distribution, IEEE Trans. Multimed. 19 (10) (2017) 2197-2209.

[7]

E.J.d.S. Luz, W.R. Schwartz, G. Cámara—Chávez, D. Menotti, ECG—based heartbeat classification for arrhythmia detection: a survey, Comput. Methods Programs Biomed. 127 (2016) 144-164.

[8]

B.M. Asl, S.K. Setarehdan, M. Mohebbi, Support vector machine—based arrhythmia classification using reduced features of heart rate variability signal, Artif. Intell. Med. 44 (1) (2008) 51-64.

[9]

V. Gupta, M. Mittal, KNN and PCA classifier with autoregressive modelling during different ECG signal interpretation, Proc. Comput. Sci. 125 (2018) 18-24.

[10]

A. Vaswani, N. Shazeer, N. Parmar, J. Uszkoreit, L. Jones, A.N. Gomez, Ł. Kaiser, I. Polosukhin, Attention Is All You Need, Curran Associates Inc, 2017, pp. 5998-6008.

[11]

S. Singh, S.K. Pandey, U. Pawar, R.R. Janghel, Classification of ECG arrhythmia using recurrent neural networks, Proc. Comput. Sci. 132 (2018) 1290-1297.

[12]

P. Gopika, V. Sowmya, E. Gopalakrishnan, K. Soman, Transferable approach for cardiac disease classification using deep learning, in: Deep Learning Techniques for Biomedical and Health Informatics, Elsevier, 2020, pp. 285-303.

[13]

S. Nurmaini, R. Umi Partan, W. Caesarendra, T. Dewi, M. Naufal Rahmatullah, A. Darmawahyuni, V. Bhayyu, F. Firdaus, An automated ECG beat classification system using deep neural networks with an unsupervised feature extraction technique, Appl. Sci. 9 (14) (2019) 2921.

[14]

L. Meng, W. Tan, J. Ma, R. Wang, X. Yin, Y. Zhang, Enhancing dynamic ECG heartbeat classification with lightweight transformer model, Artif. Intell. Med. 124 (2022) 102236.

[15]

Q. Wang, B. Wu, P. Zhu, P. Li, W. Zuo, Q. Hu, ECA—Net: efficient channel attention for deep convolutional neural networks, in: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, 2020, pp. 11534-11542.

[16]

N.V. Chawla, K.W. Bowyer, L.O. Hall, W.P. Kegelmeyer, SMOTE: synthetic minority over—sampling technique, J. Artif. Intell. Res. 16 (2002) 321-357.

[17]

L. Zhang, H. Peng, C. Yu, An approach for ECG classification based on wavelet feature extraction and decision tree, in: 2010 International Conference on Wireless Communications & Signal Processing (WCSP), IEEE, 2010, pp. 1-4.

[18]

S. Saminu, N. Özkurt, I.A. Karaye, Wavelet feature extraction for ECG beat classification, in: 2014 IEEE 6th International Conference on Adaptive Science & Technology (ICAST), IEEE, 2014, pp. 1-6.

[19]

S. Somani, A.J. Russak, F. Richter, S. Zhao, A. Vaid, F. Chaudhry, J.K. De Freitas, N. Naik, R. Miotto, G.N. Nadkarni, et al., Deep learning and the electrocardiogram: review of the current state—of—the—art, Europace 23 (8) (2021) 1179-1191.

[20]

M. Chourasia, A. Thakur, S. Gupta, A. Singh, ECG heartbeat classification using CNN, in: 2020 IEEE 7th Uttar Pradesh Section International Conference on Electrical, Electronics and Computer Engineering (UPCON), IEEE, 2020, pp. 1-6.

[21]

D. Zhang, S. Yang, X. Yuan, P. Zhang, Interpretable deep learning for automatic diagnosis of 12—lead electrocardiogram, iScience 24 (4) (2021) 102373.

[22]

Y. Huang, H. Li, X. Yu, A novel time representation input based on deep learning for ECG classification, Biomed. Signal Process. Control 83 (2023) 104628.

[23]

X. Peng, W. Shu, C. Pan, Z. Ke, H. Zhu, X. Zhou, W.W. Song, DSCSSA: a classification framework for spatiotemporal features extraction of arrhythmia based on the Seq2Seq model with attention mechanism, IEEE Trans. Instrum. Meas. 71 (2022) 1-12.

[24]

B. Wang, C. Liu, C. Hu, X. Liu, J. Cao, Arrhythmia classification with heartbeat—aware transformer, in: ICASSP 2021—2021 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), IEEE, 2021, pp. 1025-1029.

[25]

M.D. Le, V.S. Rathour, Q.S. Truong, Q. Mai, P. Brijesh, N. Le, Multi—module recurrent convolutional neural network with transformer encoder for ECG arrhythmia classification, in: 2021 IEEE EMBS International Conference on Biomedical and Health Informatics (BHI), IEEE, 2021, pp. 1-5.

[26]

J. Guan, W. Wang, P. Feng, X. Wang, W. Wang, Low—dimensional denoising embedding transformer for ECG classification, in: ICASSP 2021—2021 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), IEEE, 2021, pp. 1285-1289.

[27]

N. Shukla, A. Pandey, A.P. Shukla, S.C. Neupane, ECG—ViT: a transformer—based ECG classifier for energy—constraint wearable devices, J. Sens. 2022 (2022) 1-9.

[28]

W. Wu, Y. Huang, X. Wu, SRT: improved transformer—based model for classification of 2D heartbeat images, Biomed. Signal Process. Control 88 (2024) 105017.

[29]

S.M. Abubakar, W. Saadeh, M.A.B. Altaf, A wearable long—term single—lead ECG processor for early detection of cardiac arrhythmia, in: 2018 Design, Automation & Test in Europe Conference & Exhibition (DATE), IEEE, 2018, pp. 961-966.

[30]

H. Ozkan, O. Ozhan, Y. Karadana, M. Gulcu, S. Macit, F. Husain, A portable wearable tele—ECG monitoring system, IEEE Trans. Instrum. Meas. 69 (1) (2019) 173-182.

[31]

F. Jiang, Y. Li, C. Sun, C. Wang, Lightweight neural networks for automatic classification of ECG signals, in: 2022 14th International Conference on Wireless Communications and Signal Processing (WCSP), IEEE, 2022, pp. 527-532.

[32]

J. Xiao, J. Liu, H. Yang, Q. Liu, N. Wang, Z. Zhu, Y. Chen, Y. Long, L. Chang, L. Zhou, et al., ULECGNet: an ultra—lightweight end—to—end ECG classification neural network, IEEE J. Biomed. Health Inform. 26 (1) (2021) 206-217.

[33]

S. Ran, X. Yang, M. Liu, Y. Zhang, C. Cheng, H. Zhu, Y. Yuan, Homecare—oriented ECG diagnosis with large—scale deep neural network for continuous monitoring on embedded devices, IEEE Trans. Instrum. Meas. 71 (2022) 1-13.

[34]

K.H. Le, H.H. Pham, T.B. Nguyen, T.A. Nguyen, T.N. Thanh, C.D. Do, LightX3ECG: a lightweight and explainable deep learning system for 3—lead electrocardiogram classification, Biomed. Signal Process. Control 85 (2023) 104963.

[35]

V. López, A. Fernández, S. García, V. Palade, F. Herrera, An insight into classification with imbalanced data: empirical results and current trends on using data intrinsic characteristics, Inf. Sci. 250 (2013) 113-141.

[36]

H. Zhang, H. Zhang, S. Pirbhulal, W. Wu, V.H.C.D. Albuquerque, Active balancing mechanism for imbalanced medical data in deep learning—based classification models, ACM Trans. Multimed. Comput. Commun. Appl. 16 (1s) (2020) 1-15.

[37]

G. Sivapalan, K.K. Nundy, S. Dev, B. Cardiff, D. John, ANNet: a lightweight neural network for ECG anomaly detection in IoT edge sensors, IEEE Trans. Biomed. Circuits Syst. 16 (1) (2022) 24-35.

[38]

X. Xie, H. Liu, D. Chen, M. Shu, Y. Wang, Multilabel 12—lead ECG classification based on leadwise grouping multibranch network, IEEE Trans. Instrum. Meas. 71 (2022) 1-11.

[39]

G. Petmezas, K. Haris, L. Stefanopoulos, V. Kilintzis, A. Tzavelis, J.A. Rogers, A.K. Katsaggelos, N. Maglaveras, Automated atrial fibrillation detection using a hybrid CNN—LSTM network on imbalanced ECG datasets, Biomed. Signal Process. Control 63 (2021) 102194.

[40]

E. Adib, F. Afghah, J.J. Prevost, Arrhythmia classification using CGAN—augmented ECG signals, in: 2022 IEEE International Conference on Bioinformatics and Biomedicine (BIBM), IEEE, 2022, pp. 1865-1872.

[41]

Y. Xia, Y. Xu, P. Chen, J. Zhang, Y. Zhang, Generative adversarial network with transformer generator for boosting ECG classification, Biomed. Signal Process. Control 80 (2023) 104276.

[42]

F. Chollet, Xception: deep learning with depthwise separable convolutions, in: Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 2017, pp. 1251-1258.

[43]

A.G. Howard, M. Zhu, B. Chen, D. Kalenichenko, W. Wang, T. Weyand, M. Andreetto, H. Adam, Mobilenets: efficient convolutional neural networks for mobile vision applications, https://arxiv.org/abs/1704.04861, 2017.

[44]

M.A. Carreira—Perpinán, Y. Idelbayev, “Learning—compression” algorithms for neural net pruning, in: Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 2018, pp. 8532-8541.

[45]

A.L. Goldberger, L.A. Amaral, L. Glass, J.M. Hausdorff, P.C. Ivanov, R.G. Mark, J.E. Mietus, G.B. Moody, C.—K. Peng, H.E. Stanley, PhysioBank, PhysioToolkit, and PhysioNet: components of a new research resource for complex physiologic signals, Circulation 101 (23) (2000) e215-e220.

[46]

Testing and reporting performance results of cardiac rhythm and st segment measurement algorithms, https://array.aami.org/doi/abs/10.2345/9781570204784.ch1, 2013.

[47]

O. Singh, R.K. Sunkaria, ECG signal denoising via empirical wavelet transform, Australas. Phys. Eng. Sci. Med. 40 (2017) 219-229.

[48]

P.S. Addison, Wavelet transforms and the ECG: a review, Physiol. Meas. 26 (5) (2005) R155.

[49]

J. Zheng, J. Zhang, S. Danioko, H. Yao, H. Guo, C. Rakovski, A 12—lead electrocardiogram database for arrhythmia research covering more than 10,000 patients, Sci. Data 7 (1) (2020) 48.

[50]

Q. Hou, D. Zhou, J. Feng, Coordinate attention for efficient mobile network design, in: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, 2021, pp. 13713-13722.

PDF (2372KB)

2

Accesses

0

Citation

Detail

Sections
Recommended

/