Implementing a Novel Framework for Focal and Generalized Epilepsy Classification using Adaptive VAE with Dense Bi-GRU through Multimodal Data-guided Feature Fusion

Автор: Maneesh Kumar, Rakesh Kumar, Santosh Kumar

Журнал: International Journal of Intelligent Systems and Applications @ijisa

Статья в выпуске: 4 vol.18, 2026 года.

Бесплатный доступ

One of the neurological conditions that affects the emotional and psychological condition of individuals is known as Epilepsy. Managing this disorder is very challenging as the focal seizures begin in specific brain regions and evolve into generalized forms. The fundamental method for seizure identification is the analysis of the ElectroEncephaloGram (EEG), yet its manual interpretation is prone to error. In addition, the process of automated seizure detection using EEG data suffers from variations between subjects and datasets distribution as they might result in inconsistencies. Moreover, the unequal proportion of seizure to non-seizure samples increases the detection challenge. Hence, developing classification approaches capable of distinguishing and predicting the focal and generalized seizures is important for effective treatment planning. Therefore, an efficient deep learning-based focal and generalized epilepsy classification is designed in this research by considering the multimodal data. Initially, essential signals used for the validation are sourced from publically available EEG datasets and they are converted into Short-Time Fourier Transform (STFT) images, which are considered as the feature set 1. Next, the Sensor data used for the validation are gathered from Kaggle (https://www.kaggle.com/datasets/datasetengineer/epilepsy-dataset) and it is considered as feature set 2. Next, the acquired two set of features are offered to the Multilevel Spatio Temporal Attention Fusion Network (MSTAFN) to execute the feature fusion process. Once the feature fusion procedure is completed, and then the fused features are given as the input to the focal and generalized epilepsy classification phase. In this phase, Adaptive Variational autoencoders with Dense Bidirectional Gated Recurrent Unit (AVDBiGRU) are employed to perform the classification process. Moreover, the focal and generalized epilepsy classification process is improved by optimizing the hyper parameters of AVDBiGRU through Fitness-based Football Optimization Algorithm (FFbOA). Finally, the focal and generalized epilepsy classified outcome is obtained from AVDBiGRU. Further, various experiments are carried out in the developed focal and generalized epilepsy classification model over the widely adopted deep learning architectures like LSTM, DCNN, InceptionV3 and BiGRU to verify their efficiency over different classes. The proposed model is evaluated on an EEG dataset containing the high-frequency oscillation (HFO) annotations from 30 pediatric patients with epilepsy and model performance is assessed by using the standard evaluation metrics that includes accuracy, sensitivity, specificity, and F1-score. The proposed model achieved 95.54% accuracy, 96.66 % specificity, 93.32% F1-score and 88.53 AUC.

Focal and Generalized Epilepsy Classification, Short-Time Fourier Transform, Multilevel Spatio Temporal Attention Fusion Network, Adaptive Variational autoencoders with Dense Bidirectional Gated Recurrent Unit, Fitness-based Football Optimization Algorithm

Короткий адрес: https://sciup.org/15020650

IDR: 15020650   |   DOI: 10.5815/ijisa.2026.04.10

Текст научной статьи Implementing a Novel Framework for Focal and Generalized Epilepsy Classification using Adaptive VAE with Dense Bi-GRU through Multimodal Data-guided Feature Fusion

Abstract: One of the neurological conditions that affects the emotional and psychological condition of individuals is known as Epilepsy. Managing this disorder is very challenging as the focal seizures begin in specific brain regions and evolve into generalized forms. The fundamental method for seizure identification is the analysis of the ElectroEncephaloGram (EEG), yet its manual interpretation is prone to error. In addition, the process of automated seizure detection using EEG data suffers from variations between subjects and datasets distribution as they might result in inconsistencies. Moreover, the unequal proportion of seizure to non-seizure samples increases the detection challenge. Hence, developing classification approaches capable of distinguishing and predicting the focal and generalized seizures is important for effective treatment planning. Therefore, an efficient deep learning-based focal and generalized epilepsy classification is designed in this research by considering the multimodal data. Initially, essential signals used for the validation are sourced from publically available EEG datasets and they are converted into Short-Time Fourier Transform (STFT) images, which are considered as the feature set 1. Next, the Sensor data used for the validation are gathered from Kaggle and it is considered as feature set 2. Next, the acquired two set of features are offered to the Multilevel Spatio Temporal Attention Fusion Network (MSTAFN) to execute the feature fusion process. Once the feature fusion procedure is completed, and then the fused features are given as the input to the focal and generalized epilepsy classification phase. In this phase, Adaptive Variational autoencoders with Dense Bidirectional Gated Recurrent Unit (AVDBiGRU) are employed to perform the classification process. Moreover, the focal and generalized epilepsy classification process is improved by optimizing the hyper parameters of AVDBiGRU through Fitness-based Football Optimization Algorithm (FFbOA). Finally, the focal and generalized epilepsy classified outcome is obtained from AVDBiGRU. Further, various experiments are carried out in the developed focal and generalized epilepsy classification model over the widely adopted deep learning architectures like LSTM, DCNN, InceptionV3 and BiGRU to verify their efficiency over different classes. The proposed model is evaluated on an EEG dataset containing the high-frequency oscillation (HFO) annotations from 30 pediatric patients with epilepsy and model performance is assessed by using the standard evaluation metrics that includes accuracy, sensitivity, specificity, and F1-score. The proposed model achieved 95.54% accuracy, 96.66 % specificity, 93.32% F1-score and 88.53 AUC.

Epilepsy is a neurological condition where the normal electrical signals of the brain are disrupted that leads to sudden and unpredictable seizures. These episodes can appear in the form of sudden changes in emotions, muscle stiffness, and shaking [9]. Depending on the start of abnormal brain activity, the epilepsy is categorized into two types. In focal epilepsy, the seizures begin in a specific part of the brain [10]. The generalized epilepsy spreads across the entire brain after starting in a specified region. Even though, medications are effective in reducing or preventing seizures, they don’t work for every individual [11]. Around one-third of patients still suffer from seizures even after using Anti-Seizure Drugs (ASD). For these individuals, the doctors perform surgery to control the seizures by recognizing the exact brain region that triggers the seizures. The starting point of the seizure activity region is known as the Seizure Onset Zone (SOZ) [12]. After identifying these regions, the doctors might remove the SOZ to reduce seizures. Analyzing the cause of focal and generalized seizures is one of the main challenges in epilepsy research [13]. In many cases, focal epilepsy involves complex brain networks rather than being confined to a single isolated area. Furthermore, focal seizures are capable of triggering secondarily generalized absence seizures. Absence epilepsy is a condition, where both generalized and focal seizures occur together [14].

One of the major difficulties during the diagnosis of epilepsy is the processing of long-term EEG recordings. In order to capture the electrical activity produced by brain neurons through the scalp, EEG sensors are used [15]. EEG analysis is considered as the main technique for monitoring and diagnosing epilepsy. Seizure identification is done by neurologists by inspecting the EEG data manually, but it might result in inconsistencies [16]. The time requirement for the diagnostic process is reduced by the development of automated detection technologies. In EEG recording, the electrodes are placed on the scalp surface or probes inserted inside the skull to collect the details regarding the brain activity [17]. Automated EEG-based methods are capable of improving the precision and speed of epilepsy detection [18]. Identifying the most meaningful EEG features for precise seizure classification requires various advanced feature extraction and classification techniques [19].

EEG wavelet spectra can resemble image-like structures, so seizure detection is performed like an image classification problem [20]. Deep learning techniques are capable of learning useful patterns from EEG data for epileptic seizure detection. But, the accuracy and stability of these models are low when dealing with limited samples [21]. Some of the research works concentrate on using a small number of samples for epilepsy detection. These approaches contribute to the development of more personalized treatment plans [22]. The existing detection techniques are divided into two main groups such as deep learning-based and feature-based detection techniques [23]. Deep learning-based methods like Convolutional Neural Networks (CNNs) and Long Short-Term Memory Networks (LSTMs) are data-driven and they automatically learn useful features from raw EEG signals [24]. Due to their ability to learn features directly from data without manual intervention, the deep learning models are better than feature-based techniques. Feature-based methods require manual extraction of signal characteristics for identifying epileptic seizures [25]. Therefore, a focal and generalized epilepsy classification model using deep learning is introduced in this research.

Major contributions of the developed model are given in the following:

  •    To establish a multimodal deep learning framework for focal and generalized epilepsy classification. This research introduces a multimodal diagnostic approach that integrates EEG signals with sensor-based physiological information for analyzing the epileptic activity. The integration of these data sources enhances the ability of the developed model to handle variability across patients and seizure conditions. Further diagnostic tests are decided by distinguishing between focal and generalized epilepsy.

  •    To design an MSTAFN for multimodal feature fusion of the input spectrogram images from STFT and input data. The MSTAFN module fuses spatial and temporal patterns after processing multi-level feature domains. This fusion strategy is helpful in fusing the most informative context-aware and semantically rich representation that enhances classification performance. The non-stationary nature of brain signals are precisely captured by the spatio-temporal attention mechanism as it minimizes the inter-subject variability issues.

  •    To develop AVDBiGRU network for identifying focal and generalized epilepsy. The contextual correlations from the fused features are processed by the VAE as well as DBiGRU without overfitting. The VAE mechanism enhances the generalizability, while the dense skip connections improve the gradient flow and prevent information loss across the network. Complex temporal features from EEG are precisely handled by the AVDBiGRU model.

  •    To suggest an FFbOA for enhancing the learning efficiency of AVDBiGRU network. This algorithm is utilized to fine-tune the hyperparameters of AVDBiGRU to improve the epilepsy identification performance. This

  • 2.    Literature Survey 2.1.    Related Works

optimization overcomes local minima issues via the fitness-based random variable update and it helps to attain faster convergence. The detection precision and accuracy is enhanced by optimizing hidden neuron count and learning rate.

A focal and generalized epilepsy classification model using a deep learning technique by analyzing multi-modal data is presented in this work. Sub-class II describes the existing epilepsy detection works. Sub-class III showcases the architecture of the designed classification model and the details of the optimization approach. The transformation of input signals into spectrograms and the feature fusion procedures are explained in Sub-class IV. The classification phase is elaborated in Sub-class V. The experimental evaluation and the conclusions are presented in Sub-class VI and Subclass VII.

In 2022, Najafi et al. [1] have developed an epilepsy classification approach by integrating Discrete Wavelet Transform (DWT) and Longitudinal Bipolar montage (LB). At first, EEG signals were decomposed, and relevant statistical features were selected. The extracted data were fed into an LSTM for the classification of epilepsy. Their approach categorized normal, focal, and generalized epilepsy signals using optimized feature selection and deep learning mechanisms.

In 2024, Fan et al. [2] have introduced a three-node motif reduction model to represent healthy, focal and critical brain regions for analyzing seizure propagation in focal epilepsy. The authors defined a novel seizure propagation marker to characterize the different seizure patterns and transitions. The influence of critical node excitability and connection heterogeneity on the seizure evolution was proved by the experimental findings.

In 2024, Gill et al. [3] have presented an seizure classification model by analyzing real-time multi-class EEG data. They retrieved statistical and spectral features from the input. A hybrid network with the combination of CNN and multi-head self-attention was employed to categorize the seizure types. The complexity of the EEG was effectively handled by the hybrid approach.

In 2022, Narin [4] has implemented a focal and non-focal epilepsy prediction model utilizing two-dimensional CNN architectures and Continuous WT (CWT). EEG signals were transformed into 2D scalogram images and classified using multiple pre-trained CNN models. As per the findings, the InceptionV3 technique provided the best performance. Therefore, the suggested method was useful in assisting neurologists for rapid seizure detection.

In 2025, Mokhiamar et al. [5] have designed a hybrid model by integrating CNN and LSTM architectures for EEG-based seizure detection. Additionally, the researchers considered blockchain for secure data management. The spectrogram images captured the temporal and spatial patterns, while the hybrid technique improved the learning efficiency. The model showed better detection accuracy and it ensured data privacy through blockchain integration.

In 2025, Hong et al. [6] have proposed a self-supervised attention for seizure detection. A hybrid temporal–spatial learning strategy was adopted in this work along with multi-scale feature extraction. They considered a self-attention module based on electrode adjacency. Through extensive clinical dataset evaluations, the network achieved consistent improvements over conventional methods.

In 2025, Li et al. [7] have developed an epilepsy classification model by combining the CNN and Vision Transformer (ViT) using a multi-stream feature fusion approach. Initially, the EEG signals were transformed, and the results were processed by the CNN-ViT approaches to capture the local and global patterns. The discriminative ability of the executed model was high due to its feature fusion technique.

In 2025, Yi [8] has introduced a deep learning-aided pulse neural epilepsy detection technique with recurrent spiking structures. Their model attained efficient seizure detection results while lowering power consumption. So, the implemented model was suitable for wearable and low-power medical devices.

  • 2.2.    Problem Statement

Epileptic seizure is a kind of neurological disorder, which is characterized by abnormal neuronal discharges. Automatic classification of focal and generalized epilepsy is important to tackle several complications experienced by individuals. Presently, various deep learning techniques are designed by considering the EEG signals that help to accomplish better outcomes. Yet, these techniques need enormous training samples to process the network. But, in some cases, their efficiency is limited due to the limited samples. Several issues that arise while designing a focal and generalized epilepsy classification framework will be listed as follows.

  •    Classical focal and generalized epilepsy classification techniques are not efficient in attaining better outcomes due to the presence of noise as well as lower amplitude signals. Poor generalization issues in the network lead to inaccurate outcomes and biasing issues.

  •    Noises presented in the samples are subjected to misdiagnosis of outcomes, and also take more time to process the samples in the training phase. Moreover, maintaining the generalizability is complex due to poor understanding rates.

  •    Maintaining the stability of the network is difficult, and the implementation expense is also higher due to the use of enormous parameters. In some cases, the network leads to human errors and consumes enormous time.

  •    Overfitting issues that arise in the deep learning networks need to be tackled, and also require improving the network's robustness in complex classes. Variation issues arise in the samples tends to require more time for the validations.

  •    Reducing the false positive rate is complicated to improve the overall network performance. Moreover, the parameters need to be set properly for collecting the spectral and temporal patterns.

  • 3.    Implementation of Generalized Epilepsy Classification Model based on Multi-modal Data using Deep Learning 3.1.    Architecture of Proposed Epilepsy Classification Framework

On considering these research gaps, an advanced deep learning-based focal and generalized epilepsy classification framework is developed in this work. Advancements and complications presented in the classical focal and generalized epilepsy classification models are provided in Table 1.

Table 1. Features and challenges of classical focal and generalized epilepsy classification models

Author [citation]

Methodology

Features

Challenges

Najafi et al. [1]

LSTM

It recognizes the subtle, evolving seizure patterns over time.

It minimizes the need for manual feature engineering and provides better classification accuracy.

Its training time is slow and needs a lot of data for better training.

It is sensitive to noise and is also computationally intensive.

Fan et al. [2]

Three-node motif reduced network

It minimizes the complex brain regions into 3 simplified nodes.

It recognizes the different patterns of seizure spread.

It may lead to loss of nuances and intricate details.

It has poor real-world applicability and needs robust validation.

Gill et al. [3]

Deep CNN

It automatically earns the features from input, preventing the need for complex feature engineering.

It demonstrated improved efficiency and high classification accuracy.

Its training process can be computationally complex. Its interpretability is low and susceptible to overfitting.

Narin [4]

InceptionV3

It minimizes the computational burden and retrieves the nonlinear features.

It can generate high-dimensional feature vectors.

It need a high amount of labelled training data.

It is sensitive to artefacts and noise.

Mokhiamar et al.

[5]

LSTM-CNN

It is good in tackling the gradient vanishing issues. It is good in attaining better outcomes by processing the sequential information in different ranges.

Its implementation expense is higher. It has a complicated architecture and requires more samples for training.

Hong et al. [6]

MCAN

It has higher interpretability and also maintains robustness in complex classes.

Its outcomes are highly dependent on the input quality.

It always use high-quality information.

Li et al. [7]

CNN-ViT

It quickly collects the global and local features. Discriminative efficiency of the system is improved with higher robustness.

It takes an enormous time to collect the long-range dependencies.

Its implementation is expensive.

Yi [8]

ANN

It reduces the energy utilization and uses limited resources for the validation.

It processes the samples in parallel form.

It needs to tackle the overfitting issues. Handling the categorical data in complex.

An automatic and effective identification of focal and generalized epilepsy using deep learning is suggested in this work. In this model, multimodal data is considered to improve the accuracy of the epilepsy classification task. The proposed model is helpful in recognizing the focal and generalized epilepsy by analyzing the subtle and localized changes in brain activity. In this model, EEG as well as sensor data is collected for recognizing focal and generalized epilepsy. Brain activity patterns are effectively monitored by the proposed technique as it processes the temporal and spatial features of EEG as well as sensor data. The input EEG signals are converted into STFT spectrogram images to efficiently convey the information in the form of temporal and frequency domains. The dynamic shifts in brain wave patterns are preserved in the spectrogram images, which is essential for identifying epileptic activity and these images are considered as feature set 1. The sensor data from common databases is regarded as feature set 2. More contextual information is obtained from the sensor data that helps to strengthen the epilepsy classification process. An MSTAFN is used for retrieving the spatial and temporal features from EEG and sensor data. Also, this model integrates multimodal information. The multilevel STA model is beneficial in reducing the noise. This multilevel fusion strategy results in more discriminative and informative fused features. The suggested MSTAFN improves the epilepsy classification accuracy due to its capacity to handle heterogeneous data sources while maintaining the inherent relationships between the data. An AVDBiGRU network is proposed for the focal and generalized epilepsy classification. This model process the fused features obtained from the MSTAFN. The VAE model in this network is capable of learning robust latent representations while decreasing the dimensionality of the fused features. The DBi-GRU model is responsible for modelling the sequential features in both forward and backward temporal directions. Therefore, the proposed model learns the intricate temporal dynamics present in the features obtained from the EEG signals and sensor data. Better classification stability is obtained as a result of a densely connected BiGRU layer. Efficient information flow is guaranteed by the developed AVDBiGRU and it reduces gradient vanishing problems. The hyper parameters of proposed AVDBiGRU model are optimized by using FFbOA algorithm, while the network weights and biases are trained using the Adam optimizer through standard back propagation for accurate epilepsy classification. The epilepsy analysis efficiency of the implemented model is verified among conventional techniques. The structural design of the developed focal and generalized epilepsy detection model is visualized in Fig. 1.

Data from sensors

Input

Input EEG signals

conversion

STFT-based image

Developed FFbOA

Parameter optimization

Proposed Adaptive Variational autoencoders with Dense Bidirectional Gated Recurrent Unit

VAE

DBiGRU

Fig.1. Structural design of the developed focal and generalized epilepsy detection model

Generalized Seizure

Focal Seizure

  • 3.2.    Description of Multi-modal Data

Multi-modal data are collected for the focal and generalized epilepsy and their details are given below:

Dataset of Sensor-data containing HFO markings for 30 pediatric patients with epilepsy: This database is accessed on: 2025-11-08 from EEG signals of 30 adolescents and children are available in this dataset. It contains metadata files in the BIDS standard. These signals are recorded during the sleeping phase of participants. The size of this repository is 15.07 GB. In this repository, samples for different classes including normal, generalized seizure and focal seizure are available. For each class, 25415 records are available.

The     appropriate     EEG-based     features     are     accessed     on:     2025-11-08     from Seizure-specific features, wavelet transform features, frequency-domain features, time-domain features and many other types of features are available in this repository. Details like seizure pattern and duration of seizures are given in this dataset. The collected EEG signals and data are specified as S andD , respectively. The sample signals are shown in Fig. 2.

Image 1

Image 2

Image 3

Image 4

Fig.2. Sample EEG signals for focal and generalized epilepsy

Image 5

  • 3.3.    Proposed FFbOA Description

The classification ability of the implemented AVDBiGRU network is enhanced via the FFbOA based hyper parameter optimization. This algorithm fine-tunes the learning rate as well as hidden neuron counts from the developed network to improve the epilepsy classification accuracy. As these parameters are properly optimized within a specific range, the proposed model can analyze complex fused features obtained from the multimodal data without overfitting issues. So, the FFbOA-assisted optimization improves convergence time and increases focal and generalized epilepsy classification accuracy. In the conventional FbOA [26], the ball passing strategies during the football game is mathematically modelled, which helps to enhance its global search. It efficiently escapes local optima by formulating the team tactics during the match. However, the maintenance of the team coordination phase in this algorithm leads to increased computational complexity and it affects the optimization performance when handling large populations. Thus, the performance of FboA is enhanced by modifying the random parameter. In the developed FFbOA, the fitness functions are considered to upgrade the value of random variable d as per Eq. (1).

d_ Cntf + Btfn2

= Cntf + Wstf 2 + Mftn

Here, the current fitness, worst fitness, mean fitness and best fitness are represented as Cntf , Wstf , Mftn and Btfn , concurrently. Upgrading the random number based on the above formulation helps to approach the global optimum quickly. As the random influence is increased in the early stages, the high-dimensional optimization issues are handled precisely by the proposed FFbOA. Due to the consideration of different fitness functions, exploration of various regions in the search space is enhanced. The consideration of random number computation makes the search process more effective across difficult optimization landscapes by improving the convergence speed. The pseudocode of the FFbOA is shown in Algorithm 1.

Algorithm 1: Proposed FFbOA

Input: Initial parameters of VAE and BiGRU

Assign the total iterations B and population F

Compute the fitness of all players

While ( b B ) do

For i = 1: F

Perform the exploration phase

  • Update the random value as given in Eq. (1)

Compute the football velocity

Update the best force

Perform the exploitation phase

Compute the mutation strategy

End for

End while

Return the best solution

Output: Optimized hidden neuron count DRVAE and DRBGRU and learning rate YRVAE and YRBGRU from VAE and

BiGRU

4.    Spectrogram Conversion and Data-Guided Multi-modal Data Fusion Steps for Performance Improvement 4.1.    STFT for Spectrogram Conversion

The input EEG signals S are converted in to spectrogram images via the STFT approach. The role of STFT [30] is to analyze the changes in frequency of signals over time. Instead of analyzing the entire signal at once, STFT divide the signal into small sections and analyze each part separately. For every segment, a Fourier transform is performed to recognize the frequencies present during the specific time window. STFT helps to examine the interaction between frequency and time and interact. As the signals do not have a consistent frequency, the STFT helps to convert them in an imaging format. The STFT is formulated in Eq. (2).

T(ф,^)=    t(s).^(s -ф).e i^d.t

-TO

In the above equation, the center of the window function and the time-domain signal is specified as and , respectively. The window function placed over is given as . This window function is included by the Fourier transform to analyze the signal segments. In this process, the signal is segmented into overlapping time intervals using a window function. By continuously shifting this window across the entire signal, the progression of frequency over time is analyzed, which results in a time-frequency domain representation. The resultant spectrogram images are symbolized as and the images are shown in Fig. 3.

EEG signals

Fig.3. Visualization of resultant spectrogram images

Spectrogram Images

  • 4.2.    Spatio Temporal Attention Network

The STA module consists of a self-attention mechanism to learn the long-term spatial and temporal relationships from the spectrogram and sensor data. The STA [31] approach is composed of three main components including the temporal self-attention, spatial self-attention and a feature fusion module. The spatial and temporal attention operates separately to extract respective information by flattening the features. The outputs from these two attention streams are merged through the feature fusion module, which incorporates Multi-Layer Perceptron (MLP) layers, Layer Normalization (LN) and convolution operations.

Initially, the embedded input token v ' is reshaped. Then the spatial and temporal dimensions generate two separate embedded sequences. The Multi-Head Self-Attention (MSA) processes the flattened sequences to capture the long-range contextual information by managing the spatial and temporal axis. This procedure is mathematically defined in the following Eq. (3)-Eq. (6).

A s = MSA ( LN ( A s )) + A s

4= MSA ( LN ( At )) + At                                      (4)

MSA ( A ) = Concat ( h 1 ,...., hn E l                                        (5)

h = Att ( H , B] , P] ) = Soft

( max

l

h , в n

x b   )

p j

In the above notations, the output temporal and spatial features are specified as A ' and A ' , respectively. The scaling factor is termed as x . The linear transformation matrices, attention function and the number of heads is indicated as El , Att and h , concurrently. The query, key and value of heads are mentioned as H , B and P , respectively. The attention score between [ 0 - 1 ] is given by the softmax function.

  • 4.3.    MSTAFN-based Fusion Process

The input spectrogram images Z STFT and data D are given to the MSTAFN for retrieving and fusing the features. Rationale: Different time points and frequency bands are assigned with high-priority weights by the spatio-temporal attention technique. The EEG data is intrinsically non-stationary and its statistical characteristics change over time. But, the spatio-temporal attention is capable of handling the long-range features from EEG data. Information from the spectrograms and EEG data are easily combined by the MSTAFN model. This feature fusion process eliminates the unnecessary or redundant information. Therefore, MSTAFN is employed for the future fusion process.

Workflow: In the proposed MSTAFN architecture, the fusion is achieved by processing the two input feature sets through separate spatial as well as temporal attention branches and then combining their outputs. The network produces two intermediate feature maps including the spatial feature map and a temporal feature map. The feature and spatial feature maps are converted into a set of query, key, and value representations. The attention mechanism computes the relevance between temporal and spatial positions by multiplying the query and key for generating an attention weight matrix. These weights are then applied to the value representation to produce the temporal as well as spatial attention output. Both these features are concatenated by the feature fusion process of MSTAFN as shown in Eq. (7).

FE = MLP ^ LN ^ CF ^ As' , At' + yA (7)

The output fused feature is signified as FE . A Gaussian Error Linear Unit (GELU) and two fully connected layers are presented in the MLP module. The learnable parameter is symbolized as y . The concatenation process is mentioned by the variable CF . After the fusion, the fused features are obtained based on Eq. (8).

FE VT = S e + D s (8)

Insufficient fusion is prevented by preserving the local structural information in the feature fusion module. The multi-level operation captures the hierarchical representation of input, which incorporates the global structures and finegrained local patterns. The spatio-temporal attention mechanism concentrates on the most informative features associated with epileptic activity. The capability of the MSTAFN-based fusion method to learn the correlations between features from the input images and data is high. Moreover, the suggested technique has the potential to learn the deep contextual interactions across various abstraction levels by using the multi-level attention. The temporal phases of neuronal activity are highlighted by the discriminative ability of the spatio-temporal attention mechanism. Furthermore, the attention-driven fusion process reduces the computational complexity. The fused features are represented as FEST . Schematic view of the MSTAFN-based feature fusion process is displayed in Fig. 4.

Input signals S

Input

Data D

Fig.4. Schematic view of the MSTAFN-based feature fusion process

5.    Focal and Generalized Epilepsy Classification using Adaptive Integrated Deep Learning Architecture 5.1.    Variational Autoencoders

VAE is employed in this work for reducing the dimensionality of the fused features. An encoder and a decoder are the two main parts of the VAE [32]. The spatial dimension is reduced by the convolutional layers in VAE. One convolution layer has 32 filters and the other layer has 64 filters. The latent space mean is generated via the dense layer and log variance. Eq. (9) provides the log-likelihood of the data.

log d e ( v ) ^ E к ф x|v )[ log d e ( v\x ) ] - KL k ( x\v )| d ( x ) ]

Here, the Kullback-Leibler divergence and the prior distribution are represented as KL and d ( x ) , respectively. The probability of latent variables and the approximate posterior is termed as de ( v|x ) and кф ( x|v ) , concurrently. The fully connected layer in the decoder part reconstructs the input. Therefore, the latent vector is reshaped into a56 x 56 x 32 tensor. The output is normalized by the transposed convolutional layer. Architectural overview of VAE is depicted in Fig. 5.

Fig.5. Architectural overview of VAE

  • 5.2.    Dense Bidirectional Gated Recurrent Unit

The DBiGRU [33] model performs the epilepsy detection without taking a longer training time. The feature learning efficiency of the BiGRU is enhanced by its densely connected structure. Feature reusing ability is enhanced by the Dense BiGRU. This network prevents gradient issues by passing the information to intermediate layers. In BiGRU, the adjustments needed on the hidden state is managed by the update and reset gates. The information storage is controlled by these gates. The operations inside the GRU component are expressed in the following Eq. (10)-Eq. (12).

P a = & ( H p f a ® D p g a - 1 )

k a = & ( H k f a ® D k g a - 1 )

g a = (( 1 - Pa ) ® g a - 1 Ж P a ® q a )

In the above derivations, the prior hidden state, sigmoid, input features, and time are specified as ga 4, &  , f and a , respectively. The update and reset gate are mentioned as p and k , concurrently. In DBiGRU, the contextual data from previous and future time steps are considered for providing the output. Two hidden states are trained in this network. The computation of BiGRU is given in Eq. (13)-Eq. (15).

ga = GRU(fa , g2)

ga=gru (fa, gaz)

ga =[ga , ga J

Here, the forward and backwards hidden states are represented as g and g , correspondingly. One of the hidden state processes the inputs forward, while the other processes in opposite direction. The hidden states from both directions are used to calculate the outputs at each time step. DBiGRU accurately represent the sequential data by utilizing both past and future information. Architectural overview of DBiGRU is showcased in Fig. 6.

Fig.6. Architectural overview of DBiGRU

  • 5.3.    Epilepsy Classification through AVDBiGRU

The fused features FEST are processed by the proposed AVDBiGRU technique for classifying the focal and generalized epilepsy.

Working of AVDBiGRU: The VAE module converts the fused features into a compact latent space. The encoder of VAE compresses the input into suitable samples by mapping the input to a lower-dimensional latent space. From this latent space, the decoder performs the reconstruction process. VAE identifies the useful characteristics and patterns in the input. The nonlinear relationships between the input and the latent parameters are captured using VAE. The generative ability of VAE reduces the overfitting issues and enhances the learning efficiency for yielding useful latent embeddings for the classification of focal and generalized epilepsy. VAEs generate meaningful representations from the data and it denoise the input before further processing. The resultant features from VAE are classified by the DBiGRU. In the DBiGRU, data processing in the forward direction is handled by one set of neurons, while the other set concentrates on data coming from the opposite direction. The contextual information from the fused features is learned by the bidirectional structure of DBiGRU model. The intricate temporal relationships between the epileptic events are precisely handled by the developed AVDBiGRU network. Deeper feature propagation and information reuse between layers are made possible by the dense connection of BiGRU layers. Furthermore, the gating mechanisms in the DBiGRU manage the information flow, which helps to preserve long-term relationships while eliminating unnecessary temporal details. The outputs of the forward and backward GRU units are concatenated to form the temporal features needed for classification. The dense classification layer receives the aggregated temporal features. This layer acts as the decision-making component of the model for determining whether the input pattern corresponds to focal or generalized epilepsy based on the learned latent and temporal features.

Fig.7. Structural view of the proposed FFbOA-AVDBiGRU-aided focal and generalized epilepsy detection model

The integration of VAE and BiGRU improves the gradient flow and feature learning. The training time of the AVDBiGRU network is minimized by the parameter optimization process by the FFbOA. The objective function Lfn of the implemented FFbOA-AVDBiGRU-aided focal and generalized epilepsy detection model is given in Eq. (16).

Lfn =

argmm       I ------------------

{ GT XG , GT BLSTM , PL XGB , PL BBLS™ \ Accuracy + Pr ecision

In the above expression, the learning rate optimized from VAE and BiGRU in the range of [ 0.01 - 0.99 ] is mentioned as YRVAE and YR BGRU , respectively. The hidden neuron counts of VAE and BiGRU in the interval of [ 5 - 255 ] is represented as DR VAE and DR BGRU , concurrently. The arithmetical expression for the accuracy and precision is provided in Eq. (17) and Eq. (18).

ppT + ntT Accuracy =------------------- PP t + nt T + fPp + fnF

Pr ecision = —ppT— PP t + fPF

In the above equations, the terms fp , pp , fn and nt specifies the false positive, true positive, false negative and true negative values. Structural view of the proposed FFbOA-AVDBiGRU-aided focal and generalized epilepsy detection model is exhibited in Fig. 7.

  • 6.    Experimental Observations and Discussion

    • 6.1.    Experimental Configuration

  • 6.2.    Assessment Parameters

The proposed multi-modal focal and generalized epilepsy classification model was implemented using Python. During the optimization phase, the number of populations was set to 10, the chromosome length to 4, and the maximum number of iterations to 50. The effectiveness of the proposed FFbOA was compared against Carpet Weaver Optimization (CWO) [27], Dark Forest Algorithm (DFA) [28], Sharpbelly Fish Optimization Algorithm (SBFOA) [29] and FboA [26]. For classification benchmarking, various neural network models such as LSTM [1], DCNN [3], InceptionV3 [4], and BiGRU [33] were evaluated against the proposed model. For ensuring the unbiased evaluation, a subject-wise K-Fold cross-validation strategy is used, where each subject’s data is kept within a single fold for preventing data leakage and improving generalizability of model.

The computations for the assessment parameters considered to evaluate the performance of the implemented AVDBiGRU-assisted focal and generalized epilepsy detection are provided from Eq. (19)-Eq. (28).

F PR =-- fF--

fPF + nt T

F1 - score =

2 ppT

2 PP t + fPF + fn F

F DR =-- f^

CSI =

fPF + PP t ppT

PP t + fP F + fn F

FOR = —fnF-— fnF + ntT

FPR = —fF— fP F + nt T

MCC =

PP t * nt T - fPF x fn F

yppp+phpp+ffon^

FNR =--fnF-- fn F + PP t

N PV =-- nt!-- ntT + fnF

Specificity =---—--- nt T + fP F

  • 6.3.    Evaluation of Seizure Identification Accuracy

The performance evaluation of focal and generalized identification accuracy is estimated among conventional approaches as given in Fig 8 and Fig 9. The F1-score of the developed FFbOA-AVDBiGRU-based epilepsy classification model is 13.75%, 8.46%, 5.29% and 1.58% higher than LSTM, DCNN, InceptionV3 and BiGRU models at the TanH activation function. The MSTAFN efficiently combines multimodal features from sensor-based inputs with STFT-based EEG representations for accurately capturing the temporal and spatial features, which resulted in high F1-score and less FDR outcomes in all activation functions. The precision of the FFbOA-AVDBiGRU-based epilepsy classification is better than CWO-AVDBiGRU, DFA-AVDBiGRU, SBFOA-AVDBiGRU and FbOA-AVDBiGRU. By removing noise and redundancy from multimodal data, the VAE component improves the extraction of enhanced latent representations that help to obtain high accuracy and precision. The data processing ability of FFbOA-AVDBiGRU in both forward and backward directions enhance temporal dependency learning of epileptic signals. Traditional models like LSTM and Bi-GRU do not have feature-level attention mechanisms and they only handle sequential learning. Eventhough techniques like DCNN and InceptionV3 are efficient in spatial learning, they are not applicable in processing long-term temporal patterns.

(a)

(b)

• LSTM    * InceptionVS • FFbOA-AVDBiGRU

Ф DCNN   * BiGRU

(c)

(d)

(e)

(f)

(g)

(h)

(i)

(j)

(a)

Fig.8. Evaluation of seizure identification performance of the proposed model among different classifiers by means of a) F1score, b) FDR, c) CSI, d) Accuracy, e) FOR, f) FPR, g) MCC, h) Precision, i) FNR and j) NPV

(c)

(b)

(e)

(d)

(g)

Activation Function

(h)

(i)

Fig.9. Evaluation of seizure identification performance of the proposed model among different optimization strategies by means of a) F1score, b) FDR, c) CSI, d) Accuracy, e) FOR, f) FPR, g) MCC, h) Precision, i) FNR and j) NPV

(j)

  • 6.4.    Quantitative Verification of Model Performance

  • 200

    82.06189

    82.4854

    85.88867

    87.6685

    92.01567

    250

    81.91934

    87.75985

    87.70587

    91.47175

    93.11595

    CSI

    50

    73.03861

    74.81582

    77.48465

    80.93127

    87.48524

    100

    66.66052

    71.87578

    77.69198

    81.92668

    83.62114

    150

    67.41546

    73.16509

    79.0504

    82.97711

    84.4626

    200

    69.58047

    70.19162

    75.26743

    78.04445

    85.21205

    250

    69.37575

    78.18935

    78.1037

    84.28382

    87.11866

  • 6.5.    Efficiency Analysis of Feature Fusion Process

The quantitative verification of the implemented model's performance over existing algorithms and classifiers are given in Table 2 and Table 3. These results show the efficiency of the proposed FFbOA-AVDBiGRU network in identifying the focal as well as generalized epilepsy. The accuracy of designed FFbOA-AVDBiGRU approach is 95.54% when the hidden neuron count is 50, but the accuracy of LSTM, DCNN, InceptionV3 and BiGRU is 90.69%, 91.82%, 94.07% and 95.15%. The multilayer fusion process preserves the high-level temporal features from sensor data and low-level textural features from the STFT images without any distortion issues. Additionally, the VAE improves the latent space representation and produces more stable convergence, which resulted in high accuracy, CSI scores and less FNR in the detection process. The dense interconnectedness of the implemented FFbOA-AVDBiGRU network minimizes information loss and improves effective gradient flow. When the epoch count is 250, the suggested FFbOA-AVDBiGRU model gained a specificity score of 96.55%. Meanwhile, algorithms like CWO-AVDBiGRU, DFA-AVDBiGRU, SBFOA-AVDBiGRU and FbOA-AVDBiGRU achieved a specificity range of 90.95%, 93.87%, 93.85% and 95.73%. Even while the LSTM is proficient in capturing sequential dependencies, it is not suitable for solving gradient vanishing issues and it does not have the ability to recognize important spatial features. InceptionV3 has high computational cost issues and it is less efficient in managing temporal changes. Therefore, the outcome of the implemented technique in focal and generalized epilepsy detection is better than standard techniques.

Table 2. Quantitative verification of model performance over heuristic algorithms

Hidden neuron count

CWO-AVDBiGRU [27]

DFA-AVDBiGRU

[28]

SBFOA-

AVDBiGRU [29]

FbOA-AVDBiGRU [26]

FFbOA-AVDBiGRU

Accuracy

50

89.61257

90.39592

91.5428

92.97386

95.54996

100

86.66371

89.09126

91.63045

93.37707

94.05339

150

87.02448

89.66885

92.19974

93.79781

94.38462

200

88.04126

88.3236

90.59245

91.779

94.67711

250

87.94623

91.8399

91.80391

94.3145

95.41063

Specificity

50

92.20943

92.79694

93.6571

94.7304

96.66247

100

89.99779

91.81845

93.72284

95.0328

95.54004

150

90.26836

92.25164

94.1498

95.34835

95.78847

200

91.03095

91.2427

92.94434

93.83425

96.00783

250

90.95967

93.87992

93.85294

95.73588

96.55798

FNR

50

15.58114

14.40612

12.6858

10.53921

6.675063

100

20.00443

16.36311

12.55432

9.934398

8.919921

150

19.46328

15.49672

11.70039

9.303291

8.423063

200

17.93811

17.5146

14.11133

12.3315

7.984333

250

18.08066

12.24015

12.29413

8.528248

6.884048

F1-score

50

84.41886

85.59388

87.3142

89.46079

93.32494

100

79.99557

83.63689

87.44568

90.0656

91.08008

150

80.53672

84.50328

88.29961

90.69671

91.57694

Table 3. Quantitative verification of model performance over techniques

Hidden neuron count

LSTM [1]

DCNN [3]

InceptionV3 [4]

BiGRU [33]

FFbOA-AVDBiGRU

Accuracy

50

90.69763

91.82329

94.07645

95.15229

95.54996

100

89.6301

90.85079

93.10857

93.62065

94.05339

150

88.3845

90.71332

93.06705

93.30787

94.38462

200

88.92887

89.53507

90.4439

93.51639

94.67711

250

90.58414

92.37136

92.69337

94.26745

95.41063

Specificity

50

93.02322

93.86747

95.55734

96.36422

96.66247

100

92.22258

93.1381

94.83143

95.21549

95.54004

150

91.28837

93.03499

94.80029

94.9809

95.78847

200

91.69665

92.1513

92.83292

95.13729

96.00783

250

92.93811

94.27852

94.52003

95.70058

96.55798

FNR

50

13.95355

12.26506

8.885321

7.27157

6.675063

100

15.55485

13.72381

10.33714

9.56902

8.919921

150

17.42326

13.93002

10.39942

10.0382

8.423063

200

16.60669

15.6974

14.33415

9.725413

7.984333

250

14.12379

11.44297

10.95995

8.598832

6.884048

F1-score

50

86.04645

87.73494

91.11468

92.72843

93.32494

100

84.44515

86.27619

89.66286

90.43098

91.08008

150

82.57674

86.06998

89.60058

89.9618

91.57694

200

83.39331

84.3026

85.66585

90.27459

92.01567

250

85.87621

88.55703

89.04005

91.40117

93.11595

CSI

50

75.5101

78.14981

83.67949

86.44269

87.48524

100

73.07798

75.86467

81.26262

82.53335

83.62114

150

70.32401

75.54635

81.16037

81.75507

84.4626

200

71.51674

72.86473

74.92586

82.27318

85.21205

250

75.24831

79.464

80.24522

84.16404

87.11866

The efficiency of using MSTAFN-based fused features for the focal and generalized epilepsy classification is validated and the results are given in Table 4. When using spectrogram images for performing focal and generalized epilepsy classification, the accuracy is 91.42%. Similarly, when using the sensor data for the seizure classification, the accuracy is 93.77%. But, using the features obtained by fusing the spectrogram and sensor data via the MSTAFN resulted in an accuracy of 95.41%. The MSTAFN module fuses spatial and temporal patterns after processing multilevel feature domains. This fusion strategy is helpful in fusing the most informative context-aware and semantically rich representation that enhances classification performance. Therefore, using MSTAFN-based fused features gained better precision, F1-score and less FNR results.

Table 4. Efficiency analysis of feature fusion process

Metrics

Spectrogram images (Feature 1)

Sensor-data(Feature 2)

Fused features using MSTAFN

Accuracy

Accuracy

91.42447

93.7712

95.41146

Sensitivity

87.13671

90.6568

93.1172

Specificity

93.56836

95.3284

96.5586

Precision

87.13671

90.6568

93.1172

FPR

6.431644

4.671598

3.441402

FNR

12.86329

9.343196

6.882803

NPV

93.56836

95.3284

96.5586

FDR

12.86329

9.343196

6.882803

F1_score

87.13671

90.6568

93.1172

MCC

0.807051

0.859852

0.896758

FOR

6.431644

4.671598

3.441402

  • 6.6.    Overall Efficiency of the Presented Model

The overall efficiency of the presented FFbOA-AVDBiGRU model for focal and generalized epilepsy classification is analyzed and the results are visualized in Fig. 10. The precision analysis graph shows that the proposed model obtained high precision values between 91% and 94% among the batch size variations. The accuracy of 96% is attained by the proposed technique when the batch size is 8 and 128. These results confirm the generalization ability of the developed technique by overcoming gradient instability and overfitting issues. The FNR score of the detection process is lower in different batch sizes that showcase the efficiency of FFbOA-based fine-tuning mechanism. The FDR of the developed FFbOA-AVDBiGRU-assisted focal and generalized epilepsy classification is 6% when the batch size is 128 and the FPR is 3%. The proposed model’s potential in analyzing the essential feature regions and eliminating unnecessary information resulted in better precision.

(f)

(e)

Fig.10. Overall Efficiency of the Presented Focal and Generalized Epilepsy Classification Model with Respect to a) Accuracy, b) F1score, c) Precision, d) FDR, e) FNR and f) FPR

  • 6.7.    Convergence and ROC Estimation

The convergence and ROC estimation of the developed FFbOA-AVDBiGRU model for focal and generalized epilepsy classification is provided in Fig 11. The suggested algorithm’s searching ability is confirmed by its reduced cost function value from the very first iteration itself. The convergence outcome indicates that the suggested FFbOA avoids local minima and premature convergence due to the inclusion of fitness-based computation during the optimization process. Therefore, the introduced optimization approach FFbOA enhanced the learning stability of the proposed AVDBiGRU while increasing the accuracy of the detection procedure. The proposed model precisely identified both the focal and generalized epilepsy seizure activities as confirmed by the ROC analysis. The AUC of LSTM in focal and generalized epilepsy classification is 79.13%, DCNN is 81.43%, InceptionV3 is 83.68% and BiGRU is 86.08%, while the proposed model’s AUC is 88.53%. The bidirectional recurrent path in the AVDBiGRU network enhances the temporal context awareness by capturing both past and future signal patterns from the fused features, which resulted in the accurate identification of seizure variants.

(a)

Fig.11. Performance Estimation of the Epilepsy Classification Model in terms of a) Convergence and b) ROC

(b)

  • 6.8.    Statistical Results

  • 6.9.    Interpretability and Explainabilty of Proposed Model

  • 6.10.    Ablation Study of Proposed Model

The statistical results of the proposed FFbOA-AVDBiGRU-aided focal and generalized epilepsy classification are shown in Table 5. FFbOA maintains stable optimization as confirmed by the lowest mean, median, and standard deviation values. The mean and median scores of the implemented approach are 1.114 and 1.03. Traditional algorithms like FbOA and SBFOA show irregular convergence and computational overhead. But, the new concept in the developed FFbOA influences the random factor based on the current, mean, best, and worst fitness values, that enhance the learning stability. Quicker convergence is achieved by the FFbOA-based optimization. Additionally, the FFbOA shows better consistency and control over learning rate as well as hidden neuron count optimization.

Table 5. Statistical results of the presented focal and generalized epilepsy classification model

Statistical measures

CWO-AVDBiGRU [1]

DFA-AVDBiGRU [2]

SBFOA-AVDBiGRU [4]

FbOA-AVDBiGRU [19]

FFbOA-AVDBiGRU

BEST

1.338913

1.291827

1.297593

1.273974

1.022761

WORST

1.928689

3.758084

2.411148

4.123271

2.412587

MEAN

1.636779

1.60502

1.521292

1.369498

1.114488

MEDIAN

1.563311

1.716155

1.588178

1.273974

1.030536

STD

0.203608

0.357632

0.304176

0.418379

0.251429

The attention mechanism in the proposed MSTAFN framework provides the interpretability by highlighting discriminative temporal–spectral EEG regions having contribution in seizure classification, while saliency-based analysis can further identify the most influential input features that are responsible for the prediction.

An ablation study for the proposed model is displayed in Table 6. The final proposed model with used optimization function achieved the highest accuracy of 95.55% and specificity of 96.66% which is improved as compared to the other modules used in proposed model and discussed in ablation study. Although we observed a slight variation in F1 -Score and FNR values but the improved specificity and accuracy of proposed model indicates a better class discrimination that is considered decisive in the consistent clinical diagnosis application. Overall, the results validate the effectiveness of each module included in the proposed framework.

Table 6. Ablation study of proposed model

Model

Accuracy (%)

Specificity (%)

FNR (%)

F1-Score (%)

STFT+BiGRU

92.75

92.30

8.12

91.76

STFT+VAR+BiGRU

93.87

93.26

7.17

92.87

STFT+MSTAFN+BiGRU

94.78

94.23

6.26

93.85

STFT+MSTAFN+VAE+BiGRU

95.36

95.15

5.25

94.73

Proposed Model

95.55

96.66

6.67

93.32

7.    Conclusions

An automatic and effective identification of focal and generalized epilepsy using deep learning was suggested in this work. Initially, the EEG signals and the appropriate sensor data were collected. The input EEG signals were converted into STFT spectrogram images. An MSTAFN was used for retrieving the spatial and temporal features from the EEG as well as sensor data. The multilevel STA model was beneficial in reducing the noise. An AVDBiGRU network was proposed for the focal and generalized epilepsy classification. This model processes the fused features obtained from the MSTAFN. The parameters of AVDBiGRU are fine-tuned by the FFbOA for accurate classification of epilepsy. The epilepsy analysis efficiency of the implemented model was verified among conventional techniques. The accuracy of the implemented AVDBiGRU model for focal and generalized epilepsy detection is 95.54%. Thus, the developed technique has high discriminative capacity and it achieved precise classification results. In the future, Empirical Mode Decomposition (EMD) will be used for feature generation instead of only using the STFT mechanism. Noise handling will also be performed via filtering and normalization techniques.

All the Declarations and StatementsAuthor Contributions Statement

Mr. Maneesh Kumar: Conceptualization, methodology, investigation, data curation, software implementation, formal analysis, visualization, writing – original draft, and correspondence. He proposed the research idea, designed the overall study framework, carried out the implementation and analysis, prepared the manuscript draft, and served as the corresponding author.

Dr. Rakesh Kumar: Supervision, conceptual guidance, validation, review and editing, and project administration. He supervised the research work, provided intellectual direction, reviewed the methodology and results, and contributed to revising and improving the manuscript.

Dr. Santosh Kumar: Supervision, methodology support, validation, review and editing, and technical guidance. He assisted in shaping the research design, supported the evaluation and interpretation of the results, and contributed to the critical review and refinement of the manuscript.

All authors have read and agreed to the published version of the manuscript.

Conflict of Interest Statement

The authors declare that there are no conflicts of interest regarding the publication of this paper.

Funding Declaration

This research did not receive any specific grant from funding agencies in the public, commercial, or not for profit sectors.

Data Availability Statement

The authors confirm that the data supporting the finding of this study are available within the article. Raw data that support the findings of this study are available from the corresponding author, upon reasonable request.

Ethical Declarations

This article does not contain any studies with human participants or animals performed by any of the author; hence ethical approval was not required.

Acknowledgments

The authors sincerely thank all those who provided valuable guidance, support, and constructive suggestions during the course of this research. Their insights helped improve the quality and clarity of this work.

Declaration of Generative AI in Scholarly Writing

In the preparation of this manuscript, generative AI and AI-assisted technologies were used solely for language enhancement, grammar correction, and improvement of readability. Their use was limited to the writing process and did not extend to the analysis of data, interpretation of findings, or drawing of scientific conclusions. All AI-assisted output was carefully reviewed, revised, and approved by the authors. The authors remain fully responsible for the accuracy, integrity, and originality of the content presented in this work.

Abbreviations

The following abbreviations are used in this manuscript:

EEG - ElectroEncephaloGram

STFT - Short-Time Fourier Transform

MSTAFN - Multilevel Spatio Temporal Attention Fusion Network

AVDBiGRU - Adaptive Variational autoencoders with Dense Bidirectional Gated Recurrent Unit

FFbOA - Fitness-based Football Optimization Algorithm

HFO - High-Frequency Oscillation

ASD - Anti-Seizure Drugs

SOZ - Seizure Onset Zone

CWT - Continuous Wavelet Transform

CNN - Convolutional Neural Networks

LSTM - Long Short-Term Memory Networks

ViT - Vision Transformer

STA - Spatio Temporal Attention Network

MLP - Multi-Layer Perceptron

LN - Layer Normalization

MSA - Multi-Head Self-Attention

GELU - Gaussian Error Linear Unit

VAE - Variational Autoencoders

CWO - Carpet Weaver Optimization

DFA - Dark Forest Algorithm

SBFOA - Sharpbelly Fish Optimization Algorithm