You are on page 1of 5

2021 National Conference on Communications (NCC)

Performance Analysis of Convolutional Neural


Network Based EEG Epileptic Seizure Classification
in Presence of Ocular Artifacts

Payal Patel Udit Satija


School of Electrical Sciences, Department of Electrical Engineering,
Indian Institute of Technology Bhubaneswar Indian Institute of Technology Patna
Bhubaneswar, Odisha-752050, India. Bihta, Bihar-801106, India.
pa16@iitbbs.ac.in udit@iitp.ac.in

Abstract—Recently, convolutional neural network (CNN) has [2]- [25]. Existing traditional machine learning methods are
played a crucial role in classifying epileptic seizures due to its based on discrete wavelet transform (DWT) [1], [2], empirical
capability of automatically learning the discriminatory features wavelet transform (EWT) [7], [9], harmonic wavelet packet
2021 National Conference on Communications (NCC) | 978-1-6654-4177-3/21/$31.00 ©2021 IEEE | DOI: 10.1109/NCC52529.2021.9530053

from the raw electroencephalogram (EEG) data. Moreover, most transform [12], discrete cosine transform (DCT) [14], local
of the existing methods considered artifact-free EEG data for mean decomposition (LMD) [3], empirical mode decompo-
extracting features. In this paper, we analyze the impact of
ocular artifacts on the performance of CNN in extracting reliable
sition (EMD) [10], [11], S-transform [8], and discrete short-
features from the EEG data for seizure classification. Further- time Fourier transform [13]. As deep learning techniques have
more, we also analyze the robustness of CNN in determining revolutionized the task of detection and classification through
the accurate and reliable features not only from raw EEG data identifying the hidden and discriminatory features from the raw
but also from spectral domain EEG data. The performance of physiological data, a few attempts have been put forward to-
the method is evaluated on the EEG signals taken from the wards EEG signal analysis using convolutional neural networks
Bonn’s dataset with different types and levels of ocular artifacts. (CNNs) [23]- [25]. In [17], CNN along with bidirectional
Performance evaluation results demonstrate that the classification long-term short memory was used for automatically score
accuracy of the method is degraded significantly under the the sleep stages. Also, in [20], CNN was used to score the
presence of ocular artifacts. Furthermore, it is observed that the sleep stages. In [16], a deep convolution neural network based
proposed CNN architecture is able to extract the discriminatory
features from spectral EEG data more accurately as compared
seizure classification algorithm was proposed for classifying
to the raw temporal EEG data. the EEG signals into normal, pre-ictal and seizure classes. The
major advantage of CNN is that it can automatically learn and
Keywords—Electroencephalogram (EEG), EEG Decoding, Con- extract the hidden discriminatory features from the raw EEG
volutional Neural Network (CNN), Ocular Artifact (OA). data with few number of convolutional layers. However, the
selection of hyperparameters such as learning rate, batch size,
number of convolutional layers, kernel size, and stride length
I. I NTRODUCTION plays an important role on the classification accuracy. Most of
the existing methods consider the raw clean EEG data for the
Automated detection of epileptic seizures in electroen- automatic extraction of features using CNNs. To the best of
cephalogram (EEG) signals can avoid the painstaking process our knowledge, for the first time, we analyze the performance
of visual inspection to the long-terms recording by the neu- of CNN in classifying seizure activity in the EEG signal under
rologist and increase the seizure identification accuracy [1]- the presence of ocular artifacts (OAs).
[3]. Furthermore, it plays a vital role in analysing neurological
disorders at early stages and can help in diagnosing the patients
in a timely manner. However, presence of background noises,
muscle contraction and relaxation, and other neurological B. Contribution of this Paper
diseases pose a challenging problem in the automated and
manual seizure identification process [4]–[6]. Therefore, there In this paper, we demonstrate how the end-to-end decod-
is a high demand to develop a robust seizure classification ing of raw EEG becomes challenging in presence of ocular
method which can assist nursing staff for immediate treatment artifacts. Furthermore, deep ConvNets is learnt using EEG
and drug delivery. data in temporal and Fourier domain under the absence and
presence of ocular artifacts to demonstrate the robust learning
A. Summary of Related Work invariant to presence of ocular artifacts. The rest of the paper
is structured as follows: Section II describes the proposed
Numerous methods based on traditional classifiers and deep ocular artifact-aware epileptic seizure classification framework.
learning techniques have been developed for the detection In Section III, the proposed framework is evaluated with the
and classification of epileptic seizures in the EEG signal EEG data both in temporal and Fourier domain under different
c
978-1-6654-4177-3/21/$31.00 2021 IEEE level of ocular artifacts. Section IV concludes the paper.

978-1-6654-4177-3/21/$31.00 ©2021 IEEE


Authorized licensed use limited to: CZECH TECHNICAL UNIVERSITY. Downloaded on July 27,2022 at 13:01:28 UTC from IEEE Xplore. Restrictions apply.
2021 National Conference on Communications (NCC)

II. P ROPOSED A RTIFACT-AWARE E PILEPTIC S EIZURE is activated by softmax activation function, which gives the
C LASSIFICATION F RAMEWORK probability value for each class and input signal is assigned to
the class having maximum probability. Moreover, the summary
In this section, we present an EEG epileptic seizure classi- of each layer is described in TableI.
fication framework using CNN in presence of ocular artifacts.
In the next subsections, we discuss about the EEG data and
proposed CNN architecture for seizure classification under TABLE I: The Parameters of CNN Architecture
varying ocular artifacts.
Layer Layer Type Filters Filter Stride Activation Output layer
size Function
A. EEG Data 0 Input - - - - 1 × 4096
1 Conv1D 5 1×9 2 reLU 5 × 4088
In this section, we present the description of Bonn’s dataset 2 Sub-sampling - 2 2 - 5 × 2044
on which our method is evaluated. Bonn’s dataset contains 3 Dropout (0.2) - - - - 5 × 2044
4 Conv1D 10 1×7 2 reLU 10 × 1019
EEG signals collected from both healthy and epileptic subjects 5 Sub-sampling - 2 2 - 10 × 509
[15]. The dataset consists of five subsets (represented as Z, 6 Dropout (0.2) - - - - 10 × 509
O, N, F, and S) that contain one hundred single-channel 7 Conv1D 15 1×5 2 reLU 15 × 505
9 Sub-sampling - 2 2 - 15 × 252
EEG segments each of 23.6 second in duration. The subsets 10 Dropout (0.2) - - - - 15 × 252
Z and O represent the EEG signals recorded using surface 11 Conv1D 20 1×3 2 reLU 20 × 125
EEG electrodes from five healthy volunteers with eyes open 12 Sub-samping - 2 2 - 20 × 62
13 Dropout (0.2) - - - - 20 × 62
and closed, respectively. Moreover, EEG signals in the set 14 Flatten - - - - 1 × 1040
F and N are acquired in seizure free duration from five 16 Dense - - - reLU 64
patients in the epileptogenic zone and hippocampal formation 17 Dropout (0.2) - - - - 64
18 Dense - - - reLU 16
of the opposite hemisphere of the brain respectively. The EEG 19 Dropout (0.2) - - - - 16
subset S represents the seizure activity in the EEG signal. 20 Dense - - - Softmax 2
This dataset was formed by collecting the EEG signals from
sites containing ictal activity and the dataset covers temporal
lobe epilepsy. Moreover, the subsets Z and O contain EEG
III. R ESULTS AND D ISCUSSION
signals acquired extracranially whereas the subsets N, F, and
S contain EEG signals acquired intracranially. This dataset is In this section, we evaluate the performance of proposed
created by selecting the EEG signals from a long continuous noise-aware epileptic seizure classification framework using
recordings in order to create the artifact-free (i.e., do not CNN in classifying the epileptic seizures for the noise-free
contain muscular activity and eye movements) dataset and EEG and EEG data with the presence of ocular artifacts.
to avoid biased results for particular subject. Due to this The performance of our proposed analysis is evaluated using
shuffling of the EEG signals collected from different patients, performance measures such as sensitivity (Se), specificity (Sp)
this dataset does not contain any patient wise labelling. All and accuracy (Ac). These performance measures are computed
the EEG signals were acquired using 128 channel amplifier as:
system and average common reference. The EEG signals were TP
Se = , (1)
recorded with a sampling frequency of 173.61 samples/s and TP + FN
12-bit resolution. In addition, the dataset contains EEG signals TN
with a spectral bandwidth between 0.5-85 Hz. In this paper, we Sp = , (2)
also evaluate our proposed CNN architecture using the artifact- TN + FP
free spectral data and ocular artifact-contaminated EEG data. TP + TN
To create the spectral data, the discrete Fourier transform of Ac = (3)
TP + TN + FN + FP
the EEG data from each class is computed.
Where, TP, TN, FP and FN represent true positive, true
B. Proposed CNN Architecture negative, false positive, and false negative, respectively. TP,
TN, FP and FN are the number of correctly detected seizure
The proposed CNN architecture is illustrated in Fig. 1. segments, number of correctly detected non-seizure segments,
Let the input signal to CNN be x(n) of length L, where, number of missed non-seizure segments and number of missed
n = 1, 2, . . . L. The stride length of the CNN is chosen as seizure segments, respectively. We perform our simulation on
2 for each convolution and max-pooling operation. In the first Spyder (Python 3.6) platform running on a computer with Intel
step, raw input EEG data is convolved with the first CNN i7-2600U CPU with a clock speed of 3.40GHz and 8 GB of
layer with five different filters of size 9 × 1, and the output RAM. We evaluate the robustness of CNN in extracting the
of each convolution is known as feature map. The number of discriminative features not only from raw temporal data but
output feature maps is equal to the number of filters in the also from the derived data. These derived data are obtained by
convolutional layer. The stride size is chosen in each layer as taking the Fourier transform of the raw temporal EEG data.
2, to reduce the number of samples by half. In the next step, The CNN model accuracy and loss with respect to number of
each feature map is passed through a non-linear function ‘reLu’ epochs are illustrated in Fig. 2 and Fig. 3 respectively. It can
followed by max-pooling or sub-sampling layer. To avoid be observed from the figures that proposed CNN architecture
overfitting, a drop out of 0.2 is considered. Subsequently, this is able to learn the pattern from the data in a few epochs.
process is repeated for remaining layers. Finally, the last layer Since, Bonn’s dataset is comparatively noise-free, different
output is fed to the flatten layer which appends all features types and levels of ocular artifacts are added into the EEG
map to single dimension. The output layer with two neurons data during training and testing stage. Different types of ocular

Authorized licensed use limited to: CZECH TECHNICAL UNIVERSITY. Downloaded on July 27,2022 at 13:01:28 UTC from IEEE Xplore. Restrictions apply.
2021 National Conference on Communications (NCC)

1 1
2 2
3 3
4
5 20
1
2
3

Convolutional 1D
Convolutional 1D
4
5

Flatten Layer
Output

Features Map

Feature Map
Sub-Sampling

Sub-Sampling
Input:
1D Raw
EEG signal

CNN Layer 1 Sub-Sampling CNN Layer 4


Layers Sub-Sampling
Features Map Layers
Features Map Fully Connected Layers

Fig. 1: Proposed CNN architecture for epileptic seizure EEG classification.

artifacts are taken from two databases i.e. Mendeley database


and Polysmnographic database [18], [19]. We evaluate the
performance of the proposed method in classifying seizure and
non-seizure EEG signals into following combination of class
types: S-Z (seizure signals subset (S) and non-seizure signals
subset (Z)), S-O (seizure signals subset (S) and non-seizure
signals subset (O)), S-N (seizure signals subset (S) and non-
seizure signals subset (N)), S-F (seizure signals subset (S) and
non-seizure signals subset (F)). We also evaluate the proposed
method on the mixed subset of S, N, and O, which is denoted
as S-N-O.

TABLE II: Seizure Classification Performance for Temporal


EEG Data Fig. 2: Illustrates proposed CNN model accuracy versus
epochs.
Method Class Type Sp Se Ac Loss
(%) (%) (%)
S-N 100 100 100 0.01
Performances evaluation for S-O 100 90 95 0.39
OA-free EEGs S-Z 100 100 100 0.0
S-F 100 95 97.5 0.31
S-N-O - - 96.67 0.15
S-N 100 60 80 2.91
Performances evaluation for S-O 100 80 90 1.24
EEGs with OA in S-Z 100 80 90 1.23
testing phase S-F 100 66.7 83.3 2.04
S-N-O - - 85.56 0.72
S-N 100 65 82.5 2.59
Performances evaluation for S-O 100 55 77.5 3.91
EEGs with OA in both S-Z 100 52.5 76.25 3.77
testing and training phases S-F 100 67.5 83.75 2.36

1) Performance Evaluation Under OA-Free EEG Data: As


mentioned earlier, Bonn’s dataset contains artifact-free EEG
signals, we consider 80% of the data for the training, out
of which 30% data is used for the validation. Remaining Fig. 3: Illustrates proposed CNN model loss versus epochs.
20% of the data is used for testing. Simulation results are
depicted in Table II and III for the raw temporal EEG data
and spectral EEG data, respectively. Furthermore, it can be
observed from the tables that proposed CNN architecture is
able to derive more reliable features from the spectral EEG data as compared to temporal EEG data with low loss. Since

Authorized licensed use limited to: CZECH TECHNICAL UNIVERSITY. Downloaded on July 27,2022 at 13:01:28 UTC from IEEE Xplore. Restrictions apply.
2021 National Conference on Communications (NCC)

exiting seizure classification methods are evaluated on EOG Overall, it is observed from the results that the performance
artifact-free EEG data, we also evaluate and compare the of CNN in classifying seizure activity is severely degraded
performance of proposed method with existing method based under the presence of OAs which was not analysed in the
on deep convolution neural network [16] on the same data. existing works. Therefore, it is important to train the CNNs
It can be observed from the classification results that our after preprocessing the EEG data or using maximum possible
proposed method achieves an average accuracy of 96.67% models of OAs corrupted EEGs to improve the performance of
while existing seizure classification method propsed in [16] CNN-based seizure classification methods. Also, the use of de-
achieves an average accuracy of 88.27% for the same set S-N- rived EEG can improve the seizure classification performance.
O. This demonstrates its superior performance over the existing
method. Moreover, in this paper, we considered individual IV. C ONCLUSION
class set with the seizure signal which has not been done in In this paper, the impact of ocular artifacts on the perfor-
the earlier works. mance of CNN is analyzed in extracting the reliable features
from the EEG data for seizure classification. Also, we evaluate
TABLE III: Seizure Classification Performance in Spectral the performance of proposed CNN architecture in determining
Domain the accurate and reliable features from both raw EEG data and
spectral domain EEG data. The performance of the method is
Method Class Type Sp Se Ac Loss
(%) (%) (%) evaluated on the EEG signals taken from the Bonn’s dataset
S-N 100 95 97.5 0.08 with different types and levels of ocular artifacts. The per-
Performances evaluation for S-O 100 100 100 0.01 formance evaluation results demonstrate that the classification
OA-free EEGs S-Z 100 100 100 0.0
S-F 95 100 97.5 0.01 accuracy of the method is degraded significantly under the
S-N-O - - 96.67 0.18 presence of ocular artifacts. Furthermore, it is observed that the
S-N 100 60 80 2.91
Performances evaluation for S-O 100 80 90 1.24
proposed CNN architecture is able to extract the discriminatory
EEGs with OA in S-Z 100 80 90 1.23 features from spectral EEG data more accurately as compared
testing phase S-F 100 66.7 83.3 2.04 to the raw temporal EEG data.
S-N-O - - 85.56 0.72
S-N 97.5 60 78.25 3.19
Performances evaluation for S-O 100 60 80 3.04 R EFERENCES
EEGs with OA in both S-Z 100 52.5 76.25 3.71
testing and training phases S-F 100 55 77.5 3.20 [1] M. Niknazar, S. R. Mousavi, B. Vosoughi Vahdat and M. Sayyah, “A
new framework based on recurrence quantification analysis for epileptic
seizure detection,” IEEE J. Biomed. Health Informatics, vol. 17, no. 3, pp.
2) Performance Evaluation Under EEG Data with EOG 572-578, May 2013.
artifacts: In this subsection, we evaluate the performance [2] A. Sharmila and P. Geethanjali, “DWT based detection of epileptic
of proposed CNN architecture under the varying type and seizure from EEG signals using naive bayes and k-NN classifiers,” IEEE
level of ocular artifacts in classifying epileptic seizures. To Access, vol. 4, pp. 7716-7727, 2016.
demonstrate the classification capability of the proposed CNN [3] T. Zhang and W. Chen, “LMD based features for the automatic seizure
detection of EEG signals using SVM,” IEEE Trans. Neural Systems
architecture, we evaluate the classification performances after Rehabilitation Eng., vol. 25, no. 8, pp. 1100-1108, Aug. 2017.
adding ocular artifacts in both seizure and seizure-free EEG
[4] M. Saini, Payal, U. Satija, “An effective and robust framework for ocular
data during training and testing phase separately. These two artifact removal from single-channel EEG signal based on variational
cases are discussed separately here: mode decomposition,” IEEE Sensor J., vo. 20, no. 1, pp.369-376, 2019.
[5] M. Saini, U. Satija, M.D. Upadhayay “Effective automated method for
detection and suppression of muscle artefacts from single-channel EEG
(a) Under EEGs corrupted with OAs in testing phase: It signal”, Healthcare Technology Letters, vol. 7, no. 2, pp. 35-40, 2020.
demonstrates the capability of the CNN architecture to classify [6] M. Saini, U. Satija, M. D. Updhayay, “Wavelet based waveform distortion
the seizure/non-seizure class from the EEG signal with OAs in measures for assessment of denoised EEG quality with reference to noise-
the testing phase while it is learnt from the artifact-free EEG free EEG signal,” IEEE Signal Processing Letters, vol. 27, pp. 1260-1264,
data in the training phase. We observed from the results that 2020.
CNN is able to learn the pattern during training and validation, [7] A. Bhattacharyya and R. B. Pachori, “A multivariate approach for patient-
but failed to identify the pattern accurately during testing phase specific EEG seizure detection using empirical wavelet transform,” IEEE
Trans. Biomed. Eng., vol. 64, no. 9, pp. 2003-2015, Sept. 2017.
for the EEGs with OAs. The results for this scenarios are
[8] S. Chatterjee, N. Ray Choudhury and R. Bose, “Detection of epileptic
depicted in Table II and III for the temporal and spectral EEG seizure and seizure-free EEG signals employing generalised S-transform,”
data respectively. It can be observed from the table that there IET Sci., Meas. Technol., vol. 11, no. 7, pp. 847-855, no. 10, 2017.
is drastic degradation in the Se, Sp and Ac. [9] A. Bhattacharyya, V. Gupta, and R. B. Pachori, “Automated identification
of epileptic seizure EEG signals using empirical wavelet transform based
(b) Under EEGs corrupted with OAs both in training and Hilbert marginal spectrum,” 22nd Int. Conf. Digital Signal Processing
testing phase: In this case, the proposed CNN architecture is (DSP), Aug. 2017, pp. 1-5.
learnt using both artifact-free EEG data and corrupted EEG [10] S. M. S. Alam and M. I. H. Bhuiyan, “Detection of seizure and epilepsy
data which enables CNN to extract the features from EEG using higher order statistics in the EMD domain,” IEEE J. Biomedical
signal corrupted with ocular artifacts. It is observed from the Health Informatics, vol. 17, no. 2, pp. 312-318, Mar. 2013.
results that proposed CNN architecture is failed to extract the [11] D. Cho, B. Min, J. Kim and B. Lee, “EEG-Based prediction of
pattern during validation process since the pattern in the EEG epileptic seizures using phase synchronization elicited from noise-assisted
multivariate empirical mode decomposition,” IEEE Trans. Neural Systems
data has changed due to addition of ocular artifacts. The results Rehabilitation Eng., vol. 25, no. 8, pp. 1309-1318, Aug. 2017.
for this scenarios are depicted in Table II and III. It can be [12] L. S. Vidyaratne and K. M. Iftekharuddin, “Real-Time epileptic seizure
observed from the table there is drastic drop in the Se, and Sp detection using EEG,” IEEE Trans. Neural Systems Rehabilitation Eng.,
and Ac. vol. 25, no. 11, pp. 2146-2156, Nov. 2017.

Authorized licensed use limited to: CZECH TECHNICAL UNIVERSITY. Downloaded on July 27,2022 at 13:01:28 UTC from IEEE Xplore. Restrictions apply.
2021 National Conference on Communications (NCC)

[13] K. Samiee, P. Kovács and M. Gabbouj, “Epileptic seizure classification


of EEG time-series using rational discrete short-time Fourier transform,”
IEEE Trans. Biomed. Eng., vol. 62, no. 2, pp. 541-552, Feb. 2015.
[14] M. Z. Parvez and M. Paul, “Epileptic seizure detection by exploiting
temporal correlation of electroencephalogram signals,” IET Signal Pro-
cess., vol. 9, no. 6, pp. 467-475, no. 8, 2015.
[15] R. G. Andrzejak, K. Lehnertz, F. Mormann, C. Rieke, P. David, C.E.
Elger, “Indications of nonlinear deterministic and finite-dimensional struc-
tures in time series of brain electrical activity: dependence on recording
region and brain state,” Phys. Rev., vol. 64, no. 6, pp. 1-8, 2001.
[16] U. R. Acharya, S. L. Oh, Y. Hagiwara, J. H. Tan, and H. Adeli, “Deep
convolutional neural network for the automated detection and diagnosis
of seizure using EEG signals,” Computers in Biology and Medicine, 2017.
[17] A. Supratak, H. Dong, C. Wu and Y. Guo, “DeepSleepNet: A model for
automatic sleep stage scoring based on raw single-channel EEG,” IEEE
Trans. Neural Systems Rehabilitation Eng., vol. 25, no. 11, pp. 1998-2008,
Nov. 2017.
[18] M. A. Klados and P. D. Bamidis, “A semi-simulated EEG/EOG dataset
for the comparison of EOG artifact rejection techniques.” Data in brief,
vol. 8, pp. 1004-1006, 2016.
[19] A. Goldberger, L. Amaral, L. Glass, J. Hausdorff, P. Ivanov, R.
Mark, J. Mietus, G. Moody, C.-K. Peng, and H. Stanley, “Physiobank,
physiotoolkit, and physionet: Components of a new research resource for
complex physiologic signals,” Circulation, vol. 101, no. 23, pp. e215-
e220, 2000.
[20] O. Tsinalis, P. M. Matthews, Y. Guo, and S. Zafeiriou, “Automatic
sleep stage scoring with single-channel EEG using convolutional neural
networks,” arXiv preprint arXiv:1610.01683, 2016.
[21] H. Cecotti, and A. Graeser, “Convolutional neural network with em-
bedded Fourier transform for EEG classification,” IEEE 19th International
Conference on Pattern Recognition, 2008. ICPR 2008, Dec. 2008, pp. 1-4.
[22] K. D. Tzimourta, L. G. Astrakas, M. G. Tsipouras, N. Giannakeas, A.
T. Tzallas, and S. Konitsiotis, “Wavelet based classification of epileptic
seizures in EEG signals,” IEEE 30th Int. Symp. Computer-Based Medical
Systems (CBMS), June 2017, pp. 35-39.
[23] L. Ma, J. W. Minett, T. Blu, and W. S. Wang, “Resting state EEG-
based biometrics for individual identification using convolutional neural
networks,” IEEE 37th Ann. Int. Conf. Eng. Medicine Biology Society
(EMBC), Aug. 2015, pp. 2848-2851.
[24] P. Thodoroff, J. Pineau, and A. Lim, “Learning robust features using
deep learning for automatic seizure detection,” In Machine Learning for
Healthcare Conference, pp. 178-190, Dec. 2016.
[25] R. Zafar, S. C. Dass, and A. S. Malik, “Electroencephalogram-based
decoding cognitive states using convolutional neural network and likeli-
hood ratio based score fusion,” PloS One, vol. 12, no. 5, p. e0178410,
2017.

Authorized licensed use limited to: CZECH TECHNICAL UNIVERSITY. Downloaded on July 27,2022 at 13:01:28 UTC from IEEE Xplore. Restrictions apply.

You might also like