Tech Seminar

Download as pdf or txt
Download as pdf or txt
You are on page 1of 22

VISVESVARAYA TECHNOLOGICAL UNIVERSITY

JNANA SANGAMA, BELAGAVI-560 004

TECHNICAL SEMINAR REPORT [18ECS84]


On
EFFICIENT EPILEPTIC SEIZURE PREDICTION BASED ON DEEP
LEARNING

Submitted in partial fulfillment of the requirements for the degree of

BACHELOR OF ENGINEERING
IN
ELECTRONICS AND COMMUNICATION ENGINEERING

Submitted by
SHREYA M
1GA18EC148
Under the guidance of
SEEMA SRINIVAS
Assistant Professor
Dept. of Electronics and Communication Engineering

Carried out at
GLOBAL ACADEMY OF TECHNOLOGY
DEPARTMENT OF ELECTRONICS AND COMMUNICATION
ENGINEERING

RR NAGAR, BENGALURU - 560 098.


GLOBAL ACADEMY OF TECHNOLOGY
(Affiliated to Visvesvaraya Technological University)
RR NAGAR, BENGALURU-560 098

DEPARTMENT OF ELECTRONICS AND COMMUNICATION


ENGINEERING

CERTIFICATE

This is to certify that the Technical Seminar entitled EFFICIENT EPILEPTIC


SEIZURE PREDICTION BASED ON DEEP LEARNING, bonafide work carried
out by Ms. Shreya M bearing USN 1GA18EC148, a student of Global Academy of
Technology in partial fulfillment for the award of Bachelor of Engineering in
Electronics & Communication Engineering under Visvesvaraya Technological
University, Belagavi during the year 2021-22. The report has been approved as it
satisfies the academic requirements in respect of Technical Seminar as prescribed for
the said Degree.

Signature of the Guide: Signature of the HOD:


SEEMA SRINIVAS Dr. H S MANJUNATHA REDDY
Assistant Professor, Dept. of ECE, Professor & HOD, Dept. of ECE,
GAT, Bangalore. GAT, Bangalore.

Date:

Place:
Efficient Epileptic Seizure Prediction based on Deep Learning 2019-2020

ACKNOWLEDGEMENT

The satisfaction and euphoria that accompany the successful completion of any task
would be incomplete without the mention of the people who made it possible, whose
constant guidance and encouragement crowned the efforts with success.

I would like to profoundly thank Management of Global Academy of Technology for


providing such a healthy environment for the successful completion of Seminar work.

I would like to express my thanks to the Principal Dr. Ranapratap Reddy for their
encouragement that motivated me for the successful completion of Seminar work.

Also, I would like to express my deepest sense of gratitude to Dr. H. S Manjunatha


Reddy, Professor and Head of Department for his constant support and guidance
throughout the Seminar work.

I would also like to thank the Seminar Coordinator SEEMA SRINIVAS,


Assistant Professor, Department of Electronics and Communication Engineering
and all other teaching and non-teaching staff of Electronics and Communication
Engineering Department who has directly or indirectly helped me in the
completion of the Seminar work.

Last, but not the least, I would hereby acknowledge and thank my Parents who have
been a source of inspiration and also instrumental in the successful completion of the
seminar work.

SHREYA M
1GA18EC148
Efficient Epileptic Seizure Prediction based on Deep Learning 2019-2020

ABSTRACT

Epilepsy is one of the world's most common neurological diseases. It is defined


as a group of related disorders in the brain's electrical systems that are
characterized by a tendency to cause recurrent seizure. Seizure cause changes in
movement, behavior, sensation, or awareness, including loss of consciousness or
convulsions, which last from a few seconds to few minutes in most individuals.
Seizures may occur in children and adults. Epilepsy is not a form mental illness
or intellectual dysfunction.
Detecting the seizure during the pre-ictal period helps the patient greatly. This
paper explains a patient-specific seizure prediction technique based on deep
learning and applied to long-term scalp EEG recordings which means various
deep learning models are being applied to the EEG signal, which differentiate
it from interictal state. This helps in the early detection and possible treatment.
Four deep learning models are proposed to extract the most discriminative
features which enhance the classification accuracy and prediction time.
The proposed approach extracts the significant spatial features from different
scalp positions and the recurrent neural network in expecting the incidence of
seizures earlier than the current methods.
The achieved highest accuracy of 99.6% and lowest false alarm rate of 0.004
along with very early seizure prediction time of one hour make the proposed
method the most efficient one.
Efficient Epileptic Seizure Prediction based on Deep Learning 2019-2020

CONTENTS

CHAPTER 1 INTRODUCTION
1.1 Epileptic EEG 1

CHAPTER 2 LITERATURE SURVEY 4

CHAPTER 3 PROPOSED WORK 5

CHAPTER 4 METHODOLOGY
4.1 Multilayer perceptron 9
4.2 Deep convolutional neural network 10
4.3 Long short term memory networks 11
4.4 Deep convolutional auto encoder 13
4.5 EEG channel selection 13

CHAPTER 5 ALGORITHM 14

APPLICATIONS, ADVANTAGES AND


CHAPTER 6 DISADVANTAGES
6.1 Applications 15
6.2 Advantages 15
6.3 Disadvantages 16

CONCLUSION 17

REFERENCES 18
Efficient Epileptic Seizure Prediction based on Deep Learning 2019-2020

LIST OF FIGURES

Figure 1 EEG brain states in typical epileptic EEG 2


(a) Sample plot of normal EEG signal
Figure 2 (b) Sample plot of epileptic EEG signal 3
Block diagram of MLP based seizure
Figure 3 predictor 6
Block diagram of DCNN+ MLP based
Figure 4 seizure predictor 7
Block diagram of semi- supervised
DCAE+Bi-LSTM model,
(a) Pre- training phase of DCAE to
generate the reconstructed EEG signals from
the latent space representation
through unsupervised learning
(b) Pre- trained classifier that predicts
Figure 5 seizure through supervised learning. 8
The architecture of the proposed MLP
Figure 6 based classifier 10
The architecture of the proposed DCNN
Figure 7 front end in DCNN based models. 11
Efficient Epileptic Seizure Prediction based on Deep Learning 2021-2022

CHAPTER 1

INTRODUCTION
Epilepsy is defined as a group of related disorders in the brain's electrical systems that are
characterized by a tendency to cause recurrent seizure. Seizure’s characteristics include loss
of awareness or consciousness and disturbances of movement, sensation or other cognitive
functions.

1.1 EPILEPTIC EEG


Electroencephalogram (EEG) is an electrophysiological monitoring method to record
electrical activity of the brain. It is typically non-invasive, with the electrodes placed along
the scalp and is considered the most powerful diagnostic and analytical tool of epilepsy.
Physicians classify the brain activity of the epileptic patients according to the EEG
recordings into four states:
1) preictal state- The time period just before the seizure

2) ictal state- The time period during the seizure occurrence

3) postictal state- The period after the seizure took place

4) interictal state- The period between seizures

According to the above categorization of the epileptic patient’s brain activities, the seizure
prediction problem could be viewed as a classification task between the preictal and interictal
brain states. An alarm is raised in case of detecting the preictal state among the predominant
interictal states indicating a potential seizure is coming.
Since EEG signals are different across patients due to the variations in seizure type and
location, most seizure prediction methods are therefore patient-specific.

Machine learning can be classified into two:

1) Supervised learning- training of the machine using data which is well “labeled” (which

means some data is already tagged with the correct answer)

Dept of Electronics and Communication Engineering Page 1


Efficient Epileptic Seizure Prediction based on Deep Learning 2021-2022

2) Unsupervised learning- training the machine to work on its own to discover information
(it mainly deals with the unlabeled data).
Supervised learning techniques are used through two main stages which are feature
extraction and classification between preictal states and interictal states.
The extracted features are used to train the classifier that could then be used for the analysis of
new EEG recordings to predict the occurrence of the seizure by detecting the preictal state.
The extracted features are categorized into three main groups: time domain, frequency domain
and nonlinear features.
Based on the selected features, a prediction scheme that detects the preictal brain state is
implemented. Most of the previous work proposed machine learning based prediction
schemes like Support Vector Machine (SVM).
SVM is a supervised machine learning model that uses classification algorithms for

two-group classification problems. After giving an SVM model sets of labeled training data
for each category, they're able to categorize new text.
In this paper, automatic extraction of the most important features by developing deep learning
based algorithms without any pre-processing.
For the system to be suitable for real-time usage, computation complexity should be
considered, therefore we introduce a channel selection algorithm to select the best
representing channels from the multi-channel EEG recording. The used testing method
proves the robustness of the proposed algorithms over different seizures.

Figure 1. Brain states in a typical epileptic EEG

Dept of Electronics and Communication Engineering Page 2


Efficient Epileptic Seizure Prediction based on Deep Learning 2021-2022

Figure 2. (a)Sample plot of normal EEG signal


(b)Sample plot of epileptic EEG signal

Dept of Electronics and Communication Engineering Page 3


Efficient Epileptic Seizure Prediction based on Deep Learning 2021-2022

CHAPTER 2

LITERATURE SURVEY

Author & Title Contribution Limitations


Year
S. Raghu, and Features The classification of A total of twelve
N. Sriraam , A. Ranking for the epileptic seizures from features was
S. Hegde(2016) Classification of normal EEG merely extracted, which
Epileptic depends on the selection of introduced a delay in
Seizure from appropriate EEG feature. the prediction.
Temporal EEG
Amit K. Sinha, A New System State characterization The study involved an
Ken neth A. Theoretic (classification analysis over much
Loparo, and Classifier for algorithm) longer time periods,
William J. Detection and this approach failed to
Richoux Prediction of predict one seizure in
Epileptic the training set that f
(2004) Seizures. or Patient
Mr. Amit Personalized Real-time ECG Theory implies to
Walinjkar Wearable Classification and FHIR ECG recordings (this
, Dr. John Systems for Interoperability paper was referred to
Real-time ECG study the
Woods (2017) Classification classification methods
and Healthcare used)
Interoperability

S. Raghu, and N. Sriraam , A. S. Hegde

An International Journal of Modern Engineering Research, published in 2016,


“Features Ranking for the Classification of Epileptic Seizure from Temporal EEG” . In this
Journal they proposed for EEG classification by feature ranking test, applied using test,
receiving operator characteristics, Bhattacharyya and Wilcoxon methods to select significant
features.

Amit K. Sinha, Kenneth A. Loparo, and William J. Richoux

An International Journal of IEEE EMBS, published in 2004, “A New System


Theoretic Classifier for Detection and Prediction of Epileptic Seizures” . In this Journal they
proposed the computational approach, Fuzzy Measure-theoretic Quantum Approximation of
an Abstract System (FMQAS), generates a system measure between each pair of system
objects as a relative measure of association incorporating, through a hierarchical iterative
procedure, both the local and global significance of the interaction.

Dept of Electronics and Communication Engineering Page 4


Efficient Epileptic Seizure Prediction based on Deep Learning 2021-2022

CHAPTER 3

PROPOSED WORK

Block Diagram of the proposed models:


Four deep learning based models are introduced for the purpose of early and accurate seizure
prediction taking into account the real-time operation, which are as follows:

Figure 3. Block diagram of MLP based Seizure predictor

3.1. Multi-layer Perceptron (MLP):


A simple deep neural network algorithm, is trained on the selected patients to learn the network
parameters that are able to do the classification task. The block diagram of the model is shown.

Figure 4. Block diagram of DCNN+ MLP based Seizure predictor

Dept of Electronics and Communication Engineering Page 5


Efficient Epileptic Seizure Prediction based on Deep Learning 2021-2022

3.2. Deep Convolutional Neural Network (DCNN):


The second model that relies on Deep Convolutional Neural Network (DCNN) is introduced
to enhance the classification accuracy, which extracts the spatial features (spatial features
refers to the information having location- based relation with other information) from different
electrodes locations and uses MLP for the classification task. In order to use DCNN, EEG data
is represented by a matrix with one dimension is the number of channels and the other
dimension is the time steps. The block diagram of the model is shown in figure.

Figure 5 . Block diagram of semi- supervised DCAE +Bi-LSTM model, (a) pre-training phase of
DCAE to generate the reconstucted EEG signals from the latent space representation through
unsuperivsed learning, (b) pre-trained classifier that predicts seizures through supervised learning

Dept of Electronics and Communication Engineering Page 6


Efficient Epileptic Seizure Prediction based on Deep Learning 2021-2022

3.3. Deep convolutional Autoencoder (DCAE):


For reducing training time, we developed the fourth model that implements Deep
convolutional Autoencoder (DCAE) architecture. In DCAE, we pre-trained the model
front-end, DCNN, in an unsupervised manner. Then, the training process is launched with
some initial values that will help the network to converge faster and enhance the network
optimization which in turn reduce the training time and increase the accuracy. After training
the AE, the trained encoder is connected to Bi-LSTM network for classification. The block
diagram of the model is shown in figure 6.

Dept of Electronics and Communication Engineering Page 7


Efficient Epileptic Seizure Prediction based on Deep Learning 2021-2022

CHAPTER 4

METHODOLOGY

4.1 Multilayer Perceptron:


Multilayer Perceptron (MLP) is considered one of the most widely used artificial neural
network (ANN). MLP consists usually of three successive layers, called: input layer, hidden
layers, and output layer. Deep ANNs are composed of multiple hidden layers that enable the
network to learn the features better using the non-linear activation functions. The ANN idea
is motivated by the structure of the human brain’s neural system. A typical ANN is a buildup
of connected units called neurons. These artificial neurons incorporate the received data and
transmit it to the other associated neurons, much like the biological neurons in the brain. The
output of a neuron in any ANN is computed by applying a linear or nonlinear activation
function to the weighted sum of the neurons’ output in the preceding layer. When the ANN
used as a classifier, the final output at the output layer indicates the appropriate predicted class
of the corresponding input data.In our first proposed seizure prediction model, Fig. 3, we apply
the raw EEG after segmentation to MLP with four hidden layers as depicted in Fig.
7. The number of units in each layer is 300, 100, 50, 20 starting from the first hidden layer to
the fourth one. The total number of trainable parameters is 8,870,291 which is considered high
due to the fully connected architecture.

Figure 6. The architecture of the proposed MLP based classifier

Dept of Electronics and Communication Engineering Page 8


Efficient Epileptic Seizure Prediction based on Deep Learning 2021-2022

4.2 Deep Convolutional Neural Network:

This is due to the ability of CNN to automatically extract significant spatial features that best
represents the data from its raw form without any preprocessing and without any human
decision in selecting these features. The sparse connectivity and parameter sharing of CNN
give it high superiority regarding the memory footprint as it requires much less memory to
store the sparse weights. The equivariant representation property of the CNN increases the
detection accuracy of a pattern when it exists in a different location across the image. A typical
CNN formed of three types of layers: convolution layer, pooling layer and fully connected
layer. The convolution layer is used to generate the feature map by applying filters with
trainable weights to the input data. This feature map is then down-sampled by applying the
pooling layer to reduce the features’ dimension and therefore the computational complexity.
Finally, the fully connected layer is applied to all the preceding layer’s output to generate the
one-dimensional feature vector. CNN is used as a feature extractor to replace the complex
feature engineering used in previous work. The proposed DCNN architecture model is shown
in Fig. 8, in which the EEG segment is converted into a 2D matrix to be suitable for the DCNN.
The architecture consists of four convolutional layers and three maximum pooling layers
interchangeably. The proposed DCNN architecture is used as the front-end feature extractor in
our three proposed models in Fig. 3, 4, 5(b) which helps in spatial feature extraction from the
different electrodes position on the scalp. The number of trainable parameters is drastically
decreased when employing DCNN due to the weight sharing property. The number of trainable
parameters in the second model, DCNN + MLP, is almost 520K, while in the third and fourth
model, DCNN + Bi-LSTM and DCAE + Bi-LSTM, the number of trainable parameters is
almost 28K.

Figure 7. The architecture of the proposed DCNN front-end in DCNN based models

Dept of Electronics and Communication Engineering Page 9


Efficient Epileptic Seizure Prediction based on Deep Learning 2021-2022

4.3 Long Short-Term Memory Networks:

Long Short Term Memory Networks (LSTMs) are a type of RNN, implemented to overcome
the problems of basic RNN. LSTMs are able to solve the problem of vanishing gradient by
maintaining the gradient values during the training process and back-propagate it through layer
and time, thus LSTM has the capability of learning long-term dependencies. LSTM cell
consists of three controlling gates that could store or forget the previous state and use or discard
the current state. Any LSTM cell computes two states at each time step: a cell state that could
be maintained for long time steps and a hidden state that is the new output of the cell at each
time step. Instead of using LSTM as the classifier, we used a Bidirectional-LSTM (Bi-LSTM)
network in which each LSTM block is replaced by two blocks that process temporal sequence
simultaneously in two opposite directions.

In the forward pass block, the feature vector generated from the DCNN is processed starting
from its first-time instance to the end, while the backward pass block processes the same
segment in the reverse order. The network output at each time step is the combined outputs of
the two blocks at this time step. In addition to the previous context processing in standard
LSTM, Bi-LSTM processes the future context which enhances the prediction results. Using
Bi-LSTM as a classifier enhances the prediction accuracy through extracting the important
temporal features in addition to the spatial features extracted by the DCNN.

4.4. Deep Convolutional Autoencoder:


Autoencoders (AEs) are unsupervised neural networks whose target is to find a lower
dimensional representation of the input data. This technique has many applications like data
compression, dimensionality reduction, visualizing high dimensional data and removing noise
from the input data. Deep Convolutional Autoencoder (DCAE) replaces the fully connected
layers in the simple AE with convolution layers.

Dept of Electronics and Communication Engineering Page 10


Efficient Epileptic Seizure Prediction based on Deep Learning 2021-2022

4.5 EEG Channel Selection:

We introduce an EEG channel selection algorithm to select the most important and
informative EEG channels related to our problem. Decreasing the number of channels
helps with reducing the features’ dimension, the computation load and the required
memory for the model to be suitable for real-time application. the algorithm will output
the reduced channels that give the same accuracy by omitting redundant or irrelevant
channels.

Dept of Electronics and Communication Engineering Page 13


Efficient Epileptic Seizure Prediction based on Deep Learning 2021-2022

CHAPTER 5

ALGORITHM

Algorithm 1: EEG channel selection algorithm


Input: Eight patients EEG preictal segments, the seizure prediction accuracy for each
patient using all channels Acc[1 : 8]
Output: Chred [1 : 8] (array of reduced channels for each patient that give the same
accuracy Acc)
Initialization: m = 8 (initial number of channels), done = 0
for patient ← 1 to 8 do
m = 8, done = 0;
for ch ← 1 to 23 do
compute variance[ch];
compute entropy[ch];
compute variance[ch]*entropy[ch];
end
sort the 23 channels with highest variance entropy product
first in Temp;
while done ≠ 1 do
select first m channels from Temp;
train and test the model with m channels;
compute the prediction accuracy Accnew ;
if Accnew ≥ Acc[patient] then
done ← 1;
Chred [patient] ← Temp [1: m];
else
m ← m+1
end
end
end

Dept of Electronics and Communication Engineering Page 14


Efficient Epileptic Seizure Prediction based on Deep Learning 2021-2022

CHAPTER 6

APPLICATIONS
 Due to unexpected seizure times, epilepsy has a strong psychological and social
effect in addition to it could be considered a life-threatening disease.
Consequently, the prediction of epileptic seizures would greatly contribute to
improving the quality of life of epileptic patients in many aspects, like raising an
alarm before the occurrence of the seizure to provide enough time for taking
proper action, developing new treatment methods and setting new strategies to
better understand the nature of the disease.
 Since EEG signals are different across patients due to the variations in seizure
type and location, most seizure prediction methods are therefore patient-specific.
The used testing method proves the robustness of the proposed algorithms over
different seizures.

ADVANTAGES
 Deep learning-based patient-specific epileptic seizure prediction method using
long-term scalp EEG data has been proposed. This method achieves a prediction
accuracy of 99.6%, a sensitivity of 99.72%, a specificity of 99.60%, a false alarm
rate of 0.004 per hour and prediction time of one hour prior the seizure onset.
 DCAE based supervised learning approach led to reducing the training time. For
the system to be suitable for real-time application, a channel selection algorithm
is proposed which reduces the computational load and the training time. Using
exhaustive cross-validation technique to test the proposed models proves the
robustness and generality of our method against variation across various seizure
types.
 Comparison with previous work demonstrate that the proposed method is
efficient, reliable and suitable for real-time application of seizure prediction.

 The proposed method achieved the highest accuracy, sensitivity and specificity
among others. Our prediction time is the earliest and the false alarm rate is the
lowest.

Dept of Electronics and Communication Engineering Page 15


Efficient Epileptic Seizure Prediction based on Deep Learning 2021-2022

DISADVANTAGES
 The main challenge is to determine the most discriminative features that best
represent each class. The computation time needed to extract these features
depends on the process complexity and is considered another challenge especially
in real-time application.
 The involvement of various deep learning model, one has to properly understand
the algorithms before implementing them in real life.
 Raw EEG input is taken, which may contain unwanted external signals.

Dept of Electronics and Communication Engineering Page 16


Efficient Epileptic Seizure Prediction based on Deep Learning 2021-2022

CONCLUSION
A novel deep learning based patient-specific epileptic seizure prediction method using
long-term scalp EEG data has been proposed. This method achieves a prediction
accuracy of 99.6%, a sensitivity of 99.72%, a specificity of 99.60%, a false alarm rate
of 0.004 per hour and prediction time of one-hour prior the seizure onset. An important
spatial and temporal feature from raw data are learned by the DCNN and
Bi-LSTM networks respectively. DCAE based Semi supervised learning approach is
investigated with the transfer learning technique which led to reducing the training
time. For the system to be suitable for real-time application, a channel selection
algorithm is proposed which reduces the computational load and the training time.
Using Leave-One Out exhaustive cross-validation technique to test the proposed
models proves the robustness and generality of our method against variation across
various seizure types. Our experimental results and the comparison with previous
work demonstrate that the proposed method is efficient, reliable and suitable for
real-time application of seizure prediction. This is by achieving accuracy higher than
the state of the art with earlier prediction time to mitigate the potential life-threatening
incidents for epileptic patients.

Dept of Electronics and Communication Engineering Page 17


Efficient Epileptic Seizure Prediction based on Deep Learning 2021-2022

REFERENCES
1. H. Khan, L. Marcuse, M. Fields, K. Swann, and B. Yener, “Focal onset seizure
prediction using convolutional networks,” IEEE Trans. Biomed. Eng., vol. 65, no.
9, pp. 2109–2118, Sep. 2018.
2. Cheng-Yi Chiang, Nai-Fu Chang, Tung-Chien Chen, Hong-Hui Chen, and Liang-
Gee Chen, “Seizure prediction based on classification of EEG synchronization
patterns with on-line retraining and post-processing scheme,” 2011 Annual
International Conference of the IEEE Engineering in Medicine and Biology
Society, Boston, MA, pp. 7564–7569, 2011.
3. Amit K. Sinha, Kenneth A. Loparo, and William J. Richoux, “A New System
Theoretic Classifier for Detection and Prediction of Epileptic Seizures”.
Preceedings of the 26th annual International Conference of IEEE EMBS
San-fransico, CA, USA September 1-5,2004
4. S. Raghu, and N. Sriraam Center for Medical Electronics and Computing M.S.
Ramaiah Institute of Neuroscience M. S. Ramaiah Institute of Technology M.S.
Ramaiah Memorial Hospital Bangalore, India Bangalore, India, A. S. Hegde
M.S. Ramaiah Memorial Hospital Bangalore, India Bangalore, India “Features
Ranking for the Classification of Epileptic Seizure from Temporal EEG”.
5. Xuedan Du, Yinghao Cai, Shuo Wang, and Leijie zhang The State Key
Laboratory of MAnagement and control for Complex Systems, Institute of
Automation, CAS Beijing, China “Overview of Deep Learning” november
11-13,2016

Dept of Electronics and Communication Engineering Page 18

You might also like