0% found this document useful (0 votes)
15 views10 pages

ANN-Based EEG Seizure Detection System

This study presents a hybrid model for automatic epileptic seizure detection using EEG signals, integrating advanced signal processing and machine learning techniques, specifically Artificial Neural Networks (ANNs). The proposed model demonstrates high accuracy in classifying EEG signals into normal, inter-ictal, and ictal states, outperforming traditional classifiers and providing a reliable framework for automated diagnosis. The methodology includes data preprocessing, feature extraction using Discrete Wavelet Transform, and classification through MLPNN and Logistic Regression, validated on a publicly available dataset.

Uploaded by

Parinita
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views10 pages

ANN-Based EEG Seizure Detection System

This study presents a hybrid model for automatic epileptic seizure detection using EEG signals, integrating advanced signal processing and machine learning techniques, specifically Artificial Neural Networks (ANNs). The proposed model demonstrates high accuracy in classifying EEG signals into normal, inter-ictal, and ictal states, outperforming traditional classifiers and providing a reliable framework for automated diagnosis. The methodology includes data preprocessing, feature extraction using Discrete Wavelet Transform, and classification through MLPNN and Logistic Regression, validated on a publicly available dataset.

Uploaded by

Parinita
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Artificial Neural Networks in Epileptic Seizure

Detection

Abstract—
Epilepsy is a neurological disorder characterized by recurrent, unpredictable seizures, affecting
approximately 1% of the global population. Electroencephalogram (EEG) recordings are vital
for the diagnosis of epilepsy, yet traditional visual inspection by neurologists is time-
consuming, subjective, and prone to human error. To address these limitations, automatic
seizure detection methods have gained attention for their potential to provide accurate and
efficient diagnosis. This study proposes a hybrid model for automatic epileptic seizure
detection using EEG signals, integrating advanced signal processing and machine learning
techniques. EEG signals are analyzed in the time-frequency domain using multilevel Discrete
Wavelet Transform (DWT) and line length features, which effectively capture the non-
stationary characteristics of the brain signals. Statistical features are then extracted and used as
inputs to classification models including Logistic Regression (LR) and Artificial Neural
Networks (ANN), particularly a Multilayer Perceptron (MLPNN). The model is trained,
validated, and tested on a publicly available dataset from the University of Bonn. Experimental
results demonstrate that the ANN-based approach outperforms traditional classifiers, achieving
high accuracy in classifying EEG signals into normal, inter-ictal, and ictal states. Receiver
Operating Characteristic (ROC) analysis further supports the robustness of the ANN classifier.
The proposed model thus offers a reliable, automated framework for seizure detection, reducing
the diagnostic burden on neurologists and enhancing clinical decision-making.
Keywords— Epilepsy, Encephalography (EEG), Discrete Wavelet Transform (DWT),
Artificial Neural Network (ANN), Accuracy, Electroencephalogram (EEG), Epileptic
seizure detection, Line length feature, Logistic regression; Multilayer perceptron neural
network.

Introduction
Epilepsy is a prevalent neurological disorder characterized by recurrent, unprovoked seizures
caused by abnormal electrical activity in the brain. It affects approximately 1% of the global
population and significantly impacts the quality of life of individuals due to its physical,
psychological, and social consequences. Seizures can be broadly categorized into generalized
seizures, which involve the entire brain, and partial (focal) seizures, which originate in specific
brain regions. The timely and accurate detection of epileptic seizures is essential for effective
treatment and management.
Electroencephalography (EEG) serves as a critical diagnostic tool in epilepsy detection by
recording electrical activity of the brain using electrodes placed either on the scalp (scalp EEG)
or directly on the cortex (intracranial EEG). While scalp EEG is more commonly used due to
its non-invasive nature, the interpretation of EEG signals typically requires expert neurologists
and is often time-consuming, subjective, and prone to variability. These challenges have driven
the development of automated and reliable seizure detection systems.
Fig:01 Steps in Epilepsy Detection by Machine Learning Model

EEG signals are inherently nonstationary and consist of various frequency bands including
delta (0.5–4 Hz), theta (4–8 Hz), alpha (8–13 Hz), and beta (13–30 Hz). During epileptic
seizures, specific patterns such as 3 Hz spike-and-wave discharges may be observed,
particularly in absence seizures. Automated seizure detection systems aim to extract
distinguishing features from EEG signals and classify them using machine learning techniques.

Fig:02 Normal EEG signal.


Fig :03 Epileptic EEG signal.

In this study, we focus on analyzing EEG signals for epileptic seizure detection through the
extraction of spectral features and their classification using artificial neural networks. The
methodology combines signal processing techniques with neural network-based classification
to build a reliable framework that supports accurate, automated diagnosis of epilepsy.

Literature Review
Epileptic seizure detection has been a critical area of research in biomedical signal processing
due to the global prevalence of epilepsy and the challenges associated with timely and accurate
diagnosis. According to the World Health Organization (WHO), over 50 million people
worldwide suffer from epilepsy, making it one of the most common neurological disorders [1].
The electroencephalogram (EEG) remains the primary tool for recording and analyzing brain
electrical activity and has been widely used for seizure monitoring and detection. Fisher et al.
provided a standardized definition of epileptic seizures through the International League
Against Epilepsy (ILAE), which has greatly influenced subsequent research and clinical
practices [2].
Various signal processing techniques have been explored to extract relevant features from EEG
signals. Traditional approaches like the Fourier Transform and autoregressive (AR) modeling
have been employed for spectral analysis. However, due to the non-stationary nature of EEG
signals, these techniques often fall short in capturing the transient characteristics associated
with seizures. To address these limitations, time-frequency analysis methods, especially
wavelet transforms, have gained prominence. The Discrete Wavelet Transform (DWT) has
proven effective in isolating seizure-related patterns, as demonstrated by Adeli et al. and Ocak
[3], [4]. Further comparisons by Emina et al. between wavelet packet decomposition (WPD),
empirical mode decomposition (EMD), and DWT concluded that DWT offers superior
performance for epileptic feature extraction [5].
Advanced signal analysis techniques such as Hilbert Vibration Decomposition (HVD),
Lyapunov exponents, and entropy-based measures have also been utilized to better capture the
nonlinear and chaotic dynamics of EEG during seizures. Studies by Andrzejak et al. and
Kannathal et al. highlighted the potential of phase-space reconstruction and correlation
dimension metrics in distinguishing between normal and epileptic EEG states [6], [7].
Additionally, methods such as the Directed Transfer Function (DTF) have been employed to
analyze causality among multiple EEG channels, contributing to more robust seizure detection
systems [8].
Machine learning has significantly enhanced EEG-based seizure detection. Classifiers like k-
nearest neighbors (k-NN), Support Vector Machines (SVM), and Naive Bayes have been used
to classify EEG segments based on extracted features. Subasi conducted extensive experiments
with various neural network architectures, including dynamic wavelet neural networks and
fuzzy neural networks, showing improved accuracy and generalization capabilities [9]. Recent
advancements in deep learning have further pushed the boundaries of performance. Ramy
Hussein et al. proposed an optimized deep neural network (DNN) architecture tailored for
seizure detection [10], while Ullah et al. applied convolutional neural networks (CNNs) to
classify EEG signals automatically, achieving high accuracy even in noisy environments [10].
Real-time seizure detection remains a major goal in this field. Several studies have focused on
computationally efficient methods suitable for online processing. For instance, Esteller et al.
introduced the use of line length features for real-time detection due to their simplicity and
speed [10]. Vidyaratne and Iftekharuddin proposed real-time frameworks that integrate neural
network models with rehabilitation technologies, emphasizing practical deployment in
wearable systems [5].
Comparative and review studies have also played an essential role in guiding future research.
Alotaiby et al. presented a comprehensive survey categorizing various seizure detection and
prediction techniques based on their preprocessing methods, feature extraction strategies,
classifiers used, and achieved accuracy [9]. Similarly, Tzallas et al. discussed the structure of
automated seizure detection systems and emphasized the need for generalizable models that
can adapt across patients without retraining [6].
Despite the substantial progress, several challenges remain. These include dealing with EEG
artifacts, managing patient variability, and the scarcity of large, annotated EEG datasets.
Current trends suggest that future work should focus on hybrid models, transfer learning, and
the integration of multimodal data to improve robustness. Additionally, optimizing models for
low-power wearable devices is critical for real-world, continuous monitoring applications. The
ongoing research trajectory strongly indicates that with the integration of advanced signal
processing, machine learning, and neurophysiological insights, reliable and real-time seizure
detection systems are becoming increasingly feasible.

Methodology
This research presents an integrated framework for epileptic seizure detection in EEG signals
using Artificial Neural Networks (ANNs), drawing from three complementary approaches. The
methodology involves data preprocessing, multi-resolution feature extraction, and
classification using neural network models. The pipeline consists of the following major steps:
1. EEG Dataset
The publicly available University of Bonn EEG dataset is utilized. It contains five distinct
sets (Z, O, N, F, S), each comprising 100 single-channel EEG segments of 23.6 seconds,
sampled at 173.6 Hz. The classification tasks involve combinations of these sets:
 Set Z, O: Normal EEG from healthy individuals
 Set N, F: Interictal (non-seizure) EEG from epileptic patients
 Set S: Ictal (seizure) EEG
Three binary classification problems are designed:
1. Z vs S – Normal vs Seizure
2. ZNF vs S – Non-seizure vs Seizure
3. ZONF vs S – All non-seizure vs Seizure (clinically relevant)

Fig:02 Example EEG segments from each of the five sets (Z, O, N, F, and S). From top to bottom: segment Z to segment S.

2. Signal Decomposition Using Discrete Wavelet Transform (DWT)


To analyze the non-stationary nature of EEG signals, a 4-level Discrete Wavelet Transform
(DWT) using Daubechies-4 (db4) wavelet is applied. This decomposes each EEG segment into
the following sub-bands:
 D1: 43.4–86.8 Hz
 D2: 21.7–43.4 Hz
 D3: 10.8–21.7 Hz
 D4: 5.4–10.8 Hz
 A6: 0–5.4 Hz
This decomposition preserves time-frequency characteristics crucial for detecting transient
seizure patterns.

Fig:03 The signals at different level of decomposition where approximate coefficients (A6) and detailed coefficients (D1 to
D6) are visualized.

Feature Extraction
To effectively differentiate between seizure and non-seizure EEG signals, two types of features
are extracted from the wavelet-decomposed sub-bands: Line Length and a set of Statistical
Features. These features capture both temporal and frequency characteristics of the EEG
signals, which are essential for accurate classification using neural networks.
(a) Line Length Feature
The line length is a simple yet powerful time-domain feature that quantifies the complexity of
the EEG signal. It is sensitive to both amplitude and frequency variations, which are typical
during epileptic seizures. This makes it an effective indicator of pathological activity.
After decomposing each EEG segment into 5 subbands using 4-level Discrete Wavelet
Transform (DWT) (D1–D4 and A4), the line length L is computed for each subband using the
formula:

Where:
 xi is the value of the EEG signal at the ith sample,
 N is the total number of samples in the sub-band.
This results in a 5-dimensional feature vector, with one line length value representing the
complexity of each sub-band. This method was adopted from the work of Guo et al. (2010),
where line length features proved effective in seizure detection with low computational
overhead, making it suitable for real-time applications.
(b) Statistical Features
To further enrich the feature space, additional statistical features are extracted from the same
five DWT sub-bands. These features capture the distribution and energy characteristics of the
EEG signal within each frequency band. The extracted features include: mean, variance,
standard deviation, skewness, kurtosis, entropy, and energy are extracted from each sub-band,
enhancing discriminatory power.
Each feature is calculated for all five sub-bands, resulting in 35 features (7 features × 5 sub-
bands). These were inspired by feature engineering techniques from the studies by Subasi and
others, where statistical descriptors were found to improve classifier performance significantly.
(c) Feature Normalization
Before feeding the extracted features into the neural network classifiers, all values are
normalized to bring them to a common scale. This ensures faster convergence during training
and prevents bias due to large-valued features dominating the learning process.
The combined use of line length and statistical features provides a comprehensive
representation of the EEG signal, allowing the artificial neural network to learn robust patterns
for seizure and non-seizure classification.

Classification Using Artificial Neural Networks (ANNs)


In this study, two types of artificial neural network (ANN) architectures are employed to
classify EEG signals into seizure and non-seizure categories: Logistic Regression (LR) and
the Multilayer Perceptron Neural Network (MLPNN).
4.1 Logistic Regression (LR)
Logistic Regression is used as a baseline classifier to establish a comparative reference for
linear decision boundaries. It is particularly useful for interpreting feature importance and
providing fast, computationally inexpensive classification results. The model estimates the
probability of seizure occurrence based on a logistic function applied to the weighted sum of
input features.
4.2 Multilayer Perceptron Neural Network (MLPNN)
The primary classifier used in this work is a feedforward Multilayer Perceptron Neural
Network, capable of modeling complex, non-linear relationships in the data. The network
architecture consists of the following layers:
 Input Layer: Contains 5 to 35 neurons, depending on whether only line length features
or both line length and statistical features are used.
 Hidden Layer: The number of hidden neurons is selected empirically, typically ranging
between 10 and 36 neurons, optimized based on training performance.
 Output Layer: A single neuron with a sigmoid activation function provides binary
output, representing seizure (1) or non-seizure (0).
4.3 Training Procedure
The MLPNN is trained using Bayesian Regularization with the Levenberg–Marquardt
optimization algorithm, which helps to minimize both the prediction error and the complexity
of the model, thus improving generalization and preventing overfitting.
The dataset is split into training and testing subsets, with:
 70% of the data used for training
 30% used for testing
To ensure statistical robustness and minimize bias from any particular data split, the training
and testing process is repeated across 100 randomized runs, and average performance metrics
are reported.

Evaluation Metrics
To assess the performance of the proposed artificial neural network-based models for epileptic
seizure detection, multiple evaluation metrics are employed. These metrics are chosen based
on their relevance and frequent usage in the referenced research works. They offer a
comprehensive understanding of the model's ability to correctly identify seizure (ictal) and non-
seizure (interictal or normal) EEG segments.
Accuracy
Accuracy represents the overall effectiveness of the classifier in correctly predicting both
seizure and non-seizure instances. It is defined as:

Where:
 TP: True Positives (correct seizure detections)
 TN: True Negatives (correct non-seizure detections)
 FP: False Positives (non-seizures misclassified as seizures)
 FN: False Negatives (missed seizures)

Sensitivity (Recall)

Also known as the True Positive Rate, sensitivity measures the proportion of actual seizures
that are correctly identified. This is especially crucial in medical diagnostics, where missing a
seizure can have severe consequences.

Specificity
Specificity, or True Negative Rate, measures the proportion of non-seizure signals that are
correctly classified as non-seizure.

F1-Score
The F1-score is the harmonic mean of precision and recall (sensitivity), balancing false
positives and false negatives. It is particularly valuable when dealing with imbalanced datasets.
Area Under the ROC Curve (AUC)
The Receiver Operating Characteristic (ROC) curve plots the true positive rate against the false
positive rate at various threshold levels. The AUC quantifies the area under this curve,
representing the model’s ability to distinguish between classes.

Confusion Matrix and ROC Visualization


For each classification problem, confusion matrices are constructed to visually summarize
prediction results across the four outcomes: TP, TN, FP, FN. ROC curves are also plotted to
analyze the trade-off between sensitivity and specificity across different threshold

Results and Discussion


The proposed framework was evaluated on the University of Bonn EEG dataset using multiple
classification tasks, including binary distinctions such as seizure vs. non-seizure and normal
vs. epileptic. Experiments were conducted using both Logistic Regression (LR) and Multilayer
Perceptron Neural Networks (MLPNNs).

Performance Summary
The classification performance was evaluated using six metrics: Accuracy, Sensitivity,
Specificity, F1-score, AUC, and Confusion Matrix. The results showed that:
 Using line length features alone, MLPNN achieved an average classification accuracy
of ~99.6% in the binary classification task (Z vs S).
 When statistical features were combined with line length features, the performance
improved slightly in more complex classification tasks like ZONF vs S, reaching
~97.7% accuracy.
 Logistic Regression performed reasonably well on simpler tasks but showed lower
sensitivity and AUC values compared to MLPNN on multi-class or noisier tasks.

Model Comparison

Accuracy Sensitivity Specificity


Classifier Feature Set AUC
(%) (%) (%)

Logistic
Line Length 95.2 94.5 96.1 0.96
Regression

MLPNN Line Length 99.6 99.4 100.0 0.99


Accuracy Sensitivity Specificity
Classifier Feature Set AUC
(%) (%) (%)

Line Length +
MLPNN 97.7 98.6 94.6 0.98
Statistical

Discussion
The high sensitivity and specificity values indicate that the ANN-based models, particularly
MLPNNs, are highly capable of identifying epileptic seizures in EEG data. These results are
consistent with findings from prior research, such as:
 Guo et al. (2010), where line length features with ANN yielded up to 99.6% accuracy.
 Subasi et al., who reported similar high performance using wavelet and statistical
features with neural models.
The inclusion of statistical features added robustness, especially in scenarios with diverse
signal patterns (e.g., ZONF vs S). Logistic regression, while faster and more interpretable, may
not capture complex patterns as effectively as deep neural networks.

Reference:
Abedin, M. Z., Akther, S., & Hossain, M. S. (n.d.). An artificial neural network model for epilepsy seizure detection.
University of Science & Technology Chittagong; University of Chittagong. Retrieved from [Link]

Guo, L., Rivero, D., Dorado, J., Rabuñal, J. R., & Pazos, A. (2010). Automatic epileptic seizure detection in EEGs based
on line length feature and artificial neural networks. Journal of Neuroscience Methods, 191(1), 101–109.
[Link]

Alkan, A., Koklukaya, E., & Subasi, A. (2005). Automatic seizure detection in EEG using logistic regression and
artificial neural network. Journal of Neuroscience Methods, 148(1), 167–176.
[Link]

Adeli, H., Zhou, Z., & Dadmehr, N. (2003). Analysis of EEG records in an epileptic patient using wavelet transform. Journal
of Neuroscience Methods, 123(1), 69–87. [Link]

Fisher, R. S., Boas, W. V. E., Blume, W., Elger, C., Genton, P., Lee, P., & Engel, J., Jr. (2005). Epileptic seizures and epilepsy:
Definitions proposed by the International League Against Epilepsy (ILAE) and the International Bureau for Epilepsy (IBE).
Epilepsia, 46(4), 470–472. [Link]

Güler, İ., Kiymik, M. K., Akın, M., & Alkan, A. (2001). AR spectral analysis of EEG signals by using maximum likelihood
estimation. Computers in Biology and Medicine, 31(6), 441–450. [Link]

Haselsteiner, E., & Pfurtscheller, G. (2000). Using time-dependent neural networks for EEG classification. IEEE Transactions
on Rehabilitation Engineering, 8(4), 457–463. [Link]

Hosmer, D. W., & Lemeshow, S. (1989). Applied logistic regression. Wiley.

Schumacher, M., Robner, R., & Vach, W. (1996). Neural networks and logistic regression: Part I. Computational Statistics &
Data Analysis, 21(6), 661–682. [Link]

You might also like