0% found this document useful (0 votes)
3 views52 pages

1 s2.0 S1568494625005228 Main

This study presents a novel method for classifying epileptic EEG signals using Adaptive Local Iterative Filtering (ALIF) and an attention-augmented cascaded deep neural network (CDNN). The approach achieved a classification accuracy of 100% and high sensitivity and specificity, while incorporating SHAP and Grad-CAM for interpretability. This methodology aims to enhance epilepsy diagnosis and improve trust in clinical decision support systems.
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)
3 views52 pages

1 s2.0 S1568494625005228 Main

This study presents a novel method for classifying epileptic EEG signals using Adaptive Local Iterative Filtering (ALIF) and an attention-augmented cascaded deep neural network (CDNN). The approach achieved a classification accuracy of 100% and high sensitivity and specificity, while incorporating SHAP and Grad-CAM for interpretability. This methodology aims to enhance epilepsy diagnosis and improve trust in clinical decision support systems.
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
You are on page 1/ 52

Journal Pre-proof

Interpretable classification of epileptic EEG signals using ALIF


decomposition and attention-augmented cascaded deep neural networks

Wei Zeng, Minglin Zhang, Liangmin Shan, Yang Chen, Zuoyong Li,
Shaoyi Du

PII: S1568-4946(25)00522-8
DOI: https://doi.org/10.1016/j.asoc.2025.113211
Reference: ASOC 113211
To appear in: Applied Soft Computing
Received date : 8 October 2024
Revised date : 15 March 2025
Accepted date : 23 April 2025

Please cite this article as: W. Zeng, M. Zhang, L. Shan et al., Interpretable classification of
epileptic EEG signals using ALIF decomposition and attention-augmented cascaded deep neural
networks, Applied Soft Computing (2025), doi: https://doi.org/10.1016/j.asoc.2025.113211.

This is a PDF file of an article that has undergone enhancements after acceptance, such as the
addition of a cover page and metadata, and formatting for readability, but it is not yet the definitive
version of record. This version will undergo additional copyediting, typesetting and review before it
is published in its final form, but we are providing this version to give early visibility of the article.
Please note that, during the production process, errors may be discovered which could affect the
content, and all legal disclaimers that apply to the journal pertain.

© 2025 Published by Elsevier B.V.


Journal Pre-proof

Interpretable classification of epileptic EEG signals

of
using ALIF decomposition and attention-augmented
cascaded deep neural networks

pro
Wei Zenga,b,∗, Minglin Zhanga,b , Liangmin Shana,b , Yang Chena,b , Zuoyong
Lic , Shaoyi Dud
a
School of Physics and Mechanical and Electrical Engineering, Longyan University,
Longyan 364012, P.R. China
b
School of Mechanical Engineering and Automation, Fuzhou University, Fuzhou 350116,
P.R. China
c
Fujian Provincial Key Laboratory of Information Processing and Intelligent Control,

d
re-
College of Computer and Control Engineering, Minjiang University, Fuzhou 350121,
China
Institute of Artificial Intelligence and Robotics, Xi’an Jiaotong University, Xi’an
710049, P.R. China
lP
Abstract
Epilepsy is a chronic neurological disorder characterized by recurrent seizures.
Accurate diagnosis and effective monitoring require the precise classification
of electroencephalogram (EEG) signals. In this study, we introduce a novel
approach that combines Adaptive Local Iterative Filtering (ALIF) for sig-
rna

nal decomposition with an attention-enhanced cascaded deep neural network


(CDNN) architecture.The ALIF algorithm decomposes EEG signals into in-
trinsic mode functions (IMFs) that capture inherent oscillatory components.
These IMFs are processed by the CDNN, which operates in two stages: a
feature extraction module and a classification module. In the feature ex-
traction stage, a SEblock channel attention mechanism dynamically priori-
tizes significant features within the IMFs. The classification stage employs
Jou

a hybrid CNN-LSTM architecture that effectively captures both spatial and


temporal dependencies. To enhance interpretability, the SHapley Additive
exPlanations (SHAP) framework is incorporated to provide insights into the


Corresponding author.
E-mail address: [email protected] (W. Zeng).

Preprint submitted to Applied Soft Computing March 14, 2025


Journal Pre-proof

model’s decision-making process, while Gradient-weighted Class Activation

of
Mapping (Grad-CAM) visualizes the most discriminative regions in the input
data. Rigorously validated using 10-fold cross-validation on the Bonn and
EEG Epilepsy databases, the proposed methodology achieved an exceptional
classification accuracy of 100%, with sensitivity, specificity, and F1-scores

pro
exceeding 99% across various scenarios. The integration of SHAP and Grad-
CAM not only elucidates the model’s decision processes but also contributes
to a more interpretable and reliable system for epileptic EEG signal classi-
fication. This synergistic combination of advanced signal processing, deep
learning, and interpretability techniques holds significant potential to en-
hance epilepsy diagnosis and strengthen trust in clinical decision support
systems.
Keywords: re-
Epileptic EEG signals, ALIF decomposition, Cascaded deep neural
networks, SEBlock attention mechanism

1. Introduction
lP
Epilepsy is a chronic neurological disorder characterized by recurrent
and unpredictable seizures, affecting over 50 million people worldwide [1].
Seizures are caused by abnormal, excessive electrical discharges in the brain,
leading to temporary disruptions in normal brain function and a wide range
of symptoms, including loss of consciousness, convulsions, and impaired cog-
rna

nition. The accurate and timely classification of epileptic electroencephalo-


gram (EEG) signals is crucial for effective diagnosis, prognostication, and
treatment planning, ultimately improving the quality of life for individuals
with epilepsy.
The history of EEG in epilepsy research and clinical practice has been
marked by several pivotal milestones. The pioneering work of Hans Berger in
the early 20th century, which led to the discovery of human brain waves and
Jou

the development of the first EEG recording device [2], laid the foundation for
our understanding of neuronal electrical activity. Subsequent advancements,
such as the establishment of the International 10-20 system for electrode
placement, standardized the acquisition and analysis of EEG data, facilitat-
ing cross-study comparisons and enhancing the reproducibility of findings.
EEG has become an indispensable tool in the evaluation and management
of epilepsy, providing valuable insights into the temporal and spatial char-

2
Journal Pre-proof

acteristics of seizure events. During an epileptic seizure, specific patterns of

of
abnormal electrical discharges can be observed in the EEG recordings, offer-
ing crucial information for locating the seizure focus, identifying the seizure
type, and guiding treatment decisions. Additionally, continuous EEG moni-
toring plays a vital role in assessing the efficacy of antiepileptic medications,

pro
surgical interventions, and other therapeutic approaches, enabling personal-
ized treatment strategies tailored to individual patient needs.
The accurate classification of epileptic EEG signals is a multifaceted chal-
lenge, driven by the inherent complexity and non-stationarity of these signals.
EEG recordings are susceptible to various artifacts, such as muscle activity,
eye movements, and external electrical interference, which can obscure or dis-
tort the underlying neuronal patterns of interest. Furthermore, the dynamics
re-
of seizure events can evolve over time, exhibiting temporal variability that
traditional signal processing techniques may struggle to capture effectively.
Recent advancements in signal processing and machine learning have led
to significant improvements in epileptic EEG signal classification [3]. The
Fourier transform provides a frequency-domain representation of the signal,
enabling the identification of dominant frequencies and their associated power
lP
spectra [4]. However, this approach assumes stationarity and lacks the abil-
ity to capture time-varying spectral characteristics, which are particularly
relevant in the context of epileptic seizures [5]. Wavelet transform tech-
niques have been widely explored for their ability to capture time-frequency
information [6]. For instance, Subasi et al. [7] employed discrete wavelet
transform (DWT) in combination with ensemble learning methods, achiev-
rna

ing an accuracy of 99.3% on the Bonn dataset. Similarly, Zarei and Asl
[8] utilized DWT with orthogonal matching pursuit for feature extraction,
demonstrating robust performance across various classification scenarios.
Liu et al. [9] introduced the revised tunable Q-factor wavelet transform
(RTQWT) as a novel method for feature extraction from EEG signals, which
were critical for epilepsy detection. The RTQWT addressed the limitations of
the traditional tunable Q-factor wavelet transform (TQWT) by incorporat-
Jou

ing a weighted normalized entropy approach, allowing for a more adaptable


Q-factor that better suits the nonstationary characteristics of EEG signals.
This improvement led to the extraction of more precise and specific feature
subspaces, enhancing the classification accuracy of EEG signals. The paper
compared the performance of RTQWT with other time-frequency distribu-
tion methods and demonstrates through experiments that RTQWT, when
used in conjunction with various classifiers such as decision tree, linear dis-

3
Journal Pre-proof

criminant, naive Bayes, SVM, and KNN, can effectively extract detailed fea-

of
tures and improve EEG signal classification accuracy. The main disadvantage
of the TQWT, which the RTQWT aims to overcome, was the lack of an opti-
mized tunable criterion and the inflexibility of the constant-Q factor setting.
Shen et al. [10] introduced an EEG-based real-time approach for detecting

pro
epilepsy seizures. The methodology involved using the DWT and eigenvalue
algorithms to extract features from different sub-frequency bands of EEG
signals. These features were then classified into three categories: health con-
trol, seizure-free, and seizure-active, using a support vector machine (SVM).
For real-time seizure onset detection, the RUSBoosted tree ensemble method
was employed. The main contribution of this work was the development of
a highly effective real-time seizure detection system using EEG data, which
re-
could significantly aid in the clinical management of epilepsy. However, the
approach faced challenges such as dealing with inter-patient variability, han-
dling non-epileptic events, and optimizing computational efficiency for real-
time processing.
Deep learning approaches have also shown remarkable success in this
domain. Dissanayake et al. [11] proposed two patient-independent deep
lP
learning architectures, which utilized distinct learning strategies to discern
patterns indicative of pre-ictal brain stages across multiple subjects. These
models were trained to capture the nuances of inter-subject variability in
EEG data, a critical factor in developing a generalized seizure prediction
system. The deep learning models demonstrated remarkable performance on
the CHB-MIT-EEG dataset, achieving high accuracy rates of 88.81% and
rna

91.54%, respectively. The Siamese model, in particular, was trained with


a novel learning strategy that allowed it to learn from patient variations,
thereby enhancing its ability to predict seizures with greater precision. Con-
volutional Neural Networks (CNNs) have been particularly effective in cap-
turing spatial patterns within EEG data. For example, Atal and Singh [12]
utilized CNNs to process the optimized features extracted through the mod-
ified Blackman bandpass filter-greedy particle swarm optimization (MBBF-
Jou

GPSO) method. The MBBF was employed to filter out unwanted noise from
EEG signals, ensuring that only the essential information was retained. This
filtering was crucial as it facilitated better stopband attenuation, thus im-
proving the signal quality. The integration of CNNs in this framework allowed
for the automatic and efficient learning of relevant features, which in turn
improved the accuracy of seizure detection. The study confirmed the supe-
rior performance of the proposed system through rigorous performance and

4
Journal Pre-proof

comparative analysis, demonstrating the significant contribution of CNNs in

of
achieving better seizure detection outcomes. CNNs automatically learn hi-
erarchical feature representations from the input data, eliminating the need
for manual feature engineering and enabling the discovery of complex pat-
terns that may be overlooked by traditional approaches. Recurrent Neural

pro
Networks (RNNs), especially Long Short-Term Memory (LSTM) networks,
have demonstrated their efficacy in modeling the temporal dynamics of EEG
signals. Abdulwahhab et al. [13] proposed a hybrid CNN-LSTM architec-
ture that achieved state-of-the-art performance on the scalp EEG database,
highlighting the potential of combining spatial and temporal feature learning.
Recent advances in EEG-based emotion recognition have increasingly demon-
strated the efficacy of hybrid deep learning models that combine CNNs and
re-
LSTM networks. For instance, Chakravarthi et al. [14] developed a hybrid
CNN-LSTM model that achieved high classification accuracy by leveraging
CNNs for extracting spatial features from EEG signals and LSTMs for mod-
eling their temporal dynamics. Complementary studies by Medhi et al. [15]
and Ji et al. [16] further validate the advantages of such hybrid architectures,
particularly in addressing challenges like non-stationarity and inter-subject
lP
variability. Moreover, frameworks incorporating attention mechanisms, such
as the STILN model by Tang et al. [17] and the 4D attention-based neural
network by Xiao et al. [18], highlight the benefits of adaptively weighting
critical spatial, spectral, and temporal features, thereby enhancing overall
recognition performance. Collectively, these studies underscore the potential
of hybrid CNN-LSTM approaches in improving EEG signal classification,
rna

providing a strong foundation that supports and complements the method-


ology presented in our work.
In recent years, attention mechanisms have been introduced to deep learn-
ing architectures, offering a means to selectively focus on the most relevant
portions of the input data. Inspired by the success of attention mechanisms
in natural language processing tasks, researchers have explored their appli-
cation in EEG signal analysis, aiming to enhance the discriminative power
Jou

of deep learning models by emphasizing the most informative features [19].


Despite these advancements, challenges remain in developing robust, in-
terpretable, and clinically applicable methods for epileptic EEG signal clas-
sification. The non-stationarity of EEG signals, inter-patient variability, and
the need for real-time processing continue to drive research in this field.
Moreover, the interpretability of complex machine learning models remains
a crucial concern for clinical adoption.

5
Journal Pre-proof

To address these challenges, our study introduces a novel methodology

of
that synergistically integrates the Adaptive Local Iterative Filtering (ALIF)
technique for signal decomposition and an attention-augmented cascaded
deep neural network (CDNN) architecture. This approach addresses several
key challenges in epileptic EEG signal analysis, including non-stationarity,

pro
complex signal dynamics, and the need for interpretability.
Our approach builds upon recent advancements in signal decomposition
and attention mechanisms. The ALIF technique, introduced by Cicone et al.
[20], offers advantages over traditional empirical mode decomposition meth-
ods in terms of adaptivity and robustness to noise. By incorporating ALIF,
our method addresses the non-stationarity challenge inherent in EEG signals
more effectively than previous approaches relying on Fourier or wavelet-based
decompositions.
re-
The integration of attention mechanisms in EEG signal analysis is a rel-
atively recent development. Attention-based models have shown promise in
various neurological signal processing tasks. For instance, Gong et al. [21]
employed a self-attention mechanism in conjunction with CNNs for EEG-
based emotion recognition, demonstrating improved performance over tradi-
lP
tional deep learning architectures. Our incorporation of the SEblock atten-
tion mechanism extends this line of research to epileptic EEG signal classifica-
tion, enabling the model to focus on the most informative components of the
decomposed signals. The hybrid CNN-LSTM architecture in our classifica-
tion module is inspired by recent successes in combining these architectures
for time series analysis. For example, Lu et al. [22] proposed a recurrent
rna

convolutional neural network for seizure detection and prediction, effectively


capturing both spatial and temporal dependencies in EEG data. Our ap-
proach builds upon this concept, leveraging the strengths of both CNNs and
LSTM within a unified framework optimized for epileptic EEG signal clas-
sification. Table 1 summarizes the methodologies, advantages, limitations,
and performance metrics of significant prior studies in EEG-based seizure
detection.
Jou

6
Journal Pre-proof

Table 1: Comparison of previous studies in EEG-based epilepsy diagnosis

of
and seizure detection

Study Methodology Advantages Limitations Performance


Metrics

pro
Subasi et al. DWT with ensem- Effective noise re- Focused on binary Accuracy:
(2019) [7] ble learning duction and high classification; lim- 99.3% on
accuracy ited multi-class Bonn dataset
analysis
Zarei and Asl DWT with orthog- Robust perfor- Sensitive to param- Robust per-
(2021) [8] onal matching pur- mance across eter settings; scala- formance
suit varied scenarios bility issues noted

(2023) [9] ous classifiers


re-
Liu et al. RTQWT with vari- Enhanced feature Complex
extraction
non-stationary
signals
for ing and higher
tun-

computational cost
Improved
accuracy
reported

Shen et al. DWT and eigen- Enables real-time Challenges withHigh accu-
(2022) [10] value analysis for detection with inter-patient vari- racy; specific
lP
real-time seizure effective noise ability metrics not
detection suppression provided
Dissanayake Patient- Addresses inter- Increased model Accuracy:
et al. independent deep subject variability; complexity 88.81% and
(2021) [11] learning architec- robust modeling 91.54% on
rna

tures different
models
Atal and CNN for spatial Efficient spatial Limited temporal 99.5% ac-
Singh feature extraction feature extraction; modeling; reliance curacy on
(2024) [12] after noise filtering automatic noise on manual tuning specific cases
suppression
Abdulwahhab Hybrid CNN- Captures both spa- Increased complex- Reported
et al. LSTM architecture tial and temporal ity; potential over- state-of-the-
Jou

(2024) [13] dependencies effec- fitting art perfor-


tively mance
Continued on next page

7
Journal Pre-proof

Study Methodology Advantages Limitations Performance

of
Metrics
Gong et al. CNN with in- Improves feature Additional compu- Performance
(2023) [21] tegrated self- prioritization and tational overhead; improve-

pro
attention interpretability limited validation ments noted
in epilepsy

Furthermore, to foster trust and transparency in the decision-making


process, our study integrates the SHapley Additive exPlanations (SHAP)
interpretability tool [23]. SHAP is a state-of-the-art technique that pro-
vides insights into the contributions of individual features to the model’s
re-
output, enhancing the interpretability and explainability of the deep learn-
ing model. By understanding the reasoning behind the model’s predictions,
clinicians can gain valuable insights and make more informed decisions, ulti-
mately improving the reliability and acceptance of the proposed methodol-
ogy in clinical settings. In addition to SHAP, we employ Gradient-weighted
Class Activation Mapping (Grad-CAM) for visual explanation of the model’s
lP
decision-making process. Grad-CAM, introduced by Selvaraju et al.[24], is
a technique that uses the gradients of any target concept flowing into the
final convolutional layer to produce a coarse localization map highlighting
important regions in the image for predicting the concept. While originally
developed for image classification tasks, Grad-CAM has been successfully
adapted to various domains, including EEG signal analysis. For instance,
rna

Li et al. [25] utilized Grad-CAM to visualize the most discriminative time-


frequency regions in EEG spectrograms for intention recognition tasks. In
our study, we extend the application of Grad-CAM to epileptic EEG sig-
nal classification, providing intuitive visual explanations of the features and
temporal regions that most influence the model’s decisions. This visual inter-
pretation complements the quantitative insights provided by SHAP, offering
a comprehensive approach to model interpretability. The primary novelties
Jou

and contributions of this study are:


1) The synergistic integration of the ALIF decomposition technique and
deep learning methodologies, leveraging the strengths of both domains for
accurate and robust classification of epileptic EEG signals.
2) The incorporation of the SEblock channel attention mechanism within
the CDNN architecture, enabling the model to adaptively focus on salient
features and enhance its discriminative capabilities.

8
Journal Pre-proof

3) The use of a hybrid CNN-LSTM architecture in the classification mod-

of
ule, capturing both spatial and temporal dependencies within the EEG signal
patterns, thereby accurately characterizing the dynamic nature of epileptic
seizures.
4) The integration of the SHAP interpretability tool, providing insights

pro
into the model’s decision-making process and fostering trust in clinical deci-
sion support systems through enhanced transparency and explainability.
5) The application of Grad-CAM for visual explanation of the model’s
focus areas, offering intuitive and interpretable insights into the features and
temporal regions most critical for classification decisions.
By addressing the challenges of non-stationarity, complex signal patterns,
and interpretability, this study offers a comprehensive and innovative ap-
re-
proach to epileptic EEG signal classification. The synergistic fusion of signal
processing techniques, deep learning architectures, attention mechanisms,
and interpretability tools paves the way for improved diagnosis, monitoring,
and treatment of epilepsy, ultimately leading to better patient outcomes and
enhanced quality of life for individuals affected by this debilitating neurolog-
ical condition.
lP
2. Method
The proposed method involves the decomposition of EEG signals using
ALIF, resulting in multiple Intrinsic Mode Functions (IMFs). These IMFs
are then input into a cascaded deep neural network, incorporating an SEblock
rna

channel attention mechanism for efficient feature extraction. The classifica-


tion module of the network is utilized for accurate signal classification. A
flowchart depicting our method is illustrated in Fig. 1.
To ensure the integrity and reliability of the EEG data utilized in this
study, we implemented a comprehensive preprocessing pipeline. This in-
cluded artifact removal using Independent Component Analysis (ICA) to
eliminate noise from eye blinks and muscle movements, bandpass filtering to
Jou

retain frequencies between 0.5 and 50 Hz, normalization to mitigate inter-


subject variability, and segmentation of the continuous EEG data into 2-
second epochs with 50% overlap. These steps were essential in preparing
high-quality data for training our seizure detection model.

9
Journal Pre-proof

of
pro
re-
lP
rna

Fig. 1. Schematic overview of the epileptic EEG signal classification process


utilizing ALIF and an attention-enhanced CDNN.
Jou

10
Journal Pre-proof

2.1. Seizure EEG database

of
The Bonn [26] and EEG Epilepsy [27] databases serve as valuable re-
sources for evaluating the proposed methodology. The Bonn database com-
prises 5 classes, while the EEG Epilepsy database contains 3 classes, both
offering single-channel EEG signals.

pro
The Bonn EEG dataset offers a curated compilation of EEG signals, fea-
turing a balanced representation of both healthy and epileptic conditions.
Comprising five subsets denoted as A, B, C, D, and E, the dataset presents
a single-channel EEG format with a 12-bit resolution and a sampling fre-
quency of 173.61 Hz. Each of the 100 segments within the subsets lasts 23.6
seconds, accounting for 4097 data points. Subsets A and B, drawn from a
control group of healthy individuals, capture distinct EEG patterns during
re-
eyes-open and eyes-closed conditions, respectively. Notably, these segments
undergo careful manual extraction from multi-channel recordings to elimi-
nate potential interferences such as muscle artifacts and eye movements. The
dataset further encompasses intracranial EEG recordings from preoperative
patients with controlled epilepsy (Subsets C, D, and E). Surgical resection
of specific brain regions in these patients resulted in controlled seizure activ-
lP
ity. Subset D features EEG directly from the epileptic focus, while Subset
C captures EEG from the opposite side during interictal periods. Subset E
provides valuable insights into seizure episodes, amalgamating data from all
intracranial electrodes, including those placed in lateral and basal regions of
the new cortical layer. Detailed information is demonstrated in Table 2.
rna

Table 2: Bonn EEG dataset overview by subsets

Subset Description Subjects Segments Duration


A Eyes Open (Healthy Control) 5 Healthy 100 23.6 Seconds
B Eyes Closed (Healthy Control) 5 Healthy 100 23.6 Seconds
Intracranial EEG from Patients with Epilepsy
C EEG during Interictal Periods 5 Patients 100 23.6 Seconds
D EEG Directly from the Epileptic Focus 5 Patients 100 23.6 Seconds
Jou

E EEG data from All Intracranial Electrodes 5 Patients 100 23.6 Seconds
Technical Details
Resolution 12 bits
Sampling Frequency 173.61 Hz
Data Points per Segment 4097

The EEG Epilepsy Database encapsulates segmented time series record-


ings of EEG from a cohort of ten epilepsy patients. These recordings were

11
Journal Pre-proof

procured at the Neurology & Sleep Centre situated in Hauz Khas, New Delhi.

of
The data, captured at a sampling rate of 200 Hz via the Grass Telefactor
Comet AS40 Amplification System, boasts of gold-plated scalp EEG elec-
trodes configured in accordance with the 10-20 system. The recordings are
meticulously categorized into pre-ictal, interictal, and ictal phases, thereby

pro
facilitating an in-depth scrutiny of the dynamics of epileptic seizures. Each
folder available for download, which symbolizes a seizure stage, encompasses
fifty MAT-files. Each of these files houses 1024 samples of EEG time series
data spanning a duration of 5.12 seconds. This database serves as a valu-
able resource for in-depth research on the distinct patterns of EEG signals
associated with epilepsy. Detailed information is demonstrated in Table 3.
Table 3: EEG Epilepsy database overview

Parameter
Sampling Rate
re-
Description
200 Hz
Electrode Placement 10-20 Electrode System
Segmentation Ictal (F), Interictal (G), Pre-ictal (H)
lP
MAT-File Details Description
Samples per File 1024
Duration per Sample 5.12 Seconds
Files per Stage 50

Fig. 2 provides visual exemplifications of diverse EEG recordings pro-


rna

cured from two databases.


Table 4 illustrates the detailed experimental setup, encompassing exper-
iments conducted with the Bonn and EEG Epilepsy datasets. In the case
of the Bonn dataset, twelve distinct classification problems are introduced,
while the EEG Epilepsy dataset involves five different classification chal-
lenges. The primary objective of these experiments is to discern between
preictal (normal), interictal, and ictal EEG signals. This involves both bi-
Jou

nary and multi-class classification scenarios, emphasizing a comprehensive


exploration of signal classification across various contexts.

2.2. ALIF algorithm


The ALIF method proposed by Cicone et al. [20] performs adaptive
signal decomposition into IMFs using an iterative filtering approach with
data-driven time-variable filter lengths.

12
Journal Pre-proof

of
pro
re-
(a) Five types of EEG signals from Bonn database.
lP
rna
Jou

(b) Three types of EEG signals from EEG Epilepsy


database.

Fig. 2. Examples of Different types of EEG signals from Bonn and EEG
Epilepsy databases.

13
Journal Pre-proof

Table 4: Various experimental scenarios for the Bonn and EEG Epilepsy

of
databases.
Dataset Case Groups Description
Type 1 Type 2 Type 3 Type 4 Type 5
Bonn 1 A versus E Normal (eyes open) Ictal - - -

pro
2 B versus E Normal (eyes closed) Ictal - - -
3 AB versus E Normal Ictal - - -
4 C versus E Interictal Ictal - - -
5 D versus E Interictal Ictal - - -
6 CD versus E Interictal Ictal - - -
7 A versus D Normal Interictal - - -
8 ABCD versus E Non-seizure Seizure - - -
9 AB versus CDE Normal Epileptic - - -
10 A versus C versus E Normal Interitcal Ictal - -
11 AB versus CD versus E Normal Interitcal Ictal - -
12 A versus B versus C versus D versus E Normal (eyes open) Normal (eyes closed) Interictal Interictal Ictal
EEG Epilepsy I
II
III
IV
V
F versus G
F versus H
G versus H
F versus GH
F versus G versus H
re-
Ictal
Ictal
Interictal
Seizure
Ictal
Interictal
Preictal
Preictal
Seizure-free
Interictal
-
-
-
-
Preictal

For a signal f (x), the steps to extract a single IMF f1 (x) are:
lP
1) Initialize: fˆ(0) (x) = f (x)
2) At iteration n (n ≥ 1):
(a) Adaptively select half filter length ln (x) based on local maximal vari-
ation:
ln (x) = α · mean(|f (n−1) (x) − f (n−1) (x − δx)|) (1)
rna

where α and δx are set constants.


(b) Construct localized filter wn (x, t) with Gaussian kernel:
 
1 (t − x)2
wn (x, t) = √ exp − (2)
2πσ 2σ 2

where σ controls smoothness.


(c) Apply filter to compute local weighted average:
Jou

Z ln (x)
fˆ(n) (x) = fˆ(n−1) (x) − fˆ(n−1) (x + t)wn (x, t)dt (3)
−ln (x)

3) Check if stopping criteria are met (e.g. iteration number or difference


between estimates). If no, set n = n + 1 and go back to Step 2.
Outer Iteration for IMF Ensemble:

14
Journal Pre-proof

1) Set IMF index k = 1.

of
2) Record inner iteration terminant Pas fk (x) = fˆ(n) (x).
3) Compute residual r(x) = f (x) − ki=1 fi (x).
4) Apply inner iteration to r(x) to extract next IMF fk+1 (x).
5) Set k = k + 1, repeat Steps 3-4 until stopping criteria are met (e.g.

pro
residual becomes simple with few extrema).
The outer iteration recursively extracts all IMFs based on successive ap-
plications of the inner iteration. Varying inner iteration parameters gives
different decomposition results.

2.3. CDNN architecture: insights and relevance


The CDNN is a sophisticated architecture designed for accurate classi-
re-
fication of EEG signals, leveraging the hierarchical representation obtained
through the ALIF method. The CDNN comprises two levels: the first for
feature extraction and the second for classification, shown in Fig. 1.
The proposed CDNN architecture is designed to overcome the limitations
of traditional approaches in EEG-based analysis by addressing the dual chal-
lenges of capturing complex spatial patterns and temporal dynamics inherent
lP
in EEG signals. While standalone CNNs effectively extract localized spatial
features, they lack the capacity to model sequential dependencies, and LSTM
networks, though adept at capturing temporal information, do not fully ex-
ploit spatial correlations. In contrast, the cascaded design of the CDNN
sequentially integrates CNN layers with LSTM layers. The initial CNN lay-
ers are responsible for detecting fine-grained spatial features associated with
rna

specific neural activations, and the subsequent LSTM layers aggregate these
spatial features over time to capture the evolution of transient states.
A critical innovation of our architecture is the incorporation of the Squeeze-
and-Excitation Block (SEBlock) attention mechanism. This mechanism op-
erates by performing global average pooling across the temporal dimension
to extract a compact representation of each channel’s information. A sub-
sequent gating process then adaptively recalibrates channel-wise feature im-
Jou

portance, emphasizing channels that contribute significantly to the diagnosis


while suppressing noise and less informative signals. This adaptive weighting
not only enhances the discriminative power of the model but also improves its
robustness against inter-subject variability and recording artifacts, common
challenges in EEG data.
To enhance the model’s ability to prioritize significant features within
the IMFs derived from EEG signals, we integrated the SEBlock attention

15
Journal Pre-proof

mechanism. The SEBlock operates by first performing global average pool-

of
ing across the temporal dimension of each IMF, capturing the global context
of the signal. This is followed by an adaptive recalibration process, where a
gating mechanism models the interdependencies between channels and gener-
ates weights that selectively emphasize informative features while suppressing

pro
less relevant ones. This integration allows the model to dynamically prioritize
features within the IMFs, thereby improving the accuracy and robustness of
seizure detection from EEG data.
By combining hierarchical spatiotemporal feature extraction with dy-
namic attention-based recalibration, the CDNN architecture provides deeper
insights into the underlying neural mechanisms associated with epilepsy. This
integrated approach bridges the gap between purely technical implementa-
re-
tions and theoretical understanding, offering both improved diagnostic ac-
curacy and enhanced interpretability. The design choices in our CDNN ar-
chitecture directly address the shortcomings of previous methods, thereby
advancing the state-of-the-art in EEG-based epilepsy diagnosis.
In this study, we employed the CDNN architecture to accurately classify
epileptic EEG signals. The choice of this hybrid architecture, integrating
lP
CNNs and LSTM networks, was guided by the need to capture both spa-
tial and temporal dependencies inherent in EEG signals. The CNN layers
effectively extract spatial patterns from the IMFs obtained through ALIF de-
composition, while the LSTM layers model temporal dynamics. Additionally,
SEBlock attention mechanisms were incorporated to adaptively recalibrate
channel-wise features, emphasizing the most informative components and
rna

enhancing the model’s discriminative power. This architectural design not


only addresses the non-stationarity and complex dynamics of epileptic EEG
signals but also achieves superior classification performance across multiple
scenarios, as evidenced by our experimental results.
Table 5 summarizes a detailed parameter representation of the classifica-
tion module of the CDNN model.
Jou

2.4. Rationale for choosing the CDNN architecture


The CDNN architecture was chosen for its superior ability to hierar-
chically capture complex spatiotemporal patterns in EEG signals. By cas-
cading CNNs and LSTM layers, the CDNN leverages the strengths of both
components: CNNs efficiently extract spatial features across EEG chan-
nels, capturing local dependencies related to brain region interactions, while

16
Journal Pre-proof

Table 5: Classification module summary of CDNN.

of
No Layer name Layer parameters Output shape Number of params
1 Conv 1D filters=64, kerne size=21, input shape=(3584,1), stride=11 (324,64) 1408
2 BatchNorm - (324,64) 256
3 Activation ‘leaky relu’, alpha=0.1 (324,64) 0
4 MaxPooling1D pool size=2 (162,64) 0

pro
5 Conv 1D filters=64, kernel size=7, stride=1 (156,64) 28736
6 BatchNorm - (156,64) 256
7 Activation ‘leaky relu’, alpha=0.1 (156,64) 0
8 MaxPooling1D pool size=2 (78,64) 0
9 Conv 1D filters=128, kernel size=5, stride=1 (74,128) 41088
10 Batch Norm - (74,128) 512
11 Activation ‘leaky relu’, alpha=0.1 (74,128) 0
12 MaxPooling1D pool size=2 (37,128) 0
13 Conv 1D filters=256, kernel size=13, stride=1 (25,256) 426240
14 Activation ‘leaky relu’, alpha=0.1 (25,256) 0
15 Conv 1D filters=512, kernel size=7, stride=1 (19,512) 918016
16 Activation ‘leaky relu’, alpha=0.1 (19,512) 0
17
18
19
20
21
22
Conv 1D
BatchNorm
Activation
MaxPooling1D
LSTM
Flatten
-
‘leaky relu’, alpha=0.1
pool size=2
Unit=128
-
re-
filters=256, kernel size=9, stride=1 (11,256)
(11,256)
(11,256)
(5,256)
(5,128)
(640)
1179904
1024
0
0
197120
0
23 Dense unit=64, activation=‘relu’, kernel regularizer=l2 (0.02) (64) 41024
24 Dense unit=5, activation=‘softmax’ (5) 325
lP
LSTMs model temporal sequences, essential for recognizing dynamic emo-
tional states. This hierarchical integration allows the CDNN to progressively
refine feature representations across multiple layers, ensuring that both spa-
tial and temporal dependencies are learned more comprehensively. In con-
trast, standalone CNNs lack temporal modeling capabilities, while LSTMs
rna

struggle to fully exploit spatial correlations. Hybrid CNN-LSTM models offer


improved spatiotemporal learning but do not achieve the hierarchical feature
extraction required for capturing complex non-stationary patterns in EEG
signals. The CDNN’s cascaded design overcomes these limitations, leading
to enhanced classification accuracy and robustness.
Additionally, the CDNN architecture incorporates the SEBlock attention
mechanism, which dynamically recalibrates channel-wise feature importance.
By performing global average pooling followed by adaptive gating, the SE-
Jou

Block models interdependencies between channels, selectively emphasizing


the most informative features while suppressing less relevant ones. This
adaptive feature prioritization enhances the model’s discriminative power,
making it more robust to noise and inter-subject variability. Moreover, the
hierarchical structure of the CDNN, combined with the SEBlock’s atten-
tion mechanism, effectively mitigates overfitting and improves generalization.

17
Journal Pre-proof

This innovative integration provides a more accurate and robust solution for

of
EEG-based seizure detection, significantly advancing the state-of-the-art in
spatiotemporal modeling.

3. Experimental results

pro
We conducted a rigorous evaluation of our proposed methodology using a
10-fold cross-validation approach on two distinct databases: the Bonn EEG
Database and the EEG Epilepsy Database. To comprehensively assess the
classification performance, we employed various performance metrics, includ-
ing Sensitivity (Sen), Specificity (Spe), Accuracy (Acc), Positive Predictive
Value (PPV), Negative Predictive Value (NPV), Matthews Correlation Co-
efficient (Mcc), and F1 Score.

Sen =
re-
TP
TP + FN
× 100(%), (4)

TN
Spe = × 100(%), (5)
TN + FP
lP
TP + TN
Acc = × 100(%), (6)
TP + TN + FN + FP
TP
PPV = × 100(%) (7)
TP + FP
rna

TN
NPV = × 100(%) (8)
TN + FN
TP × TN − FN × FP
Mcc = p (9)
(TP + FN)(TP + FP)(TN + FN)(TN + FP)
2 × TP
F1 score (F1) = × 100(%) (10)
2 × TP + FN + FP
Jou

Here is the calculation: a True Positive is equal to TP, a False Negative is


equal to FN, a True Negative is equal to TN, and a False Positive is equal
to FP.
The curves for overall loss and accuracy during model training with all
data are depicted in Figs. 3 and 4. Notably, convergence for both metrics is
observable after approximately 300 epochs.

18
Journal Pre-proof

of
pro
(a)
re- (b)

Fig. 3. Training of the CDNN model on Bonn database for multi-class clas-
sification: (a) loss and (b) accuracy curves.
lP
rna
Jou

(a) (b)

Fig. 4. Training of the CDNN model on EEG Epilepsy database for multi-
class classification: (a) loss and (b) accuracy curves.

19
Journal Pre-proof

The classification results for unique instances across two datasets are de-

of
lineated in Tables 6 and 7. Complementing this, Fig. 5 depicts the ROC
trajectories and their corresponding AUC metrics for a dozen instances from
the Bonn dataset and a quintet from the EEG epilepsy dataset, thereby
offering an exhaustive evaluation of the CDNN model’s capabilities. The re-

pro
search conducted by us underscores an amplified precision in distinguishing
between preictal, interictal, and ictal EEG signals. On a broader scale, the
methodology put forth demonstrates a resilient performance, yielding posi-
tive outcomes and validating its effectiveness in accurately classifying diverse
EEG signal categories.

Table 6: The evaluation of the Performance of the proposed approach using

Case
Case
Acc(%)
1 99.50
2 100
Sen (%)
99.50
100
99.50
100
re-
10-fold cross-validation style on Bonn dataset with 12 cases.

Case Spe (%) PPV (%)


99.50
100
NPV (%)
99.50
100
Mcc (%)
99.00
100
F1 (%)
99.50
100
Case 3 100 100 100 100 100 100 100
Case 4 100 100 100 100 100 100 100
lP
Case 5 99.50 99.50 99.50 99.50 99.50 99.00 99.50
Case 6 100 100 100 100 100 100 100
Case 7 99.00 99.00 99.00 99.00 99.00 98.00 99.00
Case 8 100 100 100 100 100 100 100
Case 9 100 100 100 100 100 100 100
Case 10 99.67 99.67 99.83 99.67 99.83 99.50 99.67
rna

Case 11 99.80 99.83 99.89 99.83 99.89 99.72 99.83


Case 12 99.20 99.20 99.80 99.20 99.80 99.00 99.20

Table 7: An evaluation of the performance of the proposed approach using


10-fold cross-validation with 5 cases of EEG epilepsy dataset.
Case Acc (%) Sen (%) Spe (%) PPV (%) NPV (%) Mcc (%) F1 (%)
Jou

Case I 100 100 100 100 100 100 100


Case II 100 100 100 100 100 100 100
Case III 100 100 100 100 100 100 100
Case IV 100 100 100 100 100 100 100
Case V 99.33 99.33 99.67 99.35 99.67 99.01 99.33

To mitigate potential overfitting, we employed a robust three-part data


split strategy, allocating 70% of the data for training, 15% for validation,

20
Journal Pre-proof

of
pro
re-
(a) Bonn database.
lP
rna
Jou

(b) EEG Epilepsy database.

Fig. 5. Seizure detection ROC curves and AUC from Bonn and EEG Epilepsy
databases.

21
Journal Pre-proof

and 15% for testing. This strategy was applied to both the Bonn and EEG

of
Epilepsy databases. The dedicated validation set, completely independent
of the training data, was used for hyperparameter tuning and to monitor
model performance during training, ensuring that the model does not merely
memorize the training set but generalizes well to unseen data. We further

pro
corroborated the model’s stability by comparing performance metrics, such
as accuracy, sensitivity, specificity, and F1 score, between the validation and
testing sets. The results from both databases are summarized in two de-
tailed tables (Table 8 and Table 9), which illustrate that the differences in
performance metrics between the validation and test sets are minimal (within
1-2% compared to Table 6 and Table 7 with 10-fold cross-validation). This
consistency confirms that the employed regularization techniques, includ-
re-
ing dropout and L2 regularization, effectively mitigate overfitting. These
findings underscore the robustness and reliability of our approach under con-
trolled conditions. Future work will extend these validations to more diverse,
real-world datasets to further ensure the model’s generalizability.

Table 8: The evaluation of the Performance of the proposed approach using


lP
70%-15%-15% split validation on Bonn dataset with 12 cases.

Case Acc(%) Sen (%) Spe (%) PPV (%) NPV (%) Mcc (%) F1 (%)
Case 1 100 100 100 100 100 100 100
Case 2 100 100 100 100 100 100 100
Case 3 100 100 100 100 100 100 100
Case 4 100 100 100 100 100 100 100
rna

Case 5 100 100 100 100 100 100 100


Case 6 100 100 100 100 100 100 100
Case 7 96.67 96.67 96.67 96.88 96.88 93.54 96.66
Case 8 100 100 100 100 100 100 100
Case 9 100 100 100 100 100 100 100
Case 10 100 100 100 100 100 100 100
Case 11 100 100 100 100 100 100 100
Jou

Case 12 98.67 98.46 99.64 99.05 99.68 98.40 98.71

The SHAP analysis on the Bonn database revealed distinct feature im-
portance patterns across the five subsets (A-E), which is shown in Fig. 6.
For normal EEG (subset A), lower frequency components in the theta and
alpha ranges showed high importance. In contrast, seizure activity (sub-
set E) was characterized by significant contributions from higher frequency

22
Journal Pre-proof

Table 9: An evaluation of the performance of the proposed approach using

of
70%-15%-15% split validation with 5 cases of EEG epilepsy dataset.
Case Acc (%) Sen (%) Spe (%) PPV (%) NPV (%) Mcc (%) F1 (%)
Case I 100 100 100 100 100 100 100
Case II 100 100 100 100 100 100 100

pro
Case III 100 100 100 100 100 100 100
Case IV 100 100 100 100 100 100 100
Case V 100 100 100 100 100 100 100

features, particularly in the beta and gamma bands. Subsets B, C, and D


exhibited a gradual transition in feature importance, reflecting the nuanced
spectral changes from normal to pre-ictal states. This analysis underscores
the model’s ability to capture the complex frequency dynamics associated
re-
with different EEG states, from normal through interictal to ictal conditions.
SHAP analysis of the EEG Epilepsy database highlighted the model’s dis-
criminative power across ictal (F), interictal (G), and pre-ictal (H) classes,
which is shown in Fig. 7. The ictal class showed high importance for features
capturing rapid fluctuations and high-frequency components, aligning with
the chaotic nature of seizure activity. Interictal and pre-ictal classes em-
lP
phasized mid-range frequencies and temporal stability measures. Notably,
features derived from the ALIF decomposition and those processed by the
SEblock attention mechanism consistently ranked high in importance, vali-
dating the effectiveness of these key components of our methodology. This
analysis provides valuable insights into the specific signal characteristics most
rna

relevant for distinguishing between different epileptic states.


The Grad-CAM analysis reveals distinct patterns of feature importance
across different EEG signal types in both databases, highlighting the model’s
ability to discriminate between various epileptic states. For the Bonn Database,
the visualizations demonstrate a clear progression in the activation patterns
from normal EEG (classes A and B) through interictal (classes C and D) to
ictal (class E) states, which is shown in Fig. 8. The model appears to focus
on different frequency bands and temporal regions as it moves from normal
Jou

to epileptic activity, with more intense and widespread activations observed


in the seizure class (E).
In the EEG Epilepsy Database results, the Grad-CAM visualizations elu-
cidate the model’s focus during classification of ictal (F), interictal (G), and
pre-ictal (H) states, which is shown in Fig. 9. The ictal state (F) shows the
most intense and widespread activations, indicative of the complex, high-

23
Journal Pre-proof

of
pro
re-
(a) Subset A. (b) Subset B.
lP
rna
Jou

(c) Subset C. (d) Subset D.

24
Journal Pre-proof

of
pro
(e) Subset E.
re-
Fig. 6. SHAP values from Bonn Epilepsy database: Top 20 feature contribu-
lP
tions.

frequency components typically associated with seizure activity. Interictal


(G) and pre-ictal (H) states exhibit more localized and less intense activa-
tions, suggesting the model’s attention to subtle EEG changes that precede
or follow seizure events.
rna

These visualizations provide valuable insights into the decision-making


process of the deep learning model, demonstrating its capacity to capture and
utilize relevant spatio-temporal features for accurate classification of epileptic
EEG signals. The differential activation patterns across classes underscore
the model’s sensitivity to the nuanced spectral and temporal dynamics char-
acteristic of various epileptic states, contributing to its high classification
performance.
Jou

4. Discussion
The accurate classification of epileptic EEG signals is a challenging task
with profound implications for clinical practice and patient care. Our study
introduces a novel methodology that synergistically combines the ALIF tech-
nique for signal decomposition and an attention-augmented CDNN architec-

25
Journal Pre-proof

of
pro
re-
(a) Subset F. (b) Subset G.
lP
rna
Jou

(c) Subset H.

Fig. 7. SHAP values from EEG Epilepsy database: Top 20 feature contribu-
tions.

26
Journal Pre-proof

of
pro
re-
(a) Subset A. (b) Subset B.
lP
rna

(c) Subset C. (d) Subset D.


Jou

27
Journal Pre-proof

of
pro
(e) Subset E.

across EEG subsets A-E. re-


Fig. 8. Grad-Cam visualizations for Bonn database: Feature contributions

ture. This approach addresses several key challenges in epileptic EEG signal
analysis, including non-stationarity, complex signal dynamics, and the need
for interpretability.
lP
The integration of ALIF for signal decomposition represents a significant
advancement in our methodology. Traditional signal processing techniques,
such as Fourier and wavelet transforms, while valuable in certain contexts, of-
ten struggle to capture the intricate temporal dynamics and non-stationarity
inherent in epileptic EEG signals. The ALIF algorithm, proposed by Cicone
rna

et al. [20], offers a powerful solution by decomposing the EEG signals into
a set of IMFs that effectively capture the inherent oscillatory components.
This decomposition not only addresses the non-stationarity challenge but also
provides a refined representation of the signal, enabling the subsequent deep
learning architecture to focus on the most salient features for classification.
Several previous studies have explored the use of signal decomposition
techniques in conjunction with machine learning algorithms for epileptic EEG
signal analysis. For instance, Hassan et al. [28] employed the Complete
Jou

Ensemble Empirical Mode Decomposition with Adaptive Noise (CEEMDAN)


technique to preprocess the EEG signals before applying an adaptive boosting
classifier. Their approach achieved an accuracy of 99.2% on the Bonn dataset.
Similarly, Zarei and Asl [8] combined DWT and orthogonal matching pursuit
(OMP) for signal decomposition, followed by a SVM classifier, attaining an
accuracy of 99.33% on the same dataset.

28
Journal Pre-proof

of
pro
re-
(a) Subset F. (b) Subset G.
lP
rna

(c) Subset H.

Fig. 9. Grad-Cam visualizations for EEG Epilepsy database: Feature contri-


Jou

butions in Ictal, Interictal and Preictal states.

29
Journal Pre-proof

While these studies demonstrate the potential benefits of signal decompo-

of
sition techniques, our methodology stands out by leveraging the strengths of
both signal processing and deep learning in a synergistic manner. By directly
inputting the decomposed IMFs into the CDNN architecture, our approach
seamlessly integrates the refined signal representation with the powerful fea-

pro
ture learning capabilities of deep neural networks, potentially enabling the
discovery of more intricate patterns and dependencies.
The CDNN architecture employed in our study comprises two distinct
levels: a feature extraction module and a classification module. The feature
extraction module incorporates the SEblock channel attention mechanism,
which is a state-of-the-art attention technique that enables the network to
adaptively focus on the most salient features within the IMFs. Attention
re-
mechanisms have gained significant traction in various domains, including
natural language processing and computer vision, due to their ability to
selectively emphasize relevant information while suppressing irrelevant or
redundant components.
In the context of epileptic EEG signal analysis, the integration of at-
tention mechanisms is particularly advantageous. Seizure events are often
lP
characterized by complex and dynamic patterns that may be obscured or
distorted by artifacts, background noise, or irrelevant signal components. By
enabling the network to focus on the most informative features, the atten-
tion mechanism enhances the discriminative power of the model, potentially
improving classification accuracy and robustness.
Several previous studies have explored the use of attention mechanisms
rna

in EEG signal analysis, albeit with different architectures and applications.


For instance, Feizbakhsh and Omranpour [29] proposed a cluster-based phase
space density feature extraction approach combined with a deep learning
model incorporating an attention mechanism for seizure prediction. Their
method achieved promising results, demonstrating the potential benefits of
attention mechanisms in this domain.
Our study goes a step further by integrating the SEblock attention mech-
Jou

anism within a cascaded deep neural network architecture. The SEblock is


a lightweight and computationally efficient attention module that has been
widely adopted in various computer vision tasks. By incorporating this atten-
tion mechanism into our CDNN, we leverage its ability to recalibrate feature
maps, amplifying the informative features while suppressing the less relevant
ones, ultimately enhancing the overall discriminative power of the model.
The classification module of the CDNN employs a hybrid architecture

30
Journal Pre-proof

that combines the strengths of CNNs and LSTM networks. CNNs have

of
proven to be highly effective in capturing spatial patterns and local depen-
dencies within data, making them well-suited for processing the feature repre-
sentations derived from the IMFs. On the other hand, LSTM networks excel
at modeling temporal dependencies and long-range dependencies, which are

pro
crucial for accurately characterizing the dynamic nature of epileptic seizures.
By synergistically combining these two powerful neural network archi-
tectures, our CDNN leverages their complementary strengths, enabling the
simultaneous capture of both spatial and temporal dependencies within the
EEG signal patterns. This hybrid approach is particularly advantageous in
the context of epileptic EEG signal classification, where accurate characteri-
zation of both local and global patterns is essential for reliable diagnosis and
monitoring.
re-
4.1. Comparison with state-of-the-art methods
In recent literature, diverse approaches have emerged for binary classifi-
cation of EEG signals. Our experimental results, along with comparisons to
contemporary methods in seizure detection, are presented in Table 10.
lP
The proposed methodology for epileptic EEG signal classification has
demonstrated exceptional performance across various classification scenarios,
as evidenced by the comprehensive comparison with state-of-the-art meth-
ods presented in Table 10. This comparative analysis encompasses a wide
range of contemporary approaches, including both traditional machine learn-
ing techniques and advanced deep learning architectures.
rna

In the binary classification task of discriminating between normal (A) and


ictal (E) EEG signals from the Bonn dataset, our method achieved an accu-
racy of 99.50%. This performance is comparable to or exceeds that of several
recent studies. For instance, Subasi et al. [7] reported an accuracy of 99.38%
using genetic algorithm (GA), particle swarm optimization (PSO), and SVM
techniques. Our method slightly outperforms this approach, demonstrating
its robustness in distinguishing normal from seizure activity.
Jou

For the classification of eyes-closed normal (B) versus ictal (E) EEG sig-
nals, our approach attained a perfect accuracy of 100%. This result is on
par with the performance reported by Supriya et al. [31], who utilized multi-
gradient (MG), ensemble wavelet features (EWF), and adaptive wavelet de-
composition (AWD) in conjunction with SVM. It also surpasses the 99.33%
accuracy achieved by Jiang et al. [30] using symplectic geometry eigenvalues

31
Journal Pre-proof

of
Table 10: Summary of literature comparison results (10-fold cross-validation
style).

pro
References Methodology Cases Acc (%) Our Acc (%)
Subasi et al. [7] (2019) GA, PSO and SVM A-E 99.38 99.50
Jiang et al. [30] (2020) Symplectic geometry eigenvalues + SVM A-E 100 99.50
Supriya et al. [31] (2021) MG, EWF and AWD + SVM A-E 100 99.50
Prabhakar et al. [32] (2022) K-SVD, SOM + ELM, deep learning, transfer learning A-E 98.35 99.50
Liu et al. [33] (2023) Power spectral density parameterization + SVM/KNN/DT/LDA A-E 100 99.50
Wang et al. [34] (2023) Persistent homology + GoogLeNet A-E 99.55 99.50
Jiang et al. [30] (2020) Symplectic geometry eigenvalues + SVM B-E 99.33 100
Supriya et al. [31] (2021) MG, EWF and AWD + SVM B-E 100 100
Liu et al. [33] (2023) Power spectral density parameterization + SVM/KNN/DT/LDA B-E 100 100
Prabhakar et al. [32] (2022) K-SVD, SOM + ELM, deep learning, transfer learning B-E 97.57 100
Jiang et al. [30] (2020) Symplectic geometry eigenvalues + SVM AB-E 100 100
Prabhakar et al. [32] (2022) K-SVD, SOM + ELM, deep learning, transfer learning AB-E 97.84 100
Liu et al. [33] (2023) Power spectral density parameterization + SVM/KNN/DT/LDA AB-E 100 100
Wang et al. [34] (2023) Persistent homology + GoogLeNet AB-E 98.28 100
Raghu et al. [35]
Jiang et al. [30] (2020)
Supriya et al. [31] (2021)
Liu et al. [33] (2023)
Wang et al. [34] (2023)
Raghu et al. [35] (2019)
Jiang et al. [30]
Supriya et al. [31] (2021)
Liu et al. [33] (2023)
MG, EWF and AWD + SVM re-
Matrix determinant feature + MLP classifier
Symplectic geometry eigenvalues + SVM

Power spectral density parameterization + SVM/KNN/DT/LDA


Persistent homology + GoogLeNet
Matrix determinant feature + MLP classifier
Symplectic geometry eigenvalues + SVM
MG, EWF and AWD + SVM
Power spectral density parameterization + SVM/KNN/DT/LDA
C-E
C-E
C-E
C-E
C-E
D-E
D-E
D-E
D-E
97.60
99.33
100
99.5
98.63
97.60
100
100
98.50
100
100
100
100
100
99.50
99.50
99.50
99.50
Raghu et al. [35] (2019) Matrix determinant feature + MLP classifier CD-E 96.85 100
Jiang et al. [30] (2020) Symplectic geometry eigenvalues + SVM CD-E 99.28 100
Liu et al. [33] (2023) Power spectral density parameterization + SVM/KNN/DT/LDA CD-E 98.70 100
Wang et al. [34] (2023) Persistent homology + GoogLeNet CD-E 97.68 100
lP
Tuncer et al. [36] (2019) Local senary pattern + SVM A-D 99.5 99.00
Hassan et al. [28] (2020) CEEMDAN + Adaptive Boosting ABCD-E 99.2 100
Jiang et al. [30] (2020) Symplectic geometry eigenvalues + SVM ABCD-E 99.97 100
Liu et al. [33] (2023) Power spectral density parameterization + SVM/KNN/DT/LDA ABCD-E 98.40 100
Peng et al. [37] (2021) Stein kernel-based SR AB-CDE 98.2 100
Jiang et al. [30] (2020) Symplectic geometry eigenvalues + SVM AB-CDE 99.17 100
Liu et al. [33] (2023) Power spectral density parameterization + SVM/KNN/DT/LDA AB-CDE 98 100
Jiang et al. [30] (2020) Symplectic geometry eigenvalues + SVM A-C-E 99.22 99.67
Zhang et al. [38] (2021) FSWT-based subbands and CSoS, FuzzyEn, HFD, t-SNE + KNN A-C-E 99.69 99.67
Tuncer et al. [36] (2019) Matrix determinant feature + MLP classifier AB-CD-E 96.5 99.80
Jiang et al. [30] (2020) Symplectic geometry eigenvalues + SVM AB-CD-E 99.80 99.80
rna

Zarei and Asl [8] (2021) DWT and OMP + SVM AB-CD-E 99.33 99.80
Liu et al. [33] (2023) Power spectral density parameterization + SVM/KNN/DT/LDA AB-CD-E 98.80 99.80
Sharma et al. [39] (2020) ToC + deep neural network A-B-C-D-E 97.2 99.20
Zhang et al. [38] (2021) FSWT-based subbands and CSoS, FuzzyEn, HFD, t-SNE + KNN A-B-C-D-E 93.62 99.20
Peng et al. [37] (2021) Stein kernel-based SR F-G 98.00 100
Wang et al. [40] (2021) TVAR-MWBF-UROFR + SVM F-G 98.18 100
Sukriti et al. [41] (2021) EMD-MSPCA, RCMSE, RCMFE,RCMPE + SVM F-G 96.38 100
Tajmirriahi and Amini [42] (2021) SDE + SVM F-G 99.1 100
Wijayanto [43] (2023) Compressive sensing + SVM F-G 100 100
Abhishek et al. [44] (2024) Higuchi, Katz, power spectral density, Spectral entropy as features F-G 100 100
Wijayanto et al. [43] (2023) Compressive sensing + SVM F-H 95 100
Peng et al. [37] (2021) Stein kernel-based SR F-H 99 100
Wang et al. [40] (2021) TVAR-MWBF-UROFR + SVM F-H 100 100
Sukriti et al. [41] (2021) EMD-MSPCA, RCMSE, RCMFE,RCMPE + SVM F-H 100 100
Tajmirriahi and Amini [42] (2021) SDE + SVM F-H 96.8 100
Abhishek et al. [44] (2024) Higuchi, Katz, power spectral density, Spectral entropy as features F-H 99 100
Jou

Wang et al. [40] (2021) TVAR-MWBF-UROFR + SVM G-H 88.95 100


Sukriti et al. [41] (2021) EMD-MSPCA, RCMSE, RCMFE,RCMPE + SVM G-H 97.15 100
Tajmirriahi and Amini [42] (2021) SDE + SVM G-H 91.5 100
Abhishek et al. [44] (2024) Higuchi, Katz, power spectral density, Spectral entropy as features G-H 94 100
Peng et al. [37] (2021) Stein kernel-based SR F-GH 97.5 100
Wang et al. [40] (2021) TVAR-MWBF-UROFR + SVM F-GH 98.08 100
Peng et al. [37] (2021) Stein kernel-based SR F-G-H 97.21 99.33
Sukriti et al. [41] (2021) EMD-MSPCA, RCMSE, RCMFE,RCMPE + SVM F-G-H 93.49 99.33
Abhishek et al. [44] (2024) Higuchi, Katz, power spectral density, Spectral entropy as features F-G-H 94.1 99.33

32
Journal Pre-proof

and SVM, highlighting the effectiveness of our deep learning-based method-

of
ology.
Liu et al. [33] achieved impressive results across various classification
tasks on the Bonn dataset. For instance, in the binary classification task
of normal (A) versus ictal (E), they reported an accuracy of 100%, match-

pro
ing our method’s performance. However, for other cases like interictal (C)
versus ictal (E), their accuracy was slightly lower at 99.5% compared to our
method’s 100%. This demonstrates that while power spectral density pa-
rameterization is effective, our proposed approach consistently performs at a
high level across various tasks. The integration of ALIF decomposition and
attention-augmented deep neural networks in our methodology allows it to
maintain high accuracy even in more complex classification scenarios.
re-
Wang et al. [34] used persistent homology with GoogLeNet and achieved
competitive results, with an accuracy of 99.55% for the A-E classification
and 98.63% for the C-E classification on the Bonn dataset. While these
are high accuracy rates, our approach achieved slightly better or equiva-
lent performance, obtaining a perfect accuracy of 100% for these and other
classifications. This indicates that while topological data analysis provides
lP
valuable insights, our method’s combination of signal decomposition, deep
learning, and interpretability tools like SHAP and Grad-CAM offers an edge
in capturing complex EEG patterns for accurate classification.
In more complex scenarios, such as the classification of combined normal
(AB) versus ictal (E) signals, our method maintained its perfect accuracy of
100%. This performance matches that of Jiang et al. [30] and exceeds the
rna

97.84% accuracy reported by Prabhakar et al. [32], who employed a com-


bination of K-SVD, self-organizing maps (SOM), extreme learning machines
(ELM), and transfer learning techniques.
Notably, our approach demonstrated remarkable consistency across vari-
ous interictal versus ictal classification tasks. For instance, in the C-E, D-E,
and CD-E classification scenarios, our method achieved 100%, 99.50%, and
100% accuracy, respectively. These results are highly competitive with, and
Jou

in some cases surpass, those reported by Raghu et al. [35], Jiang et al. [30],
and Supriya et al. [31], who employed diverse techniques such as matrix de-
terminant features, symplectic geometry eigenvalues, and ensemble methods.
In the challenging task of discriminating between all non-seizure (ABCD)
and seizure (E) signals, our method achieved a perfect accuracy of 100%.
This result outperforms the 99.2% accuracy reported by Hassan et al. [28]
using CEEMDAN and Adaptive Boosting, as well as the 99.97% accuracy

33
Journal Pre-proof

achieved by Jiang et al. [30].

of
For multi-class classification scenarios on the Bonn dataset, our method
continued to exhibit strong performance. In the three-class problem of A-C-
E, we achieved an accuracy of 99.67%, which is comparable to the 99.69%
reported by Zhang et al. [38] using a complex feature extraction pipeline

pro
involving fractional short-time wavelet transform (FSWT), composite spec-
trum of symmetry (CSoS), fuzzy entropy (FuzzyEn), and Higuchi fractal
dimension (HFD).
In the most comprehensive five-class classification task (A-B-C-D-E), our
method attained an accuracy of 99.20%. This result significantly outperforms
the 97.2% accuracy reported by Sharma et al. [39] using time-of-occurrence
(ToC) features with deep neural networks, and the 93.62% accuracy achieved
re-
by Zhang et al. [38] using their feature extraction pipeline.
Turning to the EEG Epilepsy dataset, our method demonstrated per-
fect accuracy (100%) in several binary classification tasks, including F-G,
F-H, and G-H. These results are either on par with or surpass those re-
ported by recent studies. For instance, in the F-G classification, our per-
formance matches that of Wijayanto et al. [43] using compressive sensing
lP
and SVM, while outperforming the 98.18% accuracy reported by Wang et al.
[40] using time-varying autoregressive modeling with modified wavelet basis
function (TVAR-MWBF) and uniform recursive orthogonal feature ranking
(UROFR).
In the three-class problem (F-G-H) of the EEG Epilepsy dataset, our
method achieved an accuracy of 99.33%. This result surpasses the 97.21%
rna

accuracy reported by Peng et al. [37] using Stein kernel-based sparse rep-
resentation (SR) and the 93.49% accuracy achieved by Sukriti et al. [41]
employing a combination of empirical mode decomposition (EMD), multi-
variate statistical process control (MSPCA), and various entropy measures.
Abhishek et al. [44] employed features like Higuchi and Katz fractal dimen-
sions and spectral entropy, achieving a perfect accuracy of 100% in the binary
classification of ictal (F) versus interictal (G) and ictal (F) versus preictal (H)
Jou

states on the EEG Epilepsy dataset. While this performance is on par with
our proposed method, our approach also excels in multi-class scenarios such
as the F-G-H classification, where we achieved 99.33% accuracy compared to
their 94.1%. This suggests that our method not only excels in binary classifi-
cation tasks but also has robust generalization capabilities for more complex,
multi-class problems, owing to the integrated deep learning architecture that
captures both spatial and temporal dependencies in EEG signals.

34
Journal Pre-proof

The consistently high performance of our proposed methodology across

of
diverse classification scenarios and datasets underscores its robustness and
generalizability. The synergistic integration of ALIF decomposition, attention-
augmented cascaded deep neural networks, and interpretability tools has
resulted in a powerful and versatile approach for epileptic EEG signal clas-

pro
sification. These comparative results not only validate the effectiveness of
our method but also position it as a state-of-the-art solution in the field of
automated epilepsy diagnosis and monitoring.
Our experiments on both the Bonn and EEG Epilepsy databases yielded a
100% classification accuracy across multiple scenarios. For the Bonn database,
the perfect accuracy can be attributed to the high quality of the dataset,
which features balanced classes and well-segmented EEG signals. Rigor-
re-
ous preprocessing, including artifact removal and bandpass filtering, ensured
that only the most informative components were retained. In addition, the
use of stratified 10-fold cross-validation and 70%-15%-15% split minimized
the risk of overfitting and confirmed that the model’s performance was ro-
bust across different subsets of data. Similarly, the EEG Epilepsy database,
which also comprised carefully curated and preprocessed EEG recordings,
lP
produced consistent results with 100% accuracy. The effective integration of
the ALIF for signal decomposition and the attention-enhanced CDNN archi-
tecture was key. Specifically, the SEBlock attention mechanism dynamically
prioritized salient features within the IMFs, while the hybrid CNN-LSTM
structure captured both spatial and temporal dependencies. These architec-
tural strengths, combined with a balanced and noise-reduced dataset, under-
rna

pin the model’s exceptional performance on this database. It is important to


note that the 100% accuracy reported for both databases was achieved under
controlled experimental conditions with well-curated datasets. In real-world
clinical scenarios, factors such as inter-subject variability and environmental
noise may introduce additional challenges. Future studies will investigate the
model’s generalization capability using more diverse datasets and real-world
clinical data to further validate its robustness.
Jou

4.2. Interpretability analysis


The incorporation of SHAP analysis in this study provides valuable in-
sights into the feature importance and decision-making process of the pro-
posed model for epileptic EEG signal classification. By applying SHAP to
both the Bonn and EEG Epilepsy databases, we can elucidate the key factors

35
Journal Pre-proof

contributing to the model’s high performance and enhance the interpretabil-

of
ity of the results.
For the Bonn database, the SHAP analysis revealed distinct patterns of
feature importance across the five subsets (A-E). In subset A (normal EEG
with eyes open), the most influential features were predominantly related to

pro
lower frequency bands, particularly in the theta (4-8 Hz) and alpha (8-13 Hz)
ranges. This aligns with established neurophysiological knowledge, as these
frequency bands are typically prominent in awake, relaxed states.
Conversely, for subset E (seizure activity), the SHAP values indicated a
shift towards higher frequency components, particularly in the beta (13-30
Hz) and gamma (¿30 Hz) ranges. This observation corroborates previous
findings that epileptic seizures are often characterized by increased high-
re-
frequency oscillations. The stark contrast in feature importance between
subsets A and E underscores the model’s ability to discriminate between
normal and ictal EEG patterns effectively.
Interestingly, subsets B, C, and D (eyes closed, interictal zone, and epilep-
togenic zone, respectively) exhibited more nuanced feature importance pro-
files. The SHAP analysis revealed a gradual transition in the relevance of
lP
different frequency components, reflecting the subtle changes in EEG char-
acteristics as we move from normal to pre-ictal states. This granular insight
into feature importance across different EEG states demonstrates the model’s
sensitivity to the complex spectral dynamics of epileptic activity.
Turning to the EEG Epilepsy database, the SHAP analysis provided fur-
ther validation of the model’s discriminative capabilities. For the ictal class
rna

(F), high SHAP values were associated with features capturing rapid fluc-
tuations and high-frequency components, consistent with the chaotic nature
of seizure activity. In contrast, the interictal (G) and pre-ictal (H) classes
showed more emphasis on mid-range frequencies and temporal stability mea-
sures, likely reflecting the altered but non-seizure brain states.
A particularly noteworthy finding from the SHAP analysis of the EEG
Epilepsy database was the importance of features derived from the ALIF
Jou

decomposition. The high SHAP values associated with certain ALIF-based


features underscore the effectiveness of this signal decomposition technique
in capturing the non-stationary and nonlinear characteristics of EEG sig-
nals. This observation supports the synergistic integration of ALIF with
deep learning in our proposed methodology.
Moreover, the SHAP analysis revealed the significance of attention-weighted
features, particularly those processed by the SEblock channel attention mech-

36
Journal Pre-proof

anism. The high importance of these features validates the incorporation of

of
attention mechanisms in the model architecture, demonstrating their ability
to focus on the most salient aspects of the EEG signals for classification.
It is worth noting that while some features consistently ranked high in im-
portance across different classes and databases, others showed class-specific

pro
relevance. This heterogeneity in feature importance highlights the complex
and multifaceted nature of epileptic EEG signals, reinforcing the need for
sophisticated modeling approaches that can capture these intricacies.
The SHAP analysis also provides valuable insights for potential clinical
applications. By identifying the most influential features for different EEG
states, clinicians could focus on specific signal characteristics for more tar-
geted epilepsy diagnosis and monitoring. Furthermore, the interpretability
re-
afforded by SHAP could enhance trust in the model’s decisions, a crucial
factor for the adoption of AI-based systems in clinical practice.
To summarize, the SHAP analysis conducted on both the Bonn and EEG
Epilepsy databases not only corroborates the high performance of our pro-
posed model but also offers a nuanced understanding of the features driving
its classifications. These insights validate key aspects of our methodology,
lP
including the use of ALIF decomposition and attention mechanisms, while
also providing a bridge between complex deep learning models and inter-
pretable, clinically relevant features. Future work could explore how these
SHAP-based insights might be leveraged to further refine the model archi-
tecture or develop more targeted feature extraction techniques for epileptic
EEG analysis.
rna

4.3. Feature visualization


The application of Grad-CAM in this study offers a powerful visual in-
terpretation of the model’s decision-making process for epileptic EEG signal
classification. By generating heatmaps that highlight the most discriminative
regions in the input data, Grad-CAM provides intuitive and spatiotemporal
insights into the features that are most influential in the model’s classifica-
Jou

tions across different EEG states.


For the Bonn database, the Grad-CAM visualizations revealed distinct
activation patterns across the five subsets (A-E), offering a complementary
perspective to the SHAP analysis:
Subset A (normal EEG, eyes open) exhibited relatively diffuse activation
patterns, with moderate intensity across multiple frequency bands. This
suggests that the model considers a broad spectrum of EEG characteristics

37
Journal Pre-proof

to identify normal, awake states. The lack of highly localized activations

of
aligns with the expectation of a more distributed neural activity in resting-
state EEG.
Subset B (normal EEG, eyes closed) showed increased activation in the al-
pha frequency range, particularly in the posterior regions of the scalp. This

pro
observation is consistent with the well-established alpha rhythm enhance-
ment during eyes-closed conditions, validating the model’s ability to capture
physiologically relevant EEG phenomena.
Subsets C and D (interictal EEG from opposite hemisphere and epilepto-
genic zone, respectively) demonstrated more focal activation patterns. The
Grad-CAM heatmaps highlighted specific time-frequency regions, potentially
corresponding to interictal epileptiform discharges or subtle abnormalities in
re-
the epileptogenic zone. The contrast between these activation patterns and
those of normal EEG underscores the model’s sensitivity to pathological EEG
features.
Subset E (ictal EEG) exhibited the most intense and localized activa-
tions, often spanning multiple frequency bands. The Grad-CAM visualiza-
tions revealed high-intensity regions that likely correspond to the rapid, high-
lP
amplitude discharges characteristic of seizure activity. The stark difference
in activation patterns between ictal and non-ictal states provides a visually
striking representation of the model’s discriminative capabilities.
Turning to the EEG Epilepsy database, the Grad-CAM analysis offered
further insights into the model’s focus during classification of ictal (F), in-
terictal (G), and pre-ictal (H) states:
rna

For the ictal class (F), the Grad-CAM heatmaps showed intense, widespread
activations across multiple frequency bands and time points. This pattern
aligns with the complex, evolving nature of seizure dynamics and suggests
that the model integrates information from various spectral and temporal
components to identify ictal activity.
The interictal class (G) exhibited more localized and less intense acti-
vations compared to the ictal state. The Grad-CAM visualizations often
Jou

highlighted specific frequency bands or brief time windows, possibly corre-


sponding to interictal epileptiform discharges or subtle EEG abnormalities.
This focused attention on specific EEG features demonstrates the model’s
ability to distinguish the more subtle characteristics of interictal states from
both normal and ictal activity.
For the pre-ictal class (H), the Grad-CAM analysis revealed interesting
patterns of activation that were distinct from both ictal and interictal states.

38
Journal Pre-proof

The heatmaps often showed moderate intensity activations across broader

of
time-frequency regions, suggesting that the model considers a wider range of
EEG characteristics to identify the transition towards seizure onset. This ob-
servation aligns with the complex and often subtle changes in brain dynamics
that occur in the pre-ictal period.

pro
Several key insights emerge from the Grad-CAM analysis across both
databases:
1) Temporal Specificity: The heatmaps often highlighted specific time
windows within the EEG segments, indicating that the model’s classifica-
tion decisions are based on precise temporal features rather than averaged
characteristics across the entire segment.
2) Frequency Band Importance: The varying intensity of activations
re-
across different frequency bands corroborates the SHAP analysis findings,
visually demonstrating the relative importance of different spectral compo-
nents in distinguishing EEG states.
3) State-Specific Patterns: The distinct activation patterns observed for
normal, interictal, pre-ictal, and ictal states provide visual confirmation of the
model’s ability to capture the unique characteristics of each EEG condition.
lP
4) Model Focus Validation: The Grad-CAM visualizations offer empirical
validation of the model’s attention mechanisms, showing that the network
indeed focuses on physiologically relevant and state-specific EEG features.
5) Potential for Clinical Interpretation: The intuitive nature of the Grad-
CAM heatmaps could facilitate the translation of model decisions into clin-
ically meaningful insights, potentially aiding in the visual identification of
rna

critical EEG patterns by healthcare professionals.


In conclusion, the Grad-CAM analysis provides a powerful complement
to the quantitative SHAP results, offering visually intuitive insights into the
model’s decision-making process. These visualizations not only validate the
model’s ability to focus on relevant EEG features but also bridge the gap be-
tween complex deep learning architectures and interpretable, physiologically
grounded EEG analysis. The combined use of SHAP and Grad-CAM en-
Jou

hances the overall interpretability of the proposed methodology, potentially


facilitating its adoption in clinical settings and paving the way for more
transparent and trustworthy AI-assisted epilepsy diagnosis and monitoring
systems.

39
Journal Pre-proof

4.4. Hyperparameter optimization and sensitivity analysis

of
To ensure optimal performance and generalization capability, we con-
ducted comprehensive hyperparameter optimization using a two-stage ap-
proach: grid search and Bayesian optimization. Initially, grid search was em-
ployed to explore a broad range of hyperparameter values, including learning

pro
rate, batch size, dropout rate, and kernel size. Following this, Bayesian opti-
mization was utilized to fine-tune the most influential parameters, allowing
for a more efficient search within a refined parameter space. This combination
of methods ensured thorough exploration while maintaining computational
efficiency.

4.4.1. Hyperparameter settings and optimization process


re-
The key hyperparameters considered in our model included:
- Learning Rate: Ranging from 0.0001 to 0.01, optimized using a loga-
rithmic scale to capture subtle variations.
- Batch Size: Evaluated within the range of 16 to 128 to balance training
stability and computational efficiency.
- Dropout Rate: Explored from 0.1 to 0.5 to prevent overfitting while
lP
maintaining model capacity.
- Kernel Size: Tuned between 3 and 11 to optimize feature extraction in
convolutional layers.
The optimal hyperparameters were determined as follows: learning rate
of 0.001, batch size of 64, dropout rate of 0.3, and kernel size of 7. These
settings consistently yielded the highest classification accuracy across cross-
rna

validation folds.

4.4.2. Sensitivity analysis and performance consistency


To explicitly address the assumption of performance consistency across
different hyperparameter settings, we conducted a sensitivity analysis to eval-
uate the impact of each parameter on model performance. The results indi-
cated that:
Jou

- Learning Rate and Dropout Rate: These hyperparameters had the most
significant influence on classification accuracy. A higher learning rate resulted
in faster convergence but led to instability, while an optimal dropout rate
balanced generalization and overfitting.
- Batch Size and Kernel Size: Performance was relatively stable within a
narrow range of values, justifying the assumption of consistency. Specifically,

40
Journal Pre-proof

batch sizes between 32 and 64 and kernel sizes between 5 and 9 yielded

of
comparable accuracy.
These findings indicate that while certain hyperparameters require precise
tuning, others demonstrate robustness within specific ranges. This justifies
the assumption of performance stability under these settings.

pro
4.4.3. Justification of performance consistency assumption
We explicitly acknowledge that assuming constant performance across all
hyperparameter settings would be an oversimplification. However, our sen-
sitivity analysis demonstrated that performance remains consistent within
a narrow optimal range for certain parameters, particularly batch size and
kernel size. In contrast, learning rate and dropout rate required precise tun-
re-
ing to maintain model stability and accuracy. This nuanced understanding
informs our design choices and supports the robustness of our model.

4.4.4. Summary of insights


In our study, we acknowledge that hyperparameter optimization is crit-
ical for achieving robust performance. To address this, we conducted an
lP
extensive hyperparameter optimization process using a combination of grid
search and Bayesian optimization. This two-stage approach allowed us to
first explore a broad range of hyperparameter values, including learning rate,
batch size, dropout rate, and kernel size, and then fine-tune the most influ-
ential parameters within a narrower range. We also performed a sensitivity
analysis to evaluate the impact of these hyperparameters on model perfor-
rna

mance. Our analysis revealed that while some parameters, such as batch size
and kernel size, exhibited stable performance within a specific range, oth-
ers, notably the learning rate and dropout rate, required precise tuning to
maintain optimal performance. These findings justify the assumption that,
within their optimal ranges, performance remains relatively constant. How-
ever, our results clearly indicate that stepping outside these ranges can lead
to significant variations in accuracy and overall model robustness. By ex-
Jou

plicitly addressing the effects of hyperparameter settings through rigorous


optimization and sensitivity testing, we provide a robust justification for our
model’s performance and ensure that the reported results are both credible
and reproducible.
Hyperparameter optimization is a critical component of our methodology,
as it directly influences model robustness and generalizability. We conducted
an extensive optimization process using a combination of grid search and

41
Journal Pre-proof

Bayesian optimization to fine-tune key hyperparameters, including learning

of
rate, batch size, dropout rate, and kernel size. Our experiments revealed that
while parameters such as batch size and kernel size exhibit relatively stable
performance within a defined optimal range, others, particularly the learning
rate and dropout rate, are highly sensitive. For instance, we observed that

pro
the model achieves optimal performance with a learning rate of 0.001 and a
dropout rate of 0.3, and that performance remains consistent only within a
narrow window around these values. Deviations beyond these ranges resulted
in significant deterioration in accuracy.
Thus, we do not assume that performance is constant across all hyper-
parameter settings; rather, it is maintained only within the empirically de-
termined optimal range. This careful optimization and sensitivity analysis
re-
ensure that our reported results are both robust and reproducible, providing
a solid foundation for the model’s performance. Future work will further
explore the interactions among hyperparameters to confirm the stability of
the model across diverse datasets and experimental conditions.

4.5. Limitations and future directions


lP
While our study presents a novel approach to epileptic EEG signal clas-
sification with promising results, several limitations must be acknowledged,
each of which points to important avenues for future research.
A primary limitation is the reliance on single-channel EEG recordings
from the Bonn and EEG Epilepsy databases. Although these datasets are
widely used in research, they may not fully capture the complex spatial re-
rna

lationships of brain activity during epileptic events. Clinical EEG typically


involves multi-channel recordings, and the inability to model these spatial dy-
namics potentially limits the generalizability of our approach to real-world
clinical scenarios. Future research should focus on extending our methodol-
ogy to handle multi-channel EEG data, potentially incorporating advanced
techniques such as graph neural networks or attention mechanisms to model
inter-channel relationships.
Jou

The datasets employed, while valuable, represent a controlled research


environment and may not encompass the full spectrum of EEG variability
encountered in diverse patient populations. Factors such as age, comor-
bidities, medication effects, and different types of epilepsy can significantly
influence EEG patterns. To address this, future studies should validate the
model on larger, more diverse datasets that better represent the heterogene-
ity of clinical EEG recordings. This could include multi-center studies with

42
Journal Pre-proof

patients of various demographics and clinical profiles.

of
Our study primarily focused on seizure detection and classification, with-
out addressing other critical aspects of epilepsy management, such as seizure
prediction or monitoring of treatment response. Future research could ex-
pand the application of our methodology to these areas, potentially devel-

pro
oping a more comprehensive epilepsy management tool. This might involve
adapting the CDNN architecture for time series forecasting or incorporating
longitudinal data analysis techniques.
The computational complexity of our approach, particularly the ALIF
decomposition and CDNN architecture, may pose challenges for real-time
implementation. While effective in offline analysis, the current methodology
may require significant optimization for use in continuous, real-time moni-
re-
toring scenarios. Future work should focus on developing computationally
efficient variants of our model, possibly exploring techniques such as model
compression or edge computing for real-time EEG analysis.
Despite the incorporation of SHAP for interpretability, the ‘black box’
nature of deep learning models remains a concern. Future research could ex-
plore more advanced interpretability techniques, such as concept attribution
lP
or counterfactual explanations, to provide clearer insights into the model’s
decision-making process. Additionally, developing interactive visualization
tools for clinicians could enhance the practical utility of these interpretabil-
ity methods.
Our study did not extensively explore the model’s performance under
various noise conditions or in the presence of common EEG artifacts. Fu-
rna

ture work should include rigorous testing of the model’s robustness to dif-
ferent types of noise and artifacts commonly encountered in clinical EEG
recordings. This could involve developing sophisticated data augmentation
techniques or designing specialized modules within the CDNN for artifact
detection and removal.
Lastly, while our cross-validation results are promising, the lack of ex-
ternal validation on completely independent datasets or prospective clinical
Jou

trials limits our ability to definitively assess the model’s generalizability and
real-world performance. Future research should prioritize external validation
studies and, ultimately, prospective clinical trials to evaluate the efficacy and
safety of our approach in real-world clinical settings.
In addition to addressing these limitations, future directions could explore
the integration of our methodology with other clinical data sources, such as
neuroimaging or genetic information, to develop more comprehensive and

43
Journal Pre-proof

personalized approaches to epilepsy management. Furthermore, investigating

of
the potential of transfer learning techniques could enable the adaptation of
our model to related neurological disorders, expanding its clinical utility.
By addressing these limitations and pursuing these future directions, we
believe that our approach can be refined and extended to make significant

pro
contributions to the field of epilepsy diagnosis and management, ultimately
improving patient care and outcomes.

5. Conclusions
This study presents an innovative integration of ALIF-based signal de-
composition with an attention-augmented CDNN architecture for EEG-based
epilepsy diagnosis. The model’s design, which combines CNN and LSTM
re-
layers enhanced by the SEBlock attention mechanism, effectively captures
the complex spatiotemporal patterns of EEG signals. Integration of SHAP
and Grad-CAM provides quantitative and visual insights into the model’s
decision-making process, enhancing transparency and clinical interpretabil-
ity. Our rigorous evaluation using 10-fold cross-validation on both the Bonn
lP
and EEG Epilepsy databases yielded an overall accuracy of 100%, with sen-
sitivity, specificity, and F1-scores consistently exceeding 99%. These quan-
titative findings validate the effectiveness of our approach under controlled
experimental conditions. Grad-CAM visualizations reveal distinct activation
patterns for normal, interictal, and ictal states, offering clinically relevant
insights. However, while the perfect accuracy underscores the potential of
rna

our model, we acknowledge that further validation on more diverse datasets


and in real-world clinical settings is necessary to confirm its generalizability.
Overall, our results offer strong evidence that the proposed methodology can
serve as a highly reliable tool for epilepsy diagnosis, advancing the state-of-
the-art in EEG-based clinical decision support systems.

Acknowledgments
Jou

This work was partly supported by the Natural Science Foundation of


Fujian Province (Grant No. 2022J011146).

Data availability
The EEG data in the study are the original data freely accessed from the
Bonn [26] and EEG Epilepsy [27] databases.

44
Journal Pre-proof

Declaration of Competing Interest

of
The authors declare that they have no known competing financial inter-
ests or personal relationships that could have appeared to influence the work
reported in this paper.

pro
References
[1] Rana A, Musto AE (2018) The role of inflammation in the development
of epilepsy. Journal of Neuroinflammation 15: 1-12.

[2] Millett D (2001) Hans Berger: From psychic energy to the EEG. Per-
spectives in Biology and Medicine 44(4): 522-542.
re-
[3] Rasheed K, Qayyum A, Qadir J, Sivathamboo S, Kwan P, Kuhlmann L,
Razi A (2020) Machine learning for predicting epileptic seizures using
EEG signals: A review. IEEE Reviews in Biomedical Engineering 14:
139-155.

[4] Gao Q, Omran AH, Baghersad Y, Mohammadi O, Alkhafaji MA, Al-


lP
Azzawi AKJ, Golkar MJ (2023) Electroencephalogram signal classifi-
cation based on Fourier transform and Pattern Recognition Network
for epilepsy diagnosis. Engineering Applications of Artificial Intelligence
123: 106479.

[5] Morales S, Bowers ME (2022) Time-frequency analysis methods and


rna

their application in developmental EEG data. Developmental Cognitive


Neuroscience 54: 101067.

[6] Akin M (2002). Comparison of wavelet transform and FFT methods in


the analysis of EEG signals. Journal of Medical Systems 26: 241-247.

[7] Subasi A, Kevric J, Canbaz MA (2019) Epileptic seizure detection using


Jou

hybrid machine learning methods. Neural Computing and Applications


31(1): 317-325.

[8] Zarei A, Asl BM (2021). Automatic seizure detection using orthogonal


matching pursuit, discrete wavelet transform, and entropy based features
of EEG signals. Computers in Biology and Medicine 131: 104250.

45
Journal Pre-proof

[9] Liu Z, Zhu B, Hu M, Deng Z, Zhang J (2023) Revised tunable Q-

of
factor wavelet transform for EEG-based epileptic seizure detection.
IEEE Transactions on Neural Systems and Rehabilitation Engineering
31: 1707-1720.

pro
[10] 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. Biomedical Signal Processing and Control 77: 103820.

[11] Dissanayake T, Fernando T, Denman S, Sridharan S, Fookes C (2021)


Deep learning for patient-independent epileptic seizure prediction using
scalp EEG signals. IEEE Sensors Journal 21(7): 9377-9388.

re-
[12] Atal DK, Singh M (2024) Effectual seizure detection using MBBF-GPSO
with CNN network. Cognitive Neurodynamics 18(3): 907-918.

[13] Abdulwahhab AH, Abdulaal AH, Al-Ghrairi AHT, Mohammed AA,


Valizadeh M (2024) Detection of epileptic seizure using EEG signals
analysis based on deep learning techniques. Chaos, Solitons & Fractals
lP
181: 114700.

[14] Chakravarthi B, Ng SC, Ezilarasan MR, Leung MF (2022) EEG-based


emotion recognition using hybrid CNN and LSTM classification. Fron-
tiers in Computational Neuroscience 16: 1019776.

[15] Medhi K, Hoque N, Dutta SK, Hussain MI (2022) An efficient EEG


rna

signal classification technique for Brain-Computer Interface using hybrid


Deep Learning. Biomedical Signal Processing and Control 78: 104005.

[16] Ji Y, Li F, Fu B, Zhou Y, Wu H, Li Y, Shi G (2024) A novel hybrid


decoding neural network for EEG signal representation. Pattern Recog-
nition, 155, 110726.

[17] Tang Y, Wang Y, Zhang X, Wang Z (2023) STILN: A novel spatial-


Jou

temporal information learning network for EEG-based emotion recogni-


tion. Biomedical Signal Processing and Control 85: 104999.

[18] Xiao G, Shi M, Ye M, Xu B, Chen Z, Ren Q (2022) 4D attention-based


neural network for EEG emotion recognition. Cognitive Neurodynamics
16:805-818.

46
Journal Pre-proof

[19] He P, Wang L, Cui Y, Wang R, Wu D (2023) Unsupervised feature

of
learning based on autoencoder for epileptic seizures prediction. Applied
Intelligence 53: 20766-20784.

[20] Cicone A, Liu J, Zhou H (2016) Adaptive local iterative filtering for

pro
signal decomposition and instantaneous frequency analysis. Applied and
Computational Harmonic Analysis 41(2): 384-411.

[21] Gong L, Li M, Zhang T, Chen W (2023) EEG emotion recognition using


attention-based convolutional transformer neural network. Biomedical
Signal Processing and Control 84: 104835.

[22] Lu X, Wen A, Sun L, Wang H, Guo Y, Ren Y (2023) An epileptic seizure


re-
prediction method based on CBAM-3D CNN-LSTM model. IEEE Jour-
nal of Translational Engineering in Health and Medicine 11: 417-423.

[23] Antwarg L, Miller RM, Shapira B, Rokach L (2021) Explaining anoma-


lies detected by autoencoders using Shapley Additive Explanations. Ex-
pert Systems with Applications 186: 115736.
lP
[24] Selvaraju RR, Cogswell M, Das A, Vedantam R, Parikh D, Batra D
(2017) Grad-cam: Visual explanations from deep networks via gradient-
based localization. In Proceedings of the IEEE International Conference
on Computer Vision, pp. 618-626.

[25] Li Y, Yang H, Li J, Chen D, Du M (2020) EEG-based intention recogni-


rna

tion with deep recurrent-convolution neural network: Performance and


channel selection by Grad-CAM. Neurocomputing 415: 225-233.

[26] Andrzejak RG, Lehnertz K, Mormann F, Rieke C, David P, Elger


CE (2001) Indications of nonlinear deterministic and finite-dimensional
structures in time series of brain electrical activity: Dependence on
recording region and brain state. Physical Review E 64(6): 061907.
Jou

[27] Swami P, Gandhi TK, Panigrahi BK, Tripathi M, Anand S (2016) A


novel robust diagnostic model to detect seizures in electroencephalogra-
phy. Expert Systems with Applications 56: 116-130.

[28] Hassan AR, Subasi A, Zhang Y (2020) Epilepsy seizure detection using
complete ensemble empirical mode decomposition with adaptive noise.
Knowledge-Based Systems 191: 105333.

47
Journal Pre-proof

[29] Feizbakhsh B, Omranpour H (2023) Cluster-based phase space density

of
feature in multichannel scalp EEG for seizure prediction by deep learn-
ing. Biomedical Signal Processing and Control 86: 105276.

[30] Jiang Y, Chen W, Li M (2020) Symplectic geometry decomposition-

pro
based features for automatic epileptic seizure detection. Computers in
Biology and Medicine 116: 103549.

[31] Supriya S, Siuly S, Wang H, Zhang Y (2021) New feature extraction for
automated detection of epileptic seizure using complex network frame-
work. Applied Acoustics 180: 108098.

[32] Prabhakar SK, Lee SW (2022) ENIC: Ensemble and Nature Inclined
re-
Classification with sparse depiction based deep and transfer learning for
biosignal classification. Applied Soft Computing 108416.

[33] Liu S, Wang J, Li S, Cai L (2023) Epileptic seizure detection and pre-
diction in EEGS using power spectra density parameterization. IEEE
Transactions on Neural Systems and Rehabilitation Engineering 31:
lP
3884-3894.

[34] Wang Z, Liu F, Shi S, Xia S, Peng F, Wang L, Xu Z (2023) Automatic


epileptic seizure detection based on persistent homology. Frontiers in
Physiology 14: 1227952.

[35] Raghu S, Sriraam N, Hegde AS, Kubben PL (2019) A novel approach


rna

for classification of epileptic seizures using matrix determinant. Expert


Systems with Applications 127: 323-341.

[36] Tuncer T, Dogan S, Akbal E (2019) A novel local senary pattern based
epilepsy diagnosis system using EEG signals. Australasian Physical &
Engineering Sciences in Medicine 42(4): 939-948.

[37] Peng H, Lei C, Zheng S, Zhao C, Wu C, Sun J, Hu B (2021) Automatic


Jou

epileptic seizure detection via Stein kernel-based sparse representation.


Computers in Biology and Medicine 132: 104338.

[38] Zhang T, Han Z, Chen X, Chen W (2021) Subbands and cumulative


sum of subbands based nonlinear features enhance the performance of
epileptic seizure detection. Biomedical Signal Processing and Control
69: 102827.

48
Journal Pre-proof

[39] Sharma R, Pachori RB, Sircar P (2020) Seizures classification based

of
on higher order statistics and deep neural network. Biomedical Signal
Processing and Control 59: 101921.

[40] Wang Q, Wei HL, Wang L, Xu S (2021) A novel time-varying model-

pro
ing and signal processing approach for epileptic seizure detection and
classification. Neural Computing and Applications 33(11): 5525-5541.

[41] Sukriti, Chakraborty M, Mitra D (2021) A novel automated seizure


detection system from EMD-MSPCA denoised EEG: Refined compos-
ite multiscale sample, fuzzy and permutation entropies based scheme.
Biomedical Signal Processing and Control 67: 102514.

re-
[42] Tajmirriahi M, Amini Z (2021) Modeling of seizure and seizure-free
EEG signals based on stochastic differential equations. Chaos, Solitons
& Fractals 150: 111104.

[43] Wijayanto I, Humairani A, Hadiyoso S, Rizal A, Prasanna DL, Tripathi


SL (2023) Epileptic seizure detection on a compressed EEG signal us-
lP
ing energy measurement. Biomedical Signal Processing and Control 85:
104872.

[44] Abhishek S, Kumar S, Mohan N, Soman KP (2024) EEG based auto-


mated detection of seizure using machine learning approach and tradi-
tional features. Expert Systems with Applications 251: 123991.
rna
Jou

49
Journal Pre-proof

Highlights:
► Innovative use of ALIF and attention-augmented deep learning to improve
epileptic EEG classification accuracy and address non-stationarity
► First integration of SHAP and Grad-CAM for interpretable and transparent EEG
signal classification
► Outperforms state-of-the-art methods, achieving 100% accuracy in key binary
and multi-class tasks on Bonn and EEG Epilepsy datasets

of
► Hybrid CNN-LSTM model captures both spatial and temporal features,
enhancing seizure detection accuracy
► Robust under varying noise conditions, demonstrating strong generalization for
real-world epilepsy diagnosis

pro
re-
lP
rna
Jou
Journal Pre-proof

Declaration of competing interest

The authors declare that they have no known competing financial

of
interests or personal relationships that could have appeared to influence

the work reported in this paper.

pro
re-
lP
rna
Jou

You might also like