scieee Science in your language
[en] (orig)

One Dimensional Convolutional Neural Networks for Seizure Onset Detection Using Long-term Scalp and Intracranial EEG

Read accessible full text

One Dimensional Convolutional Neural Networks for Seizure Onset Detection Using Long-term Scalp and Intracranial EEG

Author: Wang, Xiaoshuang,Wang, Xiulin,Liu, Wenya,Chang, Zheng,Kärkkäinen, Tommi,Cong, Fengyu
Publisher: Elsevier
Year: 2021
Source: https://jyx.jyu.fi/bitstream/123456789/77411/1/1-s2.0-S0925231221009723-main.pdf
This is a sel -a chi ed e sion o an o iginal a icle. This e sion
may di e om he o iginal in pagina ion and ypog aphic de ails.
Au ho (s):
Ti le:
Yea :
Ve sion:
Copy igh :
Righ s:
Righ s u l:
Please ci e he o iginal e sion:
CC BY 4.0
h ps://c ea i ecommons.o g/licenses/by/4.0/
One Dimensional Con olu ional Neu al Ne wo ks o Seizu e Onse De ec ion Using
Long- e m Scalp and In ac anial EEG
© 2021 he Au ho s
Published e sion
Wang, Xiaoshuang; Wang, Xiulin; Liu, Wenya; Chang, Zheng; Kä kkäinen, Tommi;
Cong, Fengyu
Wang, X., Wang, X., Liu, W., Chang, Z., Kä kkäinen, T., & Cong, F. (2021). One Dimensional
Con olu ional Neu al Ne wo ks o Seizu e Onse De ec ion Using Long- e m Scalp and
In ac anial EEG. Neu ocompu ing, 459, 212-222.
h ps://doi.o g/10.1016/j.neucom.2021.06.048
2021
One dimensional con olu ional neu al ne wo ks o seizu e onse
de ec ion using long- e m scalp and in ac anial EEG
Xiaoshuang Wang
a,b
, Xiulin Wang
a,b,c
, Wenya Liu
a,b
, Zheng Chang
b
, Tommi Kä kkäinen
b,
⇑
,
Fengyu Cong
a,b,d,e,
⇑
a
School o Biomedical Enginee ing, Facul y o Elec onic In o ma ion and Elec ical Enginee ing, Dalian Uni e si y o Technology, Dalian 116024, PR China
b
Facul y o In o ma ion Technology, Uni e si y o Jy askyla, Jy askyla 40014, Finland
c
Depa men o Radiology, A ilia ed Zhongshan Hospi al o Dalian Uni e si y, Dalian, PR China
d
School o A i icial In elligence, Facul y o Elec onic In o ma ion and Elec ical Enginee ing, Dalian Uni e si y o Technology, Dalian, 116024, PR China
e
Key Labo a o y o In eg a ed Ci cui and Biomedical Elec onic Sys em, Liaoning P o ince Dalian Uni e si y o Technology, Dalian, PR China
a icle in o
A icle his o y:
Recei ed 22 Feb ua y 2021
Re ised 30 Ap il 2021
Accep ed 17 June 2021
A ailable online 20 June 2021
Communica ed by Zidong Wang
Keywo ds:
Epilepsy
Seizu e de ec ion
Scalp elec oencephalog am (sEEG)
In ac anial elec oencephalog am (iEEG)
Con olu ional neu al ne wo ks (CNN)
abs ac
Epilep ic seizu e de ec ion using scalp elec oencephalog am (sEEG) and in ac anial elec oencephalo-
g am (iEEG) has a ac ed widesp ead a en ion in ecen wo decades. The accu a e and apid de ec ion
o seizu es no only e lec s he e iciency o he algo i hm, bu also g ea ly educes he bu den o manual
de ec ion du ing long- e m elec oencephalog am (EEG) eco ding. In his wo k, a s acked one-
dimensional con olu ional neu al ne wo k (1D-CNN) model combined wi h a andom selec ion and da a
augmen a ion (RS-DA) s a egy is p oposed o seizu e onse de ec ion. Fi s ly, we segmen ed he long-
e m EEG signals using 2-s sliding windows. Then, he 2-s in e ic al and ic al segmen s we e classi ied by
he s acked 1D-CNN model. Du ing model aining, a RS-DA s a egy was applied o sol e he p oblem o
sample imbalance, and he pa ien -speci ic model was ained wi h e en -based K- old (Kis he numbe
o seizu es pe pa ien ) c oss alida ion o de ec ing all seizu es o each pa ien . Finally, we e alua ed he
pe o mances o he p oposed app oach in he wo le els: he segmen -based le el and he e en -based
le el. The p oposed me hod was es ed on wo long- e m EEG da ase s: he CHB-MIT sEEG da ase and
he SWEC-ETHZ iEEG da ase . Fo he CHB-MIT sEEG da ase , we achie ed 88.14% sensi i i y, 99.62%
speci ici y and 99.54% accu acy in he segmen -based le el. F om he pe spec i e o he e en -based
le el, 99.31% sensi i i y, 0.2/h alse de ec ion a e (FDR) and mean 8.1-s la ency we e achie ed. Fo he
SWEC-ETHZ iEEG da ase , in he segmen -based le el, 90.09% sensi i i y, 99.81% speci ici y and 99.73%
accu acy we e ob ained. In he e en -based le el, 97.52% sensi i i y, 0.07/h FDR and mean 13.2-s la ency
we e a ained. F om hese esul s, we can see ha ou me hod can e ec i ely use bo h sEEG and iEEG
da a o de ec epilep ic seizu es, and his may p o ide a e e ence o he clinical applica ion o seizu e
onse de ec ion.
Ó2021 The Au ho s. Published by Else ie B.V. This is an open access a icleunde he CC BY license (h p://
c ea i ecommons.o g/licenses/by/4.0/).
1. In oduc ion
Epilepsy is a ch onic neu ological disease, which esul s om
sudden abno mal and synch onous elec ical ac i i ies o b ain
neu ons. I has a ec ed nea ly 1% o he wo ld’s popula ion, and
abou 30% o people wi h epilepsy a e esis an o an iepilep ic
d ugs [1]. Elec oencephalog am (EEG) has become an e ec i e
sc eening echnique in diagnosing epilepsy. Since he manual
de ec ion o seizu es by e iewing long- e m and con inuous EEG
is a ime-consuming and labo ious ask, he au oma ed and imely
de ec ion o seizu es can g ea ly imp o e diagnos ic e iciency and
educe wo kload.
EEG-based analysis o he au oma ed de ec ion o seizu es has
been widely explo ed in he las wo decades. In he p e ious
esea ches abou EEG-based seizu e de ec ion, he sho - e m
Bonn EEG da ase [2] and he long- e m CHB-MIT scalp EEG (sEEG)
da ase [3] we e he wo mos commonly used da ase s [4]. Fo he
sho - e m Bonn EEG da ase , many con en ional machine lea n-
ing and deep lea ning me hods, including Suppo Vec o Machine
(SVM) [5–7], Random Fo es (RF) [8], K-Nea es Neighbo (KNN)
[9,10], A i icial Neu al Ne wo k (ANN) [11], Con olu ional Neu al
h ps://doi.o g/10.1016/j.neucom.2021.06.048
0925-2312/Ó2021 The Au ho s. Published by Else ie B.V.
This is an open access a icle unde he CC BY license (h p://c ea i ecommons.o g/licenses/by/4.0/).
⇑
Co esponding au ho s a : Facul y o In o ma ion Technology, Uni e si y o
Jy askyla, Jy askyla 40014, Finland (T. Kä kkäinen); School o Biomedical Engi-
nee ing, Facul y o Elec onic In o ma ion and Elec ical Enginee ing, Dalian
Uni e si y o Technology, Dalian 116024, PR China (F. Cong).
E-mail add esses: [email p o ec ed] (T. Kä kkäinen), [email p o ec ed] (F. Cong).
Neu ocompu ing 459 (2021) 212–222
Con en s lis s a ailable a ScienceDi ec
Neu ocompu ing
jou nal homepage: www.else ie .com/loca e/neucom
Ne wo ks (CNN) [12–14] and Long-Sho Te m Memo y (LSTM)
[15], ha e been applied o analyze his da ase o seizu e de ec ion
and ob ained he accu acy anging om 88.87% o 100%. Al hough
hese me hods achie ed high pe o mances on he sho - e m
Bonn EEG da ase , his benchma k clinical da ase was a small
and special-selec ed da ase . As s a ed in [2], he sho - e m Bonn
EEG da ase consis ed o 500 single-channel EEG segmen s o 23.6-
s du a ion (200 sEEG segmen s and 300 in ac anial EEG (iEEG)
segmen s), and each segmen was cu ou om con inuous EEG
eco dings a e isual inspec ion. Howe e , in he eal wo ld, he
EEG eco dings o people wi h epilepsy usually las om se e al
hou s o se e al weeks. The e o e, he analysis o long- e m and
con inuous EEG da a o seizu e de ec ion may ha e mo e p ac ical
signi icance.
Fo he long- e m CHB-MIT sEEG da ase (24 pa ien s, abou
916 h and 198 seizu es), an o e iew o wo ks is b ie ly in o-
duced. In con en ional machine lea ning me hods, he s udies
[7,16] used SVM classi ie s o seizu e de ec ion and achie ed he
sensi i i y anging om 96.81% o 97.34% and he speci ici y ang-
ing om 97.26% o 97.50%. In [17], se en classi ie s, including SVM,
Ensemble, KNN, Linea Disc iminan Analysis (LDA), Logis ic
Reg ession (LR), Decision T ee (DT) and Nai e Bayes (NBs), com-
bined wi h he s a egy o channel selec ion we e used o calssi i-
ca ion, and he KNN inally achie ed he highes accu acy o 84.8%.
In [18], Alicko ic e al. applied ou classi ie s (SVM, RF, Mul ilaye
pe cep on (MLP) and KNN) simul aneously o classi y he ea u e
samples ha we e ex ac ed by Disc e e Wa ele T ans o m
(DWT), empi ical mode decomposi ion (EMD) and wa ele packe
decomposi ion (WPD), and an o e all accu acy o 100% was inally
achie ed in ic al s. in e ic al sEEG. Howe e , only 1000 in e ic al,
1000 ic al and 1000 p eic al 8-s segmen s we e specially selec ed
om he CHB-MIT sEEG da ase o he analysis o seizu e de ec-
ion, which g ea ly damaged he in eg i y o he da a. Recen ly,
se e al leading deep lea ning echniques, including CNN, LSTM
and ecu en neu al ne wo k (RNN), we e also applied o he
CHB-MIT sEEG da ase . In [19], 1D-CNN was used o classi y he
4-s aw sEEG segmen s, and i achie ed 66.76% sensi i i y,
99.63% speci ici y and 99.07% accu acy. Hossain e al. applied a
7-laye wo-dimensional con olu ional neu al ne wo k (2D-CNN)
o classi y he ime-channel sEEG ma ixes, and his app oach
ob ained an o e all sensi i i y, speci ici y and accu acy o 90.00%,
91.65% and 98.05%, espec i ely [20]. Di e en om he 2D-CNN
used in [20], Liang e al. achie ed an accu acy o 99.00% by using
a 2D-CNN-LSTM model o seizu e de ec ion. In his model, 2D-
CNN was used as he ea u e ex ac ion model o lea ning he
high-le el ep esen a ions o inpu s. The ou pu s o 2D-CNN we e
hen ed in o LSTM o classi ica ion [21].In[22], a bidi ec ional
LSTM (Bi-LSTM) ne wo k was u ilized o he classi ica ion o 4-s
sEEG epochs, and he me hod a ained 93.61% sensi i i y and
91.85% speci ici y. The RNN model was applied by Yao e al. o sei-
zu e de ec ion, and i achie ed he a e aged sensi i i y, speci ici y
and accu acy o 88.80%, 88.60% and 88.69%, espec i ely [23].
As men ioned abo e, many con en ional machine lea ning and
deep lea ning me hods ha e been applied o he CHB-MIT sEEG
da ase o seizu e de ec ion, bu many ele an s udies only e al-
ua ed he pe o mances in a segmen -based le el. In he segmen -
based le el, many s udies conca ena ed all seizu es o a pa ien
in o one seizu e, and hen he ic al segmen s cu om he con-
ca ena ed seizu e we e used o classi ica ion, igno ing he de ec-
ion o each seizu e ( he e en -based le el). F om he pe spec i e
o he de ec ion o a seizu e o in he e en -based le el, when
de ec ing seizu es du ing long- e m EEG ecoding, an excellen
sys em should ala m accu a ely wi h sho la ency and low alse
de ec ion a e (FDR). The e o e, bo h le els ( he segmen -based
le el and he e en -based le el) should be e alua ed simul ane-
ously in he analysis o long- e m EEG eco dings o seizu e
de ec ion.
In his pape , he long- e m sEEG and iEEG eco dings a e ana-
lyzed o he de ec ion o seizu es. In he long- e m EEG eco d-
ings, mos o he EEG eco dings a e in he in e ic al s age, while
he ime du a ion o a seizu e usually anges om ens o seconds
o se e al minu es. Consequen ly, he p oblem o sample imbal-
ance should be conside ed and p ope ly esol ed in he analysis
o he long- e m EEG ecodings. The no el y and main con ibu-
ions o his pape a e summa ized as ollows:
Two long- e m da ase s, he CHB-MIT sEEG da ase and he
SWEC-ETHZ iEEG da ase [24], a e analyzed in his pape .
The e o e, he e ec i eness o he p oposed me hod in seizu e
de ec ion is es ed wi h wo di e en da ase s, sEEG and iEEG.
A s acked 1D-CNN model is p oposed in his s udy. Two di e -
en pa allel 1D-CNNs wi h di e en calcula ion sizes a e used o
lea n he high-le el ep esen a ions simul aneously. Then, he
di e se ea u es o hese wo 1D-CNNs a e conca ena ed o
classi ica ion.
Since sample imbalance is a key p oblem in he long- e m EEG
eco dings, a andom selec ion and da a augmen a ion (RS-DA)
s a egy is p oposed o balance samples du ing he model ain-
ing phase.
To be e e alua e he pe o mances o he p oposed me hod,
we e alua e he classi ica ion esul s o each pa ien in he
wo le els: he segmen -based le el and he e en -based le el.
In he segmen -based le el, sensi i i y, speci ici y and accu acy
a e calcula ed. In he e en -based le el, we calcula e he sensi-
i i y, FDR and la ency ( ime du a ion om he onse o a sei-
zu e o i s de ec ion).
The emaining o his pape is o ganized as ollows: Sec ion 2
desc ibes he ma e ials and he p oposed me hod. Resul s a e
showed in Sec ion 3. Discussion and conclusion a e gi en in Sec-
ion 4and Sec ion 5, espec i ely.
2. Ma e ials and me hods
In his sec ion, we i s desc ibe wo long- e m EEG da ase s
( he sEEG da ase and he iEEG da ase ). Then, we p esen he p o-
posed me hod including p ep ocessing, CNN model, model aining
and sys em e alua ion.
2.1. Da a p epa a ion
The CHB-MIT sEEG da ase (h ps://a chi e.physione .o g/phys-
iobank/da abase/chbmi /)[3] and he SWEC-ETHZ iEEG da ase
(h ps://ieeg-swez.e hz.ch)[24] we e used o he analysis o sei-
zu e de ec ion.
The CHB-MIT sEEG da ase consis s o 916 h o sEEG and 198
seizu es. The sEEG eco dings om 24 pa ien s a e eco ded a a
sampling a e o 256 Hz, and mos o eco dings con ain 23 chan-
nels [3]. In his s udy, 24 h o in e ic al sEEG da a (all i less han
24 h) we e selec ed o each pa ien . The selec ion c i e ia o sei-
zu es we e as ollows: (1) I he ime in e al be ween wo seizu es
was sho (less han 20 min), he wo seizu es we e conca ena ed
in o one seizu e, (2) A conca ena ed seizu e o a aw seizu e las ing
mo e han 10 s was chosen, and so seizu es which las ed less han
10 s we e no conside ed. The de ails o he selec ed sEEG signals
we e summa ized in Table 1.
In he SWEC-ETHZ iEEG da ase , i con ains 2565 h o iEEG and
116 leading seizu es om 18 pa ien s. The sampling a e is 512 o
1024 Hz, and he numbe o iEEG channels anges om 24 o 128.
X. Wang, X. Wang, W. Liu e al. Neu ocompu ing 459 (2021) 212–222
213
Mo e de ails o his da ase can be ound in [24]. Fo his da ase ,
we also selec ed 24 h o in e ic al iEEG o each pa ien . The selec-
ion c i e ia o seizu es we e he same as desc ibed in he CHB-
MIT sEEG da ase . Then, he selec ed iEEG signals we e uni o mly
down-sampled o 256 Hz (same sampling a e as he CHB-MIT
sEEG da ase ). We summa ized he de ails o he selec ed iEEG sig-
nals in Table 2.
2.2. Me hodology
2.2.1. P ep ocessing
Be o e aining and es ing he p oposed model, we need o
gene a e a ce ain numbe o samples. In he p ep ocessing, 2-s
sliding windows we e applied o segmen he long- e m EEG sig-
nals (as shown in Fig. 1). Since a seizu e las ed om ens o seconds
o se e al minu es (as shown in Tables 1 and 2), he size o 2-s ic al
segmen s was e y small. In o de o gene a e mo e ic al segmen s,
2-s sliding windows wi h he co esponding o e lap a io we e
used o segmen he aw ic al EEG signals only du ing he model
aining phase. The o e lap a io anged om 0.75 o 0.9 (depend-
ing on he numbe and he ime du a ion o seizu es). Fo example,
he ic al segmen s om pa ien s 6 and 16 in Table 1 and pa ien 5
in Table 2 we e ob ained wi h he o e lap a io o 0.9, while he
ic al segmen s om pa ien 15 in Table 1 and pa ien 1 in Table 2
we e a ained wi h he o e lap a io o 0.75. In ob aining 2-s in e -
ic al segmen s, we used 2-s sliding windows wi hou o e lap. The
p ep ocessing in ob aining he segmen s o in e ic al and ic al sig-
nals is illus a ed in Fig. 1.
Due o he sampling a e o 256 Hz, one 2-s EEG segmen can be
ega ded as a ma ix o n512, whe e nis he numbe o channels
o each pa ien , and 512 is he numbe o sampling poin s. In his
s udy, he 2-s EEG segmen s we e used as he di ec inpu s o
he p oposed 1D-CNN model.
2.2.2. Con olu ional neu al ne wo ks (CNN)
CNN is gene ally composed o con olu ional laye s, pooling lay-
e s and ully connec ed laye s. A con olu ional laye con ains a ce -
ain numbe o con olu ion ke nels and pe o ms con olu ion
calcula ions on he inpu signals. The con olu ion esul s a e hen
nonlinea ized by ac i a ion unc ions. In ou 1D-CNN model, he
ec i ied linea ac i a ion uni (ReLU) was used in con olu ional
laye s. The pooling laye is also called he down-sampling laye ,
which pe o ms pooling ope a ions on he ou pu s o he con olu-
ional laye o p ese e highe -le el ep esen a ions. Pooling p o-
cesses including maximum pooling and global a e age pooling
we e used in ou model. A e he signals pass h ough con olu-
ional laye s and pooling laye s, he high-le el ea u es a e usually
ed in o ully connec ed laye s o he inal classi ica ion.
In his wo k, a s acked 1D-CNN model was p oposed o seizu e
de ec ion. As shown in Fig. 2, i has wo pa allel blocks, and he
EEG segmen s a e sen o bo h blocks a he same ime. The wo
blocks a e named Block 1 and Block 2, espec i ely. The Block 1 con-
ains h ee con olu ional blocks. The i s con olu ional block con-
sis s o a con olu ional laye (32 ke nels wi h he size o n3 and
he s ide o 2, whe e nis he numbe o channels), a ba ch no mal-
iza ion (BN) laye and a max-pooling (MP) laye ( he pooling size o
3 and he s ide o 1). In he second con olu ional block, i includes
a con olu ional laye wi h 64 ke nels ( he size o 3 and he s ide o
2), a BN laye and a MP laye wi h he pooling size o 3 and he
s ide o 1. The hi d con olu ional block also con ains a con olu-
ional laye (128 ke nels wi h he size o 3 and s ide o 1), a BN
laye and a MP laye wi h he pooling size o 3 and he s ide o
1. The s uc u e o he Block 2 is he same as ha o he Block 1,
and he only di e ence is he size o con olu ion ke nels in he i s
and second con olu ion laye s. In he Block 2, he ke nel sizes o
hese wo laye s a e n5 and 5, espec i ely. A he end o he
Block 1 and he Block 2, he lea ned high-le el ep esen a ions
a e conca ena ed. Then, he conca ena ed ea u es a e globally
a e aged as he inpu s o wo ully connec ed laye s. The i s ully
Table 1
De ails o he selec ed sEEG singals om he CHB-MIT sEEG da ase .
Pa ien # Channels In e ic al (h) # Seizu es mean ± s d (s)
⁄
1 23 24 7 63 ± 30
2 23 24 3 57 ± 41
323 24 7 57±8
4 23 24 4 94 ± 31
5 23 24 5 111 ± 9
623 24 10 15±3
7 23 24 3 108 ± 30
8 23 15 5 184 ± 49
923 24 3 68±9
10 23 24 7 64 ± 17
11 23 24 3 268 ± 418
12 23 12 10 96 ± 69
13 18 24 8 67 ± 55
14 23 19 7 24 ± 12
15 24 24 14 142 ± 98
16 18 13 6 14 ± 9
17 23 18 3 98 ± 15
18 23 24 5 63 ± 13
19 23 24 3 79 ± 2
20 23 23.3 6 49 ± 22
21 23 24 4 50 ± 28
22 23 24 3 68 ± 9
23 23 23 5 85 ± 60
24 23 12.3 14 36 ± 23
To al 518.6 145
⁄
Mean and s anda d de ia ion o he ime du a ion o seizu es pe pa ien .
Table 2
De ails o he selec ed iEEG signals om he SWEC-ETHZ iEEG da ase .
Pa ien # Channels In e ic al (h) # Seizu es mean ± s d (s)
1 88 24 2 601 ± 17
266 24 2 88±2
364 24 4 64±4
432 24 14 41±14
5 128 24 4 16 ± 1
6 32 24 8 45 ± 33
7 75 24 4 69 ± 38
8 61 24 7 219 ± 176
948 24 17 67±47
10 32 24 16 75 ± 21
11 32 24 2 91 ± 11
12 56 24 9 146 ± 33
13 64 24 7 102 ± 61
14 24 24 16 96 ± 39
15 98 24 2 94 ± 35
16 34 24 5 190 ± 51
17 60 24 2 97 ± 1
18 42 24 5 199 ± 100
To al 432 126
Fig. 1. Fo in e ic al EEG signals, we used 2-s sliding windows wi hou o e lap. Fo
ic al EEG signals which we e selec ed as he aining se , we used 2-s sliding
windows wi h he co esponding o e lap a io (0.75–0.9).
X. Wang, X. Wang, W. Liu e al. Neu ocompu ing 459 (2021) 212–222
214
connec ed laye has 128 neu ons wi h ReLU unc ion. The second
ully connec ed laye is he ou pu laye wi h 2 neu ons wi h So -
max unc ion. Acco ding o he 1D-CNN model, he numbe o cal-
cula ion pa ame e s and he ou pu shape in each laye a e
summa ized in Table 3.
Fo he ou pu s om he s acked 1D-CNN model, a simple pos -
p ocessing was pe o med o accu a ely de ec ing a seizu e and
sounding an ala m (as shown in Fig. 2). In o de o sound an ala m
accu a ely and eliably, i mus mee a condi ion ha Lconsecu i e
de ec ion labels we e posi i e. The alue o L anged om 2 o 5,
and he inal L alue was de e mined acco ding o he classi ica ion
esul s. In heo y, when he L alue inc eases, he FDR dec eases
and he la ency o an ala m becomes longe . To a oid unnecessa y
epea ed ala ms, we should se he minimum ime in e al (MTI)
be ween wo ala ms. In his wo k, he a e aged ime du a ion o
seizu es o each pa ien was se as he MTI be ween wo ala ms
o each pa ien . The e o e, when he i s ala m sounded, in he
ollowing MTI, he second ala m was p ohibi ed.
2.2.3. Model aining
The pa ien -speci ic model was ained o each pa ien . Fo
de ec ing all seizu es o each pa ien , he app oach o e en -
based K- old c oss alida ion was used, whe e Kwas he numbe
o seizu es pe pa ien . I a subjec has Kseizu es, he model ain-
ing is pe o med K ounds. In each ound, (K-1) seizu es a e
selec ed o aining, and he emaining one is used o es ing
(as shown in Fig. 3).
Since he ime du a ion o in e ic al EEG is abou 50 o 1300
imes longe han ha o ic al EEG among di e en pa ien s (as
shown in Tables 1 and 2), he sample imbalance is a key p oblem
in his wo k. In o de o sol e he p oblem du ing model aining,
we p oposed a RS-DA s a egy. As shown in Fig. 3, we augmen ed
(K-1) ic al seizu es by using he o e sampling echnique men-
ioned in he p ep ocessing (Sec ion 2.2.1). Howe e , he size o
he augmen ed ic al segmen s was s ill much smalle han ha
o in e ic al segmen s. The e o e, he andom selec ion was pe -
o med on in e ic al segmen s. We i s di ided in e ic al segmen s
in o Kequal pa s. Then, an equal numbe o in e ic al segmen s
we e andomly selec ed om (K-1) pa s o make he size o he
selec ed in e ic al segmen s equal o ha o he augmen ed ic al
segmen s. Finally, he selec ed in e ic al segmen s and he aug-
men ed ic al segmen s we e used o ain (80%) and moni o
(20%) he model du ing model aining. The emaining segmen s
(one in e ic al pa and one seizu e) we e used o e alua e he
ained model. Th ough his way, all in e ic al segmen s and sei-
zu es could be es ed wi hou epe i ion a e K ounds.
Du ing model aining, he Ea ly-S opping echnique was also
used o p e en o e i ing, and he d opou a e o he second ully
connec ed laye was se o 0.25. Based on Ke as 2.3.1 wi h
Tenso low-1.15.0 backend, ou model was implemen ed in Py hon
3.6, and one N idia Tesla P100 GPU was con igu ed o un he p o-
posed model.
2.2.4. Sys em e alua ion
We e alua ed he pe o mances o he p oposed me hod in he
wo le els: he segmen -based le el and he e en -based le el.
Segmen -based le el
In he segmen -based le el, sensi i i y, speci ici y and accu acy
we e calcula ed o e alua e he classi ica ion o EEG segmen s. The
h ee me ics can be exp essed as ollows:
Sensi i
i y ¼TP
TP þFN ð1Þ
Speci ici y ¼TN
TN þFP ð2Þ
Table 3
In he p oposed 1D-CNN model, he numbe o calcula ion pa ame e s and he ou pu
shape in each laye a e summa ized as below. nis he size o he inpu ma ix,
whe e is equal o 512, and n(18 o 128) is he numbe o EEG channels.
Laye and ype Ou pu shape # Pa ame e s
Inpu n0
2 * Con
a
2*( /2 32) 4672–32832
b
2 * (BN + MP)
a
2*( /2 32) 256
2 * Con 2 * ( /4 64) 16512
2 * (BN + MP) 2 * ( /4 64) 512
2 * Con 2 * ( /4 128) 49408
2 * (BN + MP) 2 * ( /4 128) 1024
GAP 256 0
Dense 128 32896
Dense 2 258
To al 105538–133698
a
Two pa allel laye s.
b
The numbe is ela ed o he alue o n(18 o 128).
Fig. 2. A s acked 1D-CNN model was p oposed o seizu e de ec ion. M@nk
1
o
M@k
2
:Mis he numbe o ke nels, nk
1
and k
2
a e he sizes o con olu ional
ke nels. Abb e ia ions: Con , con olu ion; BN, ba ch no maliza ion; MP, max-
pooling; s
1
, pooling size; s
2
, s ide; GAP, global a e age pooling; FC, ully connec ed.
Lis he numbe o consecu i e de ec ion labels o an ala m.
X. Wang, X. Wang, W. Liu e al. Neu ocompu ing 459 (2021) 212–222
215

Accu acy ¼TP þTN
TP þFN þTN þFP ð3Þ
whe e TP is ue posi i e, indica ing he numbe o ue de ec ed
ic al segmen s om ic al segmen s; FN is alse nega i e, indica ing
he numbe o ic al segmen s which a e w ongly classi ied as in e -
ic al segmen s; TN is ue nega i e, indica ing he numbe o ue
de ec ed in e ic al segmen s om in e ic al segmen s; FP is alse
posi i e, indica ing he numbe o in e ic al segmen s which a e
w ongly classi ied as ic al segmen s. Sensi i i y is he pe cen age
o ue de ec ed ic al segmen s o o al ic al segmen s, and speci-
ici y is he pe cen age o ue de ec ed in e ic al segmen s o o al
in e ic al segmen s. An excellen classi ie should ha e high sensi-
i i y and speci ici y a he same ime.
E en -based le el
In he e en -based le el, we calcula ed he h ee me ics: sensi-
i i y, FDR and la ency. Sensi i i y and FDR can be exp essed by he
ollowing wo o mulas:
Sensi i
i y ¼numbe o co ec ly de ec ed seizu es
numbe o all seizu es ð4Þ
FDR ¼numbe o inco ec de ec ions
hou s o in e ic al EEG :ð5Þ
La ency is he ime du a ion be ween he onse o a seizu e and
i s de ec ion. Fig. 4 shows an example o a alse de ec ion, a co ec
de ec ion and i s la ency. An ou s anding sys em should ha e high
sensi i i y wi h sho la ency and low FDR.
3. Resul s
The esul s om he CHB-MIT sEEG da ase and he SWEC-ETHZ
iEEG da ase a e gi en in his sec ion. The pe o mances o he p o-
posed me hod a e e alua ed in he wo le els a he same ime. In
he segmen -based le el, he a e aged esul s (sensi i i y, speci-
ici y and accu acy) a e calcula ed o each pa ien . In he e en -
based le el, he sensi i i y, he FDR and he a e aged la ency o
an ala m a e calcula ed.
3.1. Resul s o CHB-MIT sEEG da ase
Table 4 shows he esul s o each pa ien in he wo le els a e
e en -based K- old c oss alida ion. As shown in Table 4, in he
segmen -based le el, he o e all sensi i i y, speci ici y and accu-
acy a e 88.14%, 99.62% and 99.54%, espec i ely. The accu acy o
mos pa ien s (excep pa ien s 8, 12, 13 and 24) is highe han
99%, and ha o all pa ien s is highe han 98%. In he e en -
based le el, 144 ou o 145 seizu es (excep one seizu e o pa ien
16) a e accu a ely de ec ed, wi h a sensi i i y o 99.31%. The o e -
Fig. 3. E en -based K- old c oss alida ion combined wi h a RS-DA s a egy is applied du ing model aining. I a subjec has Kseizu es, he model aining is pe o med K
ounds. In each ound, one seizu e and one in e ic al pa a e used as he es ing se s, and he emaining (K-1) seizu es and (K-1) in e ic al pa s a e used as he aining se s.
A e K ounds, all seizu es and in e ic al EEG can be es ed wi hou epe i ion.
X. Wang, X. Wang, W. Liu e al. Neu ocompu ing 459 (2021) 212–222
216
all FDR is 0.2/h, and 7 pa ien s (2, 4, 5, 10, 11, 14 and 19) ha e a
FDR o 0/h. The o e all la ency is 8.1 s, and he pa ien 22 has
he longes a e aged la ency o 14.7 s.
The alue o Lis ela ed o sensi i i y, FDR and la ency in he
e en -based le el. We also calcula e hese h ee me ics unde di -
e en L alues. In his wo k, he alue o L anges om 2 o 5. As
shown in Fig. 5(a), we can see ha , as he alue o Linc eases,
he o e all sensi i i y and FDR show a dec easing end, bu he
o e all la ency o an ala m shows an inc easing end. When he
alue o Lis 5, he o e all sensi i i y and FDR a e he lowes
(93.53% and 0.04/h, espec i ely), and he o e all la ency is he
longes , a 13 s.
3.2. Resul s o SWEC-ETHZ iEEG da ase
Based on he analysis o he SWEC-ETHZ iEEG da ase , Table 5
also gi es he esul s o each pa ien in he wo le els a e
e en -based K- old c oss alida ion. In he segmen -based le el,
he o e all sensi i i y o 90.09%, speci ici y o 99.81% and accu acy
o 99.73% a e achie ed. The accu acy o all pa ien s is highe han
99%. In he e en -based le el, 123 ou o 126 seizu es (excep one
seizu e in pa ien s 4, 6 and 7) a e co ec ly de ec ed, and i s sensi-
i i y is 97.52%. The low o e all FDR is 0.07/h, and he FDR o 10
pa ien s (1, 6 and 9 o 16) is 0/h. The o e all la ency o an ala m
is 13.2 s, and he longes a e aged la ency is 52.3 s o pa ien 8.
The o e all sensi i i y, FDR and la ency wi h di e en L alues
a e also calcula ed in he e en -based le el. In Fig. 5 (b), as he L
alue inc eases om 2 o 5, he sensi i i y and FDR also show a
gene al downwa d end, bu he o e all la ency has a upwa d
end. When he L alue is equal o 4 o 5, he o e all sensi i i y
and FDR a e he lowes , a 96.41% and 0.02/h, espec i ely. The
longes o e all la ency is 18.1 s when he L alue is 5.
4. Discussion
In his wo k, we p oposed a s acked 1D-CNN model combined
wi h he RS-DA s a egy o seizu e de ec ion. The de ails o p e i-
ous s udies and his wo k, including he numbe o pa ien s, p o-
cessing and he co esponding me ics we e summa ized in
Table 6 ( he segmen -based le el) and Table 7 ( he e en -based
le el). Since he long- e m SWEC-ETHZ iEEG da ase was a ailable
om 2019[24], we compa ed he esul s only based on he CHB-
MIT sEEG da ase .
As shown in Table 6, he con en ional machine lea ning me h-
ods, including LDA [25], Ex eme Lea ning Machine (ELM) [26],
SVM [7,16,27],RF[28], ANN [29] and KNN [17,30], we e appiled
o seizu e de ec ion. The accu acy ob ained by hese me hods an-
ged om 84.8% o 99.41 %, and he highes accu cy o 99.41% was
achi ed by he RF in [28]. The deep lea ning me hods, such as CNN
[19,20,31–33], au oencode s [34–37], LSTM [21,22] and RNN [23],
achie ed he accu acy anging om 84.00 % o 99.33%, and he
s acked 2D-CNN used in [33] a ained he highes accu acy o
99.33%. In his wo k, he p oposed app oach achie ed he accu acy
o 99.54% and 99.73% o he CHB-MIT sEEG da ase and he SWEC-
ETHZ iEEG da ase , espec i ely. The e o e, om he pe spec i e o
he accu acy, he pe o mance o ou me hod was be e han ha
o mos p e ious s udies in Table 6, and his p o ed ha he p o-
posed s acked 1D-CNN was e ec i e.
F om he pe spec i e o he sensi i i y (in he segmen -based
le el), al hough he s udies [7,16] a ained highe sensi i i ies a
96.81% and 97.34%, espec i ely, he ime-consuming and complex
ea u e ex ac ion and selec ion enginee ing was applied. The
o he h ee s udies [28,30,32] achie ed he high sensi i i y o
97.91%, 96.66% and 98.84%, espec i ely, bu one eason o he
high sensi i i y was ha i used he o e sampling echnique o
gene a e mo e ic al samples o classi ica ion. Because o he o e -
lapping in o ma ion be ween hese augmen ed ic al samples, in
some sense, hei classi ica ion was a epea ed classi ica ion o
simila samples. The e o e, in [28,32,30], he high sensi i i y was
o e es ima ed. Di e en om he s udies [28,32,30], in ou wo k,
he o e sampling echnique was only used du ing he model ain-
ing phase, and he ic al samples ha we e selec ed as he es ing
se we e ob ained wi hou o e sampling. In ac , he numbe o
aw ic al samples is small (i can be seen om Tables 1 and 2 min-
imal amoun o misclassi ica ion can g ea ly educe he sensi i i y.
Hence, as shown in Table 6, he 88.14% sensi i i y o ou wo k was
ela i ely high.
In he e en -based le el, he esul s o his wo k and p e ious
s udies using he CHB-MIT sEEG da ase we e summa ized in
Table 7. The h eshold me hod [38] and he con en ional machine
lea ning me hods including SVM [3,16,39], Neu al Ne wo k Classi-
ie based on Imp o ed Pa icle Swa m Op imiza ion (IPSONN)
[40], Rele ance Vec o Machine (RVM) [41] and Adap i e
Dis ance-based Change-poin De ec o (ADCD) [42] we e applied
o he de ec ion o seizu es. These me hods achie ed he sensi i -
i y o 88.5% o 98.47% and he FDR o 0.08/h o 0.63/h, and he high-
es sensi i i y o 98.47% was ob ained using an SVM g oup wi h en
SVMs in [16]. Deep lea ning me hods, including CNN [31,43], Deep
Recu en Neu al Ne wo k (DRNN) [44] and AE [45], we e used o
analyze he same da ase o seizu e de ec ion, and he sensi i i y
anging om 86.29% o 100% and he FDR anging om 0.08/h o
0.74/h we e achie ed. Ou me hod also showed he high pe o -
mances: (1) he sensi i i y o 99.31% and he FDR o 0.2/h o he
CHB-MIT sEEG da ase ; (2) 97.52% sensi i i y and 0.07/h FDR o
he SWEC-ETHZ iEEG da ase . Hence, unde he e en -based le el,
ou me hod also pe o med be e han mos o he me hods in
Table 7.
In [44], a sensi i i y o 100% was a ained, bu only 5 ou o 24
pa ien s we e used o he de ec ion o seizu es. The de ec ion o
seizu es wi h sho la ency (less han 20 s) can ea ly elimina e
symp oms o he seizu es [46,47]. Al hough he a e aged la encies
(8.1 s and 13.2 s) o he CHB-MIT and he ETHZ-SWEC EEG da ase s
we e sligh ly longe han hose in Table 7, hey we e s ill in he
accep able ange.
Fig. 4. E en -based le el: he example o a alse de ec ion, a co ec de ec ion and i s la ency.
X. Wang, X. Wang, W. Liu e al. Neu ocompu ing 459 (2021) 212–222
217
As he esul s shown in Tables 6 and 7, ou me hod showed
high pe o mances in he wo le els, and i pe o med be e
han mos o he me hods in Tables 6 and 7. Mo eo e , he p o-
posed me hod was e ec i e o bo h da ase s, he sEEG and he
iEEG. Acco ding o ou wo k, he e a e se e al highligh s ha
need o be emphasized. Fi s ly, a 1D-CNN model is used in his
s udy, which can be di ec ly applied o he classi ica ion o aw
EEG signals wi hou addi ional p ep ocessing o EEG signals,
such as equency domain analysis and ime– equency domain
analysis. Secondly, in o de o ob ain mo e di e en high-le el
ep esen a ions o a be e classi ica ion, we p oposed a s acked
1D-CNN model consis ing o wo pa allel 1D-CNN blocks. The
wo pa allel 1D-CNN blocks wi h di e en calcula ion sizes can
lea n di e en high-le el ep esen a ions a he same ime, and
he di e se ea u es o hese wo 1D-CNN blocks a e hen con-
ca ena ed o he u he analysis. Thi dly, he RS-DA s a egy
is i s u ilized o sol e he p oblem o sample imbalance du ing
model aining.
Table 4
In he CHB-MIT sEEG da ase , esul s o each pa ien a e gi en in he wo le els. L= 3 is inally selec ed o he e en -based le el.
Pa ien # Seizu es K-Fold Segmen -based le el E en -based le el
Sen
1
(%) Spe (%) Acc (%) Sen
2
(%) FDR (/h) La (s)
1 7 98.00 99.82 99.81 100 0.04 6.3
2 3 91.73 99.90 99.88 100 0 8.7
3 7 99.00 99.84 99.84 100 0.08 6.3
4 4 85.89 99.78 99.73 100 0 8
5 5 97.05 99.91 99.89 100 0 7.2
6 10 86.46 99.73 99.71 100 0.04 8
7 3 92.65 99.93 99.89 100 0.04 7.3
8 5 91.99 98.91 98.77 100 0.6 7.6
9 3 95.10 99.91 99.90 100 0.08 8
10 7 92.45 99.88 99.84 100 0 6.3
11 3 99.02 99.92 99.90 100 0 6
12 10 81.06 98.69 98.17 100 1.42 10
13 8 76.41 99.09 98.92 100 0.79 9.8
14 7 70.16 99.46 99.39 100 0 8.6
15 14 94.98 99.36 99.25 100 0.33 7.7
16 6 69.96 99.56 99.50 83.33 0.08 7.6
17 3 85.02 99.61 99.55 100 0.17 8
18 5 81.15 99.65 99.58 100 0.17 7.6
19 3 92.31 99.91 99.89 100 0 6
20 6 82.58 99.64 99.59 100 0.17 9.7
21 4 97.48 99.66 99.65 100 0.17 6
22 3 89.94 99.95 99.93 100 0.04 14.7
23 5 96.53 99.62 99.59 100 0.61 6
24 14 68.43 99.19 98.82 100 0.08 12.6
To al 145 88.14 99.62 99.54 99.31 0.20 8.1
Abb e ia ions: Sen
1
, segmen -based sensi i i y; Spe, speci ici y; Acc, accu acy; Sen
2
, e en -based sensi i i y; FDR, alse de ec ion a e; La , la ency.
Fig. 5. In he e en -based le el, he alue o L anges om 2 o 5. (a) Fo he CHB-MIT sEEG da ase , he o e all sensi i i y, FDR and la ency a e showed. (b) Fo he SWEC-
ETHZ iEEG da ase , he o e all sensi i i y, FDR and la ency a e showed. L= 3 is inally selec ed o he e en -based le el in his wo k.
X. Wang, X. Wang, W. Liu e al. Neu ocompu ing 459 (2021) 212–222
218
Howe e , one limi a ion o his s udy is ha only a 1D-CNN
model is applied. O he deep lea ning models, such as 2D-CNN
and LSTM, combined wi h he RS-DA s a egy can also be applied
o he same da ase s o mo e de ailed compa isons. Ano he lim-
i a ion is ha we igno e he use o epilepsy- ela ed EEG ea u es
o seizu e de ec ion. The EEG ea u es, including s a is ical pa am-
e e s, equency o ime– equency domain ea u es, en opies,
e c., can be ex ac ed and inco po a ed as he inpu o he 1D-
CNN model. By his me hod, i may imp o e he esul s o seizu e
de ec ion. In he u u e wo k, his highligh can be u he analyzed
and discussed.
5. Conclusion
In his pape , we p esen ed a s acked 1D-CNN model o he
de ec ion o seizu e onse . In his model, wo pa allel 1D-CNN
blocks wi h di e en calcula ion sizes we e used o lea n he
high-le el ep esen a ions o he EEG inpu s simul aneously. The
ou pu s o hese wo pa allel 1D-CNN blocks we e hen conca e-
na ed o he inal classi ica ion. Since he sample imbalance was
a key issue in he long- e m epilep ic EEG eco dings, a RS-DA
s a egy combined wi h he e en -based K- old c oss alida ion
was p oposed o balancing samples du ing model aining. In his
Table 5
In he SWEC-ETHZ iEEG da ase , esul s o each pa ien a e gi en in he wo le els. L= 3 is inally selec ed o he e en -based le el.
Pa ien # Seizu es K-Fold Segmen -based le el E en -based le el
Sen
1
(%) Spe (%) Acc (%) Sen
2
(%) FDR (/h) La (s)
1 2 93.59 99.94 99.85 100 0 10
2 2 97.67 99.86 99.85 100 0.13 9
3 4 100 99.88 99.88 100 0.17 6
4 14 75.56 99.31 99.19 92.86 0.13 12.8
5 4 100 99.67 99.67 100 0.33 6
6 8 81.61 99.96 99.80 87.50 0 6.6
7 4 70.53 99.89 99.84 75.00 0.04 14
8 7 78.93 99.53 99.04 100 0.04 52.3
9 17 98.64 99.84 99.83 100 0 7.3
10 16 96.44 99.95 99.89 100 0 6.9
11 2 100 99.99 99.99 100 0 6
12 9 97.04 99.80 99.77 100 0 9.6
13 7 86.55 99.85 99.78 100 0 11.4
14 16 94.87 99.61 99.49 100 0 6.8
15 2 94.52 99.98 99.97 100 0 14
16 5 96.44 99.94 99.90 100 0 13.2
17 2 85.57 99.81 99.78 100 0.17 22
18 5 73.70 99.68 99.53 100 0.21 24.4
To al 126 90.09 99.81 99.73 97.52 0.07 13.2
Table 6
Segmen -based le el: lis o p e ious s udies and his wo k using he CHB-MIT sEEG da ase o seizu e de ec ion.
Au ho Yea Da ase P ocessing # Pa ien s Sen (%) Spe (%) Acc (%)
Khan e al. [25] 2012 CHB-MIT Mul iple wa ele scales + LDA 5 83.6 100.0 91.8
Amma e al. [26] 2016 CHB-MIT DWT + ELM 3 – – 94.85
Janja asji e al. [27] 2017 CHB-MIT Wa ele based ea u es + SVM 24 72.99 98.13 96.87
Yuan e al. [34] 2017 CHB-MIT STFT + SSDA 9 – – 93.82
Bha acha yya e al. [28] 2017 CHB-MIT Channel selec ion, EWT + RF 23 (177 h) 97.91 99.57 99.41
Yuan e al. [35] 2018 CHB-MIT STFT, ChannelA + SSDA 9 – – 96.61
Wen e al. [36] 2018 CHB-MIT Channel selec ion + CNN-AE 24 – – 92
Boonyaki anon e al. [19] 2019 CHB-MIT DWT, ea u e ex ac ion, no maliza ion + 1D-CNN 24 eco ds
+
66.76 99.63 99.07
Yuan e al. [37] 2019 CHB-MIT Da a augmen a ion, STFT + CNN-AE 24 – – 94.37
Hossain e al. [20] 2019 CHB-MIT 2D a ay ( ime * channels) + 2D-CNN 23 90.00 91.65 98.05
Liang e al. [21] 2019 CHB-MIT 2D a ay ( ime * channels) + 2D-CNN-LSTM 24 84.00 99.00 99.00
Wei e al. [31] 2019 CHB-MIT MIDS, WGANs + 1D-CNN 24 72.11 95.89 84.00
Tian e al. [32] 2019 CHB-MIT O e sampling, FFT, WPD + 2D-CNN, 3D-CNN 24 96.66 99.14 98.33
Yao e al. [23] 2019 CHB-MIT Windowing + IndRNN 24 88.80 88.60 88.69
Cao e al. [33] 2019 CHB-MIT STFT, MAS, AWF + S-2D-CNN 24 – – 99.33
Zabihi e al. [29] 2020 CHB-MIT Phase space, nullcline + LDA-ANN 23 (171 h) 91.15 95.16 95.11
Li e al. [30] 2020 CHB-MIT Channel selec ion, NMD, FCM, + KNN 24 98.40 99.01 98.61
Hu e al. [22] 2020 CHB-MIT LMD, s a is ical ea u e ex ac ion + Bi-LSTM 24 93.61 91.85 –
Za ei e al. [7] 2021 CHB-MIT OMP, DWT, Non-linea ea u es + SVM 23 96.81 97.26 97.09
Li e al. [16] 2021 CHB-MIT EMD, CSP + an SVM g oup consis ing o en SVMs 24 97.34 97.50 97.49
Shoka e al. [17] 2021 CHB-MIT Va iance channel selec ion + KNN 23 – – 84.8
This wo k 2021 CHB-MIT 2D a ay ( ime * channels), RS-DA s a egy + S-1D-CNN 24 88.14 99.62 99.54
This wo k 2021 SWEC-ETHZ 2D a ay ( ime * channels), RS-DA s a egy + S-1D-CNN 18 90.09 99.81 99.73
STFT, sho - ime Fou ie ans o m; SSDA, s acked spa se denoising au oencode s; EWT, empi ical wa ele ans o m; ChannelA , channel-awa e a en ion mechanism;
CNN-AE, con olu ional au oencode ; MIDS, me ge o he inc easing and dec easing sequences; WAGNs, wasse s ein gene a i e ad e sa ial ne s; FFT, as Fou ie ans o m;
3D-CNN, h ee-dimensional CNN; IndRNN, independen ly RNN; MAS, mean ampli ude o spec um map; AWF, adap i e and disc imina i e ea u e weigh ing usion; S-2D-
CNN, s acked 2D-CNN; S-1D-CNN, s acked 1D-CNN; NMD, nonlinea mode decomposi ion; FCM, ac ional cen al momen ; LMD, local mean decomposi ion; OMP,
o hogonal ma ching pu sui ; CSP, common spa ial pa e n.
+
The CHB-MIT sEEG da ase con ains a o al o 686 eco ds, while one eco d o each pa ien is selec ed.
X. Wang, X. Wang, W. Liu e al. Neu ocompu ing 459 (2021) 212–222
219