Please wait a minute...
Journal of ZheJiang University (Engineering Science)  2020, Vol. 54 Issue (5): 1039-1048    DOI: 10.3785/j.issn.1008-973X.2020.05.023
Computer Technology     
Prediction model of paroxysmal atrial fibrillation based on pattern recognition and ensemble CNN-LSTM
Ping YANG(),Dan WANG*(),Zi-jian KAGN,Tong LI,Li-hua FU,Yue-ren YU
Faculty of Information Technology, Beijing University of Technology, Beijing 100124, China
Download: HTML     PDF(1051KB) HTML
Export: BibTeX | EndNote (RIS)      

Abstract  

The real-time prediction model that can predict the onset of paroxysmal atrial fibrillation (PAF) 45 min in advance on the one minute electrocardiogram (ECG) segment with 8 Hz sampling frequency was proposed, for real-time and data-intensive application scenarios such as long-term ECG monitoring and intensive care units (ICU). The probabilistic symbolic pattern recognition method was used to extract the pattern transition features within one minute window of down sampled ECG sequence, reducing the calculation complexity of the model and the demand for storage space, so as to ensure the effect of real-time prediction. A hybrid model (CNN-LSTM) of the convolutional neural network (CNN) and the long short-term memory (LSTM) was proposed to extract local spatial features and time-dependent features implied in pattern transition features. An ensemble classifier based on CNN-LSTM was constructed to improve the generalization ability of the model. Spark Streaming technology was used to read, write and calculate ECG streaming data, and low latency communication between data and model was realized. The accuracy, sensitivity, and specificity of the proposed model were 91.26%, 82.21%, and 95.79% respectively. The average delay of model processing was 2 s, which can meet the real-time PAF prediction demand.



Key wordsparoxysmal atrial fibrillation (PAF)      electrocardiogram (ECG)      prediction      probabilistic symbolic pattern recognition      convolutional neural network (CNN)      long short-term memory (LSTM)      Spark Streaming     
Received: 27 November 2019      Published: 05 May 2020
CLC:  TP 183  
Corresponding Authors: Dan WANG     E-mail: yangping_sx@163.com;neuwd@sina.com.cn
Cite this article:

Ping YANG,Dan WANG,Zi-jian KAGN,Tong LI,Li-hua FU,Yue-ren YU. Prediction model of paroxysmal atrial fibrillation based on pattern recognition and ensemble CNN-LSTM. Journal of ZheJiang University (Engineering Science), 2020, 54(5): 1039-1048.

URL:

http://www.zjujournals.com/eng/10.3785/j.issn.1008-973X.2020.05.023     OR     http://www.zjujournals.com/eng/Y2020/V54/I5/1039


基于模式识别和集成CNN-LSTM的阵发性房颤预测模型

为了适用于长期心电监护和ICU等实时性、数据密集型应用场合,提出可在8 Hz采样频率的1 min心电图(ECG)片段上提前45 min预测阵发性房颤(PAF)发作的实时预测模型. 采用概率符号化模式识别方法,在降采样后的ECG序列上提取出1 min窗口内的模式转移特征,降低模型的计算量和对存储空间的需求,确保实时预测的效果. 提出卷积神经网络(CNN)和长短-期记忆网络(LSTM)的混合模型(CNN-LSTM),用于提取模式转移特征内隐含的局部空间特征和时间依赖特征. 为了提升模型泛化能力,构建基于CNN-LSTM的集成分类器. 采用Spark Streaming技术完成对ECG流式数据的读、写和计算,实现数据和模型之间的低延迟通信. 所提模型在公开数据集上的准确率、灵敏度和特异度分别为91.26%、82.21%、95.79%. 模型处理总延迟平均为2 s,满足实时PAF预测需求.


关键词: 阵发性房颤,  心电图(ECG),  预测,  概率符号化模式识别,  卷积神经网络(CNN),  长短-期记忆网络(LSTM),  Spark Streaming 
模式 PTF2 PTP2
a b c 总计 a b c
aa 0.0 0.0 0.0 0.0 0.0 0.0 0.0
ab 0.0 0.0 1.0 1.0 0.0 0.0 1.0
ac 0.0 1.0 1.0 2.0 0.0 0.5 0.5
ba 0.0 0.0 2.0 2.0 0.0 0.0 1.0
bb 0.0 0.0 0.0 0.0 0.0 0.0 0.0
bc 0.0 0.0 1.0 1.0 0.0 0.0 1.0
ca 0.0 0.0 0.0 0.0 0.0 0.0 0.0
cb 2.0 0.0 0.0 2.0 1.0 0.0 0.0
cc 0.0 1.0 0.0 1.0 0.0 1.0 0.0
Tab.1 Pattern transition frequencies and probabilities with pattern matching length of sequence of 2
Fig.1 One minute segment of raw and symbolized ECG signal
Fig.2 Overall framework of PAF prediction model
p n t DIp
1 4.90 5 0.980 0
2 18.90 25 0.750 0
3 51.30 125 0.410 0
4 98.69 625 0.160 0
5 171.25 3 125 0.050 0
6 270.31 15 625 0.020 0
7 398.43 78 125 0.010 0
8 546.88 390 625 0.001 0
9 585.94 1 953 125 0.000 3
10 828.13 9 765 625 <0.000 1
Tab.2 Density index values corresponding to different symbol matching lengths
Fig.3 Model structure of CNN-LSTM hybrid network
Fig.4 Overall structure of ensemble prediction model based on CNN-LSTM
Fig.5 Schematic diagram of data flow processing
Fig.6 Relationship between data types in dataset adopted[24]
模型 ACC/% SEN/% SPE/%
1D-CNN 53 68 53
LSTM 66 0 100
1D-CNN-LSTM 61 72 56
本研究方法 91 82 96
Tab.3 Comparison between prediction results of proposed method and baseline models
文献 特征提取方法 t/min f/Hz ACC/% SEN/% SPE/%
Boon等[4] HRV特征,GA 15 128 79.3 77.4 81.1
10 128 68.8 58.5 81.1
Narin等[5] HRV线性和非线性特征组合,GA 5 128 90.0 92.0 88.0
Sutton等[24] PSPR,模板匹配 1 8 82.1 100.0 73.6
Boon等[26] HRV特征,GAⅢ 5 128 87.7 86.8 88.7
Costin等[27] HRV特征, QRS复合波形态变异性 30 128 89.4 89.3 89.4
本研究方法 PSPR+CNN-LSTM+集成学习 1 8 91.3 82.2 95.8
Tab.4 Comparison between proposed model and related studies under random partition mode of training and testing sets
文献 训练集 测试集 ACC/% SEN/% SPE/%
Thong等[28] ? ? 76.0 68.0 86.0
Zong等[29] ? ? 80.0 ? ?
本研究方法 P06~P25,n11~n50 P01~p05,n01~n10 86.9 82.4 90.0
P01~P05,P11~P25,n01~n10,n21~n50 P06~P10,n11~n20 70.6 60.0 73.1
P01~p10,p16~p25,n01~n20,n31~n50 P11~p15,n31~n30 77.9 76.9 78.2
P01~p15,P21~p25,n01~n30,n41~n50 P16~p20,n31~n40 89.9 89.7 89.9
P01~p20,n01~n40 P21~p25,n41~n50 78.5 67.2 83.1
平均值 80.6 75.7 82.7
Tab.5 Experimental results of models under inter-patient paradigm
基学习器 p DIp ACC / %
1 1 0.98 84.09
2 2 0.76 89.33
3 3 0.41 89.52
4 4 0.16 75.64
Tab.6 Experimental results comparison of base learners
f / Hz ACC / % SEN / % SPE / %
128 79.1 69.3 83.7
64 80.2 70.7 84.8
32 78.5 68.6 83.9
16 75.3 69.5 78.1
8 80.6 75.7 82.7
Tab.7 Experimental results of proposed method on ECG signals with different sampling frequencies
[1]   BALL J, CARRINGTON M J, MCMURRAY J J V, et al Atrial fibrillation: profile and burden of an evolving epidemic in the 21st century[J]. International Journal of Cardiology, 2013, 167 (5): 1807- 1824
doi: 10.1016/j.ijcard.2012.12.093
[2]   黄从新, 张澍, 黄德嘉, 等 心房颤动: 目前的认识和治疗的建议-2018[J]. 中国心脏起搏与心电生理杂志, 2018, 32 (4): 6- 59
HUANG Cong-xin, ZHANG Shu, HUANG De-jia, et al Atrial fibrillation: current understanding and treatment recommendations - 2018[J]. Chinese Journal of Cardiac Pacing and Electrophysiology, 2018, 32 (4): 6- 59
[3]   黄忠朝, 陈真诚, 赵于前. 基于支持向量机的阵发性房颤自动终止预测研究[C]// 2007中国生物医学工程联合学术年会论文集(上册). 西安: 中国知网. 2007: 180-184.
HUANG Zhong-chao, CEHN Zhen-cheng, ZHAO Yu-qian. Research on automatic termination of paroxysmal atrial fibrillation based on support vector machine [C]// Proceedings of the 2007 China Biomedical Engineering Joint Academic Conference: Volume 1. Xi’an: CNKI, 2007: 180-184.
[4]   BOON K H, KHALIL-HANI M, MALARVILI M B, et al Paroxysmal atrial fibrillation prediction method with shorter HRV sequences[J]. Computer Methods and Programs in Biomedicine, 2016, 134: 187- 196
doi: 10.1016/j.cmpb.2016.07.016
[5]   NARIN A, ISLER Y, OZER M, et al Early prediction of paroxysmal atrial fibrillation based on short-term heart rate variability[J]. Physica A: Statistical Mechanics and Its Applications, 2018, 509: 56- 65
doi: 10.1016/j.physa.2018.06.022
[6]   LAKE D E, MOORMAN J R Accurate estimation of entropy in very short physiological time series: the problem of atrial fibrillation detection in implanted ventricular devices[J]. American Journal of Physiology-Heart and Circulatory Physiology, 2010, 300 (1): 319- 325
[7]   DEMAZUMDER D, LAKE D E, CHENG A, et al Dynamic analysis of cardiac rhythms for discriminating atrial fibrillation from lethal ventricular arrhythmias[J]. Circulation: Arrhythmia and Electrophysiology, 2013, 6 (3): 555- 561
doi: 10.1161/CIRCEP.113.000034
[8]   PANUSITTIKORN M, UCHAIPICHAT N, TANTIBUNDHIT C et al. Prediction of paroxysmal atrial fibrillation occurrence with wavelet-based markers [C]// ECTI-CON2010: The 2010 ECTI International Confernce on Electrical Engineering/Electronics, Computer, Telecommunications and Information Technology. Chiang Mai: IEEE, 2010: 342-345.
[9]   POURBABAEE B, LUCAS C. Automatic detection and prediction of paroxysmal atrial fibrillation based on analyzing ecg signal feature classification methods [C]// 2008 Cairo International Biomedical Engineering Conference. Cairo: IEEE, 2008: 1-4.
[10]   兰天杰, 杨翠微 基于RR间期的阵发性房颤复发预测[J]. 生物医学工程学杂志, 2019, 36 (4): 1- 10
LAN Tian-jie, YANG Cui-wei Prediction of recurrence of paroxysmal atrial fibrillation based on RR interval[J]. Journal of Biomedical Engineering, 2019, 36 (4): 1- 10
[11]   PARVANEH S, RUBIN J, RAHMAN A, et al Analyzing single-lead short ECG recordings using dense convolutional neural networks and feature-based post-processing to detect atrial fibrillation[J]. Physiological Measurement, 2018, 39 (8): 084003
doi: 10.1088/1361-6579/aad5bd
[12]   ERDENEBAYAR U, KIM H, PARK J U, et al Automatic prediction of atrial fibrillation based on convolutional neural network using a short-term normal electrocardiogram signal[J]. Journal of Korean Medical Science, 2019, 34 (7): e64
doi: 10.3346/jkms.2019.34.e64
[13]   MOODY G, GOLDBERGER A, MCCLENNEN S, et al. Predicting the onset of paroxysmal atrial fibrillation: the computers in cardiology challenge 2001 [C]// Computers in Cardiology 2001. Rotterdam: IEEE, 2001: 113-116.
[14]   GOLDBERGER A L, AMARAL L A, Glass L, et al PhysioBank, PhysioToolkit, and PhysioNet: components of a new research resource for complex physiologic signals[J]. Circulation, 2000, 101 (23): 215- 220
[15]   MOODY G B, MARK R G A new method for detecting atrial fibrillation using R-R intervals[J]. Computers in Cardiology, 1983, 10: 227- 230
[16]   FAUST O, SHENFIELD A, KAREEM M, et al Automated detection of atrial fibrillation using long short-term memory network with RR interval signals[J]. Computers in Biology and Medicine, 2018, 102: 327- 335
doi: 10.1016/j.compbiomed.2018.07.001
[17]   KAMALESWARAN R, MAHAJAN R, AKBILGIC O A robust deep convolutional neural network for the classification of abnormal cardiac rhythm using single lead electrocardiograms of variable length[J]. Physiological Measurement, 2018, 39 (3): 035006
doi: 10.1088/1361-6579/aaaa9d
[18]   RAJPURKAR P, HANNUN A Y, HAGHPANAHI M, et al. Cardiologist-level arrhythmia detection with convolutional neural networks [J/OL]. 2017. [2020-03-13]. https://arxiv.org/pdf/1707.01836.pdf.
[19]   SCHWAB P, SCEBBA G C, ZHANG J, et al. Beat by beat: classifying cardiac arrhythmias with recurrent neural networks [C]// Computing in Cardiology. Rennes: IEEE, 2017: 1-4.
[20]   SHASHIKUMAR S P, CLIFFORD G D, SHAH S J, et al. Detection of paroxysmal atrial fibrillation using attention-based bidirectional recurrent neural networks [C]// Proceedings of the 24th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining. London: ACM, 2018: 715-723.
[21]   张异凡, 黄亦翔, 汪开正, 等 用于心律失常识别的LSTM和CNN并行组合模型[J]. 哈尔滨工业大学学报, 2019, 51 (10): 76- 82
ZHANG Yi-fan, HUANG Yi-xiang, WANG Kai-zheng, et al Arrhythmia classification using parallel combination of LSTM and CNN[J]. Journal of Harbin Institute of Technology, 2019, 51 (10): 76- 82
doi: 10.11918/j.issn.0367-6234.201810178
[22]   MAHAJAN R, KAMALESWARAN R, AKBILGIC O, et al. Effects of varying sampling frequency on the analysis of continuous ECG data streams [C]// VLDB Workshop on Data Management and Analytics for Medicine and Healthcare. Cham: Springer, 2017: 73-87.
[23]   AKBILGIC O, HOWE J A Symbolic pattern recognition for sequential data[J]. Sequential Analysis, 2017, 36 (4): 528- 540
doi: 10.1080/07474946.2017.1394719
[24]   SUTTON J R, MAHAJAN R, AKBILGIC O, et al PhysOnline: an open source machinelearning pipeline for real-time analysis of streaming physiological waveform[J]. IEEE Journal of Biomedical and Health Informatics, 2018, 23 (1): 59- 65
[25]   OH S L, NG E Y K, SAN TAN R, et al Automated diagnosis of arrhythmia using combination of CNN and LSTM techniques with variable length heart beats[J]. Computers in Biology and Medicine, 2018, 102: 278- 287
doi: 10.1016/j.compbiomed.2018.06.002
[26]   BOON K H, KHALIL-HANI M, MALARVILI M B Paroxysmal atrial fibrillation prediction based on HRV analysis and non-dominated sorting genetic algorithm III[J]. Computer Methods and Programs in Biomedicine, 2018, 153: 171- 184
doi: 10.1016/j.cmpb.2017.10.012
[27]   COSTIN H, ROTARIU C, P?S?RIC? A. Atrial fibrillation onset prediction using variability of ECG signals [C]// 2013 8th International Symposium on Advanced Topics in Electrical Engineering. Bucharest: IEEE, 2013: 1-4.
[28]   THONG T, MCNAMES J, ABOY M, et al. Paroxysmal atrial fibrillation prediction using isolated premature atrial events and paroxysmal atrial tachycardia [C]// Proceedings of the 25th Annual International Conference of the IEEE Engineering in Medicine and Biology Society. Cancun: IEEE, 2003, 1: 163-166.
[1] Jia-hui XU,Jing-chang WANG,Ling CHEN,Yong WU. Surface water quality prediction model based on graph neural network[J]. Journal of ZheJiang University (Engineering Science), 2021, 55(4): 601-607.
[2] Yong YU,Jing-yuan XUE,Sheng DAI,Qiang-wei BAO,Gang ZHAO. Quality prediction and process parameter optimization method for machining parts[J]. Journal of ZheJiang University (Engineering Science), 2021, 55(3): 441-447.
[3] Yi-zhe MAO,Guo-fang GONG,Xing-hai ZHOU,Fei WANG. Identification of TBM surrounding rock based on Markov process and deep neural network[J]. Journal of ZheJiang University (Engineering Science), 2021, 55(3): 448-454.
[4] Fa-ming HUANG,Zhong-shan CAO,Chi YAO,Qing-hui JIANG,Jia-wu CHEN. Landslides hazard warning based on decision tree and effective rainfall intensity[J]. Journal of ZheJiang University (Engineering Science), 2021, 55(3): 472-482.
[5] Fa-sheng MIAO,Yi-ping WU,Lin-wei LI,Kang LIAO,Yang XUE. Prediction of joint roughness coefficient of rock mass based on Boosting-decision tree C5.0[J]. Journal of ZheJiang University (Engineering Science), 2021, 55(3): 483-490.
[6] You-kang DUAN,Xiao-gang CHEN,Jian GUI,Bin MA,Shun-fen LI,Zhi-tang SONG. Continuous kinematics prediction of lower limbs based on phase division[J]. Journal of ZheJiang University (Engineering Science), 2021, 55(1): 89-95.
[7] Wei-qi CHEN,Jing-chang WANG,Ling CHEN,Yong-qin YANG,Yong WU. Prediction model of multi-factor aware mobile terminal replacement based on deep neural network[J]. Journal of ZheJiang University (Engineering Science), 2021, 55(1): 109-115.
[8] Qiao-hong CHEN,YI CHEN,Wen-shu Li,Yu-bo JIA. Clothing image classification based on multi-scale SE-Xception[J]. Journal of ZheJiang University (Engineering Science), 2020, 54(9): 1727-1735.
[9] Wen-shu LI,Tao-tao ZOU,Hong-yan WANG,Hai HUANG. Traffic accident quantity prediction model based on dual-scale long short-term memory network[J]. Journal of ZheJiang University (Engineering Science), 2020, 54(8): 1613-1619.
[10] Dong-dong JIANG,Dao-fei LI,Xiao-li YU. Model predictive control energy management based ondriver demand torque prediction[J]. Journal of ZheJiang University (Engineering Science), 2020, 54(7): 1325-1334.
[11] Chen-lin WANG,Jie YANG,Wen-jun JU,Fu GU,Ji-xi CHEN,Yang-jian JI. Short term load forecasting and peak shaving optimization based on intelligent home appliance[J]. Journal of ZheJiang University (Engineering Science), 2020, 54(7): 1418-1424.
[12] Xu YAN,Xiao-liang FAN,Chuan-pan ZHENG,Yu ZANG,Cheng WANG,Ming CHENG,Long-biao CHEN. Urban traffic flow prediction algorithm based on graph convolutional neural networks[J]. Journal of ZheJiang University (Engineering Science), 2020, 54(6): 1147-1155.
[13] Chuang LIU,Jun LIANG. Vehicle motion trajectory prediction based on attention mechanism[J]. Journal of ZheJiang University (Engineering Science), 2020, 54(6): 1156-1163.
[14] Fei WANG,Guo-fang GONG,Li-wen DUAN,Yong-feng QIN. XGBoost based intelligent determination system design of tunnel boring machine operation parameters[J]. Journal of ZheJiang University (Engineering Science), 2020, 54(4): 633-641.
[15] Ya-jing WANG,Qun WANG,Bo-wen LI,Zhi-wen LIU,Yuan-yuan PIAO,Tao YU. Seizure prediction based on pre-ictal period selection of EEG signal[J]. Journal of ZheJiang University (Engineering Science), 2020, 54(11): 2258-2265.