Javascript is required
Alizard, F., Gibis, T., Selent, B., Rist, U., & Wenzel, C. (2022). Stochastic receptivity of laminar compressible boundary layers: An input-output analysis. Phys. Rev. Fluids, 7(7), 073902. [Google Scholar] [Crossref]
Almustafa, K. M. (2020). Classification of epileptic seizure dataset using different machine learning algorithms. Inf. Med. Unlocked, 21, 100444. [Google Scholar] [Crossref]
Bai, Y., Gautam, T., & Sojoudi, S. (2023). Efficient global optimization of two-layer relu networks: Quadratic-time algorithms and adversarial training. SIAM J. Appl. Math. Data Sci., 5(2), 446–474. [Google Scholar] [Crossref]
Başaran, E. (2022). A new brain tumor diagnostic model: Selection of textural feature extraction algorithms and convolution neural network features with optimization algorithms. Comput. Biol. Med., 148, 105857. [Google Scholar] [Crossref]
Beeraka, S. M., Kumar, A., Sameer, M., Ghosh, S., & Gupta, B. (2022). Accuracy enhancement of epileptic seizure detection: A deep learning approach with hardware realization of STFT. Circuits, Syst., Sign. Proces., 41, 461–484. [Google Scholar]
Dubey, S. R., Singh, S. K., & Chaudhuri, B. B. (2022). Activation functions in deep learning: A comprehensive survey and benchmark. Neurocomputing, 503, 92–108. [Google Scholar] [Crossref]
Epileptic Seizure Recognition. (n.d.). Kaggle. https://www.kaggle.com/datasets/harunshimanto/epileptic-seizure-recognition [Google Scholar]
Eroğlu, O., Eroğlu, Y., Yıldırım, M., Karlıdag, T., Çınar, A., Akyiğit, A., Kaygusuz, İ., Yıldırım, H., Keleş, E., & Yalçın, Ş. (2023). Comparison of computed tomography-based artificial intelligence modeling and magnetic resonance imaging in diagnosis of cholesteatoma. J Int Adv Otol., 19(4), 342–349. https://doi.org/ [Google Scholar] [Crossref]
Eroğlu, Y., Yildirim, M., & Çinar, A. (2021). CNNs based classification of breast ultrasonography images by hybrid method with respect to benign, malignant, and normal using mRMR. Comput. Biol. Med., 133, 104407. [Google Scholar] [Crossref]
Eroglu, Y., Yildirim, M., & Cinar, A. (2023). Diagnosis of periventricular leukomalacia in children with artificial intelligence-based models developed using brain magnetic resonance images. Signal, Image Video Process., 17(8), 4543–4550. [Google Scholar]
Mao, W. L., Fathurrahman, H. I. K., Lee, Y., & Chang, T. W. (2020). EEG dataset classification using CNN method. J. Phys.: Conf. Ser., 1456(1), 012017. [Google Scholar] [Crossref]
Mian Qaisar, S. & Subasi, A. (2020). Effective epileptic seizure detection based on the event-driven processing and machine learning for mobile healthcare. J. Ambient Intell. Humanized Comput., 1–13. [Google Scholar]
Nguyen, H. T., Crittenden, K., Weiss, L., & Bardaweel, H. (2022). Experimental modal analysis and characterization of additively manufactured polymers. Polymers, 14(10), 2071. [Google Scholar] [Crossref]
Pal, D., Reddy, P. B., & Roy, S. (2022). Attention UW-Net: A fully connected model for automatic segmentation and annotation of chest X-ray. Comput. Biol. Med., 150, 106083. [Google Scholar] [Crossref]
Pandian, J. A., Kanchanadevi, K., Kumar, V. D., Jasińska, E., Goňo, R., Leonowicz, Z., & Jasiński, M. (2022). A five convolutional layer deep convolutional neural network for plant leaf disease detection. Electron., 11(8), 1266. [Google Scholar]
Prathaban, B. P. & Balasubramanian, R. (2021). Dynamic learning framework for epileptic seizure prediction using sparsity based EEG Reconstruction with Optimized CNN classifier. Expert Syst. Appl., 170, 114533. [Google Scholar] [Crossref]
Sarić, R., Jokić, D., Beganović, N., Pokvić, L. G., & Badnjević, A. (2020). FPGA-based real-time epileptic seizure classification using artificial neural network. Biomed. Signal Process. Control, 62, 102106. [Google Scholar] [Crossref]
Sharma, S., Sharma, S., & Athaiya, A. (2017). Activation functions in neural networks. Towards Data Sci., 6(12), 310–316. [Google Scholar]
Shen, M., Wen, P., Song, B., & Li, Y. (2022). An EEG based real-time epilepsy seizure detection approach using discrete wavelet transform and machine learning methods. Biomed. Signal Process. Control, 77, 103820. [Google Scholar] [Crossref]
Tripathy, S. & Singh, R. (2022). Convolutional neural network: An overview and application in image classification. In Proceedings of Third International Conference on Sustainable Computing: SUSCOM 2021, Jaipur, India, pp.145-153. [Google Scholar]
Tufail, A. B., Ullah, I., Khan, R. A., Khan, M. A., Ma, Y. K., Khokhar, N. H., Sadiq, M. T., Khan, R., Shafiq, M., Eldin, E. T., & Ghamry, N. A. (2022). On disharmony in batch normalization and dropout methods for early categorization of Alzheimer’s disease. Sustainability, 14(22), 14695. [Google Scholar] [Crossref]
Wang, Z., Yang, J., & Sawan, M. (2021). A novel multi-scale dilated 3D CNN for epileptic seizure prediction. In 2021 IEEE 3rd International Conference on Artificial Intelligence Circuits and Systems (AICAS), Washington, DC, USA, pp.1-4. [Google Scholar] [Crossref]
Yildirim, M. (2023). Image visualization and classification using hydatid cyst images with an explainable hybrid model. Appl. Sci., 13(17), 9926. [Google Scholar] [Crossref]
Yildirim, M. & Cinar, A. (2022). Classification with respect to colon adenocarcinoma and colon benign tissue of coon histlopathological images with a new CNN model: MA_ColonNET. Int. J. Imaging Syst. Technol., 32(1), 155–162. [Google Scholar] [Crossref]
Search
Open Access
Research article
Special Issue

A CNN Approach for Enhanced Epileptic Seizure Detection Through EEG Analysis

nadide yucel1,
hursit burak mutlu1,
fatih durmaz1,
emine cengil2,
muhammed yildirim1*
1
Department of Computer Engineering, Faculty of Engineering and Natural Sciences, Malatya Turgut Ozal University, 44200 Malatya, Turkey
2
Department of Computer Engineering, Faculty of Engineering and Architecture, Bitlis Eren University, 13000 Bitlis, Turkey
Healthcraft Frontiers
|
Volume 1, Issue 1, 2023
|
Pages 33-43
Received: 10-11-2023,
Revised: 11-16-2023,
Accepted: 11-23-2023,
Available online: 11-30-2023
View Full Article|Download PDF

Abstract:

Epilepsy, the most prevalent neurological disorder, is marked by spontaneous, recurrent seizures due to widespread neuronal discharges in the brain. This condition afflicts approximately 1% of the global population, with only two-thirds responding to antiepileptic drugs and a smaller fraction benefiting from surgical interventions. The social stigma and emotional distress associated with epilepsy underscore the importance of timely and accurate seizure detection, which can significantly enhance patient outcomes and quality of life. This research introduces a novel convolutional neural network (CNN) architecture for epileptic seizure detection, leveraging electroencephalogram (EEG) signals. Contrasted with traditional machine-learning methodologies, this innovative approach demonstrates superior performance in seizure prediction. The accuracy of the proposed CNN model is established at 97.52%, outperforming the highest accuracy of 93.65% achieved by the Discriminant Analysis classifier among the various classifiers evaluated. The findings of this study not only present a groundbreaking method in the realm of epileptic seizure recognition but also reinforce the potential of deep learning techniques in medical diagnostics.
Keywords: Artificial intelligence, Convolutional neural network, Deep learning, Electroencephalography, Epileptic seizure detection, Machine learning

1. Introduction

Epilepsy, a neurological condition characterized by recurrent, unanticipated seizures, arises from abnormalities in brain's electrical activity. These irregularities disrupt normal neuronal communication, manifesting in varied seizures that temporarily impair brain functions, altering consciousness, movement, sensory perception, or behavior. The manifestations of epilepsy, potentially stemming from underlying conditions such as brain tumors, traumatic injuries, or congenital anomalies, exhibit a broad spectrum of symptoms, including muscle spasms, loss of consciousness, memory gaps, and altered emotional or behavioral states. While pharmacological interventions often effectively manage epilepsy, reducing seizure frequency or controlling them entirely, some cases may witness spontaneous improvement without medication. Diagnosis typically involves a neurological assessment focused on seizure type and frequency, supplemented by EEG tests to record brain's electrical activity. Given the profound impact of seizures on individuals' lives, the development of artificial intelligence-based systems for seizure detection is gaining prominence.

Recent advancements in technology have led to the increasing application of artificial intelligence in biomedical fields (Y​i​l​d​i​r​i​m​,​ ​2​0​2​3; E​r​o​g​l​u​ ​e​t​ ​a​l​.​,​ ​2​0​2​3; E​r​o​ğ​l​u​ ​e​t​ ​a​l​.​,​ ​2​0​2​3), particularly in developing computer-aided systems that alleviate experts' workload and facilitate use in non-expert settings. This study focuses on the detection of epileptic seizures using an artificial intelligence-based model, a topic also explored in existing literature. For instance, S​a​r​i​ć​ ​e​t​ ​a​l​.​ ​(​2​0​2​0​), employed a Field Programmable Gate Array (FPGA)-based feed-forward multilayer neural network architecture (MLP ANN) to categorize generalized and localized seizure types. Utilizing 822 signals from the Temple University Hospital Seizure Detection Corpus (TUH EEG Corpus), they achieved a diagnostic accuracy of 95.14% with their (5-12-3) MLP ANN on FPGA. P​r​a​t​h​a​b​a​n​ ​&​ ​B​a​l​a​s​u​b​r​a​m​a​n​i​a​n​ ​(​2​0​2​1​) proposed an adaptive optimization method using a nonlinear conjugate gradient technique, a Sparsity-based EEG Reconstruction (SER), and a three-dimensional Optimized CNN (3D OCNN) classifier based on the Fletcher Reeves (FR) algorithm. Tested on three different databases (CHB-MIT, NINC, and SRM) with 300 entries, their empirical findings indicated a remarkable 98% accuracy. In another significant contribution, W​a​n​g​ ​e​t​ ​a​l​.​ ​(​2​0​2​1​) introduced a novel CNN for assessing time, frequency, and channel information of EEG signals. Incorporating three-dimensional kernels for facilitated feature extraction, their model was evaluated using the CHB-MIT EEG database, achieving an accuracy of 80.5%, surpassing existing state-of-the-art technologies.

In the evolving landscape of epileptic seizure detection, M​a​o​ ​e​t​ ​a​l​.​ ​(​2​0​2​0​) introduced a CNN-based model, integrating continuous wavelet transform (CWT) for the categorization of epileptic episodes. This model, transforming EEG signal data into time-frequency domain images via wavelet algorithms, achieved an accuracy of 72.49%. A​l​m​u​s​t​a​f​a​ ​(​2​0​2​0​) explored the classification of the epileptic seizure dataset using various classifiers. The study highlighted the superiority of the random forest classifier over others like naïve Bayes, logistic regression, and decision trees, achieving a notable 97.08% accuracy. S​h​e​n​ ​e​t​ ​a​l​.​ ​(​2​0​2​2​) proposed an EEG-based real-time method for the detection of epileptic seizures, employing eigenvalue techniques and discrete wavelet transforms for feature extraction from lower-frequency bands. The RUSBoosted tree ensemble approach, coupled with a support vector machine for three-class categorization, was utilized, demonstrating a 97% accuracy rate across two datasets: the CHB-MIT long-term and the UB short-term datasets.

M​i​a​n​ ​Q​a​i​s​a​r​ ​&​ ​S​u​b​a​s​i​ ​(​2​0​2​0​) developed a framework for the efficient diagnosis of epileptic seizures, achieving real-time compression and effective signal processing and transfer in EEG signal capture. Utilizing a standard three-class EEG dataset, their system demonstrated a maximum classification accuracy of 97% for a single class and an average of 96.4% across three classes. B​e​e​r​a​k​a​ ​e​t​ ​a​l​.​ ​(​2​0​2​2​) implemented the short-term Fourier transform block on an FPGA within deep learning models to enhance epileptic seizure detection. Their approach, integrating Bidirectional Long Short-Term Memory (Bi-LSTM) and CNN, utilized the Bonn EEG dataset, achieving an average classification accuracy of 93.9%, with the CNN and Bi-LSTM models reaching 97.2%.

The contributions and innovations of the current study are summarized as follows:

  • Development of a CNN-based model for EEG signal classification.

  • The model, comprising 12 layers including the input layer, offers expedited processing due to its reduced layer count.

  • The model achieves a 97.52% accuracy in early diagnosis of epileptic seizures from EEG signals.

  • It promises to reduce the workload of specialists and can be utilized for preliminary diagnosis in non-expert settings.

The structure of the study includes the materials and methods section, followed by application findings, discussion, and conclusion in subsequent sections.

2. Methodology

This section delineates the dataset utilized in the study, along with the CNN architectures, layers, and activation functions applied to EEG signals of epilepsy patients.

2.1 Dataset

The dataset employed in this research, sourced from Kaggle (E​p​i​l​e​p​t​i​c​ ​S​e​i​z​u​r​e​ ​R​e​c​o​g​n​i​t​i​o​n​.​,​ ​n​.​d​.), is a modified version of a commonly used dataset for epileptic seizure detection. Originally, the dataset comprised five distinct classes, each containing 100 files, with each file recording 23.6 seconds of an individual's brain activity. These files were sampled to 4,097 data points per individual, representing the EEG recording values for 23.5 seconds. Figure 1 illustrates the first five lines of the epileptic seizure dataset.

Figure 1. Image of the epileptic seizure dataset example

The original data, consisting of 4,097 points per recording, was segmented into 23 parts and reorganized to form a matrix of 23×500 = 11,500 data points. This restructuring resulted in each row comprising 178 data points for one second of recording, with the final column (column 179, labeled 'y') denoting the class (1-5). Table 1 presents the label value for each class.

Table 1. Label value of each class

Class

Class Description

1

Recordings indicative of seizure activity.

2

EEG signals from regions with tumor presence.

3

EEG activity recorded from healthy brain regions, aiding in the identification of tumor locations.

4

Data captured with the patient's eyes closed.

5

Data captured while the patient's eyes were open.

In this dataset obtained from the Kaggle platform, subjects in the first class exhibited epileptic seizures, while those in the second, third, fourth, and fifth classes did not. The dataset underwent preprocessing, with all non-seizure activities labeled as class '0' and seizure activities as class '1'. It was subsequently divided into an 80% training set and a 20% test set.

2.2 CNN

CNN architecture, a cornerstone of deep learning neural networks, is prevalently applied in image classification and signal processing. Distinct from traditional machine learning architectures, deep learning models autonomously execute these tasks, eliminating the need for manual feature extraction and preprocessing. CNN architectures, bypassing the necessity for expert knowledge in feature extraction, directly extract features through the model itself, facilitating the learning process. This advantage has led to a surge in the use of CNN architectures in recent years. Fundamentally, CNNs comprise four layers: convolution, activation, pooling, and fully connected layers (T​r​i​p​a​t​h​y​ ​&​ ​S​i​n​g​h​,​ ​2​0​2​2; B​a​ş​a​r​a​n​,​ ​2​0​2​2).

CNN architectures, with their layered structure, are typically divided into two segments. The first encompasses the feature extraction process, employing combinations of input, convolution, and pooling layers. The second segment consists of a fully connected layer, executing the classification task. The arrangement of these layers is not standardized, allowing for the creation of novel models through adjustment of layer sequences and parameter values within the network.

2.3 CNN Layers

This subsection elucidates the various layers and activation functions employed in the design of CNN architectures.

2.3.1 Input layer

Contrary to classical neural networks where data entry is a one-dimensional array, in CNN architectures, multidimensional array formats are utilized. The input layer transmits the raw image data, formatted as a matrix, to the convolutional layer (A​l​i​z​a​r​d​ ​e​t​ ​a​l​.​,​ ​2​0​2​2).

2.3.2 Convolutional layer

The convolutional layer's objective is to extract features from the input image using diverse-sized filters, referred to as kernels. It is within these regions that features, defined by each filter, are discerned in the output generated by the convolution process (P​a​n​d​i​a​n​ ​e​t​ ​a​l​.​,​ ​2​0​2​2).

2.3.3 Pooling layer

The pooling layer operates by moving specific filters across the image with a predetermined stepping value. This action reduces the input size for subsequent network layers, thereby diminishing computational load. This layer is instrumental in decreasing data size and computational costs, and it aids in preventing network overfitting.

2.3.4 Activation layer

Commonly preferred activation functions in CNN architectures include Softmax and Rectified Linear Unit (ReLU). However, other functions like Sigmoid, Tanh, and Leaky ReLU are also utilize (Y​i​l​d​i​r​i​m​ ​&​ ​C​i​n​a​r​,​ ​2​0​2​2).

ReLU: Employed frequently in nonlinear and CNN architectures' intermediate layers, ReLU activates neurons selectively. It outputs zero for negative input values, thus deactivating neurons in such scenarios. While advantageous in reducing simultaneous neuron activation, its drawback lies in converting all negative values to zero (B​a​i​ ​e​t​ ​a​l​.​,​ ​2​0​2​3).

$\mathrm{f}(\mathrm{x})=\operatorname{maks}(0, \mathrm{x})$
(1)

Softmax: Primarily used for multi-class classification problems, Softmax differs from the binary classification-oriented sigmoid function. In multi-class models, the output layer's neuron count corresponds to the number of target classes (D​u​b​e​y​ ​e​t​ ​a​l​.​,​ ​2​0​2​2).

$\sigma(z)_j=\frac{e^{z_j}}{\sum_{k=1}^K e^z k} \text { for } j=1, \ldots . ., K$
(2)

Sigmoid: This function, converting input values into a range between 0 and 1, is widely applied for its continuous differentiability and consistent neuron output signs.

$f(x)=1 / e^{-x}$
(3)
$\mathrm{f}^{\prime}(\mathrm{x})=1-\operatorname{sigmoid}(\mathrm{x})$
(4)

The choice of activation function varies based on the specific task at hand. For example, in classification problems, sigmoid functions might yield better results. However, the use of sigmoid and tanh is sometimes avoided due to the vanishing gradient issue, especially in hidden layers.

In the methodology, the ReLU activation function is predominantly applied in the hidden layers of the neural network architecture. This preference is attributed to the derivative of ReLU being one, which facilitates the learning process in these layers (S​h​a​r​m​a​ ​e​t​ ​a​l​.​,​ ​2​0​1​7).

2.3.5 Dropout layer

To avert overfitting during training with large datasets, the dropout technique is applied, selectively deactivating nodes in the fully connected layer (T​u​f​a​i​l​ ​e​t​ ​a​l​.​,​ ​2​0​2​2).

2.3.6 Flatten layer

The flatten layer converts matrix-sized data from convolution and pooling layers into a one-dimensional array, facilitating its processing in the fully connected layer (N​g​u​y​e​n​ ​e​t​ ​a​l​.​,​ ​2​0​2​2).

2.3.7 Fully connected and classifier layer

In CNN architecture, preceding the classification layer, is a fully connected layer. This layer transforms multidimensional feature maps into a single dimension for classification. The fully connected layer's output is organized into classes equivalent to the target number of classes (P​a​l​ ​e​t​ ​a​l​.​,​ ​2​0​2​2).

3. Results

In this study, a CNN-based model was developed for the detection of epileptic seizures from EEG signals. To benchmark the performance of this model, established classifiers in the field were utilized. The model's efficacy was assessed using k-nearest neighbor (KNN), logistic regression, discriminant analysis, and AdaBoost classifiers, focusing on the classification of four distinct scenarios to predict epileptic seizure occurrences. A portion constituting 20% of the epileptic seizure dataset was allocated for testing purposes. The classification accuracy of the dataset, using the aforementioned classifiers, was determined via confusion matrices and accuracy rates. Various parameters, including accuracy, sensitivity, specificity, False Discovery Rate (FDR), False Positive Rate (FPR), False Negative Rate (FNR), and F1-score, were employed to gauge the models' performance (E​r​o​ğ​l​u​ ​e​t​ ​a​l​.​,​ ​2​0​2​1; Y​i​l​d​i​r​i​m​,​ ​2​0​2​3).

3.1 Data Preprocessing

The preprocessing phase involved the EEG recording dataset. To achieve balance, classes were designated as '0' for non-seizure activities and '1' for seizure activities. Identification and rectification of any null or missing values were undertaken to maintain data integrity. The first five rows of the dataset, post-class assignment, are depicted in Figure 2.

Figure 2. Preprocessed data image of the epileptic seizure dataset

Normalization of each EEG sample was conducted, encompassing 178 data points using the StandardScaler function. This normalization ensured a mean of 0 and a variance of 1 for all features. Adaptation of the data to meet the input requirements of the CNN was executed, resulting in the division of the dataset into an 80% training set and a 20% testing set.

3.2 Classification of EEG Signals Using Classifiers

In the current investigation, four different classifiers were evaluated for their efficacy in comparison with the proposed model. The first classifier under consideration was the KNN classifier. The confusion matrix generated by the KNN classifier is depicted in Figure 3.

(a)
(b)
Figure 3. KNN confusion matrix

Analysis of the KNN confusion matrix (Figure 3) revealed an accuracy rate of 92.48% in classifying the test data. Of the 2,300 data points allocated for testing, the KNN classifier accurately predicted 2,127 instances, with 173 being incorrectly classified. The classifier exhibited equivalent performance in both “0” (non-seizure) and “1” (seizure) classes. Table 2 presents the performance measurement metrics for the KNN classifier.

Table 2. KNN performance metric

Accuracy (%)

Sensitivity

Specificity

F1

FPR

FNR

FDR

0

92.48%

0.91

1.00

1.00

0.95

0.00

0.09

1

92.48%

1.00

0.91

0.63

0.77

0.09

0.00

Examination of the KNN classifier's performance metrics indicated a highest accuracy rate of 92.48% for both “0” and “1” classes. The logistic regression classifier was another tool used for analysis. Figure 4 illustrates the confusion matrix produced by this classifier.

(a)
(b)
Figure 4. Logistic regression confusion matrix

Upon scrutinizing the Logistic Regression confusion matrix (Figure 4), an accuracy rate of 83.17% was observed in classifying the test dataset. The Logistic Regression classifier correctly identified 1,913 out of the 2, 300 test data, while incorrectly classifying 387 instances. Performance metrics for the logistic regression classifier are summarized in Table 3.

Table 3. Logistic regression performance metrics

Accuracy

Sensitivity

Specificity

F1

FPR

FNR

FDR

0

83.17%

0.83

0.95

1.00

0.90

0.05

0.17

1

83.17%

0.95

0.83

0.18

0.30

0.17

0.05

The logistic regression classifier's performance metrics showed that the highest accuracy rate for both "0" and "1" classes was 83.17%. Additionally, discriminant analysis was utilized as a classifier for EEG signal categorization. The confusion matrix computed by the discriminant analysis classifier is shown in Figure 5.

(a)
(b)
Figure 5. Discriminant analysis confusion matrix

Upon analysis of the discriminant analysis classifier's confusion matrix, as depicted in Figure 5, a classification accuracy rate of 93.65% was observed for the test dataset. Of the 2,300 test data points, 2,154 were correctly identified and 146 misclassified by the discriminant analysis classifier. The classifier's performance demonstrated parity in both the “0” (non-seizure) and “1” (seizure) classes. Table 4 delineates the performance measurement metrics for the discriminant analysis classifier.

Table 4. Discriminant analysis performance metrics

Accuracy (%)

Sensitivity

Specificity

F1

FPR

FNR

FDR

0

93.65%

0.97

0.82

0.95

0.96

0.18

0.03

1

93.65%

0.82

0.97

0.88

0.85

0.03

0.18

The Discriminant Analysis classifier's performance metrics underscored an equal highest accuracy rate of 93.65% for both the "0" and "1" classes. Further, the AdaBoost classifier was evaluated, and its corresponding confusion matrix is presented in Figure 6.

(a)
(b)
Figure 6. AdaBoost confusion matrix

The examination of the AdaBoost confusion matrix (Figure 6) revealed an accuracy rate of 87.87% in classifying the test data. The AdaBoost classifier accurately predicted 2,021 instances, with 279 being incorrect classifications, out of the 2,300 data points allocated for testing. The classifier maintained consistent performance across the “0” and “1” classes. Table 5 displays the performance measurement metrics for the AdaBoost classifier.

Table 5. AdaBoost performance metrics

Accuracy (%)

Sensitivity

Specificity

F1

FPR

FNR

FDR

0

87.87%

0.90

0.75

0.95

0.93

0.25

0.10

1

87.87%

0.75

0.90

0.60

0.67

0.10

0.25

An analysis of the AdaBoost classifier's performance metrics indicated the highest accuracy rate of 87.87% for both "0" and "1" classes.

3.3 Classification of EEG Signals with the Proposed CNN-based Model

The proposed model, employing a multilayer CNN, has been developed for the analysis and prediction of epileptic seizures from EEG data. A schematic representation of this model is provided in Figure 7.

Figure 7. The proposed model

The primary architecture of the model is a CNN, which is particularly adept at processing time-series data, such as EEG readings. This CNN-based model encompasses an input layer, succeeded by alternating Conv1D and MaxPool1D layers. Each Conv1D layer is distinct in its filter count and kernel size and utilizes the ReLU activation function. MaxPool1D layers contribute to dimensionality reduction of the input, thereby decreasing the model's computational complexity. The reduced number of layers in the model ensures enhanced speed and efficiency in processing. The model is designed to alleviate the workload of experts and is feasible for use in non-specialist environments.

Incorporated after each convolution and max pooling layer is a dropout layer. This layer randomly disables a fraction of input units during each update in the training phase, a strategy intended to prevent overfitting.

The model culminates in a flatten layer, which collapses the spatial dimensions of the input into the channel size. This is followed by a dense layer comprising two neurons, employing the 'softmax' activation function. This layer is responsible for classifying the input into two categories: seizure and non-seizure, providing output probabilities.

For training, stochastic gradient descent is utilized as the optimization technique, and binary cross-entropy serves as the loss function. The performance of the model is assessed using various evaluation metrics. The confusion matrix corresponding to the classifier of the proposed model is illustrated in Figure 8.

Figure 8. Confusion matrix of the proposed model

Upon examining the confusion matrix of the proposed CNN-based model, as illustrated in Figure 8, an accuracy rate of 97.65% was achieved in the classification of the test data. The model correctly classified 2,246 out of the 2,300 data points allocated for testing, with 54 instances of misclassification. Uniform performance was observed in both the "0" (non-seizure) and "1" (seizure) classes. To assess the model's performance more intricately, precision, recall, and F1-score for each class were considered, alongside the creation of confusion matrices and classification reports. The accuracy and loss curves for the training and test sets of the proposed model are displayed in Figure 9.

(a)
(b)
Figure 9. Accuracy and loss curves of the proposed model: (a) Accuracy curve; (b) Loss curves

A comparative analysis between the proposed model and other classifiers revealed a smaller disparity between the training and test accuracy curves in the proposed model, as opposed to the wider differences observed in the accuracy curves of other classifiers. This suggests a higher rate of correct prediction for each class in the proposed model's confusion matrix, compared to other models. Table 6 presents the performance measurement metrics derived from the proposed model.

Table 6. Performance metrics of the proposed model

Accuracy (%)

Sensitivity

Specificity

F1

FPR

FNR

FDR

0

97.65%

0.98

0.95

0.99

0.99

0.05

0.02

1

97.65%

0.95

0.98

0.93

0.94

0.02

0.05

An examination of the proposed model's performance metrics underscored the highest accuracy rate of 97.65% for both "0" and "1" classes. Table 7 lists the accuracy values obtained in the proposed model alongside the four other classifiers used in the study.

Table 7. Accuracy values of the classifiers and the proposed model

KNN

Logistic Regression

Discriminant Analysis

AdaBoost

Proposed Model

92.48

83.17

93.65

87.87

97.65

In the classification process of two distinct conditions derived from the epileptic seizure dataset, the proposed CNN-based model attained the highest accuracy rate, recorded at 97.65%. This performance was comparatively superior to that of other classifiers: discriminant analysis achieved an accuracy of 93.65%, KNN reached 92.48%, AdaBoost obtained 87.87%, and logistic regression was at 83.17%.

The proposed model, which yielded the highest accuracy, accurately predicted 2,246 out of 2,300 test data points, with 54 instances of misclassification. Analysis of the performance metrics indicated that both classes "0" and "1" achieved an equivalent highest accuracy of 97.65%.

Conversely, the classifier with the lowest accuracy was logistic regression, which correctly classified 1,913 out of 2,300 data points, misclassifying 387. Upon reviewing the performance metrics of the logistic regression classifier, it was observed that both the "0" class and the "1" class attained an accuracy rate of 83.17%.

4. Discussion

In the present study, a multilayer CNN model was developed for the automated detection of epileptic seizures from EEG recordings. The process encompassing data preprocessing, model training, and testing revealed that the model is capable of detecting seizures with an accuracy of 97.65%. This high degree of accuracy was also mirrored in the sensitivity, specificity, and F1-score metrics.

When compared to traditional classifiers such as discriminant analysis, KNN, AdaBoost, and Logistic Regression, which achieved accuracies of 93.65%, 92.48%, 87.87%, and 83.17% respectively, the proposed CNN model exhibited superior performance. This enhanced efficacy can be attributed to the deep learning capabilities of the CNN, which are adept at extracting complex features from time-series data. The comparative performance of the proposed model and these classifiers is depicted in Figure 10.

Figure 10. Accuracy of the proposed model and classifiers

However, the model is not without limitations. The performance is notably contingent on the distribution and quality of the training dataset. To address this, future work will focus on training the model using larger and more varied EEG datasets. This approach is anticipated to further enhance the performance and robustness of the model.

In conclusion, the CNN model developed in this study has demonstrated its effectiveness as a tool for the automatic diagnosis of epileptic seizures. Such advancements in seizure detection hold the potential to significantly improve the management and monitoring of epilepsy treatment, ultimately contributing to better patient quality of life.

5. Conclusion

Epileptic seizures, resulting from cerebral abnormalities, affect approximately 1% of the global population and can have indirect impacts on patient health. Accurate prediction and early intervention are crucial in managing these seizures. In response to this need, a computer-aided model based on CNN technology was developed in this study. This method facilitates early diagnosis of epileptic seizures, potentially enabling more timely treatment.

The CNN-based model exhibited a high degree of effectiveness, achieving an accuracy of 97.65%. Such performance indicates that the model not only reduces the workload of healthcare professionals but also minimizes the likelihood of conventional diagnostic errors. Moreover, its utility extends beyond expert settings, suggesting its applicability in broader, non-specialist environments.

Ethical Approval

This study adheres to strict ethical guidelines, ensuring the rights and privacy of participants. Informed consent was obtained from all participants, and personal information was protected throughout the study. The methodology and procedures of this research have been approved by the appropriate ethics committee. Participants were informed of their rights, including the right to withdraw from the study at any time. All collected data is used solely for the purpose of this research and is stored and processed in a secure and confidential manner.

Data Availability

The data used to support the research findings are available from the corresponding author upon request.

Conflicts of Interest

The authors declare no conflict of interest.

References
Alizard, F., Gibis, T., Selent, B., Rist, U., & Wenzel, C. (2022). Stochastic receptivity of laminar compressible boundary layers: An input-output analysis. Phys. Rev. Fluids, 7(7), 073902. [Google Scholar] [Crossref]
Almustafa, K. M. (2020). Classification of epileptic seizure dataset using different machine learning algorithms. Inf. Med. Unlocked, 21, 100444. [Google Scholar] [Crossref]
Bai, Y., Gautam, T., & Sojoudi, S. (2023). Efficient global optimization of two-layer relu networks: Quadratic-time algorithms and adversarial training. SIAM J. Appl. Math. Data Sci., 5(2), 446–474. [Google Scholar] [Crossref]
Başaran, E. (2022). A new brain tumor diagnostic model: Selection of textural feature extraction algorithms and convolution neural network features with optimization algorithms. Comput. Biol. Med., 148, 105857. [Google Scholar] [Crossref]
Beeraka, S. M., Kumar, A., Sameer, M., Ghosh, S., & Gupta, B. (2022). Accuracy enhancement of epileptic seizure detection: A deep learning approach with hardware realization of STFT. Circuits, Syst., Sign. Proces., 41, 461–484. [Google Scholar]
Dubey, S. R., Singh, S. K., & Chaudhuri, B. B. (2022). Activation functions in deep learning: A comprehensive survey and benchmark. Neurocomputing, 503, 92–108. [Google Scholar] [Crossref]
Epileptic Seizure Recognition. (n.d.). Kaggle. https://www.kaggle.com/datasets/harunshimanto/epileptic-seizure-recognition [Google Scholar]
Eroğlu, O., Eroğlu, Y., Yıldırım, M., Karlıdag, T., Çınar, A., Akyiğit, A., Kaygusuz, İ., Yıldırım, H., Keleş, E., & Yalçın, Ş. (2023). Comparison of computed tomography-based artificial intelligence modeling and magnetic resonance imaging in diagnosis of cholesteatoma. J Int Adv Otol., 19(4), 342–349. https://doi.org/ [Google Scholar] [Crossref]
Eroğlu, Y., Yildirim, M., & Çinar, A. (2021). CNNs based classification of breast ultrasonography images by hybrid method with respect to benign, malignant, and normal using mRMR. Comput. Biol. Med., 133, 104407. [Google Scholar] [Crossref]
Eroglu, Y., Yildirim, M., & Cinar, A. (2023). Diagnosis of periventricular leukomalacia in children with artificial intelligence-based models developed using brain magnetic resonance images. Signal, Image Video Process., 17(8), 4543–4550. [Google Scholar]
Mao, W. L., Fathurrahman, H. I. K., Lee, Y., & Chang, T. W. (2020). EEG dataset classification using CNN method. J. Phys.: Conf. Ser., 1456(1), 012017. [Google Scholar] [Crossref]
Mian Qaisar, S. & Subasi, A. (2020). Effective epileptic seizure detection based on the event-driven processing and machine learning for mobile healthcare. J. Ambient Intell. Humanized Comput., 1–13. [Google Scholar]
Nguyen, H. T., Crittenden, K., Weiss, L., & Bardaweel, H. (2022). Experimental modal analysis and characterization of additively manufactured polymers. Polymers, 14(10), 2071. [Google Scholar] [Crossref]
Pal, D., Reddy, P. B., & Roy, S. (2022). Attention UW-Net: A fully connected model for automatic segmentation and annotation of chest X-ray. Comput. Biol. Med., 150, 106083. [Google Scholar] [Crossref]
Pandian, J. A., Kanchanadevi, K., Kumar, V. D., Jasińska, E., Goňo, R., Leonowicz, Z., & Jasiński, M. (2022). A five convolutional layer deep convolutional neural network for plant leaf disease detection. Electron., 11(8), 1266. [Google Scholar]
Prathaban, B. P. & Balasubramanian, R. (2021). Dynamic learning framework for epileptic seizure prediction using sparsity based EEG Reconstruction with Optimized CNN classifier. Expert Syst. Appl., 170, 114533. [Google Scholar] [Crossref]
Sarić, R., Jokić, D., Beganović, N., Pokvić, L. G., & Badnjević, A. (2020). FPGA-based real-time epileptic seizure classification using artificial neural network. Biomed. Signal Process. Control, 62, 102106. [Google Scholar] [Crossref]
Sharma, S., Sharma, S., & Athaiya, A. (2017). Activation functions in neural networks. Towards Data Sci., 6(12), 310–316. [Google Scholar]
Shen, M., Wen, P., Song, B., & Li, Y. (2022). An EEG based real-time epilepsy seizure detection approach using discrete wavelet transform and machine learning methods. Biomed. Signal Process. Control, 77, 103820. [Google Scholar] [Crossref]
Tripathy, S. & Singh, R. (2022). Convolutional neural network: An overview and application in image classification. In Proceedings of Third International Conference on Sustainable Computing: SUSCOM 2021, Jaipur, India, pp.145-153. [Google Scholar]
Tufail, A. B., Ullah, I., Khan, R. A., Khan, M. A., Ma, Y. K., Khokhar, N. H., Sadiq, M. T., Khan, R., Shafiq, M., Eldin, E. T., & Ghamry, N. A. (2022). On disharmony in batch normalization and dropout methods for early categorization of Alzheimer’s disease. Sustainability, 14(22), 14695. [Google Scholar] [Crossref]
Wang, Z., Yang, J., & Sawan, M. (2021). A novel multi-scale dilated 3D CNN for epileptic seizure prediction. In 2021 IEEE 3rd International Conference on Artificial Intelligence Circuits and Systems (AICAS), Washington, DC, USA, pp.1-4. [Google Scholar] [Crossref]
Yildirim, M. (2023). Image visualization and classification using hydatid cyst images with an explainable hybrid model. Appl. Sci., 13(17), 9926. [Google Scholar] [Crossref]
Yildirim, M. & Cinar, A. (2022). Classification with respect to colon adenocarcinoma and colon benign tissue of coon histlopathological images with a new CNN model: MA_ColonNET. Int. J. Imaging Syst. Technol., 32(1), 155–162. [Google Scholar] [Crossref]

Cite this:
APA Style
IEEE Style
BibTex Style
MLA Style
Chicago Style
GB-T-7714-2015
Yucel, N., Mutlu, H. B., Durmaz, F., Cengil, E., & Yildirim, M. (2023). A CNN Approach for Enhanced Epileptic Seizure Detection Through EEG Analysis. Healthcraft. Front., 1(1), 33-43. https://doi.org/10.56578/hf010103
N. Yucel, H. B. Mutlu, F. Durmaz, E., Cengil, and M., Yildirim, "A CNN Approach for Enhanced Epileptic Seizure Detection Through EEG Analysis," Healthcraft. Front., vol. 1, no. 1, pp. 33-43, 2023. https://doi.org/10.56578/hf010103
@research-article{Yucel2023ACA,
title={A CNN Approach for Enhanced Epileptic Seizure Detection Through EEG Analysis},
author={Nadide Yucel and Hursit Burak Mutlu and Fatih Durmaz and Emine Cengil and Muhammed Yildirim},
journal={Healthcraft Frontiers},
year={2023},
page={33-43},
doi={https://doi.org/10.56578/hf010103}
}
Nadide Yucel, et al. "A CNN Approach for Enhanced Epileptic Seizure Detection Through EEG Analysis." Healthcraft Frontiers, v 1, pp 33-43. doi: https://doi.org/10.56578/hf010103
Nadide Yucel, Hursit Burak Mutlu, Fatih Durmaz, Emine Cengil and Muhammed Yildirim. "A CNN Approach for Enhanced Epileptic Seizure Detection Through EEG Analysis." Healthcraft Frontiers, 1, (2023): 33-43. doi: https://doi.org/10.56578/hf010103
YUCEL N, MUTLU H B, DURMAZ F, et al. A CNN Approach for Enhanced Epileptic Seizure Detection Through EEG Analysis[J]. Healthcraft Frontiers, 2023, 1(1): 33-43. https://doi.org/10.56578/hf010103
cc
©2023 by the author(s). Published by Acadlore Publishing Services Limited, Hong Kong. This article is available for free download and can be reused and cited, provided that the original published version is credited, under the CC BY 4.0 license.