南京大学学报(自然科学版) ›› 2021, Vol. 57 ›› Issue (2): 318–326.doi: 10.13232/j.cnki.jnju.2021.02.017

• • 上一篇    

心电图信号双任务学习的时空级联神经网络及心律失常分类模型

陶砚蕴1, 岳国旗1, 王凯欣1, 张宇祯2(), 蒋彬2, 黄杏梅2   

  1. 1.苏州大学轨道交通学院,苏州,215005
    2.苏州大学附属第一医院心内科,苏州,215005
  • 收稿日期:2020-10-19 出版日期:2021-03-23 发布日期:2021-03-23
  • 通讯作者: 张宇祯 E-mail:zhangyuzhen@suda.edu.cn
  • 作者简介:E⁃mail:zhangyuzhen@suda.edu.cn
  • 基金资助:
    国家自然科学基金(61872259);江门市博士后创新实践项目(JMBSH2020C05);中国博士后基金(2019M661935);姑苏卫生人才计划青年拔尖人才项目(GSWS2020015)

A spatial⁃temporal cascaded neural network with two⁃task learning based on ECG for arrhythmia classification

Yanyun Tao1, Guoqi Yue1, Kaixin Wang1, Yuzhen Zhang2(), Bin Jiang2, Xinmei Huang2   

  1. 1.Institute of Intelligence Structure and System,Soochow University,Suzhou,215005,China
    2.Department of Cardiology,The First Affiliated Hospital of Soochow University,Suzhou,215005,China
  • Received:2020-10-19 Online:2021-03-23 Published:2021-03-23
  • Contact: Yuzhen Zhang E-mail:zhangyuzhen@suda.edu.cn

摘要:

心律失常是常见的心血管疾病,目前临床软件对其识别的准确率不高,医师复核需要大量时间.针对以上问题,提出时空级联网络(CascadedNet)的心电图识别与心律失常分类模型.CascadedNet的双层级联结构提取心电图心搏形态特征并挖掘节律关联信息,实现异常心搏和异常节律的识别.引入端到端的心搏与节律识别双任务学习方法,使任务间共享特征表达式.CascadedNet在MIT?BIH心律失常数据集上的测试结果表明:CascadedNet比内部算法(支持向量机、朴素贝叶斯网络、梯度上升树和随机森林)的准确率高出19.7%以上;比长短时记忆网络和循环神经网络准确率高出5.23%;与单维卷积网络相比,CascadedNet的总体准确率相当,但召回率和精确度分别高出9.96%和7.94%,且网络复杂度比单维卷积网络更低,结构有更好的可解释性.

关键词: 心律失常, ECG信号, 级联网络, 卷积模块, 门控循环单元, 双任务学习

Abstract:

Arrhythmia is a serious cardiovascular disease. At present,the recognition accuracy of clinical software is not high,and doctors need a lot of time to review. In order to improve the accuracy of diagnosis and reduce the recheck time,this work designs a spatial?temporal cascaded neural network called CascadedNet to complete electrocardiogram (ECG) signal recognition and arrhythmia classification,and employs multitask learning to train arrhythmia classification model. The first level of CascadedNet includes a convolution module and a feature expression to extract the spatial features of heart beat,which can identify the arrhythmia of abnormal heart beat. The second level contains a gated recurrent unit and a hidden layer,which mines the temporal correlation of ECG long?term signal rhythm,and judges the arrhythmia of abnormal rhythm. The model was trained by the end?to?end multitask learning. The recognition tasks of heart beat and rhythm arrhythmia type shared common feature expression and promote each other. CascadedNet and comparison algorithms were tested on data set from MIT?BIH arrhythmia database. The samples were divided into heart beat samples (short?term data) and rhythm samples (long?term data). The total number of samples is 1083,training samples are 819 and test samples are 264. The results show that the accuracy of CascadedNet is more than 19.7% higher than that of internal algorithm (Support Vector Machine,Naive Bayesian Network,Gradient Boost Tree and Random forest),and 5.23% higher than that of Long Short?Term Memory Network (LSTM) and Recurrent Neural Network (RNN). Compared with 1?Demension Convolution Neural Network (1D?CNN),CascadedNet obtained the same overall accuracy,but a higher recall rate and accuracy,And the network complexity is much lower than that of 1D?CNN,and CascadedNet has a higher interpretability in processing ECG long and short term signals.

Key words: arrhythmia, ECG, cascaded neural network, convolution layer, gate recurrent unit, dual?task learning

中图分类号: 

  • TP183

图1

早搏(a)和房颤(b)的心电图波形片段"

图2

CascadedNet的卷积?门控循环单元神经网络结构"

表1

心搏和节律类型的样本数量"

心博类型训练测试节律类型训练测试
总数460134总数355130
N10430(N)8530
V8324(VT)3716
L5016(VFL)2911
R7018(SVTA)4617
A126(AFIB)6523
F145(B)167
/6215(VF)4516
S6520(BI)3210

表2

CascadedNet的结构参数"

序号结构函数
1Conv4×2ReLU,stride=2,size=2
2Conv8×2ReLU,stride=2,size=2
3Maxpooling-Poolsize=2,stride=2
4Flatten--
5Dense16Dropout=0.5
6Dense8Softmax
7GRU cell-input=100,k=10
8Hidden50tanh
9Dense8softmax

表3

算法在心律失常识别上的准确率、召回率和精确率"

方法采样数×通道类别类别准确率召回率精确率
RNN[25]-4类总体81.29%--
LSTM[25]-4类总体85.01%--
1D?CNN[20]360015类总体92.51%88.57%90.48%
RF

200×2 (心搏)

1000×2 (节律)

15类心搏64.5%97.6%67.5%
节律47.6%71.0%76.9%
SMOTE?FFT?RF心搏72.5%76.6%91.6%
节律57.6%64.0%76.6%
GBDT心搏74.6%74.1%71.1%
节律65.3%10.3%100%
NB心搏23.1%13.1%21.3%
节律23.6%13.8%44.8%
SVM心搏67.6%51.2%76.5%
节律47.5%77.8%58.5%
CascadedNet心搏87.1%96.4%96.7%
节律92.3%100%100%
总体89.7%98.3%98.2%

图3

CascadedNet与对比算法SMOTE?FFT?RF,GBDT,SVM的混淆矩阵(节律类型识别)"

1 Dawes T J W,de Marvao A,Shi W Z,et al. Machine learning of three?dimensional right ventricular motion enables outcome prediction in pulmonary hypertension:a cardiac MR imaging study. Radiology,2017,283(2):381-390.
2 刘军,李高平. 心电图计算机自动测量与人工测量的比较. 中华心血管病杂志,2001,29(11):691-692.
Liu J,Li G,Comparison of computerized automatic measurement and manual measurement of electrocardiogram. Chinese Journal of Cardiology,2001,29(11):691-692.
3 Acharya U R,Oh S L,Hagiwara Y,et al. A deep convolutional neural network model to classify heartbeats. Computers in Biology and Medicine,2017,89:389-396.
4 Sannino G,De Pietro G. A deep learning approach for ECG?based heartbeat classification for arrhythmia detection. Future Generation Computer Systems,2018,86:446-455.
5 Yao Q H,Wang R X,Fan X M,et al. Multi?class Arrhythmia detection from 12?lead varied?length ECG using Attention?based Time?Incremental Convolutional Neural Network. Information Fusion,2020,53:174-182.
6 da S Luz E J,Schwartz W R,Cámara?Chávez G,et al. ECG?based heartbeat classification for arrhythmia detection:a survey. Computer Methods and Programs in Biomedicine,2016,127:144-164.
7 Padmavathi K,Sri Ramakrishna K. Classification of ECG signal during atrial fibrillation using autoregressive modeling. Procedia Computer Science,2015,46:53-59.
8 Afkhami R G,Azarnia G,Tinati M A. Cardiac arrhythmia classification using statistical and mixture modeling features of ECG signals. Pattern Recognition Letters,2016,70:45-51.
9 Alajlan N,Bazi Y,Melgani F,et al. Detection of premature ventricular contraction arrhythmias in electrocardiogram signals with kernel methods. Signal Image & Video Processing,2014,8(5):931-942.
10 P?awiak P. Novel genetic ensembles of classifiers applied to myocardium dysfunction recognition based on ECG signals. Swarm and Evolutionary Computation,2018,39:192-208.
11 谢亮,汪晓东. 基于改进的快速独立分量分析与支持向量机的ECG分类诊断. 仪器仪表学报,2009,30(12):2599-2604.
Xie L,Wang X D. Diagnostic ECG classification based on improved fast independent component analysis and support vector machine. Chinese Journal of Scientific Instrument,2009,30(12):2599-2604.
12 唐孝,唐丽,莫智文. 基于支持向量机算法的ECG分类策略. 生物医学工程学杂志,2008,25(2):246-249.
Tang X,Tang L,Mo Z W. A strategy of ECG classification based on SVM. Journal of Biomedical Engineering,2008,25(2):246-249.
13 Prasad G K,Sahambi J S. Classification of ECG arrhythmias using multi?resolution analysis and neural networks∥Conference on Convergent Technologies for Asia?Pacific Region. Bangalore,India:IEEE,2003:227-231.
14 Güler ? ,übeyli E D. ECG beat classifier designed by combined neural network model. Pattern Recognition,2005,38(2):199-208.
15 Ceylan R,?zbay Y,Karlik B. A novel approach for classification of ECG arrhythmias:type?2 fuzzy clustering neural network. Expert Systems with Applications,2009,36(3):6721-6726.
16 Rojo?álvarez J L,Camps?Valls G,Caama?o?Fernández A J,et al. A review of kernel methods in ECG signal classification∥Gacek A,Pedrycz W. ECG Signal Processing,Classification and Interpretation. London:Springer?Verlag,2012:195-217.
17 Jiang W,Kong S G. Block?based neural networks for personalized ECG signal classification. IEEE Transactions on Neural Networks,2007,18(6):1750-1761.
18 周群一,吕旭东,段会龙. ECG心搏模式识别. 生物医学工程学杂志,2005,22(1):202-206.
Zhou Q Y,Lv X D,Duan H L. Electrocardiograph beat pattern recognition. Journal of Biomedical Engineering,2005,22(1):202-206.
19 Yildirim ?. A novel wavelet sequence based on deep bidirectional LSTM network model for ECG signal classification. Computers in Biology and Medicine,2018,96:189-202.
20 Yildirim ? ,P?awiak P,Tan R S,et al. Arrhythmia detection using deep convolutional neural network with long duration ECG signals. Computers in Biology and Medicine,2018,102:411-420.
21 Yang J L,Bai Y,Lin F,et al. A novel electrocardiogram arrhythmia classification method based on stacked sparse auto?encoders and softmax regression. International Journal of Machine Learning and Cybernetics,2018,9(10):1733-1740.
22 瞿文凤. 基于深度置信网络的心电信号分类研究. 现代计算机,2019(25):32-35.
Qu W F. Classification of ECG signals based on deep belief network. Modern Computer,2019(25):32-35.
23 王自强,刘洪运,石金龙等. 基于卷积神经网络的心电图心博识别. 中国医学物理学杂志,2019,36(8):938-944.
Wang Z Q,Liu H Y,Shi J L,et al. ECG heartbeat recognition based on convolution neural network. Chinese Journal of Medical Physics,2019,36(8):938-944.
24 Zhai X L,Tin C. Automated ECG classification using dual heartbeat coupling based on convolutional neural network. IEEE Access,2018,6:27465-27472.
25 Ji J L,Chen X H,Luo C Q,et al. A deep multi?task learning approach for ECG data analysis∥2018 IEEE EMBS International Conference on Biomedical & Health Informatics (BHI). Las Vegas,NV,USA:IEEE,2018:124-127.
[1] 张萌, 韩冰, 王哲, 尤富生, 李浩然. 基于深度主动学习的甲状腺癌病理图像分类方法[J]. 南京大学学报(自然科学版), 2021, 57(1): 21-28.
[2] 顾健伟, 曾 诚, 邹恩岑, 陈 扬, 沈 艺, 陆 悠, 奚雪峰. 基于双向注意力流和自注意力结合的机器阅读理解[J]. 南京大学学报(自然科学版), 2019, 55(1): 125-132.
[3] 安 晶, 艾 萍, 徐 森, 刘 聪, 夏建生, 刘大琨. 一种基于一维卷积神经网络的旋转机械智能故障诊断方法[J]. 南京大学学报(自然科学版), 2019, 55(1): 133-142.
Viewed
Full text


Abstract

Cited

  Shared   
  Discussed   
No Suggested Reading articles found!