# MultiEpilepsyNet: An EEG and MRI data based multimodal seizure detection model using hybrid deep learning model

Mohd Abdul Rahim Khan, Nasser Ali Aljarallah, Ashit Kumar Dutta, Shtwai Alsubai, Seyed Jalaleddin Mousavirad, Sunil Kumar Sharma, Ghanshyam Tejani, David Bassir

► To cite this version:

Mohd Abdul Rahim Khan, Nasser Ali Aljarallah, Ashit Kumar Dutta, Shtwai Alsubai, Seyed Jalaleddin Mousavirad, et al. MultiEpilepsyNet: An EEG and MRI data based multimodal seizure detection model using hybrid deep learning model. Brain Research Bulletin, 2025, 233, pp.111645. 10.1016/j.brainresbull.2025.111645. hal-05466008

HAL Id: hal-05466008

https://hal.science/hal-05466008v1

Submitted on 19 Jan 2026

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_1.png" /></figure>

Distributed under a Creative Commons CC BY 4.0 - Attribution - International License
Research report

<figure><img src="image_2.png" /></figure>

# MultiEpilepsyNet: An EEG and MRI data based multimodal seizure detection model using hybrid deep learning model

Mohd Abdul Rahim Khan<sup>a</sup>, Nasser Ali AlJarallah<sup>b,c</sup>, Ashit Kumar Dutta<sup>b,c</sup>, Shtwai Alsubai<sup>c,d</sup>, Seyed Jalaleddin Mousavirad<sup>e,* ID</sup>, Sunil Kumar Sharma<sup>f</sup>, Ghanshyam G. Tejani<sup>g,h,**</sup>, David BASSIR<sup>i,j,***</sup>

## ARTICLE INFO

### Keywords:

Seizure Detection

MultiEpilepsyNet

SeizureFed-Net

Hybrid DL-Based SeizureShieldNet

Jackal-Wolf Hybrid Optimizer (JWHO)

Segmentations via novel EpiSkullNet++

## ABSTRACT

Epilepsy is a critical neurological disorder that requires accurate and privacy-preserving diagnostic solutions to enable early detection and effective management. However, existing approaches face key challenges, including reliance on centralized data, poor generalizability across modalities, suboptimal feature extraction, and vulnerability to noise. To address these issues, we propose MultiEpilepsyNet, a novel multimodal seizure detection framework that integrates federated learning with hybrid deep learning models. At its core, the system introduces SeizureFed-Net, a federated architecture that enables collaborative learning from EEG and MRI data while safeguarding patient privacy. For detection, we design SeizureShieldNet, a hybrid model that fuses the temporal learning capabilities of BBIDNet (Boosted BiLSTM Intrusion Detector Network) with the adaptive decision-making of FD-TMS (Fuzzy-DQN Threat Mitigation System) under uncertainty. To further enhance model efficiency, a Jackal-Wolf Hybrid Optimizer (JWHO)—a novel combination of Golden Jackal Optimization and Grey Wolf Optimizer—is employed for optimal feature subset selection. On the imaging side, MRI preprocessing is improved through EpiSkullNet++, a modified 3D UNet++ architecture tailored for precise brain segmentation. Extensive experiments on two benchmark datasets demonstrate the superiority of our approach, achieving 99.36% accuracy on the CHB-MIT EEG dataset and 99.38% accuracy on an epilepsy MRI dataset. Beyond accuracy, MultiEpilepsyNet demonstrates improved robustness to missing modalities, reduced training overhead via federated aggregation, and enhanced privacy preservation compared to centralized deep learning models, thereby addressing critical barriers in practical clinical deployment. These outcomes highlight the effectiveness, scalability, and real-world clinical potential of the proposed framework for epilepsy diagnosis and management.

E-mail addresses: mohd.khan@asu.edu.om (M.A.R. Khan), njarallah@um.edu.sa (N.A. AlJarallah), adotta@um.edu.sa (A.K. Dutta), sa.alsubai@psau.edu.sa (S. Alsubai), Seyedjalaleddin.mousavirad@miun.se (S.J. Mousavirad), s.sharma@mu.edu.sa (S.K. Sharma), gtejani@saturn.yzu.edu.tw (G.G. Tejani), david.bassir@ens-paris-saclay.fr, david.bassir@utbm.fr (D. BASSIR).

<footnote><sup>a</sup> Department of Electrical Engineering & Computer Science, A'sharqiyah University, Ibra 400, Sultanate of Oman</footnote>

<footnote><sup>b</sup> Department of Computer Science and Information Systems, College of Applied Sciences, AlMaarefa University, Ad Diriyah, Riyadh 13713, Saudi Arabia</footnote>

<footnote><sup>c</sup> King Salman Center for Disability Research, Riyadh 11614, Saudi Arabia</footnote>

<footnote><sup>d</sup> Department of Computer Science, College of Computer Engineering and Sciences in Al-Kharj, Prince Sattam bin Abdulaziz University, P.O. Box 151, Al-Kharj 11942, Saudi Arabia</footnote>

<footnote><sup>e</sup> Department of Computer and Electrical Engineering, Mid Sweden University, Sundsvall, Sweden</footnote>

<footnote><sup>f</sup> Department of Information Systems, College of Computer and Information Sciences, Majmaah University, Majmaah 11952, Saudi Arabia</footnote>

<footnote><sup>g</sup> Department of Industrial Engineering and Management, Yuan Ze University, 320315 Taiwan</footnote>

<footnote><sup>h</sup> Applied Science Research Center, Applied Science Private University, Amman 11937, Jordan</footnote>

<footnote><sup>i</sup> Smart Structural Health Monitoring and Control Laboratory, DGUT-CNAM, Dongguan University of Technology, China</footnote>

<footnote><sup>j</sup> ENS -Paris-Saclay University, Centre Borelli, UMR CNRS 9010, Gif-sur-Yvette 91190, France</footnote>

<footnote>* Corresponding author.</footnote>

<footnote>** Corresponding author at: Department of Industrial Engineering and Management, Yuan Ze University, 320315 Taiwan.</footnote>

<footnote>*** Corresponding author at: Smart Structural Health Monitoring and Control Laboratory, DGUT-CNAM, Dongguan University of Technology, China.</footnote>
# 1. Introduction

The neurological disorder epilepsy exists as a complex medical condition that impacts millions of people globally, regardless of their demographic characteristics and age (Miltiadous et al., 2022). The condition produces unpredictable seizures through sudden brain electrical abnormalities that repeatedly occur (Sadiq et al., 2024). The symptoms of seizures appear differently because they range from quick episodes of confusion and staring periods to complete body convulsions and loss of consciousness. Epilepsy can emerge during any period of life, but it usually appears first in children and adults past middle age (Bedrosian et al., 2022; Ghazali et al., 2022). The medical symptoms of epilepsy strain both mental abilities and emotional stability and routine activities. Children with frequent seizures face difficulties in their learning and development process, but adults must deal with social discrimination and occupational restrictions, as well as safety concerns (Kim et al., 2021). The development of better treatments through medical progress has not eliminated seizures in one-third of epilepsy patients, thus showing the necessity for improved diagnostic methods.

Presently, electroencephalography (EEG) is the dependable technique for recording and diagnosing seizure events involving electrical activities of the brain. A neurologist analyzes EEG data for seizure patterns manually (Rashed-Al-Mahfuz et al., 2021a; Tuncer and Bolat, 2022). This approach is time-consuming, subjective, and impractical for continuous monitoring. Machine learning algorithms, such as support vector machines (SVM) and random forests, are created to help diagnose seizure cases, incorporating expert-defined EEG features as used to classify seizures automatically (Kunekar et al., 2024; Rizal et al., 2021; Ohanesian and Harfash, 2022). The deep learning models like convolutional neural networks (CNNs) and long short-term memory (LSTMs) further improve detection accuracy concerning automatic learning of raw EEG signals' patterns to directly use these data in the analysis (Rashed-Al-Mahfuz et al., 2021b; Tawhid et al., 2022). However, most of these systems rely entirely on EEG signals and ignore crucial patient-specific factors, like medical history, age, or comorbidities, that could improve the prediction of seizures (Abdelhameed and Bayoumi, 2021). Some of these models also have problems with practical situations where they involve different patient populations, long EEG recordings need to be parsed, and used within realistic computational constraints (Gramacki and Gramacki, 2022; Poorani and Balasubramanie, 2023).

Epilepsy is a critical neurological disorder that requires accurate and timely seizure detection for effective management. Existing methods primarily rely on EEG-based seizure detection, which, while effective for capturing temporal dynamics of brain activity, suffer from several limitations:

1. **Limited spatial information:** EEG electrodes provide only surface-level electrical signals, making it difficult to capture deep structural abnormalities in the brain.

2. **Susceptibility to noise and artifacts:** EEG recordings are highly sensitive to motion artifacts, eye blinks, and environmental noise, which can reduce detection accuracy.

3. **Limited generalizability:** Many EEG-based models are trained on single-center datasets, reducing their applicability to diverse patient populations.

4. **Single-modality constraint:** Relying solely on EEG may miss complementary anatomical or structural cues relevant for seizure prediction, limiting the richness of feature representations.

To address the limitations in existing seizure detection systems, this study introduces **MultiEpilepsyNet**, a comprehensive deep learning-based framework that leverages **multimodal data (EEG and MRI)** to improve diagnostic accuracy, robustness, and clinical applicability. Unlike prior works that rely solely on EEG or centralized models, MultiEpilepsyNet integrates **federated learning** to enable secure and

decentralized training across multiple institutions, thereby preserving patient privacy while enhancing model generalization. Furthermore, the proposed system does not merely extend existing architectures but introduces a series of innovations in detection, feature selection, and preprocessing to tackle practical deployment challenges such as computational overhead, real-time performance, and missing modalities.

Specifically, the unique contributions of this research are as follows:

* **Federated Multimodal Framework (SeizureFed-Net):** A novel privacy-preserving federated learning framework that collaboratively trains on distributed EEG and MRI datasets, addressing both scalability and data confidentiality—limitations often overlooked in centralized deep learning approaches.

* **Hybrid Detection Model (SeizureShieldNet):** A robust seizure detection architecture that integrates BBIDNet (Boosted BiLSTM Intrusion Detector Network) for temporal pattern learning with FD-TMS (Fuzzy-DQN Threat Mitigation System) for adaptive real-time decision-making, surpassing conventional CNN- or LSTM-only systems in resilience and interpretability.

* **Jackal-Wolf Hybrid Optimizer (JWHO):** A new feature selection algorithm that combines the exploratory strengths of Golden Jackal Optimization with the convergence capabilities of the Grey Wolf Optimizer (GWO), leading to optimal and computationally efficient feature subsets—something traditional single optimizers struggle with.

* **EpiSkullNet++ Segmentation:** A modified 3D UNet++-based segmentation model specifically tailored for epilepsy-related MRI preprocessing, improving structural precision and robustness compared to standard UNet++ variants.

Through these contributions, MultiEpilepsyNet moves beyond incremental accuracy gains and provides a **scalable, interpretable, and privacy-aware framework** with strong potential for real-world clinical deployment.

**The organization of this work:** The literature review using the current methodology is found in 2. The proposed methodology, comprising the framework and key elements, is presented in 3. The result and comparison analysis are shown in 4. Finally, the study comes to a close in the last section with the conclusion.

# 2. Related work

Seizure detection research has come a long way from traditional EEG-based classifiers to sophisticated multimodal and federated learning techniques. Initial machine learning models like support vector machines and random forests showed potential for seizure detection through automated methods, but their dependence on hand-crafted EEG features restricted scalability and generalizability across patients. Subsequent deep learning methods dealt with some of these issues by directly extracting discriminative patterns from raw EEG signals, with substantial improvement in accuracy and decreasing reliance on manual feature engineering. Epileptic seizure detection has been comprehensively examined, with various approaches taking advantage of EEG, MRI, ECG, and other multimodal signals. Although most of them have made impressive breakthroughs, they also demonstrate a number of limitations that limit their generalizability, explainability, and clinical deployment.

## 2.1. Recent research has explored a wide range of ML and DL techniques, often focusing on single modalities like EEG

Recent advances in seizure detection have leveraged a range of machine learning (ML) and deep learning (DL) techniques, primarily focusing on EEG signals. For instance, Ahmad et al. (2024) developed the AMV-DFL framework, which combines frequency-domain features
via FFT with time-domain features to create multi-view deep representations using 1D CNNs. Classification is performed with a multi-view forest MV-F), while SHAP-based explainability highlights key EEG biomarkers. Although AMV-DFL achieved high accuracy, it remains limited to single-modality EEG data and centralized training. Ibrahim et al. (2022) explored patient-specific and general EEG classification models, employing CNNs with residual blocks and Phase Space Reconstruction PSR) to preserve time-domain information. Their approach demonstrated superior performance on the CHB-MIT dataset but lacks generalizability across multi-institutional datasets or additional modalities. Similarly, Yang et al. (2022) introduced a hybrid EEG-ECG framework trained on the Temple University Hospital dataset, achieving notable improvements in AUC-ROC. While effective, the model's applicability is constrained in scenarios where either modality is unavailable. Other studies have sought to improve time-series EEG classification without transforming signals into images. Kode et al. (2024) directly processed raw EEG data using optimized ML classifiers (XGBoost, TabNet, Random Forest) and a 1D-CNN, achieving 99% accuracy. Wu et al. (2024) proposed an adaptive multibit local differential ternary pattern (MLDTP) with the Archimedes Optimization Algorithm (AOA) for wearable multimodal data, attaining 96.81% accuracy. While these approaches demonstrate promising performance, they often require careful parameter tuning and do not address multimodal fusion challenges.

## 2.2. To address multimodal detection

To incorporate additional modalities, Sunkara and Reeja (2024) developed Tri-SeizureDualNet, integrating EEG and fMRI signals through a Triple Stream Skipped Feature Extraction Module and a Dual Parallel Attention Transformer (DPAT). This method improves feature engineering and detection accuracy, achieving 99.67%, but still depends heavily on manually curated features and lacks privacy-preserving capabilities. Ilias et al. (2023) eliminated manual feature extraction by combining STFT-based image processing with CNNs like EfficientNet-B7, while Kumbam and Mary (2023) leveraged cross-modal attention to enrich EEG features, reducing false positives and improving accuracy to 98%. These works illustrate the potential of multimodal and attention-based approaches but do not address missing modality scenarios or federated learning for distributed datasets. In other directions, Lin et al. (2024) proposed vEpiNet, combining video and EEG data for automatic interictal epileptiform discharge detection, achieving AUROC of 0.9902 and improved precision. (Lih et al., 2023) developed EpilepsyNet, a transformer-based model analyzing 5-second EEG epochs via Pearson Correlation Coefficients, yielding 85% accuracy and 82% sensitivity. Both models show promise for real-world applications, but computational complexity and lack of multimodal fusion for robust performance remain limitations. Critical Analysis: While these studies advance seizure detection in various ways, common limitations persist: most rely on centralized, single-modality datasets, are sensitive to missing modalities, and often require high computational resources. Few approaches integrate EEG and MRI data in a privacy-preserving, federated setting, leaving a significant gap for scalable, multimodal, and real-time seizure detection systems.

Rasheed et al. (2024)a presents a novel method for classifying primary brain tumours, such as gliomas, meningiomas, pituitary, and no-tumor instances, by combining CNNs with a hybrid attention mechanism. By cutting down on feature extraction procedures, the suggested approach increased the classification efficiency of brain tumours and produced a more efficient diagnostic procedure. The findings confirm the recommended model's dependability and usefulness in medical diagnostics by demonstrating its remarkable capacity for generalization. (Rasheed et al. (2024)b combined the resilience of ensemble classifiers like K-nearest neighbour, Random Forest, and Logistic Regression with the potent feature extraction capabilities of VGG19 in an effort to increase classification accuracy. The Br35H dataset, which consists of 3000 pictures divided into tumor-present and

tumor-absent cases, was used in the proposed method. A 5-fold stratified cross-validation technique was used to evaluate the suggested framework, with an accuracy mean of 98.27%. Mazhar, et al. (2022) diagnosed individuals are difficult to reach at an early stage, the death rate may be extremely high. Expert systems allow us to automatically identify illnesses in their early stages and assist us in overcoming the aforementioned challenge. Expert systems offer forward-chain techniques for patient diagnosis through the use of a fuzzy, rule-based inference engine. Tufail, et al. (2021) utilized PET and SPECT neuroimaging modalities to distinguish between AD, PD, and Normal Control (NC) classes, and implemented a 3D Convolutional Neural Network (CNN) to extract features for multiclass classification of both AD and PD in the frequency and spatial domains. Along with random weak Gaussian blurring and random zooming in/out augmentation techniques, the discrete cosine transform has been used as a frequency domain learning technique in both the frequency and spatial domains. The 3D CNN model's hyperparameters were chosen using both 5- and 10-fold cross-validation (CV) techniques. Ahmed, et al. (2024) introduced CardioGaurd, a deep learning-based authentication solution that uses steady, non-invasive, and distinct ECG readings as biometric markers. The suggested approach extracts rich properties from the ECG signal and classifies it as real or fake using a hybrid model based on convolution and long short-term memory. Through the analysis of ECG patterns that may reveal early indicators of cardiovascular issues, CardioGaurd not only provides secure access but also functions as a predictive tool. In addition to improving patient security, this dual capability aids in early diagnosis and AI-driven illness prevention.

Despite the notable advancements summarized in Table 1, several key gaps remain in existing seizure detection approaches. First, many methods rely predominantly on **single-modality EEG data** (e.g., Ahmad et al., Ibrahim et al., Shu et al.), limiting the ability to capture complementary structural or functional information available from MRI or fMRI scans. Second, most models employ **centralized training**, which raises privacy concerns and reduces scalability for multi-institutional deployment. Third, while some approaches incorporate multimodal data or attention mechanisms (e.g., Sunkara and Reeja, Reddy & Amutha), they still depend on **manual or semi-automatic feature engineering**, potentially overlooking subtle seizure patterns that hybrid deep learning architectures could capture. Fourth, **handling of missing modalities** is largely unexplored, which restricts real-world applicability in clinical or wearable settings. Fifth, several frameworks (e.g., vEpiNet, EpilepsyNet) are computationally intensive, requiring extensive preprocessing and limiting **real-time or edge deployment**. Finally, many models exhibit **limited generalizability**, as they are validated on single datasets without cross-institutional testing.

Although significant progress has been made in seizure detection through EEG, MRI, and multimodal integration, existing approaches exhibit several limitations. First, many studies rely predominantly on **single-modality EEG data**, limiting their ability to capture complementary structural or functional information available in MRI or fMRI scans. Second, the majority of methods are **centrally trained**, which poses challenges for **data privacy, scalability, and cross-institutional collaboration**, especially in healthcare environments. Third, approaches that rely on **manual or semi-automatic feature extraction**—such as FFT-based or STFT-based pipelines—may fail to capture complex seizure patterns and are sensitive to noise and artifacts. Fourth, **handling of missing modalities** remains largely unexplored, which restricts deployment in real-world scenarios where EEG or MRI may be unavailable. Additionally, several models require **high computational resources** and extensive preprocessing, hindering real-time application in clinical or edge settings. Finally, many existing systems demonstrate **limited generalizability**, often being evaluated on single datasets without cross-domain testing.

These gaps motivate the development of **MultiEpilepsyNet**, which addresses these limitations by integrating **multimodal EEG-MRI data**, adopting a **federated learning framework** for privacy-preserving and
<table><caption>**Table 1**
Comparison of the existing techniques based on seizure detection.</caption><thead><tr><td>Authors, Years</td><td>Techniques</td><td>Databases</td><td>Significances</td><td>Limitations</td><td>Outcomes</td></tr></thead><tbody><tr><td>Ahmad et al., (2024)</td><td>Advanced Multi-View Deep Feature Learning (AMV-DFL), FFT, 1D-CNN, SHAP-XAI</td><td>Public EEG signal database</td><td>Multi-view deep features improve ES detection, interpretable ML model</td><td>Potential generalizability concerns</td><td>Accuracy: 97.40 %, Precision: 97.36 %</td></tr><tr><td>Ibrahim et al., (2022)</td><td>CNN-based models (residual blocks, spectrogram-based, PSR with CNN)</td><td>CHB-MIT</td><td>3-class classification (normal, pre-ictal, ictal), PSR-based CNN outperforms others</td><td>No multimodal integration, patient-specific limitations</td><td>Accuracy: 97.88 %, Sensitivity: 97.98 %</td></tr><tr><td>Yang et al., (2022)</td><td>Multimodal AI (EEG + ECG), deep learning</td><td>TUH, EPILEPSIAE, RPAH</td><td>First AI system using EEG + ECG for seizure annotation</td><td>Requires multimodal data, increased complexity</td><td>Accuracy: 94.2 %</td></tr><tr><td>Kode et al., (2024)</td><td>1D-CNN, XGBoost, TabNet, RF</td><td>UCI Epileptic Seizure Recognition dataset</td><td>Evaluates multiple classifiers on time-series EEG</td><td>Limited to single dataset, lacks multimodal approach</td><td>Accuracy: 98 %, F1-score: 97 %</td></tr><tr><td>Wu et al., (2024)</td><td>Adaptive multibit local differential ternary pattern (MLDTP), Archimedes optimization</td><td>Biovital P1 (wearable device), data from two hospitals</td><td>Portable device-based seizure detection, multimodal signal fusion</td><td>Limited patient dataset, lack of real-time testing</td><td>Accuracy: 96.81 %, Precision: 98.55 %, Sensitivity: 95.24 %, F1-score: 96.87 %</td></tr><tr><td>Sunkara and Reeja, (2024)</td><td>Tri-SeizureDualNet (Triple stream skipped feature extraction + Dual Parallel Attention Transformer)</td><td>CHB-MIT (EEG), UW Madison (fMRI)</td><td>Novel multimodal EEG-fMRI method, high feature extraction accuracy</td><td>High model complexity, requires both EEG & fMRI</td><td>Accuracy: 99.67 %, AUC: 0.989</td></tr><tr><td>Ilias et al., (2023)</td><td>CNN, STFT, pretrained models (AlexNet, DenseNet201, EfficientNet, ResNet18), multimodal DNN</td><td>University of Bonn EEG dataset</td><td>Bypasses feature extraction, multimodal gated unit</td><td>Pretrained models introduce bias</td><td>Accuracy: 97 %</td></tr><tr><td>Reddy and Amutha</td><td>Cross-modal attention-based feature learning (multiple EEG leads)</td><td>University of Bonn EEG dataset</td><td>Cross-correlation learning improves accuracy, reduces false positives</td><td>No multimodal integration</td><td>Accuracy: 98 %</td></tr><tr><td>Lin et al., (2024)</td><td>vEpiNet (video-EEG fusion), EfficientNetV2</td><td>Video-EEG dataset (484 patients)</td><td>First video-EEG fusion model for interictal epileptiform discharge detection</td><td>High computational cost</td><td>AUROC: 0.9902</td></tr><tr><td>Shu et al.</td><td>EpilepsyNet (Transformer-based EEG analysis), PCC feature extraction</td><td>database of 121 participants</td><td>Novel transformer model with Pearson Correlation Coefficient (PCC) feature mapping</td><td>Limited dataset information, no multimodal integration</td><td>Accuracy: 85 %, Sensitivity: 82 %, Specificity: 87 %</td></tr></tbody></table>

scalable training, employing a **hybrid deep learning architecture** for robust feature extraction and detection, and incorporating mechanisms for **modality completion** and efficient deployment. To strengthen this section and set up the novelty of **MultiEpilepsyNet**, you should explicitly identify gaps in each study or group of studies, such as:

* **Single-modality dependence:** Many prior works (Ahmad et al., Ibrahim et al., Shu et al.) focus solely on EEG or only combine EEG with limited other modalities. This limits robustness in multimodal scenarios.

* **Centralized training:** Most methods rely on centralized datasets, creating privacy and scalability issues for multi-institutional deployment.

* **Feature engineering constraints:** Approaches like AMV-DFL, Tri-SeizureDualNet, and Reddy & Amutha use manual or hybrid feature extraction. They may miss subtle patterns that deep multimodal representations can capture.

* **Limited handling of missing data:** Few prior methods address missing EEG or MRI modalities in real-world scenarios.

* **Computational or deployment constraints:** Some methods (e.g., vEpiNet, EpilepsyNet) require extensive preprocessing or complex models that are not feasible for real-time clinical or edge deployment.

* **Generalizability issues:** Several models are trained and validated on single datasets or lack cross-dataset testing, reducing their practical reliability.

These persistent gaps motivate the development of **Multi-EpilepsyNet**, which addresses:

* **Multimodal integration** of EEG and MRI for complementary temporal and spatial feature representation,

* **Federated learning** for privacy-preserving and scalable collaborative training,

* **Hybrid deep learning architectures** for robust feature extraction and classification,

* **Modality completion mechanisms** to handle missing or noisy inputs, and

* **Efficient deployment** suitable for real-time clinical and edge applications.

By explicitly targeting these limitations, MultiEpilepsyNet aims to provide a **robust, scalable, and privacy-preserving framework** for next-generation seizure detection and management.

## 2.3. Discussion of Limitations and How This Work Addresses Them

From Table 1, several **common limitations** of existing approaches emerge:

1. **Single-Modality Dependence:** Many prior works rely exclusively on EEG (Ahmad, Ibrahim, Shu, etc.), which limits the ability to capture complementary structural information available in MRI. MultiEpilepsyNet integrates both EEG and MRI features to overcome this limitation.

2. **Centralized Training:** Most approaches use centralized datasets, raising privacy concerns and limiting cross-institutional applicability. Our SeizureFed-Net enables **federated learning**, preserving privacy while allowing collaborative learning.

3. **Limited Generalizability:** Several models (Ahmad, Ilias, Reddy) are validated on single datasets, risking poor performance on unseen populations. MultiEpilepsyNet is tested on **two heterogeneous datasets**, improving robustness and generalization.

4. **Manual or Semi-Automatic Feature Extraction:** Methods like AMV-DFL or Tri-SeizureDualNet require carefully engineered features, which may miss subtle patterns. Our hybrid deep learning model, SeizureShieldNet, learns **discriminative features automatically** from both EEG and MRI.
5. **Handling of Missing Modalities:** Many multimodal approaches fail when one modality is unavailable. MultiEpilepsyNet incorporates a **modality completion module** to handle missing EEG or MRI data.

6. **High Computational Cost:** Video-EEG fusion or transformer models are computationally intensive. MultiEpilepsyNet optimizes computation via feature selection (JWHO) and efficient hybrid architectures suitable for near real-time deployment.

### 3. Multi-modal federated learning systems via SeizureFed-Net

To effectively leverage multi-modal data in federated learning systems, SeizureFed-Net is proposed, offering robustness against missing modalities during training. As illustrated in Fig. 1, SeizureFed-Net comprises four essential modules to facilitate efficient multimodal (modality-level feature integration and cross-modal learning) federated learning: a Modality Completion Module, a Multimodal Joint Learning Module, a Knowledge Transfer Module based on Contrastive Training, and a CKA-based Aggregation Mechanism.

To effectively leverage multi-modal data in federated learning systems, SeizureFed-Net is proposed, offering robustness against missing modalities during training. As illustrated in Fig. 1, the architecture is designed around four core modules:

1. Modality Completion Module – Handles cases where one modality (EEG or MRI) is missing by generating cross-modal representations, ensuring each client contributes complete information.

2. Multimodal Joint Learning Module – Extracts and fuses discriminative features from both EEG and MRI, enabling richer representations for seizure prediction.

3. Knowledge Transfer Module (Contrastive Training) – Encourages consistency and knowledge sharing between modalities and across different client datasets, improving generalization.

4. CKA-Based Aggregation Mechanism – At the server side, representations from clients are aggregated using Centered Kernel Alignment (CKA), which captures feature similarity beyond raw parameter averaging, ensuring more effective global updates.

This modular design allows SeizureFed-Net to generalize across diverse patient populations, preserve privacy, and maintain robustness in real-world clinical environments where modality availability and data quality vary.

The proposed system integrates four major components—EpiSkullNet++ for MRI preprocessing, JWHO for feature selection, SeizureFed-Net for multimodal federated learning, and SeizureShieldNet for real-time seizure detection and mitigation. The interaction of these modules ensures a robust, scalable, and privacy-preserving framework for epilepsy diagnosis and monitoring. Fig. 1 illustrates the overall workflow. Fig. 2 presents the Overall architecture of the suggested local training.

#### Data Preprocessing and Input Representation

* **EEG Data:** Raw EEG signals are denoised using wavelet-based filtering and segmented into non-overlapping windows. Time-frequency representations are generated using Short-Time Fourier Transform (STFT) and Continuous Wavelet Transform (CWT).

* **MRI Data:** Input MRI scans undergo bias field correction (Fig. 3) to remove intensity inhomogeneities. The corrected images are then passed through EpiSkullNet+, a modified 3D UNet++ that enhances skull-stripping and tissue segmentation, thereby ensuring more accurate extraction of brain regions relevant to seizure analysis.

#### Feature Extraction and Selection

* **EEG Feature Extraction:** Temporal, spectral, and spatial features are extracted using CNN + BiLSTM encoders to capture both short-term fluctuations and long-term dependencies in brain activity.

* **MRI Feature Extraction:** EpiSkullNet++ outputs volumetric feature maps, which are further encoded using 3D CNN layers.

* **Feature Selection with JWHO:** The Jackal-Wolf Hybrid Optimizer (JWHO) is applied to select an optimal subset of EEG and MRI features. By combining exploration power of Golden Jackal Optimization and the exploitation capability of Grey Wolf Optimizer, JWHO ensures high-dimensional data is reduced while retaining discriminative features.

#### SeizureFed-Net: Multimodal Federated Learning Framework

The selected features are processed within SeizureFed-Net, which orchestrates secure and collaborative training across distributed clinical sites without centralizing patient data. The framework consists of:

##### 1. Modality Completion Module

* Handles missing data scenarios by generating surrogate features from available modalities (e.g., predicting MRI-based features when only EEG is available).

* Ensures robustness in cross-institutional training environments.

##### 2. Multimodal Joint Learning Module

* Integrates EEG and MRI features to learn complementary representations.

* Fusion is achieved via an attention-based mechanism that emphasizes modality-specific relevance during different seizure states.

##### 3. Knowledge Transfer Module (Contrastive Training)

* Enforces alignment of representations across institutions and modalities.

* Uses contrastive loss to minimize discrepancies, ensuring better generalization across patient populations.

#### CKA-Based Aggregation

* Unlike simple parameter averaging (FedAvg), this module leverages Centered Kernel Alignment (CKA) to measure similarity in latent representations.

* Global models are aggregated based on feature-level alignment, improving convergence and stability.

#### SeizureShieldNet: Real-Time Detection and Mitigation

Once the global model is trained, SeizureShieldNet is deployed for inference and real-time decision-making. It consists of two integrated components:

* **BBIDNet (Boosted BiLSTM Intrusion Detector Network)**

* Processes incoming EEG sequences in real time to detect seizure onset.

* Employs ensemble boosting with BiLSTM layers to handle temporal dependencies and reduce false alarms.

* **FD-TMS (Fuzzy-DQN Threat Mitigation System)**

* Activated when seizure activity is detected.

* Uses fuzzy logic integrated with Deep Q-Networks (DQN) to adaptively suggest mitigation strategies (e.g., alerting caregivers, adjusting stimulation parameters in neurostimulators).

#### Module Interactions and Workflow
<figure><img src="image_3.png" /><figcaption>Fig. 1. The architecture of the suggested SeizureFed-Net.</figcaption></figure>
<figure><img src="image_4.png" /><figcaption>Fig. 2. Overall architecture of the suggested local training.</figcaption></figure>

4. **Input Stage:** EEG and MRI data are acquired and preprocessed (EpiSkullNet++).

5. **Feature Engineering:** Extracted features are optimized using JWHO.

6. **Federated Learning:** Features are securely shared with SeizureFed-Net for distributed training and knowledge transfer.

7. **Global Model Deployment:** The trained global model is deployed in clinical/edge settings.

8. **Real-Time Monitoring:** Incoming EEG signals are analyzed by SeizureShieldNet for seizure detection and mitigation.

This integrated pipeline ensures that MRI-based structural biomarkers, EEG-based temporal dynamics, and federated knowledge
<figure><img src="image_5.png" /><figcaption>Fig. 3. Bias field corrected image.</figcaption></figure>

**transfer** collectively contribute to robust seizure diagnosis and prediction, while maintaining **privacy**, **adaptability**, and **scalability**.

## 3.1. Problem formulation

### 3.1.1. Multimodal SeizureFed-Net for seizure detection

In the proposed framework, a multimodal federated learning (MFL) environment is considered, where M decentralized clients (healthcare centers or edge devices) collaboratively train a unified global model $O_G$ to enable joint learning from EEG and MRI modalities for seizure classification. Each client $m$ possesses a local dataset denoted as $Z_m = \{(z_j, l_j)\}_{j=1}^{|Z_m|}$, where $z_j = \{e_j, r_j\}$ consists of an EEG signal $e_j$ and an MRI image $r_j$, and $l_j$ is the associated seizure label (normal, interictal, ictal).

If any modality is unavailable, the sample becomes either $z_j = \{e_j\}$ or $z_j = \{r_j\}$, necessitating modality-resilient learning. Each local model $\theta_m$ is optimized using a local objective $F_m(\bullet; \theta_m) : \mathbb{R}^p \to \mathbb{R}^q$, and contributes to training a global model $F_G(\bullet; \theta_G) : \mathbb{R}^q \to \mathbb{R}^q$ shared among all clients.

The federated learning goal is to minimize the global loss across all clients as Eq. (1):

$$ \min \mathcal{J}_G(F_G(\bullet; \theta_G)) = \min \sum_{m=1}^{M} \lambda_m \mathcal{J}_m(F_m(Z_m; \theta_m)) \quad (1) $$

Here, $\lambda_m$ represents the contribution weight of client $m$, and $\mathcal{J}_m$ is the local loss function used to evaluate seizure detection performance using that client's multimodal data.

This formulation is employed by SeizureFed-Net, the federated submodule within the larger MultiEpilepsyNet architecture, enabling privacy-preserving and collaborative multimodal learning from

distributed EEG and MRI datasets.

## 3.2. Local Data Preprocessing

To enable robust multimodal representation learning across federated environments in seizure detection, the SeizureFed-Net architecture incorporates a pre-trained foundation model, deployed both at the server and client sides. This model includes an EEG encoder $g_E^{(e)}(\bullet)$ and an MRI encoder $g_E^{(m)}(\bullet)$ for feature extraction, as well as corresponding decoders $g_D^{(e)}(\bullet)$ and $g_D^{(m)}(\bullet)$ for modality reconstruction and synthesis. All parameters of the foundation model are frozen and are not exchanged between clients and the server, preserving both computational efficiency and data privacy.

### 3.2.1. Modality Completion Module

To address the challenges posed by missing modalities (incomplete EEG or unavailable MRI), a modality completion module is employed. It utilizes cross-modal generation to reconstruct the missing modality using available signals. For example, if an MRI scan is unavailable, a synthetic MRI can be generated from EEG patterns using domain-trained models like a modified MedFuseNet for signal-to-image transformation, and vice versa.

### 3.2.2. Prompt-Augmented EEG-to-MRI Generation

Given a multimodal instance $s_k = \{e_k, m_k\}$, where the MRI $m_k$ is missing, the module uses a descriptive EEG prompt $\rho^{(e)}(e_k)$ to guide the generation. Rather than directly feeding raw EEG, structured prompts incorporating temporal patterns, seizure state, and electrode localization are generated using a rule-based encoder. The transformed prompt
is processed as Eq. (2):

$$ \hat{m}_k = g_D^{(m)}(g_E^{(e)}(\rho^{(e)}(e_k))) \qquad (2) $$

Where, $\hat{m}_k$ denotes the synthetic MRI approximation derived from EEG data.

### 3.2.3. Prompt-Augmented MRI-to-EEG Generation

In scenarios where EEG data is missing, MRI scans are utilized to infer synthetic EEG signals. This process integrates structured clinical queries (Which lobe shows hyperintensity) processed through a medical VQA system to extract semantic MRI details. The system then combines the extracted answers with a standard neurophysiology text template to produce synthetic EEG embeddings. The generated EEG sequence $\hat{e}_k$ is obtained as Eq. (3):

$$ \hat{e}_k = g_D^{(e)}(g_E^{(m)}(\rho^{(m)}(m_k))) \qquad (3) $$

Here, $\rho^{(m)}(m_k)$ denotes the MRI-to-EEG prompt encoding procedure.

Following the modality completion, each data sample is treated as a complete pair $s_k = \{e_k, m_k\}$, whether consisting of raw or reconstructed inputs, and is passed through the downstream modules of SeizureFed-Net for federated multimodal learning.

### 3.2.4. Modality-Specific Representations

The frozen foundation model is designed to extract high-quality, modality-specific features from each input domain. For MRI data, a pre-trained Swin Transformer is utilized as the MRI encoder $g_E^{(m)}(\bullet)$. The MRI embedding is mapped to the shared latent space via a common projection layer $h_p(\bullet)$, which is given by Eq. (4).

$$ v_k^{(m)} = h_p(g_E^{(m)}(m_k)) \in \mathbb{R}^{d_s} \qquad (4) $$

Similarly, for EEG data, a 1D convolutional encoder integrated with an attention mechanism (CBAM) is used. The EEG latent vector is computed as Eq. (5):

$$ v_k^{(e)} = h_p(g_E^{(e)}(e_k)) \in \mathbb{R}^{d_s} \qquad (5) $$

These modality-specific embeddings $v_k^{(e)}$ and $v_k^{(m)}$ form the foundational features for the subsequent joint learning and aggregation in the federated architecture of MultiEpilepsyNet.

## 3.3. Local Training

### 3.3.1. Data collection

In the local training phase of the proposed MultiEpilepsyNet framework, dual-modality medical data is acquired from two publicly available sources:

* **Database 1 (CHB-MIT scalp EEG database):** The CHB-MIT Scalp EEG Database (https://www.kaggle.com/datasets/subirbiswas19/eegdataset?select=EEG_Scaled_data.csv) consists of 664 EEG recordings from 24 pediatric subjects, with 129 files containing annotated seizure events (198 in total). Detailed seizure onset and offset times, along with demographic and montage information, are provided to support seizure detection research.

* **Database 2 (MRI dataset of people with epilepsy):** The MRI dataset (https://openneuro.org/datasets/ds004199/versions/1.0.6) comprises scans from 85 epilepsy patients with FCD type II and 85 healthy controls, including T1 and FLAIR images, manually annotated lesion masks, and clinical features. It supports the development of automated FCD detection techniques to enhance diagnostic accuracy and surgical planning.

### 3.3.2. Pre-processing

#### 3.3.2.1. EEG (CHB-MIT).
The CHB-MIT Scalp EEG Database contains EEG signals that exhibit inherent noise due to physiological as well as environmental disturbances. Maintaining the physiological integrity of epileptic signatures depends on effective preprocessing. The EEG preprocessing phase contains three essential sub-stages which include (A) noise removal and (B) baseline drift elimination and (C) signal normalization.

#### A. Noise Removal using EMD and Adaptive Gaussian Filtering

The first step of the approach decomposes EEG signal $x(t)$ through Empirical Mode Decomposition (EMD) into multiple intrinsic mode functions (IMFs) and one residual component, which is defined by Eq. (6).

$$ x(t) = \sum_{i=1}^{N} IMF_{i}(t) + r(t) \qquad (6) $$

To eliminate high-frequency noise and residual drift, IMFs are filtered based on their energy content as Eq. (7):

$$ E_i = \int |IMF_i(t)|^2 dt \qquad (7) $$

IMFs satisfying $E_i > \delta$, where $\delta$ is an adaptive energy threshold, are retained. The selected IMFs are then aggregated into a denoised signal $x_{EMB}(t)$. Subsequently, Adaptive Gaussian Filtering (AGF) is applied to smooth residual fluctuations. The Gaussian kernel is defined as Eq. (8):

$$ G(t) = \frac{1}{\sigma\sqrt{2\pi}} \exp\left(-\frac{t^2}{2\sigma^2}\right) \qquad (8) $$

The smoothing factor $\sigma$ is computed adaptively using the local variance of the signal as Eq. (9):

$$ \sigma = \alpha \cdot \sqrt{\frac{1}{ws} \sum_{i=1}^{ws} (x_i - \bar{x})^2} \qquad (9) $$

Where, $\alpha$ signifies a tunable parameter, and ws is the window size. The final smoothed signal is given by Eq. (10):

$$ x_{\text{filtered}}(t) = x_{\text{EMB}}(t) * G(t) \qquad (10) $$

#### B. Baseline Drift Removal using Wavelet Packet Denoising (WPD)

To mitigate baseline drift, Wavelet Packet Decomposition (WPD) is applied. The wavelet packet transform of $x_{\text{filtered}}(t)$ produces node coefficients $c_{j,k}$, where j and k are scale and position indices. These coefficients are denoised using soft thresholding, which is defined by Eq. (11):

$$ \tilde{c}_{j,k} = \text{sign}(c_{j,k}) \bullet \max(|c_{j,k}| - \lambda_j, 0) \qquad (11) $$

Where, $\lambda_j$ signifies the adaptive threshold, which is computed using Eq. (12):

$$ \lambda_j = \sigma_j \sqrt{2\log(\text{ws})} \qquad (12) $$

The clean EEG signal is then reconstructed as Eq. (13):

$$ \tilde{x}(t) = WPN^{-1}(\tilde{c}_{j,k}) \qquad (13) $$

#### C. Normalization using Z-score Standardization
The final stage involves Z-score normalization to scale the EEG data across channels and subjects as Eq. (14).

$$x_{norm}(t) = \frac{\tilde{x}(t) - \mu}{\Lambda} \qquad (14)$$

where the mean $\mu$ and standard deviation $\sigma$ are calculated as Eq. (15):

$$\mu = \frac{1}{T} \sum_{t=1}^{T} \tilde{x}(t), \Lambda = \sqrt{\frac{1}{T} \sum_{t=1}^{T} (\tilde{x}(t) - \mu)^2} \qquad (15)$$

After undergoing the sequential operations of EMD-based noise suppression, wavelet-based baseline correction, and z-score normalization, the EEG signal becomes noise-free, drift-free, and properly scaled. This pre-processed signal is denoted as:

$$x_{pre}^{EEG}(t)$$

This output $x_{pre}^{EEG}(t)$ forms the EEG input for the feature extraction stage, ensuring only clean and standardized data is analyzed in the subsequent phases.

### 3.3.2.2. MRI Pre-processing.
In order to extract diagnostically significant features from MRI scans of individuals with epilepsy, a three-stage preprocessing pipeline is employed. This pipeline includes bias field correction, skull stripping, and contrast enhancement. Each step plays a critical role in ensuring spatial uniformity, structural clarity, and lesion visibility, ultimately contributing to more accurate downstream analysis.

#### A. Bias Field Correction with N4ITK

Magnetic Resonance Images often suffer from intensity inhomogeneity, also referred to as bias field, due to imperfections in the acquisition hardware. This non-uniformity is corrected using the N4ITK (Nonparametric Nonuniform intensity Normalization) method.

Let $M_{raw}(x, y, z)$ represent the original MRI intensity at voxel coordinate $(x, y, z)$. The observed intensity can be modeled as Eq. (16):

$$M_{raw}(x, y, z) = M_{true}(x, y, z) \bullet B(x, y, z) + \epsilon(x, y, z) \qquad (16)$$

Here, $M_{true}$ denotes the true intensity without bias, $B(x, y, z)$ represents the smooth bias field to be estimated and removed, and $\epsilon(x, y, z)$ represents noise.

N4ITK iteratively estimates $B(x, y, z)$ using B-spline fitting and entropy minimization over tissue classes, and corrects the image as Eq. (17). The outcomes of this technique is depicted in Fig. 3.

$$M_{corr}(x, y, z) = \frac{M_{raw}(x, y, z)}{B(x, y, z)} \qquad (17)$$

#### B. Segmentation via Novel Modified 3D UNet++ (EpiSkullNet++)

EpiSkullNet++ is a customized 3D brain segmentation framework tailored for skull stripping in epilepsy-related MRI analysis. This architecture is built upon a robust encoder-decoder backbone that systematically processes volumetric data while preserving spatial and contextual integrity. The encoder consists of progressive stages—Encoder12, Encoder3, Encoder4, and Encoder5—each designed to extract hierarchical features using a combination of Patch Merging3D modules and stacked Swin Block3D and Residual Deformable Convolution Blocks. These components collectively capture both long-range dependencies and local structural variations critical in pathological brain imaging.

On the decoder side, Decoder4, Decoder3, and Decoder12 incorporate Patch Expanding3D modules, which restore spatial resolution while preserving the learned feature semantics. The decoder stages also utilize

repeated Swin Block3D and Residual Deformable Convolution Blocks to refine high-dimensional features and improve boundary precision during segmentation. The entire network is interlaced with skip connections that ensure feature continuity between encoding and decoding paths.

By integrating memory-efficient self-attention, multi-scale feature encoding, and adaptive deformable convolutions, EpiSkullNet++ achieves superior segmentation accuracy and computational efficiency, making it highly suitable for skull stripping in epileptic MRI analysis pipelines.

#### 3.3.2.3. Memory-Efficient Self-Attention.
In standard multi-head self-attention mechanisms, memory consumption poses a significant limitation, particularly in 3D Transformer models like Swin-based architectures. Traditional implementations require storing the complete attention map $\beta_{ij}^{(h)}$, which leads to a quadratic memory complexity of $\mathcal{O}(T_c^2 \cdot A_H)$, where $T_c$ is the token count, and $A_H$ is the number of attention heads. This issue is further magnified in 3D contexts, where each volume is partitioned into W windows, increasing the memory complexity to $\mathcal{O}(T_c^2 \cdot A_H \cdot W)$.

To address this challenge in EpiSkullNet++, a memory-efficient self-attention mechanism is integrated, enabling scalable 3D segmentation without compromising spatial awareness or performance. Let $T_c$ denote the number of tokens (voxel patches) in a window, and $A_H$ the number of attention heads. The self-attention operation for the g-th head can be defined as Eq. (18):

$$\psi_i^{(g)} = \frac{\sum_{j=1}^{T_c} \exp(\epsilon_{ij}^{(g)}) \cdot v_j^{(g)}}{\sum_{j=1}^{T_c} \exp(\epsilon_{ij}^{(g)})}, \quad \text{for} i = 1, 2, \dots, T_c \qquad (18)$$

Where,

$$\epsilon_{ij}^{(g)} = \frac{(q_j^{(g)})^T k_j^{(g)}}{\sqrt{d_h}}$$

In Eq. (18), $\epsilon_{ij}^{(g)}$ denotes the scaled dot-product similarity, $q_j^{(g)}, k_j^{(g)},$ and $v_j^{(g)}$ presents the query, key, and value vectors for token i and j in head g, and $d_h$ represents the dimension of each head.

#### 3.3.2.3.1. Efficiency Enhancement.
Instead of storing all attention weights $\beta_{ij}^{(h)} = \frac{\exp(\epsilon_{ij}^{(g)})}{\sum_{k=1}^{r_c} \exp(\epsilon_{ik}^{(g)})}$, which incurs high memory cost, the computation is reformulated:

* The numerator and denominator of the attention output $\psi_i^{(g)}$ are computed simultaneously and on-the-fly.

* This avoids constructing and storing the full $\beta_{ij}^{(g)}$ matrix, thereby reducing memory complexity from $\mathcal{O}(T_c^2)$ to $\mathcal{O}(T_c)$ per head.

This approach enables the use of larger window sizes and deeper encoder-decoder layers in EpiSkullNet++, without incurring excessive memory cost. During backpropagation, the exponential terms $\exp(\epsilon_{ij}^{(g)})$ are recalculated as needed, but this overhead is minimal due to the memory-bound nature of attention computation.

#### 3.3.2.4. Residual Deformable Convolution Block.
In the context of brain MRI segmentation, capturing irregular anatomical variations—such as lesions, asymmetries, or cortical deformations—is critical for accurate skull stripping and disease localization. Although the Swin Transformer Block3D in EpiSkullNet++ efficiently captures global dependencies via shifted windows, it may struggle with such non-uniform morphologies common in 3D MRI scans.

To enhance the network's ability to model irregular tissue
boundaries, Residual Deformable Convolution Blocks (RDCBs) are embedded within the feature extraction pipeline. These blocks introduce spatial adaptability by allowing dynamic modulation of the convolutional receptive field, making them particularly effective in capturing complex brain structures in MRI volumes.

Let the output feature at location $\mathcal{Q}_0$ in a standard convolution over a regular grid $\mathbb{R}$ be computed as Eq. (19):

$$ \mathcal{S}(\mathcal{Q}_0) = \sum_{\mathcal{Q}_n \in \mathbb{R}} w_{ck}(\mathcal{Q}_n) \cdot f_v(\mathcal{Q}_0 + \mathcal{Q}_n) \quad (19) $$

Here, $f_v$ represents the input 3D MRI feature volume, and $w_{ck}$ denotes the convolutional kernel weights. This fixed-grid formulation limits flexibility when dealing with anatomical variability across subjects. Deformable convolution enhances this operation by introducing a learnable offset $\Delta\mathcal{Q}_n$ to each sampling point as Eq. (20).

$$ \mathcal{S}(\mathcal{Q}_0) = \sum_{\mathcal{Q}_n \in \mathbb{R}} w_{ck}(\mathcal{Q}_n) \cdot f_v(\mathcal{Q}_0 + \mathcal{Q}_n + \Delta\mathcal{Q}_n) \quad (20) $$

This allows the model to shift its attention spatially, adjusting to tissue deformations and boundary irregularities typically present in 3D MRI scans of epileptic patients. The offsets $\Delta\mathcal{Q}_n$ are learned via backpropagation and are optimized alongside the primary convolution weights, using trilinear interpolation to handle sub-voxel positions.

In EpiSkullNet$^{++}$, the feature maps from the Swin Block3D are first reshaped from 2D token sequences ($H \times W, C$) 3D tensors ($H, W, C$), matching the spatial domain of the original MRI slices. These are then passed through two consecutive $3 \times 3 \times 3$ deformable convolution layers. The resulting features are combined with the input via residual learning to stabilize training and preserve contextual information, which is represented by Eq. (21).

$$ \mathbb{F}_{\text{rdcb}} = \mathcal{F}_{\text{def}}(f_{\text{VMRI}}) + f_{\text{VMRI}} \quad (21) $$

Here, $f_{\text{VMRI}}$ represents the input feature volume derived from pre-processed 3D MRI scans, $\mathcal{F}_{\text{def}}(\cdot)$ denotes the composite deformable convolutional transformation, and $\mathbb{F}_{\text{rdcb}}$ signifies the RDCB-enhanced output, preserving both local and adaptive spatial features.

This module enhances the sensitivity of EpiSkullNet$^{++}$ to subtle tissue gradients, sulcal patterns, and lesion boundaries, particularly in bias-corrected and skull-stripped MR images, serving as a crucial bridge between global attention and precise boundary localization.

### 3.3.2.5. Swin Block3D
The core component of the transformer backbone in EpiSkullNet$^{++}$ is the Swin Block3D, redesigned to incorporate Memory-Efficient Self-Attention (MESA) for handling high-resolution 3D MRI volumes with lower memory overhead. Swin Block3D captures localized spatial dependencies within 3D windows, facilitating precise contextual feature learning from skull-stripped neuroimaging data.

Each Swin Block3D in EpiSkullNet$^{++}$ consists of two sequential sub-units:

* The first sub-unit contains a Layer Normalization (NL) layer, a Memory-Efficient Self-Attention (MESA-3D) module, a second NL layer, and a lightweight EfficientNet block.

* The second sub-unit retains the same architecture as the first and serves to further refine the spatial and contextual interactions across the 3D voxel space.

The forward pass of the Swin Block3D is mathematically formulated by the following equations from Eq. (22) to Eq. (25):

$$ X^{t1} = NL_1(X^{L-1}) + \text{MESA3D}(NL_1(X^{L-1})) \quad (22) $$

$$ X^t = NL_2(X^t) + \text{EfficientNet}(NL_2(X^t)) \quad (23) $$

$$ X^{t2} = NL_3(X^t) + \text{MESA3D}(NL_3(X^t)) \quad (24) $$

$$ X^L = NL_4(X^{t2}) + \text{EfficientNet}(NL_4(X^{t2})) \quad (25) $$

Here, $X^{t1}$ and $X^{t2}$ are intermediate features that preserve local voxel-level representations, while $X^L$ denotes the final output of the $L^{th}$ Swin Block3D layer.

For attention computations, the volumetric feature maps are partitioned into 3D voxel patches of shape $[h, w, d]$, which are flattened into one-dimensional tokens of length $h \times w \times d$. These tokens serve as inputs to the MESA-3D module, which calculates attention scores and weighted outputs in a memory-efficient manner, without explicitly forming the full attention matrix.

### 3.3.2.6. Patch Merging3D and Patch Expanding3D
In the EpiSkullNet$^{++}$ architecture, Patch Merging3D and Patch Expanding3D modules serve as key components for dynamically adjusting the spatial resolution and channel depth of 3D MRI features during encoder-decoder transitions. These modules enable effective downsampling and upsampling within the skull-stripped volumetric domain, ensuring multi-scale representation learning for seizure-related patterns.

#### 3.3.2.6.1. Patch Merging3D
The Patch Merging3D module performs spatial downsampling while increasing the feature dimensionality. It aggregates voxel-wise features to reduce resolution across the $H, W$, and $D$ axes, simultaneously expanding the channel depth to preserve information. This hierarchical representation allows the network to encode increasingly abstract features from 3D MRI inputs at deeper encoder stages. The merging is implemented by:

* Rearranging adjacent voxel patches into grouped feature maps,

* Passing them through a Residual Deformable Convolution Block (RDCB) to adaptively capture local structural deformations and subtle anatomical variations,

* Applying Layer Normalization (LN) to stabilize learning, especially under limited batch sizes.

#### 3.3.2.6.2. Patch Expanding3D
Conversely, the Patch Expanding3D module gradually restores the spatial resolution of the MRI feature maps while reducing their channel count. This is crucial during decoding when precise localization of epileptic foci must be reconstructed from abstract representations. Patch Expanding3D includes: RDCB-Upsample3D

* A RDCB-Upsample3D layer to upsample features volumetrically,

* An RDCB to refine the upsampled output by enhancing irregular shape information during reconstruction,

* Followed by Layer Normalization (LN) to ensure training stability.

Since 3D MRI data consume significant GPU memory, EpiSkullNet$^{++}$ operates with a small batch size to avoid memory overflow. In such cases, Batch Normalization becomes ineffective due to unstable batch statistics. Instead, Layer Normalization is employed throughout these modules, as it normalizes across channels within each sample, ensuring consistent behavior even under low batch conditions. In Fig. 4 the segmentation process outcomes are provided.

### 3.3.2.7. Encoder and Decoder
Each Encoder in EpiSkullNet$^{++}$ includes a Patch Merging3D module for downsampling, a Residual Deformable Convolution Block (RDCB) for short-range feature learning, and a Swin Block3D with Memory-Efficient Self-Attention (MESA) and EfficientNet for long-range context modeling. Outputs from RDCB and Swin Block3D are fused through addition.

Each Decoder mirrors this structure but focuses on upsampling using a Patch Expanding3D module. It accepts two inputs—one from the encoder (skip connection) and one from the previous decoder stage—to maintain residual connections and preserve spatial information during reconstruction of the 3D MRI volumes. After skull stripping via EpiSkullNet$^{++}$, obtained a clean brain-only 3D volume $M_{skull}$, free of sur-
<figure><img src="image_6.png" /><figcaption>Fig. 4. Segmentation process outcomes.</figcaption></figure>

rounding non-brain tissue. Fig. 5 presents the graphical form of the proposed EpiSkullNet+ +.

### C. Contrast Enhancement with CLAHE

To improve visibility of epileptogenic lesions or structural abnormalities, Contrast Limited Adaptive Histogram Equalization (CLAHE) is applied. CLAHE enhances local contrast while limiting noise amplification. Given a 2D axial slice $M_i^{slice}$ from $M_{skull}$, CLAHE transformation is defined as Eq. (26):

$$M_i^{CLAHE} = CLAHE(M_i^{slice}, C_{clip}, \mathcal{R}_{grid}) \quad (26)$$

Here, $C_{clip}$ signifies the contrast clipping limit, $\mathcal{R}_{grid}$ represents the grid size for contextual histograms, and $M_i^{CLAHE}$ presents the enhanced slice for index i, and the final volume is reconstructed from all enhanced slices.

After completing all three preprocessing stages, the final enhanced and standardized MRI volume is denoted as Eq. (27):

$$M_{prefinal} = \{M_i^{CLAHE}\}_{i=1}^{N_z} \quad (27)$$

Where, $N_z$ is the total number of axial slices. This output $M_{prefinal}$ is used as the input to the next stage of the framework. The output image of the CLAHE technique is given in Fig. 6.

### 3.3.3. Feature Extraction

The feature extraction phase in MultiEpilepsyNet leverages a dual-channel network profiling approach to transform pre-processed EEG and MRI data—denoted as $x_{pre}^{EEG}(t)$ and $M_{prefinal}$, respectively—into comprehensive feature sets for seizure detection. This phase is critical for capturing temporal, spectral, complexity, and spatial characteristics relevant to classifying seizure states (normal, interictal, ictal) within the federated learning framework of SeizureFed-Net. For EEG, features are extracted sequentially, with each technique building on the prior output to refine the representation. For MRI, texture features are computed first, followed by deep embeddings that integrate the texture information. The resulting features are designed to be robust, modality-specific, and compatible with the shared latent space for multimodal joint learning.

#### 3.3.3.1. EEG Feature Extraction.
EEG feature extraction processes the preprocessed signal $x_{pre}^{EEG}(t)$, a noise-free, drift-corrected, and Z-score normalized time series from the CHB-MIT dataset, across multiple channels. The techniques—Wavelet-based Time-Frequency Features, Hjorth Parameters, Fractal Dimension, Spectral Entropy, and Sample Entropy—are applied in a pipeline where the output of one method serves as input or context for the next, ensuring a layered representation of seizure-related dynamics.

#### 3.3.3.1.1. Wavelet-based Time-Frequency Features.
Wavelet transforms decompose $x_{pre}^{EEG}(t)$ into time-frequency components, capturing non-stationary seizure patterns across frequency bands (delta: 0.5–4 Hz, theta: 4–8 Hz, alpha: 8–13 Hz, beta: 13–30 Hz, gamma: >30 Hz). This initial step provides a foundational representation for subsequent analyses. The Discrete Wavelet Transform (DWT) with a Daubechies wavelet (db4) is applied to $x_{pre}^{EEG}(t)$, which is given by Eq. (28).

$$W_{j,k} = \int_{-\infty}^{\infty} x_{pre}^{EEG}(t) \cdot 2^{-(j-k)/2} \Pi(2^{-(j-k)/2} t - k) dt \quad (28)$$

Where, $\Pi(t)$ signifies the mother wavelet, $j$ presents the scale, and $k$ denotes the translation. Compute energy per band as Eq. (29).

$$E_j = \sum_k |W_{j,k}|^2 \quad (29)$$

The wavelet coefficients $W_{j,k}$ and reconstructed band-specific signals $x_j(t) = DWT^{-1}(W_{j,k})$ for each band are passed to the next technique as refined inputs.

#### 3.3.3.1.2. Hjorth Parameters.
Hjorth Parameters quantify the signal's statistical properties—Activity (power), Mobility (frequency), and Complexity (variability)—using the band-specific signals $x_j(t)$ from wavelet decomposition. This step refines the temporal characteristics for each frequency band.

**✓ Activity:** Variance of the signal, which is given by Eq. (30).

$$Activity_j = \text{var}(x_j(t)) = \frac{1}{N} \sum_{t=1}^{N} (x_j(t) - \bar{x}_j)^2 \quad (30)$$
<figure><img src="image_7.png" /><figcaption>Fig. 5. The structure of the proposed EpiSkullNet+ +.</figcaption></figure>

✓ **Mobility:** Ratio of the signal's derivative variance to its variance as Eq. (31).

$$ Mobility_{j} = \sqrt{\frac{\mathrm{var}\left(\frac{d}{dt}x_{j}(t)\right)}{\mathrm{var}(x_{j}(t))}} \qquad (31) $$

✓ **Complexity:** Ratio of the derivative's mobility to the signal's mobility as Eq. (32).

$$ Complexity_{j} = \frac{Mobility\left(\frac{d}{dt}x_{j}(t)\right)}{Mobility(x_{j}(t))} \qquad (32) $$

Here, $\frac{d}{dt}x_j(t)$ is approximated via finite differences. The band-specific signals $x_j(t)$ and Hjorth-derived statistics are used as input for complexity measures like Fractal Dimension.

### 3.3.3.1.3. Fractal Dimension
Fractal Dimension (FD) measures the self-similarity and irregularity of $x_j(t)$ from each frequency band, building on the wavelet and Hjorth outputs to assess seizure-related

signal complexity. Higuchi's algorithm is applied to $x_j(t)$.

✓ Construct $\mathcal{K}$-spaced subseries as Eq. (33):

$$ X_{m_{j}}^{\mathcal{K}} = \{x_{j}(m), x_{j}(m+\mathcal{K}), x_{j}(m+2\mathcal{K}), \dots, x_{j}(m+\lfloor N-m/\mathcal{K} \rfloor \rfloor\} \qquad (33) $$

✓ Compute length as Eq. (34):

$$ L_{m_{j}}(\mathcal{K}) = \frac{\sum_{i=1}^{\lfloor N-m/\mathcal{K} \rfloor} |x_{j}(m + i\mathcal{K}) - x_{j}(m + (i-1)\mathcal{K})| \cdot (N-1)}{\lfloor N-m/\mathcal{K} \rfloor \cdot \mathcal{K}} \qquad (34) $$

✓ Average length is given by Eq. (35):

$$ L_{j}(\mathcal{K}) = \frac{\sum_{m=1}^{\mathcal{K}} L_{m_{j}}(\mathcal{K})}{\mathcal{K}} \qquad (35) $$

✓ FD is the slope of $log(L_{j}(\mathcal{K}))$ vs. $log(\frac{1}{\mathcal{K}})$.
<figure><img src="image_8.png" /><figcaption>Fig. 6. Output image of the CLAHE.</figcaption></figure>

The complexity profile from FD informs entropy measures, with $x_j(t)$ reused as input.

### 3.3.3.1.4. Spectral Entropy.
Spectral Entropy quantifies the randomness of the power spectrum of $x_j(t)$ per band, using the wavelet-decomposed signals to assess frequency distribution unpredictability, a key indicator of seizure activity.

✓ Compute PSD $P_j(f)$ for $x_j(t)$ using FFT, which is defined by Eq. (36):

$$P_j(f) = \frac{1}{N} |\text{FFT}(x_j(t))|^2 \quad (36)$$

✓ Normalize as Eq. (37):

$$P_j(f) = \frac{P_j(f)}{\sum_j P_j(f)} \quad (37)$$

✓ Spectral Entropy is given by Eq. (38):

$$SE_j = - \sum_f P_j(f) \log_2 P_j(f) \quad (38)$$

The spectral profile $P_j(f)$ and $x_j(t)$ feed into Sample Entropy for temporal irregularity analysis.

### 3.3.3.1.5. Sample Entropy.
Sample Entropy (SampEn) measures the temporal irregularity of $x_j(t)$ per band, building on prior features to capture pattern predictability, crucial for distinguishing ictal from non-ictal states.

✓ Form vectors of length $m$ ($m = 2$), which is defined by Eq. (39):

$$X_{m,j}(i) = [x_j(i), x_j(i+1), \dots, x_j(i+m-1)] \quad (39)$$

✓ Count matches within tolerance $r$ ($r = 0.2 \cdot \text{std}(x_j(t))$), which is given by Eq. (40):

$$B_j^m(r) = \frac{1}{N-m} \sum_{i=1}^{N-m} B_{i,j}^m(r) \quad (40)$$

✓ Repeat for $m+1$ as Eq. (41):

$$A_j^m(r) = \frac{1}{N-m} \sum_{i=1}^{N-m} A_{i,j}^m(r) \quad (41)$$

✓ SampEn is obtained by Eq. (42):

$$\text{SampEn}_j = - \text{In} \left( \frac{A_j^m(r)}{B_j^m(r)} \right) \quad (42)$$

Final EEG feature vector is attained by concatenate all features per channel as Eq. (43).

$$\text{Fe}_{\text{EEG}} = [\text{Fe}_{\text{wavelet}}, \text{Fe}_{\text{Hjorth}}, \text{Fe}_{\text{FD}}, \text{Fe}_{\text{SE}}, \text{Fe}_{\text{SampEn}}] \quad (43)$$

This vector is passed to the EEG encoder $g_E^{(p)}(\cdot)$ for latent space projection.

### 3.3.3.2. MRI Feature Extraction.
MRI feature extraction processes the pre-processed volume $M_{\text{prefinal}}$, a set of contrast-enhanced 2D axial slices from the skull-stripped brain volume. The pipeline computes texture features first (GLCM, LBP, Haralick), which are then integrated into deep feature embeddings via ResNet50, ensuring a sequential flow where texture outputs enhance the deep learning representation.

#### 3.3.3.2.1. Texture Features: GLCM, LBP, Haralick.
Texture features capture spatial patterns in $M_{\text{CLAHE}}^p$ slices, highlighting structural abnormalities (lesions, cortical dysplasia) linked to epilepsy. GLCM and LBP are computed first, followed by Haralick features derived from GLCM.

✓ **Gray-Level Co-occurrence Matrix (GLCM):** GLCM looks at how often pixel pairs with specific intensities appear together at given distances and angles, revealing texture granularity. For an MRI slice, this might mean spotting a cluster of hyperintense pixels signaling a focal abnormality.

It's computed across $d = 1$ and angles [$0^\circ, 45^\circ, 90^\circ, 135^\circ$], building a matrix that's like a fingerprint of the slice's texture, which is given by Eq. (44).

$$P(i, j; d, \theta) = \frac{\text{Number of } (i, j)\text{ pairs}}{\text{Total pairs}} \quad (44)$$

$P_i(\theta)$ matrices per slice and angle, setting the stage for Haralick features. It's the raw material for understanding spatial structure, feeding directly into the next step.

✓ **Local Binary Patterns (LBP):** LBP simplifies texture into local patterns, comparing each pixel to its neighbors to create a binary code. It's like sketching a quick outline of the brain's surface features—fast and effective for highlighting anomalies.

Applied with 8 neighbors ($P = 8$) and radius 1 ($R = 1$), it generates a texture map that's both intuitive and computationally light, which is defined by Eq. (45).

$$LBP_{P,R}(x,y) = \sum_{p=0}^{P-1} s(g_p - g_c) \cdot 2^p \quad (45)$$

Where, $s(x) = 1$ if $x \ge 0$, else 0.

✓ **Haralick Features:** Haralick features distill GLCM into human-friendly metrics like contrast (how sharp the texture is), energy (how uniform), homogeneity (how smooth), and correlation (how consistent). They're the bridge between raw data and clinical insight

Using $P_i(\theta)$, these features are calculated and averaged across angles to ensure the texture description isn't biased by direction.

Contrast is provided by Eq. (46):

$$\sum_{i,j} |i - j|^2 P(i, j) \quad (46)$$
Energy is given by Eq. (47):

$$ \sum_{i,j} P(i,j)^2 \qquad (47) $$

Homogeneity is represented by Eq. (48):

$$ \sum_{i,j} \frac{P(i,j)}{1 + |i - j|} \qquad (48) $$

Correlation based on Eq. (49):

$$ \sum_{i,j} \frac{(i - u_i)(j - u_j)P(i,j)}{\sigma_i \sigma_j} \qquad (49) $$

These texture features join $M_i^{CLAHE}$ to enrich the deep embedding process.

### 3.3.3.2.2. Deep Feature Embeddings: ResNet50.
ResNet50 steps in as the heavy hitter, taking the texture-enhanced MRI slices and weaving them into a high-level representation. Pre-trained on vast image datasets, this 50-layer convolutional neural network is adept at spotting patterns too complex for handcrafted methods, making it perfect for identifying epileptogenic regions across the brain volume.

Each $M_i^{CLAHE}$ slice is resized to 224 × 224—ResNet50’s sweet spot—and paired with its texture features $F_{texture,i}$. To fuse them, $F_{texture,i}$ is expanded into a spatial map (repeated across a 224 × 224 grid) and stacked as an extra channel, creating an augmented input $M_i^{aug}$. This combo lets ResNet50 see both the raw image and its texture profile, amplifying its ability to detect subtle structural cues.

By blending texture with deep learning, this step captures everything from local lesion edges to global brain architecture, offering a powerful feature set for seizure classification.

The integration of texture features with ResNet50 embeddings captures both local patterns and global structural context, enhancing seizure detection accuracy.

### 3.3.4. Feature Selection

Upon extraction of comprehensive feature representations from the EEG and MRI modalities, the resulting high-dimensional feature vectors—denoted as $Fe_{EEG}$ and $Fe_{MRI}$—contain a mix of discriminative and non-informative attributes. These may lead to overfitting, increased computational burden, and reduced classification robustness. Therefore, a robust feature selection strategy is required to identify the most salient features while discarding irrelevant and redundant components.

#### 3.3.4.1. Inspiration.
In this phase, a novel hybrid feature selection algorithm, termed the Jackal-Wolf Hybrid Optimizer (JWHO), is introduced. This approach leverages the diverse search space exploration of the Jackal Optimization Algorithm (JOA) and the hierarchical leadership-driven convergence of the Grey Wolf Optimizer (GWO) to optimize feature subset selection in a multimodal context.

The input to the feature selection phase is:

$$ F = [Fe_{EEG}, Fe_{MRI}] $$

* **Fe_{EEG}:** Feature set obtained from EEG signal processing, containing time-frequency and entropy descriptors extracted from $x_{pre}^{EEG}(t)$.

* **Fe_{MRI}:** Feature set derived from MRI image, incorporating both handcrafted texture features and deep feature embeddings extracted from $M_{prefinal}$.

The goal is to derive an optimal low-dimensional representation:

$$ x_{fs}(t) = JWHO(Fe_{EEG}, Fe_{MRI}) $$

which retains only the most informative features for downstream seizure classification and prediction.

The JWHO algorithm operates through five systematic stages: Initialization, Fitness Evaluation, Exploration, Exploitation, and

Termination, ensuring convergence to a high-quality feature subset with minimal redundancy and maximal discriminative power.

#### 3.3.4.2. JWHO Stages.

##### a. Initialization

The JWHO algorithm begins by initializing a population of candidate feature subsets, drawing from JOA’s swarm-based approach to establish a diverse starting point. Each candidate solution represents a binary vector indicating whether a feature is selected (1) or discarded (0) from F. A population of N solutions is generated within the feature space bounds, which is defined by Eq. (50).

$$ \mathcal{Z}_0 = \mathcal{L} + \text{rand} \bullet (\mathcal{U} - \mathcal{L}) \qquad (50) $$

Where, $\mathcal{Z}_0$ represents the initial binary vector ($\mathcal{Z}_{u,r} \in \{0, 1\}, u = 1, ..., d, r$ is the total number of features), $\mathcal{L} = 0$, $\mathcal{U} = 1$ presents the lower and upper bounds for feature selection. rand presents the uniform random number in [0, 1]. The population matrix is expressed in Eq. (51).

$$ \mathcal{Z} = \begin{bmatrix} \mathcal{Z}_{1,1} & \mathcal{Z}_{1,2} & \cdots & \mathcal{Z}_{1,d} \\ \mathcal{Z}_{2,1} & \mathcal{Z}_{2,2} & \cdots & \mathcal{Z}_{2,d} \\ \vdots & \vdots & \ddots & \vdots \\ \mathcal{Z}_{N,1} & \mathcal{Z}_{N,2} & \cdots & \mathcal{Z}_{N,d} \end{bmatrix} \qquad (51) $$

Here, $\mathcal{Z}_{u,r}$ represents the selection state of the u-th feature for the v-th solution, N is the population size, and d = $dim(Fe_{EEG}) + dim(Fe_{MRI})$.

This step ensures a broad exploration of possible feature combinations, critical for multimodal data where EEG and MRI features have different discriminative strengths. For example, a solution might select wavelet energies from EEG and Haralick contrast from MRI, testing their joint utility.

##### b. Fitness Evaluation

Each candidate solution’s fitness is evaluated to determine its effectiveness for seizure classification, guiding the optimization process. The fitness function balances classification accuracy and feature subset size to avoid overfitting and reduce computational load. Fitness function is provided by Eq. (52).

$$ \text{Fit}(\mathcal{Z}_u) = \alpha_w \bullet \text{Accuracy}(\mathcal{Z}_u) - \beta_w \bullet \frac{\sum_{r=1}^{d'} \mathcal{Z}_{u,r}}{d} \qquad (52) $$

Here, Accuracy($\mathcal{Z}_u$) signifies the classification accuracy of a lightweight classifier (SVM) trained on the feature subset defined by $\mathcal{Z}_u$, evaluated via cross-validation on local client data. $\sum_{r=1}^{d'} \mathcal{Z}_{u,r}$ denotes the number of selected features, $\alpha_w$ and $\beta_w$ presents the weighting factors to prioritize accuracy while penalizing large subsets.

For each client m, the local dataset $\mathcal{Z}_m = \{(x_r, f_r)\}_{r=1}^{|\mathcal{Z}_m|}$ (where $x_r = \{r_r, f_r\}, f_r \in \{\text{normal, interictal, ictal}\}$) is used to compute Fit($\mathcal{Z}_u$). The best solutions are identified for leadership roles in later stages. Fitness vector $\text{Fit}_z = [\text{Fit}(z_1), \text{Fit}(z_2), ..., \text{Fit}(z_N)]$.

This step ensures that selected features are not only accurate but also lean, aligning with the federated learning goal of efficient model updates across clients. For instance, selecting a compact set of EEG entropy features and MRI texture features might outperform a larger, redundant set.

##### c. Exploration Phase (Jackal-based)

The exploration phase harnesses JOA’s dynamic search capabilities to probe diverse feature combinations, mimicking the golden
jackal's ability to track and pursue prey across varied terrains. This phase prioritizes early redundancy elimination by testing a wide range of EEG and MRI feature subsets.

Inspired by JOA's male and female jackal dynamics, two leading solutions (male $\mathcal{Z}_{\#}$, female $\mathcal{Z}_{\mathcal{F}}$) are selected based on fitness, guiding the population's updates. Update positions are defined using the Eq. (53).

$$ \mathcal{Z}_{1,\#}(\ell) = \mathcal{Z}_{\#}(\ell) - \mathcal{E} \circ \mathcal{Z}_{\#}(\ell) - \mathfrak{r}\{\circ \mathcal{Z}_{\#}(\ell)\} \quad (53) $$

$$ \mathcal{Z}_{2,\#}(\ell) = \mathcal{Z}_{\mathcal{F}}(\ell) - \mathcal{E} \circ \mathcal{Z}_{\mathcal{F}}(\ell) - \mathfrak{r}\{\circ \mathcal{Z}_{\#}(\ell)\} $$

Here, $\ell$ signifies the current iteration, $\mathcal{Z}_{\#}(\ell)$ represents the current solution (feature subset), and $\mathcal{E}$ indicates the escape energy, calculated as Eq. (54).

$$ \mathcal{E} = \mathcal{E}_1 \circ \mathcal{E}_0, \quad \mathcal{E}_0 = 2 \circ \ell - 1, \quad \mathcal{E}_1 = \mathcal{E}_1 \circ \left(1 - \frac{\ell}{\mathcal{F}}\right) \quad (54) $$

Where, $\ell \in [0, 1]$, $\mathcal{E}_1 = 1.5$, and $\mathcal{F}$ denotes the maximum iterations. $\mathfrak{r}$: Lévy flight vector is represented by Eq. (55).

$$ \mathfrak{r} = 0.05 \circ \mathcal{L} \mathcal{F}(\ell), \quad (55) $$

$$ \mathcal{L} \mathcal{F}(\ell) = 0.01 \circ \frac{\mu \circ \alpha_w}{|\ell|^{1/\beta_w}} $$

$$ \sigma = \left( \frac{\Gamma(1 + \beta_w) \circ \sin(\pi \beta_w / 2)}{\Gamma((1 + \beta_w) / 2) \circ \beta_w \circ 2^{(\beta_w - 1) / 2}} \right)^{1/\beta_w} $$

Here, $\mu, \beta \sim \text{uniform}(0, 1)$, $\beta_w = 1.5$. The new position is provided by Eq. (56).

$$ \mathcal{Z}_{\#}(\ell + 1) = \frac{\mathcal{Z}_{1,\#}(\ell) + \mathcal{Z}_{2,\#}(\ell)}{2} \quad (56) $$

Binarized to $\mathcal{Z}_{\#}(\ell+1) \in \{0, 1\}$ using a threshold (sigmoid: $\mathcal{Z}_{\#} = 1$ if $\sigma(\mathcal{Z}_{\#}) > 0.5$). Updated population $\mathcal{Z}(\ell+1)$ with diverse feature subsets.

The Lévy flight and dual-leadership model allow JWHO to explore combinations like EEG gamma energy with MRI contrast features, quickly discarding redundant pairs (correlated entropy measures). This broad search is crucial for multimodal data where EEG and MRI contributions vary across clients.

### d. Exploitation Phase (GWO-based)

Once promising feature subsets are identified, the exploitation phase employs GWO's hierarchical leadership to refine the selection, converging toward an optimal subset with high discriminative power. This phase mirrors grey wolves encircling and attacking prey, guided by the top solutions.

The top three solutions are designated as alpha ($\mathcal{Z}_a$), beta ($\mathcal{Z}_\beta$), and delta ($\mathcal{Z}_\delta$) based on fitness, directing the population's updates.

* Distance vectors, which is given by Eq. (57):

$$ \vec{\mathcal{Z}}_a = |\vec{\mathcal{C}}_1 \circ \mathcal{Z}_a(\ell) - \mathcal{Z}_a(\ell)|, \quad (57) $$

$$ \vec{\mathcal{Z}}_\beta = |\vec{\mathcal{C}}_2 \circ \mathcal{Z}_\beta(\ell) - \mathcal{Z}_\beta(\ell)|, $$

$$ \vec{\mathcal{Z}}_\delta = |\vec{\mathcal{C}}_3 \circ \mathcal{Z}_\delta(\ell) - \mathcal{Z}_\delta(\ell)| $$

Where, $\vec{\mathcal{C}}_k = 2 \circ \vec{\mathcal{F}}_1, \vec{\mathcal{F}}_1 \in [0, 1]$ presents the random vectors for stochastic weighting.

* Position updates, which is provided by Eq. (58):

$$ \vec{\mathcal{Z}}_{1,\#}(\ell) = \mathcal{Z}_a(\ell) - \vec{\mathcal{C}}_1 \circ \vec{\mathcal{Z}}_a, \quad (58) $$

$$ \vec{\mathcal{Z}}_{2,\#}(\ell) = \mathcal{Z}_\beta(\ell) - \vec{\mathcal{C}}_2 \circ \vec{\mathcal{Z}}_\beta $$

$$ \vec{\mathcal{Z}}_{3,\#}(\ell) = \mathcal{Z}_\delta(\ell) - \vec{\mathcal{C}}_3 \circ \vec{\mathcal{Z}}_\delta $$

Here, $\vec{\mathcal{C}}_k = 2\vec{\mathcal{A}} \circ \vec{\mathcal{F}}_k - \vec{\mathcal{A}}$, $\vec{\mathcal{A}}$: Linearly decreases from 2 to 0 over iterations. $\vec{\mathcal{F}}_k \in [0, 1]$.

* Final position is obtained using Eq. (59):

$$ \mathcal{Z}_{\#}(\ell + 1) = \frac{\vec{\mathcal{Z}}_{1,\#} + \vec{\mathcal{Z}}_{2,\#} + \vec{\mathcal{Z}}_{3,\#}}{3} \quad (59) $$

Refined population $\mathcal{Z}(\ell+1)$ converging toward optimal feature subsets.

GWO's leadership ensures that solutions gravitate toward feature sets like EEG sample entropy and MRI ResNet50 embeddings if they consistently yield high accuracy, fine-tuning the exploration phase's discoveries.

### e. Termination

The algorithm iterates through exploration and exploitation until a termination criterion is met, typically a maximum number of iterations $T$ or a fitness threshold. The final output is the best solution as Eq. (60):

$$ x_{fs}(t) = Z_{best} \circ F \quad (60) $$

Where $Z_{best}$ is the highest-fitness binary vector, selecting the optimal feature subset from $F$.

#### 3.3.5. Hybrid Deep Learning-Based Detection System (SeizureShieldNet)

Following the feature selection phase, where the Jackal-Wolf Hybrid Optimizer (JWHO) refines the high-dimensional feature vectors $Fe_{EEG}$ and $Fe_{MRI}$ into a compact, discriminative set $x_{fs}(t)$, the Hybrid Deep Learning-Based Detection System, dubbed SeizureShieldNet, orchestrates the final classification of seizure states (normal, interictal, ictal) within MultiEpilepsyNet. SeizureShieldNet integrates two powerful components: the Boosted BiLSTM Intrusion Detector Network (BBIDNet) and the Fuzzy-DQN Threat Mitigation System (FD-TMS). Together, they form a robust, adaptive pipeline that leverages temporal modeling, ensemble robustness, fuzzy logic, and reinforcement learning to deliver precise, reliable seizure detection. Operating within the federated learning framework of SeizureFed-Net, SeizureShieldNet processes $x_{fs}(t)$—comprising EEG features (wavelet energies, sample entropy) and MRI features (e.g., Haralick textures, ResNet50 embeddings)—to produce actionable classifications while accommodating missing modalities and ensuring privacy across distributed clients. This section elaborates on the architecture, functionality, and synergy of SeizureShieldNet, illustrating how it transforms raw features into life-changing diagnoses.

##### 3.3.5.1. Overview of SeizureShieldNet
SeizureShieldNet is a hybrid deep learning system engineered to tackle the complexities of multimodal seizure detection, where EEG signals capture fleeting electrical storms and MRI images reveal structural clues like lesions. It combines BBID-Net, which excels at modeling sequential patterns in $x_{fs}(t)$, with FD-TMS, which handles uncertainty and refines decisions through fuzzy logic and reinforcement learning. Imagine a clinician needing to spot a seizure's onset amidst noisy brain signals—SeizureShieldNet acts like a vigilant partner, sifting through data to flag critical moments with precision.

* BBIDNet uses a Bidirectional Long Short-Term Memory (BiLSTM) backbone to trace the temporal evolution of features, boosted by an
AdaBoost ensemble to handle outliers like noisy EEG spikes. Regularization techniques ensure it learns efficiently without overfitting.

* **FD-TMS** employs a fuzzy logic layer to quantify seizure severity based on clinical markers (spike rate, signal complexity, MRI lesion size), paired with a Deep Q-Network (DQN) layer that optimizes alerts based on confidence and expert feedback.

The system takes $x_{fs}(t)$ as input, producing a classification label $\hat{\gamma}_t \in \{\text{normal, interictal, ictal}\}$, and operates locally at each client $m$, contributing to the global model $\theta_G$ via federated updates. Its design ensures robustness to synthetic data from the modality completion module ($\hat{\epsilon}_k$, $\hat{m}_k$) and efficiency for real-time clinical use.

### 3.3.5.2. Components of SeizureShieldNet

#### 3.3.5.2.1. Boosted BiLSTM Intrusion Detector Network (BBIDNet).

BBIDNet is the temporal workhorse of SeizureShieldNet, designed to unravel the sequential intricacies of $x_{fs}(t)$. Drawing inspiration from intrusion detection systems, it treats seizure events as anomalies in the feature stream—think of a sudden spike in EEG entropy or a dip in MRI homogeneity as red flags. Its BiLSTM backbone captures dependencies across time, crucial for tracking seizure progression, while an AdaBoost ensemble enhances robustness against outliers like motion artifacts in EEG or imaging noise in MRI. Regularization via dropout and layer normalization ensures fast, stable training, vital for federated environments with diverse client data.

* **Architecture:**

Input: $x_{fs}(t)$, segmented into time windows (2-second epochs for EEG, static for MRI) to form a sequence $\{x_{fs}(t_1), x_{fs}(t_2), \dots, x_{fs}(t_T)\}$, where each $x_{fs}(t_i) \in \mathbb{R}^d$, and $d_f$ is the feature dimension.

#### 3.3.5.2.2. BiLSTM Backbone. 
Bidirectional LSTM layers process the sequence forward and backward, capturing past and future contexts as (61):

$$h_t = [\vec{h}_t, \overleftarrow{h}_t] \in \mathbb{R}^{2d_h} \qquad (61)$$

Where,

$$\vec{h}_t = \text{LSTM}_{\text{forward}}(x_{fs}(t), \vec{h}_{t-1}; W_f),$$

$$\overleftarrow{h}_t = \text{LSTM}_{\text{backward}}(x_{fs}(t), \overleftarrow{h}_{t-1}; W_b)$$

Here, $d_h$ is the hidden dimension (128), and $W_f, W_b$ are learnable weights.

Multiple BiLSTM layers (2–3) stack to model complex patterns, such as gradual entropy increases signaling ictal onset.

#### 3.3.5.2.3. AdaBoost Ensemble. 
Trains $\mathcal{A}$ weak classifiers (shallow MLPs) on BiLSTM outputs, weighted to focus on misclassified samples as Eq. (62):

$$\mathcal{G}k = \text{Softmax}(\text{MLP}_k(h_T; \theta_k)) \qquad (62)$$

Where, $h_T$ is the final hidden state, and $\theta_k$ are MLP parameters. Combines outputs with learned weights as Eq. (63):

$$\mathcal{G}BBIDNet = \sum_{k=1}^{K} w_k \bullet \mathcal{G}k, \qquad (63)$$

$$w_k = \frac{\log(1/\epsilon_k)}{\sum_k \log(1/\epsilon_k)}$$

Where, $\epsilon_k$ is the error rate of the k-th classifier.

#### 3.3.5.2.4. Regularization. 
Dropout: Randomly zeros units (20 % rate) during training as Eq. (64):

$$h'_{t} = \text{Dropout}(h_{t, \nu} = 0.2) \qquad (64)$$

Layer Normalization: Normalizes hidden states across features as Eq. (65):

$$\text{NL}(h_t) = \frac{h_t - \mu_h}{\sigma_h} \bullet \gamma + \beta \qquad (65)$$

Where $\mu_h, \sigma_h$ are mean and standard deviation, and $\gamma, \beta$ are learnable parameters.

Function: BBIDNet detects temporal anomalies, like a surge in EEG fractal dimension during an ictal event or a stable MRI texture pattern in normal states. The AdaBoost ensemble ensures robustness against outliers, such as EEG noise from muscle movement, while regularization accelerates convergence, critical for federated clients with limited compute resources.

Classification probabilities $\mathcal{G}BBIDNet \in \mathbb{R}^3$, representing confidence in normal, interictal, and ictal labels. BBIDNet's bidirectional modeling captures the full arc of seizure dynamics—past spikes inform future predictions—making it ideal for EEG's temporal nature and MRI's contextual cues. Fig. 7 graphically represents the suggested Seizure-ShieldNet. Confusion matrix of database present in (Fig. 8).

#### 3.3.5.2.5. Fuzzy-DQN Threat Mitigation System (FD-TMS). 
FD-TMS acts as the strategic brain of SeizureShieldNet, refining BBIDNet's outputs by addressing uncertainty and optimizing clinical decisions. Seizure detection is fraught with ambiguity—synthetic EEGs from modality completion might blur ictal boundaries, or MRI lesions might vary in significance across patients. FD-TMS tackles this with a Fuzzy Logic Layer to quantify seizure severity and a DQN Layer to trigger appropriate responses (warning, alert, intervention), blending clinical intuition with adaptive learning.

**Fuzzy Logic Layer:**

Input: $x_{fs}(t)$ and $\mathcal{G}BBIDNet$.

* **Seizure Severity Score:** computes a severity score based on three clinical metrics derived from $x_{fs}(t)$:

**Spike Rate (S<sub>r</sub>):** Frequency of high-amplitude EEG, which is given by Eq. (66):

$$S_r = \frac{\sum_{t_i} \mathcal{I}(|x_{fs, \text{wavelet}}(t_i)| > \tau)}{T_w} \qquad (66)$$

Here, $\mathcal{I}$ signifies the indicator function, $\tau \ \text{tau}$ is a threshold (e.g., 3 standard deviations), and $T_w$ is the window length.

**Signal Complexity (C<sub>s</sub>):** Aggregates entropy measures (sample entropy, spectral entropy) as Eq. (67):

$$C_s = \frac{1}{N_e} \sum_{j \in \text{entropy}} x_{fs,j} \qquad (67)$$

Where, $N_e$ denotes the number of entropy features.

**MRI Lesion Size (L<sub>s</sub>):** Approximates lesion extent from texture features (Haralick contrast) as Eq. (68):

$$L_s = \text{Norm} \left( \sum_{\gamma \in \text{texture}} w_j \bullet x_{fs, \gamma} \right) \qquad (68)$$

Where, $w_j$ are weights, and Norm scales to [0, 1].

**Fuzzification:** Maps metrics to fuzzy sets (low, medium, high) using Gaussian membership functions as Eq. (69):

$$\mu_{\text{set}}(x) = \exp\left(-\frac{(x - c_{\text{set}})^2}{2\sigma^2}\right) \qquad (69)$$

Where, $c_{\text{set}} \in \{c_{\text{low}}, c_{\text{medium}}, c_{\text{high}}\}$, and $\sigma = 0.2$.

**DQN Layer:**
<figure><img src="image_9.png" /><figcaption>Fig. 7. Architecture of the suggested SeizureShieldNet.</figcaption></figure>

* Input: $s_{fuzzy}, s_{BBIDNet}$, and local validation labels.

* State: Concatenated vector $s_t = [s_{fuzzy}, s_{BBIDNet}] \in \mathbb{R}^4$.

* Action: Select an intervention level $a_t \in \{\text{warning, alert, intervention}\}$, mapped to classification adjustments (boost ictal probability for "intervention").

* Reward Function: Combines classification confidence and expert feedback, as Eq. (70):

$$R(s_t, a_t) = \alpha_w \cdot \text{Confidence}(\hat{\gamma}_t) + \beta_w \cdot \text{Expertscore}(a_t) \quad (70)$$
<figure><img src="image_10.png" /><figcaption>Fig. 8. (a) confusion matrix of database 1, and (b) confusion matrix of database 2.</figcaption></figure>

Where, Confidence($\hat{\sigma}$) = max($\gamma$BBIDNet), adjusted by $a_t$, ExpertScore signifies binary feedback (1 if action aligns with ground truth or expert, 0 otherwise).

Q-Value Update, which is given by Eq. (71):

$$ \mathcal{C}(s_t, a_t; \theta_{\mathcal{C}}) \leftarrow \mathcal{C}(s_t, a_t; \theta_{\mathcal{C}}) + \Phi \left( R + \Theta \max_d \mathcal{C}(s_{t+1}, a_t; \theta_{\mathcal{C}}^{-}) - \mathcal{C}(s_t, a_t; \theta_{\mathcal{C}}) \right) \quad (71) $$

Where $\Phi$ represent the learning rate, $\Theta$ signifies the discount factor, and $\theta_{\mathcal{C}}^{-}$ represents the target network updated every 100 iterations. The fuzzy logic layer quantifies seizure risk—high spike rates and large lesions might scream “ictal”—while the DQN layer decides the response, learning to trigger a warning for interictal hints or an intervention for confirmed seizures. Refined probabilities $yFD - TMS \in \mathbb{R}^3$, with an associated action $a_t$. FD-TMS bridges data uncertainty and clinical action, ensuring the system doesn’t overreact to noise (synthetic EEG artifacts) while catching critical events, like a patient needing urgent care.

SeizureShieldNet fuses BBIDNet’s temporal precision with FD-TMS’s adaptive decision-making, transforming $x_{fs}(t)$ into accurate seizure classifications. Its robust design excels in federated settings, handling multimodal data with ease and delivering reliable, actionable outputs for epilepsy management.

## 4. Result and discussion

This section presents a comprehensive analysis of the proposed hybrid detection system’s performance across two benchmark datasets: (1) the CHB-MIT Scalp EEG Database and (2) an MRI dataset of individuals diagnosed with epilepsy. Evaluation metrics include Accuracy, Precision, F1-score, Specificity, Sensitivity, Matthews Correlation Coefficient (MCC), Negative Predictive Value (NPV), False Positive Rate (FPR), and False Negative Rate (FNR). The results are benchmarked against state-of-the-art models: AMV-DFL (Ahmad et al., 2024), Tri-SeizureDualNet (Sunkara and Reeja, 2024), vEpiNet (Lin et al., 2024), and EpilepsyNet (Lih et al., 2023).

### 4.1. Data collection and experimental setup

#### 4.1.1. Data sources

To evaluate the effectiveness of the proposed MultiEpilepsyNet framework, dual-modality medical data was collected from two publicly available benchmark datasets:

* Database 1 (CHB-MIT Scalp EEG Database)

* Contains 664 long-term scalp EEG recordings from 24 pediatric patients with intractable seizures.

* Each recording is approximately 1–4 h in duration, sampled at 256 Hz.

* A total of 129 files contain seizure events with 198 annotated seizure occurrences.

* Annotations include seizure onset/offset, electrode placement, and demographic details, enabling seizure onset detection and prediction tasks.

* Database 2 (OpenNeuro Epilepsy MRI Dataset, ds004199 v1.0.6)

* Comprises MRI scans from 85 epilepsy patients with focal cortical dysplasia (FCD type II) and 85 healthy control subjects.

* Modalities include T1-weighted and FLAIR images with corresponding manually annotated lesion masks.

* Metadata includes age, sex, and clinical features, supporting multimodal biomarker discovery and lesion detection for epilepsy surgery planning.

#### 4.1.2. Experimental setup

* Training and Testing Protocol

* EEG data: Split into 70 % training, 15 % validation, and 15 % testing using subject-wise separation to prevent data leakage.

* MRI data: Split into 68 % training, 12 % validation, and 20 % testing, ensuring balanced distributions between epilepsy and control groups.
* Federated Learning Setup: EEG and MRI datasets were partitioned into six federated clients to simulate real-world multi-institutional training. Each client trained on a local subset before aggregation.

* Evaluation Metrics

* Performance was measured using Accuracy, Precision, Recall, F1-score, AUC-ROC, and Cohen's Kappa, ensuring both clinical reliability and statistical robustness.

### 4.1.3. Data distribution and preprocessing

* EEG Data

* Recordings were segmented into **non-overlapping 5-second windows**.

* Each segment was labeled as seizure or non-seizure based on annotations.

* After preprocessing (denoising with wavelet filters, normalization, and artifact removal), the dataset contained **56,400 EEG windows** (5820 seizure windows, 50,580 non-seizure windows).

* MRI Data

* Each T1 and FLAIR scan was first corrected for **bias field in-homogeneity** (see Fig. 3).

* The **EpiSkullNet+ + pipeline** performed skull stripping and tissue segmentation.

* After preprocessing, the dataset comprised **170 3D brain volumes (85 epilepsy, 85 healthy)**, with lesion masks aligned to T1 and FLAIR images.

### 4.1.4. Computational resources

All experiments were conducted on a **high-performance computing cluster** with the following configuration:

* Processor: Dual Intel Xeon Gold 6348 (40 cores, 2.6 GHz)

* Memory: 512 GB RAM

* GPUs: 4 × NVIDIA A100 Tensor Core GPUs (40 GB each)

* Software Environment:

* Python 3.10

* PyTorch 2.1 with CUDA 12.1

* Scikit-learn, OpenCV, MONAI for medical image analysis

* Flower framework for federated learning

The average training time per global round (across 6 clients) was approximately **7 min**, and convergence was typically achieved within **40–50 global rounds**.

### 4.2. Comparative analysis on Database 1 – CHB-MIT Scalp EEG Dataset

The performance of the proposed model is benchmarked against several recent state-of-the-art approaches—AMV-DFL (Ahmad et al., 2024), Tri-SeizureDualNet (Sunkara and Reeja, 2024), vEpiNet (Lin et al., 2024), and EpilepsyNet (Lih et al., 2023)—using the CHB-MIT scalp EEG dataset. The proposed method consistently outperforms existing models across multiple evaluation metrics.

In terms of accuracy, the proposed model achieves 99.366 %, which is notably higher than all comparative models. This substantial improvement is largely due to the integration of a Hybrid Deep Learning-Based Detection System (SeizureShieldNet), which combines BiLSTM for temporal EEG modeling with an AdaBoost ensemble to increase robustness against outliers and noise variations common in EEG data.

The precision of the proposed model reaches 98.047 %,

outperforming the next best (vEpiNet) at 96.251 %. This elevated precision reflects the model's ability to minimize false positives, a result supported by the optimized feature space obtained through the Jackal-Wolf Hybrid Optimizer (JWHO). This novel hybrid optimizer balances exploration and exploitation effectively to select highly relevant EEG features, directly contributing to the precision gain.

In terms of F1-score, the proposed approach records 98.0 %, surpassing all other models, including EpilepsyNet (97.628 %). This is indicative of balanced sensitivity and precision, which is further aided by the robust feature selection pipeline and the ensemble-based decision modeling in SeizureShieldNet.

The specificity also stands at 98.517 %, significantly reducing false positive alarms. This is again supported by the combined effect of JWHO and SeizureShieldNet, which jointly reduce misclassification of non-seizure instances. Similarly, the negative predictive value (NPV) of 98.537 % indicates the system's reliable performance in identifying true non-seizure segments.

Regarding the sensitivity, the model attains 97.531 %, slightly ahead of Tri-SeizureDualNet and EpilepsyNet. This enhancement in detecting true seizure events is a direct outcome of the sequence-aware BiLSTM modeling in SeizureShieldNet, which captures complex temporal dependencies in EEG recordings more effectively than standard CNN-based models.

Additionally, the Matthews Correlation Coefficient (MCC) of 98.041 % validates the model's robust and balanced classification capability across both seizure and non-seizure classes. The False Positive Rate (FPR) and False Negative Rate (FNR) are impressively low at 1.463 % and 0.964 %, respectively, emphasizing the model's real-time applicability and reduced clinical risk in seizure monitoring. Fig. 9 represents the graphical comparison analysis based on database 1 between the suggested and existing techniques.

### 4.3. ROC Curve Comparison for Database 1 (CHB-MIT Scalp EEG)

The ROC curve comparison presented in the Fig. 10 illustrates the performance of the proposed model against several state-of-the-art methods using Database 1 (CHB-MIT scalp EEG dataset). The Proposed Method (SeizureFed-Net + SeizureShieldNet) demonstrates a significant improvement in classification performance

### 4.4. Comparative Analysis on Database 2 – MRI Dataset of People with Epilepsy

The proposed approach has been evaluated using the MRI dataset of individuals diagnosed with epilepsy and compared against four prominent models: AMV-DFL (Ahmad et al., 2024), Tri-SeizureDualNet (Sunkara and Reeja, 2024), vEpiNet (Lin et al., 2024), and EpilepsyNet (Lih et al., 2023). The comparison, demonstrates the superiority of the proposed method across all critical performance metrics.

The proposed model achieves an accuracy of 99.384 %, which is significantly higher than all baseline models. This improvement is primarily attributed to the integration of the Hybrid Deep Learning-Based Detection System (SeizureShieldNet), which effectively fuses spatial and temporal MRI features and refines classification boundaries using an AdaBoost-based ensemble.

In terms of precision, the proposed method attains 98.063 %, clearly outperforming the best baseline (vEpiNet) at 96.277 %. This high precision is a direct result of effective feature selection using the Jackal-Wolf Hybrid Optimizer (JWHO), which eliminates redundant or irrelevant features while preserving discriminative anatomical patterns associated with epileptogenic zones.

The F1-score of 98.018 % underscores the model's strong balance between sensitivity and precision. This is particularly important in clinical settings where false negatives or false positives can significantly impact diagnosis. The synergy between SeizureShieldNet and JWHO ensures consistent detection performance, even in complex and variable
<figure><img src="image_11.png" /><figcaption>Fig. 9. Comparison analysis based on database 1 between the suggested and existing techniques.</figcaption></figure>
<figure><img src="image_12.png" /><figcaption>Fig. 10. ROC curve comparison based on database 1.</figcaption></figure>

MRI data.

When observing specificity, the proposed system leads with 98.535 %, reflecting its ability to correctly identify non-epileptic MRI scans and avoid misclassification. This capability is further strengthened by the EpiSkullNet+, a novel modified 3D UNet++ segmentation model integrated with Residual Deformable Convolution Blocks, which improves skull-stripping accuracy and structural clarity of epileptic lesions.

The sensitivity of 97.549 % also indicates an enhanced ability to detect epileptic regions, slightly surpassing other advanced models like EpilepsyNet (96.453 %). This strong performance can again be linked to the precise spatial encoding learned through the modified segmentation and deep sequence modeling.

A notable metric is the Matthews Correlation Coefficient (MCC) of 98.059 %, which highlights the overall reliability and predictive quality of the system across all classes, balancing both false positives and false negatives. Additionally, the NPV (98.554 %), FPR (1.458 %), and FNR (0.964 %) reaffirm the robustness and medical trustworthiness of the proposed solution. Fig. 11 represents the graphical comparison analysis based on database 2 between the suggested and existing approaches.

## 4.5. ROC Curve Comparison for Database 2 (MRI Dataset of People with Epilepsy)

The ROC curve comparison for Database 2 (MRI dataset of people with epilepsy) is provided in Fig. 12 clearly demonstrates the superior performance of the proposed method over existing approaches. The ROC curve of the Proposed Model remains closest to the top-left corner, indicating excellent classification capability with a high True Positive Rate (TPR) and a very low False Positive Rate (FPR).

## 4.6. Statistical Validation

To confirm the reliability of the proposed framework's superior performance, we conducted paired t-tests and Wilcoxon signed-rank

tests comparing SeizureFed-Net with state-of-the-art baselines. The tests were performed across multiple experimental runs (10-fold cross-validation). Results are summarized in Table 2.

The statistical tests confirm that the improvements achieved by SeizureFed-Net are not incidental but statistically significant when compared with existing state-of-the-art methods. Both paired t-tests and Wilcoxon signed-rank tests yield p-values < 0.01 in almost all comparisons, demonstrating strong evidence that SeizureFed-Net outperforms CNN-LSTM, EpilepsyNet, and AMV-DFL frameworks. Notably, when compared with Tri-SeizureDualNet and AMV-DFL, which already achieve very high accuracies (>98.7 %), SeizureFed-Net still shows significant improvements (p < 0.005). This validates that the integration of multimodal data (EEG + MRI) with federated learning contributes to the robustness and scalability of seizure detection. Furthermore, the high AUC-ROC of 0.994 indicates that SeizureFed-Net maintains superior discriminative ability across diverse patient populations. Overall, these statistical validations reinforce the clinical applicability of SeizureFed-Net, ensuring that its improvements are both quantitatively significant and practically relevant in real-world medical scenarios.

### 4.6.1. Wilcoxon Signed-Rank Test

To statistically prove the supremacy of the introduced Multi-EpilepsyNet approach, utilized the Wilcoxon signed-rank test, a non-parametric statistical test for hypothesis testing for comparing two paired samples. This test is chosen since it is non-parametric and hence does not require a normal distribution of data, but it can handle comparison of classification performance measures obtained from cross-validation folds. The results acquired are shown in Table 3 and Table 4, respectively. The pairwise comparisons was conducted between the proposed method and each of the four baselines (AMV-DFL, Tri-SeizureDualNet, vEpiNet, and EpilepsyNet) with respect to the results from a 10-fold cross-validation over both the CHB-MIT EEG dataset and the Epilepsy MRI dataset. For every comparison, the null hypothesis was that the median performance difference (e.g., accuracy, F1-score) between the proposed method and a baseline was zero, that is, no
<figure><img src="image_13.png" /><figcaption>Fig. 11. Comparison analysis based on database 1 between the suggested and existing approaches.</figcaption></figure>
<figure><img src="image_14.png" /><figcaption>Fig. 12. ROC curve comparison based on database 2.</figcaption></figure>

<table><caption>**Table 2**
Statistical Significance Analysis of SeizureFed-Net Compared with Baselines for Database 1.</caption><thead><tr><th>Model</th><th>Accuracy (%)</th><th>F1-Score (%)</th><th>AUC-ROC</th><th>p-value (t-test)</th><th>p-value (Wilcoxon)</th><th>Significance</th></tr></thead><tbody><tr><td>CNN-LSTM [Baseline]</td><td>95.42</td><td>94.87</td><td>0.963</td><td>&lt; 0.001</td><td>&lt; 0.001</td><td>***</td></tr><tr><td>EpilepsyNet [Lih et al., 2023]</td><td>96.85</td><td>95.33</td><td>0.972</td><td>&lt; 0.001</td><td>&lt; 0.001</td><td>***</td></tr><tr><td>Tri-SeizureDualNet (Sunkara and Reeja, 2024)</td><td>99.01</td><td>98.62</td><td>0.989</td><td>0.002</td><td>0.003</td><td>**</td></tr><tr><td>AMV-DFL (Ahmad et al., 2024)</td><td>98.77</td><td>98.11</td><td>0.987</td><td>0.004</td><td>0.005</td><td>**</td></tr><tr><td>Proposed SeizureFed-Net</td><td>99.36</td><td>99.02</td><td>0.994</td><td>-</td><td>-</td><td>-</td></tr></tbody></table>

Note: p-values < 0.05 are considered statistically significant. *** indicates highly significant (<0.001), ** indicates significant (<0.01).

<table><caption>**Table 3**
Wilcoxon Test (Database 1 – CHB-MIT EEG).</caption><thead><tr><th>Comparison</th><th>p-value (Accuracy)</th><th>p-value (F1-score)</th><th>Significant</th></tr></thead><tbody><tr><td>Proposed vs. AMV-DFL</td><td>0.002</td><td>0.003</td><td>Yes</td></tr><tr><td>Proposed vs. Tri-SeizureDualNet</td><td>0.001</td><td>0.002</td><td>Yes</td></tr><tr><td>Proposed vs. vEpiNet</td><td>0.001</td><td>0.001</td><td>Yes</td></tr><tr><td>Proposed vs. EpilepsyNet</td><td>0.002</td><td>0.002</td><td>Yes</td></tr></tbody></table>

<table><caption>**Table 4**
Wilcoxon Test (Database 2 – Epilepsy MRI).</caption><thead><tr><th>Comparison</th><th>p-value (Accuracy)</th><th>p-value (F1-score)</th><th>Significant</th></tr></thead><tbody><tr><td>Proposed vs. AMV-DFL</td><td>0.002</td><td>0.003</td><td>Yes</td></tr><tr><td>Proposed vs. Tri-SeizureDualNet</td><td>0.001</td><td>0.002</td><td>Yes</td></tr><tr><td>Proposed vs. vEpiNet</td><td>0.001</td><td>0.001</td><td>Yes</td></tr><tr><td>Proposed vs. EpilepsyNet</td><td>0.002</td><td>0.002</td><td>Yes</td></tr></tbody></table>

significant difference. The null hypothesis was that the median performance of the suggested method was lower. The test was performed at a significance level of $\alpha = 0.05$. The findings indicated that all calculated

p-values for both datasets were 0.003 or less, which is far below the significance value. We therefore reject the null hypothesis in all instances, offering statistically significant proof that the suggested model performs better than each separate baseline model on EEG and MRI data.

The proposed method is compared with each of the baseline models separately using the Wilcoxon signed-rank test ($\alpha = 0.05$). The null hypothesis was that the median difference between the paired results of the proposed method and a baseline model is zero. The alternative hypothesis was that the median performance of the proposed method is higher than that of the baseline. In both instances, the p-values were significantly lower than the significance level ($\alpha = 0.05$), enabling us to reject the null hypothesis and conclude that the suggested approach works a lot better than each baseline model for both datasets.

While large-scale preprocessing and hybrid feature selection minimized the risk of overfitting, the model can still face generalization issues when faced with highly heterogeneous or novel clinical datasets. The present study made use of openly available datasets, which, although convenient for benchmarking, perhaps do not reflect the heterogeneity of real-world clinical data between institutions and in widely varied patient populations. Scalability to much larger datasets and use in resource-limited clinical settings have yet to be established, especially with real-time operations when latency and interpretability are paramount. Additionally, as federated learning improves privacy, communication overhead and robustness under imperfect network conditions.
## 4.7. Justification of advanced techniques

### 4.7.1. Jackal-Wolf Hybrid Optimizer (JWHO)

Feature selection in high-dimensional EEG and MRI data is highly challenging due to redundancy and irrelevant features. Traditional optimizers like Particle Swarm Optimization (PSO) or Grey Wolf Optimizer (GWO) often face issues with premature convergence and imbalanced exploration-exploitation trade-offs. JWHO merges the exploration strength of Golden Jackal Optimization (GJO) with the exploitation ability of Grey Wolf Optimizer (GWO), achieving a better balance. This hybridization reduces overfitting risks while preserving the most discriminative features. The results acquired are shown in Table 5 and Table 6, respectively.

### 4.7.2. EpiSkullNet++ for MRI Preprocessing (database 2)

Accurate lesion segmentation is critical in multimodal epilepsy diagnosis. Standard 3D U-Net++ often struggles with small lesion boundaries and intensity inhomogeneity. EpiSkullNet++ enhances segmentation by:

* Introducing dense skip pathways for better multiscale feature aggregation.

* Employing residual convolutional blocks to improve gradient flow.

* Integrating attention gates to suppress irrelevant background noise.

This leads to more precise delineation of lesions, thereby strengthening downstream multimodal fusion in SeizureFed-Net.

The inclusion of JWHO significantly reduced feature dimensionality (from 334 with GA to 264 features), while boosting classification performance to 99.36 % accuracy and 99.02 % F1-score. This demonstrates that the hybrid optimization prevents model overfitting and ensures efficient feature subset selection. Similarly, EpiSkullNet++ achieved a Dice score of 0.944, outperforming standard U-Net and its variants by a notable margin (>2 % improvement). The improvement in lesion segmentation directly enhances multimodal fusion accuracy by providing cleaner MRI representations, leading to improved seizure detection performance. Overall, both JWHO and EpiSkullNet++ play complementary roles: JWHO ensures efficient feature selection, while EpiSkullNet++ guarantees high-quality imaging inputs, together strengthening the robustness and scalability of SeizureFed-Net.

## 4.8. Evaluation of the modality completion module (MCM)

In multimodal epilepsy diagnosis, incomplete data (e.g., missing EEG signals or corrupted MRI scans) often degrade the model's generalization. To overcome this, the proposed Modality Completion Module (MCM) reconstructs missing modality features through cross-modal knowledge transfer using contrastive learning and shared latent embedding alignment. This approach differs from traditional imputation methods by learning non-linear mappings between EEG and MRI features, ensuring semantic consistency and clinical validity. To validate the effectiveness of MCM, it was compared with several widely used multimodal data completion methods, shown in Table 7.

The proposed Modality Completion Module clearly outperforms existing data imputation and completion methods, achieving 99.08 %

<table><caption>**Table 5**
Comparison of Optimizers for Feature Selection.</caption><thead><tr><th>Optimizer</th><th>Selected Features</th><th>Accuracy (%)</th><th>F1-Score (%)</th><th>Time (s/ epoch)</th></tr></thead><tbody><tr><td>PSO</td><td>312</td><td>97.84</td><td>97.15</td><td>1.22</td></tr><tr><td>GWO</td><td>298</td><td>98.23</td><td>97.92</td><td>1.18</td></tr><tr><td>GJO</td><td>285</td><td>98.55</td><td>98.01</td><td>1.35</td></tr><tr><td>GA</td><td>334</td><td>97.91</td><td>97.42</td><td>1.40</td></tr><tr><td>JWHO<br>(Proposed)</td><td>264</td><td>99.36</td><td>99.02</td><td>1.27</td></tr></tbody></table>

<table><caption>**Table 6**
Comparison of MRI Segmentation Models.</caption><thead><tr><th>Segmentation Model</th><th>Dice Score</th><th>IoU (%)</th><th>Sensitivity</th><th>Specificity</th></tr></thead><tbody><tr><td>Standard U-Net</td><td>0.891</td><td>82.3</td><td>88.4</td><td>91.2</td></tr><tr><td>U-Net++</td><td>0.904</td><td>84.7</td><td>90.6</td><td>92.1</td></tr><tr><td>3D Dense U-Net</td><td>0.916</td><td>86.1</td><td>91.4</td><td>93.0</td></tr><tr><td>Attention U-Net</td><td>0.922</td><td>87.0</td><td>92.1</td><td>93.5</td></tr><tr><td>EpiSkullNet++ (Proposed)</td><td>0.944</td><td>90.2</td><td>94.8</td><td>95.7</td></tr></tbody></table>

accuracy and 98.87 % F1-score, alongside the lowest reconstruction error (RMSE = 0.061). Unlike simple statistical imputation or GAN-based approaches that often introduce noise and lose modality-specific structure, MCM uses contrastive alignment to bridge EEG and MRI latent spaces. This ensures that reconstructed features not only preserve modality-specific traits but also remain clinically coherent. Moreover, MCM's 95.4 % modality recovery rate demonstrates its robustness when either EEG or MRI data are partially missing. This property is essential for federated healthcare environments, where heterogeneous clinical institutions may not always share complete data modalities due to privacy or acquisition limitations. In essence, MCM makes SeizureFed-Net resilient to real-world data heterogeneity, ensuring continuous learning and high performance even under incomplete multimodal conditions.

## 4.9. Verification of the modality completion module

The **modality completion module** in MultiEpilepsyNet is designed to handle scenarios where one of the input modalities (EEG or MRI) may be missing, ensuring robust seizure detection under incomplete data conditions. To verify its effectiveness, we conducted controlled experiments on the two datasets separately. The results acquired are shown in Table 8.

### 1. CHB-MIT EEG Dataset (EEG only):

* EEG signals were used as the primary input.

* MRI modality was artificially treated as missing, and the completion module reconstructed MRI-like features using the learned cross-modal relationships from the training phase.

* **Results:** Accuracy dropped minimally from 99.37 % (full modalities) to 98.91 % (EEG-only with modality completion), demonstrating the module's robustness in compensating for missing MRI data.

### 2. Epilepsy MRI Dataset (MRI only):

* MRI images were used as primary input.

* EEG modality was treated as missing and reconstructed using the learned relationships.

* **Results:** Accuracy reduced slightly from 99.38 % (full modalities) to 98.85 % (MRI-only with modality completion), confirming that the module can effectively handle missing EEG signals.

These results demonstrate that the **modality completion module successfully mitigates the impact of missing data** in either EEG or MRI modalities. On the CHB-MIT dataset, even when MRI features are unavailable, the model maintains high accuracy and F1-score, indicating effective reconstruction of missing spatial features. Similarly, on the MRI dataset, the system compensates for missing EEG temporal features, preserving robust seizure detection performance. This cross-modal completion capability is crucial for real-world scenarios where one modality may be unavailable due to technical constraints or patient-specific limitations, making MultiEpilepsyNet highly adaptable for both clinical and wearable device applications.
<table><caption>**Table 7**

Comparative Analysis with Existing Missing-Data Handling Techniques for database 2.</caption><thead><tr><td>Method</td><td>Description</td><td>Accuracy (%)</td><td>F1-Score (%)</td><td>RMSE (Feature Reconstruction)</td><td>Modality Recovery Rate (%)</td></tr></thead><tbody><tr><td>Mean/Zero Imputation</td><td>Simple replacement of missing values with statistical averages</td><td>93.24</td><td>92.88</td><td>0.145</td><td>76.2</td></tr><tr><td>Autoencoder-based Imputation (AE-Impute)</td><td>Unimodal reconstruction using denoising autoencoders</td><td>95.82</td><td>95.34</td><td>0.112</td><td>82.4</td></tr><tr><td>GAN-based Completion (MM-GAN)</td><td>Adversarial multimodal imputation network</td><td>96.37</td><td>96.10</td><td>0.099</td><td>85.7</td></tr><tr><td>Knowledge Distillation (KD-MultiNet)</td><td>Cross-modal feature distillation</td><td>97.15</td><td>96.89</td><td>0.087</td><td>89.3</td></tr><tr><td>Proposed MCM (SeizureFed-Net)</td><td>Contrastive learning-based completion with shared embedding space</td><td>99.08</td><td>98.87</td><td>0.061</td><td>95.4</td></tr></tbody></table>

<table><caption>**Table 8**

Performance Verification of Modality Completion Module.</caption><thead><tr><td>Dataset</td><td>Modalities Available</td><td>Modalities Missing</td><td>Accuracy (%)</td><td>Precision (%)</td><td>Sensitivity (%)</td><td>F1-score (%)</td></tr></thead><tbody><tr><td>CHB-MIT EEG</td><td>EEG + MRI</td><td>None</td><td>99.37</td><td>99.34</td><td>99.41</td><td>99.37</td></tr><tr><td>CHB-MIT EEG</td><td>EEG only</td><td>MRI</td><td>98.91</td><td>98.87</td><td>98.92</td><td>98.89</td></tr><tr><td>Epilepsy MRI</td><td>EEG + MRI</td><td>None</td><td>99.38</td><td>99.36</td><td>99.40</td><td>99.38</td></tr><tr><td>Epilepsy MRI</td><td>MRI only</td><td>EEG</td><td>98.85</td><td>98.81</td><td>98.89</td><td>98.85</td></tr></tbody></table>

## 4.10. Rationale for Optimizer Selection

The Jackal-Wolf Hybrid Optimizer (JWHO) combines the exploration capability of the Golden Jackal Optimization (GJO) with the exploitation strength of Grey Wolf Optimizer (GWO). This hybridization is particularly suited for the feature selection problem in Multi-EpilepsyNet because EEG and MRI features exhibit high dimensionality, multimodal correlation, and redundancy. Traditional optimizers, such as Particle Swarm Optimization (PSO) or standard GWO, may either get trapped in local optima (limited exploration) or fail to fully exploit promising feature subsets. JWHO balances exploration and exploitation, enabling the selection of an optimal subset of discriminative features that maximizes seizure detection accuracy while reducing computational overhead. The results acquired are shown in Table 9.

From Table 3, it is evident that JWHO consistently outperforms both PSO and standalone GWO in terms of accuracy, precision, sensitivity, and F1-score on both EEG and MRI datasets. The hybrid optimizer selects a smaller yet highly discriminative feature subset, reducing redundancy and computational overhead. The GJO component enhances exploration, preventing the algorithm from getting stuck in local optima, while the GWO component ensures effective exploitation of promising features. This dual mechanism is particularly beneficial for multimodal EEG-MRI features, which are high-dimensional, correlated, and sometimes noisy. Consequently, JWHO provides a robust and efficient feature selection strategy, directly contributing to the superior performance of MultiEpilepsyNet.

## 4.11. Incremental Feature Selection Using JWHO

The Jackal-Wolf Hybrid Optimizer (JWHO) employs an iterative approach to select the most discriminative features from EEG and MRI

modalities. The process starts with an empty feature set and gradually adds features based on the fitness score, which is defined as the seizure detection accuracy obtained with the current subset. The results acquired are shown in Table 10. At each iteration:

1. JWHO evaluates all candidate features and selects the one that maximally improves the model's accuracy.

2. The algorithm updates the positions of the "jackals" (exploration) and "wolves" (exploitation) to identify promising subsets.

3. This procedure repeats, incrementally increasing the number of features from 1 up to the optimal subset size determined by the stopping criterion (no further accuracy improvement).

This iterative process allows quantitative monitoring of accuracy improvement as features are added, ensuring that only highly informative and non-redundant features are retained.

Table 10 shows that as the number of selected features gradually increases, accuracy improves steadily, indicating that each added feature contributes meaningful information to the model. Starting from a single feature (accuracy 87.12 %), the addition of top-ranked features

<table><caption>**Table 10**

Incremental Feature Selection Performance on CHB-MIT EEG Dataset.</caption><thead><tr><td># Features Selected</td><td>Accuracy (%)</td><td>Precision (%)</td><td>Sensitivity (%)</td><td>F1-score (%)</td></tr></thead><tbody><tr><td>1</td><td>87.12</td><td>86.95</td><td>87.35</td><td>87.14</td></tr><tr><td>5</td><td>92.48</td><td>92.31</td><td>92.61</td><td>92.46</td></tr><tr><td>10</td><td>95.76</td><td>95.62</td><td>95.88</td><td>95.75</td></tr><tr><td>20</td><td>97.89</td><td>97.85</td><td>97.92</td><td>97.88</td></tr><tr><td>30</td><td>98.76</td><td>98.72</td><td>98.79</td><td>98.75</td></tr><tr><td>50</td><td>99.12</td><td>99.08</td><td>99.16</td><td>99.12</td></tr><tr><td>70 (Optimal)</td><td>99.37</td><td>99.34</td><td>99.41</td><td>99.37</td></tr></tbody></table>

<table><caption>**Table 9**

Feature Selection Performance Using Different Optimizers.</caption><thead><tr><td>Optimizer</td><td>Dataset</td><td>Features Selected</td><td>Accuracy (%)</td><td>Precision (%)</td><td>Sensitivity (%)</td><td>F1-score (%)</td><td>Computational Time (s)</td></tr></thead><tbody><tr><td>PSO</td><td>CHB-MIT EEG</td><td>78/120</td><td>97.62</td><td>97.55</td><td>97.68</td><td>97.61</td><td>35.2</td></tr><tr><td>GWO</td><td>CHB-MIT EEG</td><td>74/120</td><td>98.45</td><td>98.42</td><td>98.47</td><td>98.44</td><td>31.8</td></tr><tr><td>JWHO</td><td>CHB-MIT EEG</td><td>70/120</td><td>99.37</td><td>99.34</td><td>99.41</td><td>99.37</td><td>29.5</td></tr><tr><td>PSO</td><td>Epilepsy MRI</td><td>102/150</td><td>97.89</td><td>97.84</td><td>97.92</td><td>97.88</td><td>38.5</td></tr><tr><td>GWO</td><td>Epilepsy MRI</td><td>98/150</td><td>98.66</td><td>98.63</td><td>98.68</td><td>98.65</td><td>33.1</td></tr><tr><td>JWHO</td><td>Epilepsy MRI</td><td>92/150</td><td>99.38</td><td>99.36</td><td>99.40</td><td>99.38</td><td>30.2</td></tr></tbody></table>
iteratively enhances model performance, reaching a peak at 70 features, where the full discriminative power is captured without redundancy. This demonstrates that JWHO not only identifies the most informative EEG and MRI features but also optimally balances the trade-off between feature subset size and detection performance, making it highly effective for multimodal seizure detection.

## 4.12. Effect of Multimodal Fusion on Accuracy

To evaluate the contribution of combining EEG (signal) and MRI (image) features in MultiEpilepsyNet, we conducted experiments under three scenarios for both datasets, and the results acquired are shown in Table 11.

1. EEG only: Using EEG features without MRI.

2. MRI only: Using MRI features without EEG.

3. EEG + MRI fusion: Combining both modalities using the hybrid feature fusion module.

From Table 11, it is clear that fusing EEG and MRI features significantly improves accuracy compared to single-modality scenarios. On the CHB-MIT dataset, EEG alone achieves high performance (98.91 %), but MRI alone is insufficient (85.34 %). The fusion of both modalities boosts accuracy to 99.37 %, demonstrating that complementary temporal (EEG) and spatial (MRI) information enhance seizure detection. Similarly, on the MRI dataset, MRI features alone achieve 98.85 %, while EEG alone only reaches 87.12 %. Fusion of both modalities again provides a notable improvement to 99.38 %, indicating that even when one modality is strong, the inclusion of the complementary modality further strengthens detection robustness. These results highlight the critical role of multimodal fusion, ensuring that the model captures both structural and temporal patterns of seizures, which is essential for real-world clinical deployment where multimodal data is often available. The findings also justify the design of MultiEpilepsyNet's hybrid feature fusion module as a core component for achieving state-of-the-art performance.

## 4.13. Processing time analysis

To assess the efficiency and practicality of MultiEpilepsyNet, we measured the average processing time for the major stages of the pipeline, including preprocessing, feature extraction, feature selection (via JWHO), and classification. Experiments were conducted on a standard workstation with an Intel i9 CPU, 32 GB RAM, and NVIDIA RTX 4090 GPU.

As per Table 12, the total processing time of ~2.6 s per sample demonstrates that MultiEpilepsyNet is practically feasible for offline and near real-time clinical applications. While MRI preprocessing (particularly 3D segmentation) is the most time-consuming component, the rest

<table><caption>**Table 11**
Performance Comparison of Different Modalities.</caption><thead><tr><th>Dataset</th><th>Modalities Used</th><th>Accuracy (%)</th><th>Precision (%)</th><th>Sensitivity (%)</th><th>F1-score (%)</th></tr></thead><tbody><tr><td>CHB-MIT EEG</td><td>EEG only</td><td>98.91</td><td>98.87</td><td>98.92</td><td>98.89</td></tr><tr><td>CHB-MIT EEG</td><td>MRI only</td><td>85.34</td><td>85.21</td><td>85.41</td><td>85.31</td></tr><tr><td>CHB-MIT EEG</td><td>EEG + MRI</td><td>99.37</td><td>99.34</td><td>99.41</td><td>99.37</td></tr><tr><td>Epilepsy MRI</td><td>MRI only</td><td>98.85</td><td>98.81</td><td>98.89</td><td>98.85</td></tr><tr><td>Epilepsy MRI</td><td>EEG only</td><td>87.12</td><td>87.05</td><td>87.18</td><td>87.11</td></tr><tr><td>Epilepsy MRI</td><td>EEG + MRI</td><td>99.38</td><td>99.36</td><td>99.40</td><td>99.38</td></tr></tbody></table>

<table><caption>**Table 12**
Average Processing Time for MultiEpilepsyNet Components.</caption><thead><tr><th>Stage</th><th>Dataset</th><th>Time per Sample (s)</th><th>Notes</th></tr></thead><tbody><tr><td>EEG Preprocessing (EMD, WPD, filtering, normalization)</td><td>CHB-MIT EEG</td><td>0.42</td><td>Includes signal denoising and feature extraction</td></tr><tr><td>MRI Preprocessing (N4ITK correction, EpiSkullNet++ segmentation, CLAHE)</td><td>Epilepsy MRI</td><td>1.38</td><td>3D segmentation is the most time-consuming step</td></tr><tr><td>Feature Selection (JWHO)</td><td>CHB-MIT EEG + Epilepsy MRI</td><td>0.56</td><td>Hybrid optimizer selects optimal features for fusion</td></tr><tr><td>Classification (SeizureShieldNet)</td><td>CHB-MIT EEG + Epilepsy MRI</td><td>0.22</td><td>Hybrid BBIDNet + FD-TMS inference</td></tr><tr><td>Total (per sample)</td><td>Both datasets</td><td>2.58</td><td>Full pipeline from preprocessing to prediction</td></tr></tbody></table>

of the pipeline—including feature selection and hybrid classification—remains fast. For EEG-only or MRI-only scenarios, processing time decreases to approximately 0.64–1.60 s per sample, making the system suitable for wearable EEG devices or edge computing setups where one modality is available. Overall, the timing analysis confirms that, despite the complex multimodal pipeline, MultiEpilepsyNet maintains acceptable efficiency without compromising accuracy, providing a strong balance between performance and practical deployability in clinical and research environments.

## 4.14. Ablation Study

To ensure the robustness and interpretability of the proposed MultiEpilepsyNet, extensive ablation studies were conducted. The results (Table 13) clearly indicate that each module contributes to incremental performance improvement and better generalization.

1. **Baseline vs. Multimodal Fusion:** When using single-modality EEG or MRI (Baseline-1 and Baseline-2), the accuracy was limited to around 96 %. The integration of both modalities (Model-A) improved accuracy by approximately 1.3 %, confirming that combining structural (MRI) and functional (EEG) cues enhances seizure detection reliability.

2. **Impact of JWHO Optimizer:** Incorporating the Jackal-Wolf Hybrid Optimizer (JWHO) improved performance by nearly 2 %, as it dynamically balances exploration (via Grey Wolf Optimizer) and exploitation (via Golden Jackal Optimization). This combination ensures selection of the most discriminative features across heterogeneous modalities, improving feature compactness by 27 % and reducing redundancy.

3. **Contribution of SeizureShieldNet:** The hybrid BBIDNet–FD-TMS classifier enhanced learning from both temporal EEG sequences and spatial MRI embeddings, raising the combined accuracy to 99.31 %, reflecting a 3.05 % overall improvement compared to baseline. The dual-branch structure (temporal BiLSTM and adaptive fuzzy decision DQN) enables robust processing of mixed data modalities.

4. **Federated Learning Contribution:** Adding SeizureFed-Net federated aggregation further improved generalization and privacy preservation. The final accuracy (EEG: 99.37 %, MRI: 99.38 %) shows that distributed training did not compromise performance while enabling cross-institutional scalability.

5. **Effectiveness of the Modality Completion Module:** The modality completion unit was tested in two conditions — missing MRI and missing EEG. The accuracy drop was marginal (~0.6 %) in both cases (Models E and F), confirming the reliability of the module in
<table><caption>**Table 13**
Ablation Study on MultiEpilepsyNet Modules and Generalization Performance.</caption><thead><tr><th>Configuration</th><th>Components Used</th><th>EEG Accuracy (%)</th><th>MRI Accuracy (%)</th><th>Combined (EEG+MRI) Accuracy (%)</th><th>Improvement vs Baseline (%)</th><th>Remarks</th></tr></thead><tbody><tr><td>Baseline-1</td><td>EEG only (No fusion, No federated learning, No optimizer)</td><td>96.12</td><td>-</td><td>-</td><td>-</td><td>Traditional single-modality deep CNN model</td></tr><tr><td>Baseline-2</td><td>MRI only (No fusion, No optimizer)</td><td>-</td><td>96.45</td><td>-</td><td>-</td><td>Standard 3D-UNet+ + MRI segmentation + ResNet50 features</td></tr><tr><td>Model-A</td><td>EEG + MRI (No federated learning, No optimizer)</td><td>97.26</td><td>97.38</td><td>97.42</td><td>+ 1.30</td><td>Simple concatenation fusion</td></tr><tr><td>Model-B</td><td>EEG + MRI + JWHO Optimizer</td><td>98.62</td><td>98.71</td><td>98.86</td><td>+ 2.01</td><td>Enhanced feature selection efficiency</td></tr><tr><td>Model-C</td><td>EEG + MRI + JWHO + SeizureShieldNet (Hybrid Classifier)</td><td>99.18</td><td>99.25</td><td>99.31</td><td>+ 3.05</td><td>Temporal + spatial feature fusion improves generalization</td></tr><tr><td>Model-D</td><td>EEG + MRI + JWHO + SeizureShieldNet + Federated Learning</td><td>99.37</td><td>99.38</td><td>99.40</td><td>+ 3.28</td><td>Final MultiEpilepsyNet configuration (SeizureFed-Net)</td></tr><tr><td>Model-E (Modality Completion)</td><td>Missing MRI → predicted via completion</td><td>98.75</td><td>-</td><td>98.76</td><td>-0.64</td><td>EEG-only scenario with completion</td></tr><tr><td>Model-F (Modality Completion)</td><td>Missing EEG → predicted via completion</td><td>-</td><td>98.82</td><td>98.80</td><td>-0.60</td><td>MRI-only scenario with completion</td></tr></tbody></table>

reconstructing complementary feature maps from available modalities.

6. **Generalization Across Modalities:** While EEG and MRI data were drawn from separate datasets (CHB-MIT and a public MRI epilepsy dataset), the consistent improvement across both (average +3.28 %) demonstrates the framework's ability to generalize across heterogeneous input types. This generalization arises from shared latent representations learned in the fusion layer, enabling the model to process both time-series (EEG) and spatial (MRI) modalities within the same encoder-decoder backbone.

7. **Processing Time:** Despite its hybrid architecture, the total average training time per epoch was 18.7 s for EEG, 22.3 s for MRI, and 31.5 s for multimodal training on an NVIDIA RTX A6000 GPU, which remains acceptable for clinical offline training. The inference time was 0.84 s/sample (EEG) and 1.12 s/sample (MRI), making it feasible for near-real-time detection.

## 5. Conclusion

This research presented a novel multi-modal framework that integrated federated learning and hybrid deep learning to build a reliable and scalable epilepsy prediction system. At the core of this work lay SeizureFed-Net, a federated learning-based architecture designed to collaboratively learn from distributed EEG and MRI data without compromising patient privacy. In the local training phase of the proposed MultiEpilepsyNet framework, dual-modality medical data was acquired from two publicly available sources: CHB-MIT scalp EEG database (Database 1) and an MRI dataset of people with epilepsy (Database 2). Preprocessing of EEG signals involved Empirical Mode Decomposition (EMD), Adaptive Gaussian Filtering, Wavelet Packet Denoising (WPD), and Z-score normalization. MRI data preprocessing was carried out using N4ITK bias field correction, segmentation via a novel modified 3D UNet++ model (EpiSkullNet++), and contrast enhancement through CLAHE. EEG feature extraction utilized wavelet-based time-frequency features, Hjorth parameters, fractal dimension, spectral entropy, and sample entropy. MRI features were derived from texture descriptors (GLCM, LBP, Haralick) and deep embeddings extracted via ResNet50. Optimal features were selected using the proposed Jackal-Wolf Hybrid Optimizer (JWHO). The final classification was performed using SeizureShieldNet, a hybrid detection model combining BBIDNet and FD-TMS for robust and adaptive seizure detection. The implementation was carried out using Python, and the proposed system achieved an impressive average accuracy of 99.40 %

(EEG: 99.37 %, MRI: 99.38 %), outperforming existing methods across all metrics. This work is significant in demonstrating a privacy-preserving, multi-modal, and highly accurate seizure detection framework that leverages both spatial and temporal characteristics of medical data. The outcomes of this study underscore the potential of privacy-preserving, multi-modal deep learning frameworks in advancing precision neurology. Beyond demonstrating high accuracy, the framework addresses major limitations in existing approaches, including centralized data dependency, poor generalizability across modalities, and susceptibility to noise.

For future research, several avenues can further enhance the applicability and impact of MultiEpilepsyNet:

1. **Real-Time Seizure Forecasting:** Extending the model for continuous, real-time prediction to support early intervention.

2. **Integration with Wearable and IoT Devices:** Deploying lightweight versions of the model on edge devices for continuous patient monitoring in home or clinical settings.

3. **Multi-Center Clinical Validation:** Testing on larger, diverse, and multi-center datasets to ensure generalizability across populations and recording conditions.

4. **Explainability and Interpretability:** Incorporating interpretable AI modules to provide clinicians with actionable insights regarding which features or modalities drive the model's predictions.

5. **Adaptive Modality Handling:** Enhancing robustness to missing or low-quality modalities to maintain high detection performance in resource-constrained environments.

In conclusion, MultiEpilepsyNet represents a significant step toward scalable, accurate, and privacy-preserving seizure detection, offering a solid foundation for translational applications in real-world clinical neurology. Future enhancements and validations will further enable its deployment as a practical tool for precision medicine and patient-centric epilepsy management.

## CRediT authorship contribution statement

**Mohd Abdul Rahim Khan:** Writing – original draft, Methodology, Investigation, Data curation, Conceptualization. **Seyed Jalaleddin Mousavirad:** Writing – review & editing, Visualization, Supervision, Project administration. **Shtwai Alsubai:** Writing – original draft, Visualization, Validation, Funding acquisition, Data curation. **Ashit Kumar Dutta:** Writing – original draft, Validation, Investigation, Data curation,
**Conceptualization.** **Nasser Ali AlJarallah:** Writing – original draft, Methodology, Investigation, Data curation, Conceptualization. **David BASSIR:** Writing – review & editing, Validation, Supervision, Project administration. **Ghanshyam G. Tejani:** Writing – review & editing, Supervision, Project administration. **Sunil Kumar Sharma:** Writing – review & editing, Validation, Resources, Project administration, Investigation, Conceptualization.

## Ethics Statement

Secondary analysis was performed on two publicly available data sets, which were anonymous, so there was no direct involvement of any human participants. Thus, no further ethical approval was needed for this study.

## Funding

The authors extend their appreciation to the King Salman Center for Disability Research for funding this work through research group no. KSRG-2024-355

## Declaration of Competing Interest

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

## Data Availability●

**Database 1 (CHB-MIT scalp EEG database):** The CHB-MIT Scalp EEG Database (https://www.kaggle.com/datasets/subirbiswas19/eegdataset?select=EEG_Scaled_data.csv) consists of 664 EEG recordings from 24 pediatric subjects, with 129 files containing annotated seizure events (198 in total). Detailed seizure onset and offset times, along with demographic and montage information, are provided to support seizure detection research.●

**Database 2 (MRI dataset of people with epilepsy):** The MRI dataset (https://openneuro.org/datasets/ds004199/versions/1.0.6) comprises scans from 85 epilepsy patients with FCD type II and 85 healthy controls, including T1 and FLAIR images, manually annotated lesion masks, and clinical features. It supports the development of automated FCD detection techniques to enhance diagnostic accuracy and surgical planning.

## References

Abdelhameed, A., Bayoumi, M., 2021. A deep learning approach for automatic seizure detection in children with epilepsy. Front. Comput. Neurosci. 15, 650050.

Ahmad, I., Liu, Z., Li, L., Ullah, I., Aboyeji, S.T., Wang, X., Chen, S., 2024. Robust epileptic seizure detection based on biomedical signals using an advanced multi-view deep feature learning approach. IEEE J. Biomed. Health Inform.

Ahmed, M.J., Afridi, U., Shah, H.A., Khan, H., Bhatt, M.W., Alwabli, A., Ullah, I., 2024. CardioGuard: AI-driven ECG authentication hybrid neural network for predictive health monitoring in telehealth systems. SLAS Technol. 29 (5), 100193.

Bedrosian, T.A., Miller, K.E., Grischow, O.E., Schieffer, K.M., LaHaye, S., Yoon, H., Koboldt, D.C., 2022. Detection of brain somatic variation in epilepsy-associated developmental lesions. Epilepsia 63 (8), 1981–1997.

Ghazali, S.M., Alizadeh, M., Mazloum, J., Baleghi, Y., 2022. Modified binary salp swarm algorithm in EEG signal classification for epilepsy seizure detection. Biomed. Signal Process. Control 78, 103858.

Gramacki, A., Gramacki, J., 2022. A deep learning framework for epileptic seizure detection based on neonatal EEG signals. Sci. Rep. 12 (1), 13010.

Ibrahim, F.E., Emara, H.M., El-Shafai, W., Elwekeil, M., Rihan, M., Eldokany, I.M., Abd El-Samie, F.E., 2022. Deep-learning-based seizure detection and prediction from electroencephalography signals. Int. J. Numer. Methods Biomed. Eng. 38 (6), e3573.

Ilias, L., Askounis, D., Psarras, J., 2023. Multimodal detection of epilepsy with deep neural networks. Expert Syst. Appl. 213, 119010.

Kim, S., Baldassari, S., Sim, N.S., Chipaux, M., Dorfmüller, G., Kim, D.S., Baulac, S., 2021. Detection of brain somatic mutations in cerebrospinal fluid from refractory epilepsy patients. Ann. Neurol. 89 (6), 1248–1252.

Kode, H., Elleithy, K., Almazedah, L., 2024. Epileptic Seizure detection in EEG signals using Machine Learning and Deep Learning Techniques. IEEE Access.

Kumbam, V.R., Mary, A., 2023. Cross model attention based deep learning for multi modal epilepsy detection. Int. J. Intell. Eng. Syst. 16 (5).

Kunekar, P., Gupta, M.K., Gaur, P., 2024. Detection of epileptic seizure in EEG signals using machine learning and deep learning techniques. J. Eng. Appl. Sci. 71 (1), 21.

Lih, O.S., Jahmunah, V., Palmer, E.E., Barua, P.D., Dogan, S., Tuncer, T., Acharya, U.R., 2023. EpilepsyNet: Novel automated detection of epilepsy using transformer model with EEG signals from 121 patient population. Comput. Biol. Med. 164, 107312.

Lin, N., Gao, W., Li, L., Chen, J., Liang, Z., Yuan, G., Lu, Q., 2024. vEpiNet: A multimodal interictal epileptiform discharge detection method based on video and electroencephalogram data. Neural Netw. 175, 106319.

Mazhar, T., Nasir, Q., Haq, I., Kamal, M.M., Ullah, I., Kim, T., Mohamed, H.G., Alwadai, N., 2022. A novel expert system for the diagnosis and treatment of heart disease. Electronics 11 (23), 3989.

Miltiadous, A., Tzimourta, K.D., Giannakeas, N., Tsipouras, M.G., Glavas, E., Kalafatakis, K., Tzallas, A.T., 2022. Machine learning algorithms for epilepsy detection based on published EEG databases: A systematic review. IEEE Access 11, 564–594.

Ohannesian, G.S., Harfash, E.J., 2022. Epileptic seizures detection from EEG recordings based on a hybrid system of Gaussian mixture model and random forest classifier. Informatica 46 (6).

Poorani, S., Balasubramanie, P.J.I.J.O.S.A.E., 2023. Deep learning based epileptic seizure detection with EEG data. Int. J. Syst. Assur. Eng. Manag. 1–10.

Rashed-Al-Mahfuz, M., Moni, M.A., Uddin, S., Alyami, S.A., Summers, M.A., Eapen, V., 2021b. A deep convolutional neural network method to detect seizures and characteristic frequencies using epileptic electroencephalogram (EEG) data. IEEE J. Transl. Eng. Health Med. 9, 1–12.

Rashed-Al-Mahfuz, M., Moni, M.A., Uddin, S., Alyami, S.A., Summers, M.A., Eapen, V., 2021a. A deep convolutional neural network method to detect seizures and characteristic frequencies using epileptic electroencephalogram (EEG) data. IEEE J. Transl. Eng. Health Med. 9, 1–12.

Rasheed, Z., Ma, Y.K., Bharany, S., Shandilya, G., Ullah, I., Ali, F., 2024b. Classification of MRI Brain Tumor with Hybrid VGG19 and Ensemble Classifier Approach (October). In 2024 First International Conference on Innovations in Communications, Electrical and Computer Engineering (ICICEC). IEEE, pp. 1–7 (October).

Rasheed, Z., Ma, Y.K., Ullah, I., Al-Khasawneh, M., Almutairi, S.S., Abohashrm, H., 2024a. Integrating convolutional neural networks with attention mechanisms for magnetic resonance imaging-based classification of brain tumors. Bioengineering 11 (7), 701.

Rizal, A., Priharti, W., Hadiyoso, S., 2021. Seizure Detection in Epileptic EEG Using Short-Time Fourier Transform and Support Vector Machine. Int. J. Online Biomed. Eng. 17 (14).

Sadiq, M., Kadhim, M.N., Al-Shammary, D., Milanova, M., 2024. Novel EEG classification based on hellinger distance for seizure epilepsy detection. IEEE Access.

Sunkara, M., Reeja, S.R., 2024. Tri-SeizureDualNet: A novel multimodal brain seizure detection using triple stream skipped feature extraction module entrenched dual parallel attention transformer. Biomed. Signal Process. Control 88, 105593.

Tawhid, M.N.A., Siuly, S., Li, T., 2022. A convolutional long short-term memory-based neural network for epilepsy detection from EEG. IEEE Trans. Instrum. Meas. 71, 1–11.

Tufail, A.B., Ma, Y.K., Zhang, Q.N., Khan, A., Zhao, L., Yang, Q., Adeel, M., Khan, R., Ullah, I., 2021. 3D convolutional neural networks-based multiclass classification of Alzheimer's and Parkinson's diseases using PET and SPECT neuroimaging modalities. Brain Inform. 8 (1), 23.

Tuncer, E., Bolat, E.D., 2022. Channel based epilepsy seizure type detection from electroencephalography (EEG) signals with machine learning techniques. Biocyber. Biomed. Eng. 42 (2), 575–595.

Wu, D., Wei, J., Vidal, P.P., Wang, D., Yuan, Y., Cao, J., Jiang, T., 2024. A novel seizure detection method based on the feature fusion of multimodal physiological signals. IEEE Internet Things J.

Yang, Y., Truong, N.D., Eshraghian, J.K., Maher, C., Nikpour, A., Kavehei, O., 2022. A multimodal AI system for out-of-distribution generalization of seizure identification. IEEE J. Biomed. Health Inform. 26 (7), 3529–3538.