林美娜 鄭和裕
開(kāi)發(fā)設(shè)計(jì)
基于CNN與堆疊LightGBM的多模態(tài)OSA檢測(cè)方法
林美娜 鄭和裕
(廣東工業(yè)大學(xué),廣東 廣州 510006)
提出一種基于血氧飽和度和心電圖信號(hào)的多模態(tài)阻塞性睡眠呼吸暫停(OSA)檢測(cè)方法。首先,提取血氧飽和度和心電圖信號(hào)的經(jīng)驗(yàn)特征,并利用皮爾遜相關(guān)系數(shù)獲得最優(yōu)特征集;然后,利用卷積網(wǎng)絡(luò)(CNN)生成深層特征以挖掘不同模態(tài)間的潛在相關(guān)性;最后,構(gòu)建堆疊的輕量級(jí)梯度提升機(jī)(LightGBM),以提高分類器檢測(cè)精度。在公開(kāi)數(shù)據(jù)集Apnea-ECG上進(jìn)行四折交叉驗(yàn)證,平均準(zhǔn)確性、敏感性和特異性分別為96.04%、96.44%和96.22%,相較于決策層融合有較高的分類性能。
阻塞性睡眠呼吸暫停;卷積網(wǎng)絡(luò);輕量級(jí)梯度提升機(jī);血氧;心電圖
阻塞性睡眠呼吸暫停(obstructive sleep apnea, OSA)是一種常見(jiàn)的睡眠障礙[1],在睡眠時(shí)呼吸氣流減少甚至停止數(shù)秒[2]。根據(jù)2019年柳葉刀呼吸醫(yī)學(xué)雜志報(bào)導(dǎo),全球30~69歲的人群中約有9.36億人患有OSA[3]。因此,及時(shí)診斷和治療OSA是必要的。目前,常用血氧飽和度(oxygen saturation, SpO2)和心電圖(electrocardiogram, ECG)表征OSA[4],但SpO2下降存在延遲[5],而ECG反應(yīng)迅速[6]。采用組合的SpO2和ECG有助于提高OSA的檢測(cè)質(zhì)量[7]。
近年來(lái),許多專家學(xué)者提出基于SpO2和ECG信號(hào)特征組合的OSA檢測(cè)方法。如,LI等[7]和PUNJABI等[8]提取SpO2和ECG信號(hào)的8個(gè)經(jīng)驗(yàn)特征,并使用人工神經(jīng)網(wǎng)絡(luò)(artificial neural network, ANN)進(jìn)行OSA檢測(cè)。雖然考慮了不同信號(hào)的潛在相關(guān)性,但未進(jìn)行特征選擇,可能存在冗余特性;此外,數(shù)據(jù)集易受特征分布變化的影響,采用跨被試可減小此影響。
深度學(xué)習(xí)可得到更優(yōu)的深層特征而被廣泛應(yīng)用于OSA檢測(cè)。經(jīng)MOSTAFA等[9]調(diào)查,近十年采用深度學(xué)習(xí)檢測(cè)OSA的論文約有255篇。ERDENE-BAYAR等[10]分別使用一維和二維卷積網(wǎng)絡(luò)對(duì)ECG進(jìn)行OSA檢測(cè)。VILLAR[11]評(píng)估深度學(xué)習(xí)的有用性以提高SpO2在OSA的自動(dòng)檢測(cè)能力。上述方法雖然可以實(shí)現(xiàn)OSA檢測(cè),但未考慮不同生理信號(hào)間的潛在相關(guān)性,檢測(cè)精度受限。
特征生成在提高模型性能上可發(fā)揮重要作用[12]。BASTANI等[13]指出基于深度學(xué)習(xí)和樹(shù)的方法可以提高特征的表征能力。HE等[14]指出輕量級(jí)梯度提升機(jī)(light gradient boosting machine, LightGBM)可以學(xué)習(xí)新的特征交互,增強(qiáng)特征表示,可利用其提取經(jīng)驗(yàn)特征和深度學(xué)習(xí)生成的特征中更深層次的判別信息。
本文提出的CNN和堆疊LightGBM網(wǎng)絡(luò)結(jié)構(gòu)流程及具體參數(shù)如圖1所示。其中,LightGBM葉子數(shù)為8,樹(shù)深為?1,估計(jì)器數(shù)量為50。對(duì)SpO2和ECG信號(hào)的原始數(shù)據(jù)預(yù)處理后提取經(jīng)驗(yàn)特征,拼接后長(zhǎng)度為133;將預(yù)處理后長(zhǎng)度均為6000的片段輸入CNN網(wǎng)絡(luò),提取每層卷積特征,與經(jīng)驗(yàn)特征拼接輸入Light-GBM;將融合結(jié)果與下層卷積特征及經(jīng)驗(yàn)特征拼接,輸入LightGBM,以此堆疊進(jìn)行OSA檢測(cè)。
圖1 CNN和堆疊LightGBM的網(wǎng)絡(luò)結(jié)構(gòu)流程圖
本文使用Physionet[16]網(wǎng)站的公開(kāi)數(shù)據(jù)集呼吸暫停-心電圖數(shù)據(jù)庫(kù)(apnea-ecg database, AED)[17],70條記錄中8條包含SpO2和ECG,均來(lái)自不同的被試者,采樣頻率均為100 Hz,錄制時(shí)間為401 ~578 min不等,注釋“N”和“A”分別代表正常和OSA[17-18]。
數(shù)據(jù)預(yù)處理:去除8條包含SpO2和ECG記錄前后各30 s的異常信號(hào),此時(shí)的原始標(biāo)簽相對(duì)原本標(biāo)簽位置向后推30 s;將數(shù)據(jù)切為不重疊的1 min片段,標(biāo)注為A或N;對(duì)低于50%的SpO2進(jìn)行線性插值以消除零電平偽影[11];采用卷積移動(dòng)平均濾波器對(duì)ECG濾波,利用Christov方法[18]提取QRS波群,通過(guò)Hamilton方法[19]進(jìn)行校驗(yàn),計(jì)算兩個(gè)R波的間隔并提取心率信號(hào)。
根據(jù)被試者不同,將8條記錄劃分為四折交叉驗(yàn)證,如表1所示。
表1 四折交叉驗(yàn)證的數(shù)據(jù)劃分
2.3.1 ECG特征提取及特征選擇
為去除異常心率并濾除高頻噪聲,每隔2.4 s進(jìn)行線性插值,使用周期圖法[20]估計(jì)5min的心率信號(hào)的功率譜密度(power spectral density, PSD)和樣本頻率。設(shè)置閾值范圍為0.005~0.03,間隔為0.002 5,提取5 min的PSD和樣本頻率特征。利用LightGBM進(jìn)行四折交叉驗(yàn)證,不同閾值得到不同的受試者操作特征(receiver operating characteristic, ROC)曲線的面積曲線(area under the curve, AUC)和F1分?jǐn)?shù)(F1-score),如圖2所示。
圖2 LightGBM對(duì)心率頻率特征閾值范圍實(shí)驗(yàn)結(jié)果
由圖2可以看出,LightGBM對(duì)心率特征的最佳閾值范圍在0.012 5~0.02之間。選擇閾值為0.015,其平均ROC曲線如圖3所示,AUC為94%,標(biāo)準(zhǔn)偏差為4%。
圖3 閾值0.015對(duì)應(yīng)的平均ROC曲線
表2 提取ECG的相關(guān)特征
2.3.2 SpO2特征提取
把SpO2片段的采樣頻率從100 Hz降低為1 Hz,提取一、二階差分[24],得到向量長(zhǎng)度為127。
一階差分的表達(dá)式為
二階差分的表達(dá)式為
式中:
實(shí)驗(yàn)采用深度學(xué)習(xí)框架Keras,服務(wù)器CPU Intel(R)Core(TM)i5-6300HQ CPU @ 2.60 GHz,內(nèi)存12 GB。
使用準(zhǔn)確性(accuracy, Acc)、敏感性(sensitivity, Se)、特異性(specificity, Sp)、平衡錯(cuò)誤率(balance error rate, Ber)和AUC作為評(píng)估指標(biāo)。
式中:
為驗(yàn)證本文模型能夠挖掘不同信號(hào)間潛在相關(guān)信息,本文做4組實(shí)驗(yàn):1)基于ECG的3層CNN網(wǎng)絡(luò)模型,利用AED剩下的70 ? 8 = 62條ECG記錄訓(xùn)練CNN網(wǎng)絡(luò)模型,再將本文劃分的數(shù)據(jù)作為該模型輸入;2)基于SpO2的3層CNN網(wǎng)絡(luò)模型,即未加入堆疊LightGBM結(jié)構(gòu)前的神經(jīng)網(wǎng)絡(luò)模型;3)基于SpO2和ECG的決策層融合(decision-level fusion, DLF);4)本文基于SpO2和ECG的CNN及堆疊LightGBM的網(wǎng)絡(luò)模型。每組實(shí)驗(yàn)結(jié)果均為四折交叉驗(yàn)證的平均結(jié)果,前三組實(shí)驗(yàn)作為基線,如表3所示。
由表3可以看出:本文模型實(shí)驗(yàn)結(jié)果優(yōu)于單獨(dú)使用SpO2、ECG;與DLF模型相比,和分別提高了1.86%、1.15%,降低了1.15%;表明本文模型可以學(xué)習(xí)不同模態(tài)間潛在的相關(guān)信息,且效果優(yōu)于決策層融合。
表3 不同網(wǎng)絡(luò)模型的OSA檢測(cè)性能對(duì)比
文獻(xiàn)[25-26]使用AED數(shù)據(jù)的OSA檢測(cè)性能對(duì)比如表4所示。
表4 不同文獻(xiàn)的OSA檢測(cè)性能對(duì)比
由表4可知:SHI等[25]利用支持向量機(jī)(support vector machine, SVM)對(duì)13個(gè)最優(yōu)特征進(jìn)行十折交叉驗(yàn)證;MEMIS等[26]利用SVM和級(jí)聯(lián)方法保留用SpO2和ECG信號(hào)傳達(dá)的時(shí)間信息,但實(shí)驗(yàn)結(jié)果均低于本文模型;說(shuō)明與傳統(tǒng)機(jī)器學(xué)習(xí)相比,本文模型更能學(xué)習(xí)不同模態(tài)間潛在的相關(guān)特征信息。
為更好地挖掘和利用不同模態(tài)間的潛在相關(guān)性,本文提出一種基于CNN和堆疊LightGBM的多模態(tài)OSA檢測(cè)方法。首先,對(duì)數(shù)據(jù)集進(jìn)行跨被試劃分;然后,提取SpO2和ECG經(jīng)驗(yàn)特征集,并保留皮爾遜相關(guān)系數(shù)小于0.75的最優(yōu)特征集;最后,使用CNN生成更深層的特征,結(jié)合最優(yōu)特征集作為L(zhǎng)ightGBM分類器的輸入,使用堆疊方法實(shí)現(xiàn)OSA檢測(cè)。本文模型在公開(kāi)數(shù)據(jù)集AED上的實(shí)驗(yàn)結(jié)果與決策層融合的模型相比,逐層特征融合效果優(yōu)于決策層融合效果;與使用單獨(dú)信號(hào)的結(jié)果相比均有提高,表明本文模型可有效挖掘SpO2和ECG間潛在的相關(guān)信息。因此,本文方法能夠在跨被試數(shù)據(jù)集中實(shí)現(xiàn)較高的OSA檢測(cè)性能。
[1] SATEIA MJ. International classification of sleep disorders-third edition: highlights and modifications[J]. Chest, 2014,146(5): 1387-1394.
[2] MOSTAFA S S, MENDONCA F, RAVELO-GARCIA A G, et al. Multi-objective hyperparameter optimization of convolu-tional neural network for obstructive sleep apnea detection[J]. IEEE Access, 2020,8:129586-129599.
[3] ADAM V Benjafield, NAJIB T Ayas, Peter R Eastwood, et al. Estimation of the global prevalence and burden of obstructive sleep apnoea: a literature-based analysis[J]. The Lancet Respi-ratory Medicine, 2019,7(8):687-698.
[4] American Academy of Sleep Medicine Task Force. Sleep related breathing disorders in adults: Recommendations for syndrome definition and measurement techniques in clinical research[J]. Sleep, 1999 22(5):667-689.
[5] DEVIAENE M, TESTELMANS D, BUYSE B, et al. Automatic screening of sleep apnea patients based on the SpO2signal[J]. IEEE Journal of Biomedical and Health Informatics, 2019,23(2): 607-617.
[6] OZEGOWSKI S, WILCZY?SKA E, PIORUNEK T, et al. Usefulness of ambulatory ECG in the diagnosis of sleep-related breathing disorders[J]. Kardiol pol, 2007,65(11):1321-1328.
[7] LI HY, LI JX, NA B, et al. An IoMT cloud-based real time sleep apnea detection scheme by using the SpO2estimation supported by heart rate variability[J]. Future Generation Computer Sys-tems, 2019,98:69-77.
[8] PUNJABI M, PRABHU S. An ANN-based detection of obstructive sleep apnea from simultaneous ECG and SpO2recordings[C]//International Conference on ISMAC in Compu-tational Vision and Bio-Engineering, Springer, Cham, 2018.
[9] MOSTAFA SS, MENDON?A F, RAVELO-GARCíA AG, et al. A systematic review of detecting sleep apnea using deep learning[J]. Sensors (Basel), 2019,19(22):4934.
[10] ERDENEBAYAR U, KIM Y J, Park J U, et al. Deep learning approaches for automatic detection of sleep apnea events from an electrocardiogram[J]. Computer Methods and Programs in Biomedicine, 2019,180:105001.
[11] VAQUERIZO-VILLAR F, ALVAREZ D, KHEIRANDISH -GOZAL L, et al. A convolutional neural network architecture to enhance oximetry ability to diagnose pediatric obstructive sleep apnea[J]. IEEE Journal of Biomedical and Health Informatics, 2021,25(8): 2906-2916.
[12] DOMINGOS Pedro. A few useful things to know about machine learning[J]. Communications of the ACM, 2012,55 (10):78-87.
[13] BASTANI K, ASGARI E, NAMAVARI H. Wide and deep learning for peer-to-peer lending[J]. Expert Syst Appl, 2019,134:209-224.
[14] HE H, FAN Y. A novel hybrid ensemble model based on tree-based method and deep learning method for default prediction [J]. Expert Systems with Applications, 2021,176:114899.
[15] FRIEDMAN J H. Greedy function approximation: a gradient boosting machine[J]. Annals of Statistics, 2001, 29(5):1189-1232.
[16] GOLDBERGER A, AMARAL L, GLASS L, et al. Physio-Bank, PhysioToolkit, and Physionet: components of a new research resource for complex physiologic signals[J]. Circu-lation, 2000,101(23):215-220.
[17] PENZEL T, MOODY G B, MARK R G, et al. The apnea-ECG database[C]. Computers in Cardiology 2000. IEEE, 2000.
[18] CHRISTOV I I. Real time electrocardiogram QRS detection using combined adaptive threshold[J]. BioMedical Enginee-ring OnLine, 2004,3(1):1-9.
[19] HAMILTON P S, LIMITED E P. Open source ECG analysis software documentation[J]. Comput Cardiol, 2002(29):101-104.
[20] 黃英.周期圖法的功率譜估計(jì)[J].中國(guó)西部科技,2013,12(9): 1-2,8.
[21] RICHARDS J E. The statistical analysis of heart rate: a review emphasizing infancy data[J]. Psychophysiology, 1980,17(2): 153-66.
[22] Heart rate variability: standards of measurement, physiological interpretation and clinical use. Task Force of the European Society of Cardiology and the North American Society of Pacing and Electrophysiology[J]. Circulation, 1996,93(5): 1043-1065.
[23] JEPPESEN J, BENICZKY S, JOHANSEN P, et al. Using Lorenz plot and cardiac sympathetic index of heart rate variability for detecting seizures for patients with epilepsy[J]. International Conference of the IEEE Engineering in Medicine and Biology Society, 2014,2014:4563-4566.
[24] KOLEY BL, DEY D. On-line detection of apnea/hypop-nea events using SpO2signal: a rule-based approach em-ploying binary classifier models[J]. IEEE Journal of Biomedical and Health Informatics, 2014, 18(1):231-239.
[25] SHI C, NOURANI M, GUPTA G, et al. Apnea MedAssist II: A smart phone based system for sleep apnea assessment[C]// IEEE International Conference on Bioinformatics and Bio-medicine, 2013,572-577.
[26] MEMIS G, SERT M. Multimodal classification of obstructive sleep apnea using feature level fusion[C]//IEEE Interna-tional Conference on Semantic Computing, 2017,85-88.
Multimodal OSA Detection Method Based on CNN and Stacked LightGBM
LIN Meina ZHENG Heyu
(Guangdong University of Technology, Guangzhou 510006, China)
A multimodal method of detecting obstructive sleep apnea (OSA) based on oxygen saturation and electrocardiogram signals is proposed. Firstly, the empirical features of blood oxygen saturation and ECG signals are extracted, and the optimal feature set is obtained by using Pearson correlation coefficient; Then, convolution network (CNN) is used to generate deep features to mine the potential correlation between different modes; Finally, a stacked lightweight gradient hoist (LightGBM) is constructed to improve the detection accuracy of the classifier. Four fold cross validation was performed on the public data set apnea ECG. The average accuracy, sensitivity and specificity were 96.04%, 96.44% and 96.22% respectively. Compared with decision-making level fusion, it has higher classification performance.
obstructive sleep apnea; convolutional neural networks; light gradient boosting machine; oxygen saturation; electrocardiogram
林美娜,鄭和裕.基于CNN與堆疊LightGBM的多模態(tài)OSA檢測(cè)方法[J].自動(dòng)化與信息工程,2022,43(3):25-30.
LIN Meina, ZHENG Heyu. Multimodal OSA detection method based on CNN and stacked LightGBM[J]. Automation & Information Engineering, 2022,43(3):25-30.
TP391
A
1674-2605(2022)03-0005-06
10.3969/j.issn.1674-2605.2022.03.005
林美娜,女,1997年生,碩士研究生,主要研究方向:模式識(shí)別,生物信號(hào)處理。E-mail: meina.lin@mail.gdut.edu.cn
鄭和裕,男,1996年生,碩士研究生,主要研究方向:模式識(shí)別,機(jī)器學(xué)習(xí),生物信號(hào)處理。E-mail: zheng_hy1209@ qq.com