Next Article in Journal
Comparison of Classical and Artificial Intelligence Algorithms to the Optimization of Photovoltaic Panels Using MPPT
Previous Article in Journal
An Early Investigation of the HHL Quantum Linear Solver for Scientific Applications
Previous Article in Special Issue
Deep-Learning-Based Optimization of the Signal/Background Ratio for Λ Particles in the CBM Experiment at FAIR
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Epileptic Seizure Prediction Using a Combination of Deep Learning, Time–Frequency Fusion Methods, and Discrete Wavelet Analysis

by
Hadi Sadeghi Khansari
1,
Mostafa Abbaszadeh
2,*,
Gholamreza Heidary Joonaghany
1,
Hamidreza Mohagerani
3 and
Fardin Faraji
4
1
Department of Mathematics and Computer Science, Arak Branch, Islamic Azad University, Arak 3836119131, Iran
2
Department of Applied Mathematics, Faculty of Mathematics and Computer Sciences, Amirkabir University of Technology (Tehran Polytechnic), No. 424, Hafez Ave., Tehran 15914, Iran
3
Quantum Technologies Research Center, Science and Research Branch, Islamic Azad University, Tehran 1477893855, Iran
4
Department of Neurology, School of Medicine, Arak University of Medical Sciences, Arak 3813873449, Iran
*
Author to whom correspondence should be addressed.
Algorithms 2025, 18(8), 492; https://doi.org/10.3390/a18080492
Submission received: 1 June 2025 / Revised: 30 July 2025 / Accepted: 2 August 2025 / Published: 7 August 2025
(This article belongs to the Special Issue 2024 and 2025 Selected Papers from Algorithms Editorial Board Members)

Abstract

Epileptic seizure prediction remains a critical challenge in neuroscience and healthcare, with profound implications for enhancing patient safety and quality of life. In this paper, we introduce a novel seizure prediction method that leverages electroencephalogram (EEG) data, combining discrete wavelet transform (DWT)-based time–frequency analysis, advanced feature extraction, and deep learning using Fourier neural networks (FNNs). The proposed approach extracts essential features from EEG signals—including entropy, power, frequency, and amplitude—to effectively capture the brain’s complex and nonstationary dynamics. We measure the method based on the broadly used CHB-MIT EEG dataset, ensuring direct comparability with prior research. Experimental results demonstrate that our DWT-FS-FNN model achieves a prediction accuracy of 98.96 with a zero false positive rate, outperforming several state-of-the-art methods. These findings underscore the potential of integrating advanced signal processing and deep learning methods for reliable, real-time seizure prediction. Future work will focus on optimizing the model for real-world clinical deployment and expanding it to incorporate multimodal physiological data, further enhancing its applicability in clinical practice.

Graphical Abstract

1. Introduction

Epilepsy is a common neurological disorder marked by frequent and unpredictable seizures that can profoundly impact a person’s quality of life. Early and accurate seizure prediction is essential for improving patient outcomes by enabling timely intervention and enhancing overall safety. Electroencephalogram (EEG) signals, which capture the brain’s electrical activity, have become central to the development of automated seizure detection and prediction systems. However, the highly nonstationary and complex nature of EEG data presents significant challenges in designing robust and generalizable predictive models.
Recent advancements in machine learning and signal processing have substantially improved EEG-based epileptic seizure prediction models. Li et al. [1] introduced a patient-specific seizure prediction framework using a multichannel feedback capsule network (FB-CapsNet), which processes EEG signals in an end-to-end manner, eliminating the need for manual feature extraction. By leveraging feedback-enabled capsule structures, the model effectively captures complex spatial-temporal dependencies, offering high predictive accuracy and adaptability to individual EEG profiles. However, the model exhibits high computational complexity and limited generalizability, as it requires separate training for each patient. In contrast, Tamanna et al. [2] proposed a generalized approach utilizing discrete wavelet transform (DWT) for feature extraction and support vector machines (SVM) for classification. Their method achieved an average prediction accuracy of 96.38% and anticipated seizures approximately 26.1 min before onset, without requiring patient-specific training. Nevertheless, reliance on a single dataset and sensitivity to preprocessing steps may impact its generalizability and robustness.
Divya et al. [3] introduced a hybrid deep learning model integrating autoencoders for unsupervised feature extraction with convolutional neural networks (CNNs) for classification. The model achieved 92.5% accuracy and demonstrated good generalization across datasets, though it remains slightly behind the best-performing models and still requires clinical validation. Zhang et al. [4] developed a vision transformer (ViT)-based model that processes EEG data by converting signals into image-like formats. This method benefits from self-attention mechanisms that extract patient-specific spatial features. While it offers strong predictive performance, the approach demands large volumes of patient-specific data and significant computational resources, limiting scalability. Wang et al. [5] proposed a seizure prediction model combining dynamic multi-graph convolution with a channel-weighted transformer. This architecture captures intricate spatial and temporal relationships among EEG channels, resulting in enhanced prediction accuracy. However, it is computationally intensive and dependent on high-quality EEG data, which may not always be feasible in clinical settings.
Kapoor et al. [6] introduced a hybrid Cuckoo–Finch optimization algorithm for automatic EEG electrode selection and CNN hyperparameter tuning. Evaluated on the CHB-MIT and Siena datasets, the model achieved an accuracy of 97.76%. Despite its strong performance, the method’s computational complexity and lack of testing in real-world IoT scenarios pose challenges for deployment. Zhao et al. [7] proposed a patient-specific approach combining Adder networks and supervised contrastive learning to improve energy efficiency and feature discrimination. The model demonstrated strong sensitivity and specificity while being computationally suitable for wearable devices. However, it heavily relies on patient-specific data and requires further validation in real-time, noisy environments. Bhattacharya et al. [8] developed a Transformer-based model for seizure prediction that captures long-range temporal dependencies with minimal manual preprocessing. Achieving a sensitivity of 98.5% and a low false-positive rate of 0.12/h, the model is well-suited for clinical use. Nonetheless, its generalizability and high resource requirements remain concerns.
In the context of IoMT applications, Torkey et al. [9] proposed a hybrid model combining CNN, LSTM, and GRU layers, incorporating SMOTE for class imbalance and SHAP for model explainability. Designed for real-time deployment, the model achieved 99.13% accuracy. Despite its strengths in scalability and interpretability, limitations include high computational costs and privacy concerns in IoMT ecosystems. Kalitzin et al. [10] presented TOREADA, an adaptive seizure detection algorithm based on topological reinforcement learning. It dynamically adjusts detection parameters using real-time EEG embeddings. While simulation results highlight its robustness, the lack of clinical validation restricts its practical application. Li et al. [11] analyzed variations in fractal dimensions during seizures using CHB-MIT data, applying both Higuchi’s and roughness scaling extraction (RSE) methods. Their study clarified discrepancies in prior findings and emphasized the influence of preprocessing. However, its clinical relevance remains limited due to the absence of predictive modeling. The study by Deng et al. [12] introduced HViT, a hybrid vision Transformer architecture for EEG-based seizure prediction that integrates convolutional neural networks (CNNs) to enhance local feature extraction and mitigate top-level gradient vanishing typically seen in pure transformers. On top of this, they incorporate data uncertainty learning (DUL), modeling each EEG embedding as a Gaussian or Laplacian distribution—where the mean is learned by the HViT and a parallel branch predicts variance or scale—thereby increasing robustness to noisy EEG signal representations. Additionally, a learnable constraint coefficient in the loss function is tailored per patient, and a simple uncertainty quantification method is applied to alarms using a k-of-n continuous prediction strategy. Evaluated on two public epilepsy datasets, their approach demonstrates a superior performance, highlighting the combined benefits of CNN-augmented transformers and uncertainty modeling in improving seizure prediction accuracy.
Zhu et al. [13] presented a novel EEG-based seizure prediction model that fuses a multidimensional Transformer encoder with LSTM and GRU recurrent neural networks to simultaneously capture both global and local temporal-frequency features from EEG spectrograms. The approach first applies short-time Fourier transform to extract time–frequency representations, then separately processes spectral and temporal dimensions via dual Transformer encoders. Outputs are further refined through LSTM and GRU branches, whose features are gated and fused for classification. Tested on two public datasets—CHB-MIT and Bonn—the model achieved an outstanding performance: on CHB-MIT, it averaged 98.24 sensitivity and 97.27 specificity; on Bonn, it reached 99 accuracy in binary and 98 in three-class classification. Han Wang et al. [14] proposed a lightweight, compressive sensing-based approach to channel estimation in MIMO-FBMC systems, addressing challenges such as intrinsic imaginary interference and low-resource deployment in industrial IoT settings. By modeling the channel as sparse in the delay/Doppler domain, the authors design a low-complexity estimator that avoids dense pilot structures and heavy computations, achieving a comparable or better MSE than classical methods, especially in noisy environments. This methodology offers strong cross-domain relevance to biomedical applications like seizure prediction, where similar constraints—such as real-time processing, noise robustness, and low-power operation—exist. Applying these ideas to EEG analysis suggests potential for wavelet-domain sparsity modeling, adaptive recovery algorithms, and improved interpretability in wearable seizure-monitoring systems. To enhance novelty, related biomedical research can integrate these signal-model-driven, sparsity-aware techniques as alternatives to standard deep fusion models. The main aim of [15] is to address angle estimation in arbitrary-manifold array bistatic MIMO radar and propose a joint two-dimensional direction-of-departure (2D-DOD) and two-dimensional direction-of-arrival (2D-DOA) estimation algorithm assisted by IRS. Finally, Mansouri et al. [16] developed a real-time, non-patient-specific algorithm for seizure detection and localization. Utilizing spectral and coherence-based features, the method achieved a median detection latency of 8 s. While computationally efficient and generalizable, its accuracy is reduced for brief seizures and requires robust artifact removal for optimal performance.
Because adder networks use the t-norm distance as the similarity measure between input features and filters, the network’s gradient behavior changes. To ensure the proper convergence of AddNet-SCL, we introduce an adaptive learning rate strategy. Building upon these innovations, this paper presents a novel epileptic seizure prediction method that integrates DWT-based time–frequency analysis with advanced feature extraction techniques—including entropy, power, frequency, and amplitude—paired with deep learning using Fourier neural networks (FNNs). Evaluated on the well-established CHB-MIT EEG dataset, the proposed approach achieves high prediction accuracy with a zero false positive rate, marking a significant advancement over existing methods. The rest of this paper is structured as follows:
  • Section 2 describes the preprocessing steps, including discrete wavelet transform and feature selection methods.
  • Section 3 details the deep learning approach using Fourier neural networks.
  • Section 4 details the experimental results and provides a comparative analysis of the proposed method with current approaches.
The originality and primary contributions of this paper can be summarized as follows:
  • Sparse signal representation in the wavelet domain: Unlike traditional approaches that rely on dense representations followed by deep fusion techniques (e.g., DWT combined with LSTM), our method explicitly models EEG signals as sparse in the wavelet domain. This formulation draws a parallel to the sparsity observed in the delay/Doppler domain of FBMC channels, allowing for more efficient signal analysis.
  • Lightweight adaptive recovery framework: We introduce an adaptive sparse recovery module inspired by pursuit-based algorithms, specifically designed to handle the non-stationary and noise-prone nature of EEG signals. While conceptually similar to sparse channel estimation techniques in communication systems, this module is customized for biomedical signal processing applications.
  • Optimized for real-time applications: The proposed model significantly reduces computational overhead, making it suitable for deployment on low-power, real-time platforms such as wearable seizure detection devices. This aligns with similar efficiency goals pursued in MIMO-FBMC systems for industrial IoT environments.
  • Improved interpretability and clinical relevance: The sparse wavelet coefficients produced by our model enhance the transparency and physiological interpretability of EEG signals. This feature not only supports clinical decision making but also mirrors the interpretability advantages seen in sparse communication channel estimation.

2. Preprocessing

The dataset used in this article is CHB-MIT, which has been used in most similar articles, and this dataset is a standardized dataset, so it has been used to compare the results with other proposed methods in different articles. The paper method includes steps as follows:

2.1. Discrete Wavelet Transform

The discrete wavelet transform (DWT) is a powerful signal processing technique often used for analyzing non-stationary signals, such as electroencephalogram (EEG) data. EEG signals capture electrical activity in the brain, and due to their complex nature, traditional Fourier analysis may not be sufficient to fully characterize their time–frequency features. DWT provides a multi-resolution analysis, making it particularly suitable for EEG signal processing. Here is a description of how DWT is applied to EEG signals: Overview of the discrete wavelet transform wavelet basics: Unlike the Fourier Transform, which uses sine and cosine functions, DWT uses wavelets—short, oscillatory, localized functions that can represent both frequency and time characteristics of a signal. Wavelets can be designed to possess different shapes and properties, allowing for adaptability to various types of signals. The DWT decomposes a signal x [ p ] using a pair of filters:
  • Low-pass filter h [ p ] : extracts approximations (low-frequency components).
  • High-pass filter g [ p ] : extracts details (high-frequency components).

Decomposition Equations

a i [ k ] = p x [ p ] · h [ 2 k p ] d i [ k ] = p x [ p ] · g [ 2 k p ]
such that
  • a i [ k ] : approximation coefficients at level i.
  • d i [ k ] : detail coefficients at level i.
  • 2 k : represents downsampling by 2.
Multi-resolution analysis: DWT decomposes a signal into different frequency components by breaking it down into approximations (low-frequency) and details (high-frequency). The decomposition is performed recursively, producing multiple levels of resolution corresponding to different frequency bands. Decomposition process: The original EEG signal is passed through a series of filters: a low-pass filter (to extract approximation coefficients) and a high-pass filter (to extract detailed coefficients). This process is repeated on the approximation coefficients to yield additional levels of detail, creating a tree-like structure of coefficients. Each level recursively decomposes the approximation coefficients a j :
x [ n ] DWT { a J [ n ] , d J [ n ] , d J 1 [ n ] , , d 1 [ n ] }
Coefficients interpretation: The resulting coefficients provide insight into both the coarse (low-frequency) and fine (high-frequency) aspects of the EEG signal. The approximation coefficients are associated with slower brain wave activities (like delta and theta waves), while detailed coefficients tend to correspond to faster activities (like alpha and beta waves).
In our Python 3.13.5 function apply_dwt, we initially employed the Daubechies 4 (‘db4’) wavelet with a fixed decomposition level of 5. The db4 wavelet is widely used due to its orthogonality, compact support, and its ability to provide a balanced representation in both time and frequency domains, making it suitable for diverse signal types.
However, we recognize that the choice of wavelet should be guided by the specific characteristics of the signal under analysis. For example, the Haar wavelet is more effective for signals with abrupt changes, while smoother signals—such as those often found in biomedical applications—are better handled with Symlets or Coiflets.
Moreover, we improved the adaptability of our approach by avoiding a fixed number of decomposition levels. Instead, the appropriate level is now determined dynamically based on the signal length and the filter length of the chosen wavelet. This is achieved using the PyWavelets function:
level = pywt . dwt _ max _ level ( len ( signal ) , pywt . Wavelet ( wavelet ) . dec _ len )
This ensures that the decomposition captures relevant time–frequency features without unnecessary over-decomposition.
To clarify the process, we have provided an example: Figure 1 displays the original EEG signal, while Figure 2 shows the reconstructed signal using DWT. The aim of this work is to regularize highly irregular EEG signals.

2.2. Features Selection

2.2.1. Calculated Entropy of EEG Signal

Entropy in EEG signals refers to the measurement of irregularity or complexity in the signal. EEG signals originate from the brain’s electrical activity and are typically distinguished by characteristic patterns and fluctuations that provide valuable insights into brain activity and function. The entropy analysis of EEG signals involves quantifying the level of disorder and randomness within the signal. Higher entropy values indicate greater complexity and irregularity, while lower entropy values indicate more regular and predictable patterns in the signal. Different entropy measures, such as sample entropy or approximate entropy, can be used to analyze EEG signals and Offer insights into the dynamic processes of brain activity. In our implementation, entropy is calculated using the scipy.stats.entropy() function, which computes the Shannon entropy of a discrete probability distribution. To do this, we first create a histogram of the truncated signal using 50 bins:
hist = np.histogram(truncated_signal, bins=50)[0]
ent = entropy(hist)
This histogram captures the frequency distribution of the signal’s amplitude values. The entropy() function then normalizes the histogram to produce a probability distribution and applies the Shannon entropy formula:
H = i = 1 n p i log 2 ( p i )
where p i denotes the normalized probability associated with the i-th bin.
This approach yields a global measure of the signal’s complexity, reflecting the diversity in amplitude values throughout the signal.
The entropy analysis of EEG signals can help in understanding the complexity of neural processes, identifying abnormalities or changes in brain function, and providing valuable information for diagnostic and therapeutic purposes in neurological disorders such as epilepsy and neurodegenerative diseases. Overall, the entropy analysis of EEG signals offers a quantitative and objective way to assess the complexity and dynamics of brain activity, allowing for a deeper understanding of brain function and providing valuable insights for clinical and research applications.

2.2.2. Calculated Power of Signals

The power of a signal is a crucial concept in signal processing that quantifies the average energy contained in the signal over time. It provides insight into the strength and variability of the signal, which can be particularly important for applications in various fields such as telecommunications, audio processing, and biomedical engineering, including EEG analysis. Below is a description of signal power, including its definitions, types, calculations, and implications: Definition of signal power signal power: The power of a signal is defined as the average energy per unit time. It indicates how much energy a signal carries and is often measured in watts (W). Mathematically, for a continuous-time signal x ( t ) , the average power P can be expressed as
P = lim T 1 T T / 2 T / 2 | x ( t ) | 2 d t .
Instantaneous power: The instantaneous power of a signal at a given time t is defined as
P ( t ) = | x ( t ) | 2 ,
where T is the period of the signal. Aperiodic Signals: For aperiodic signals (non-repeating), the average power is calculated over an infinite duration, as shown in the earlier definitions. Power Spectral Density (PSD) The power spectral density (PSD) is a measure that describes how the power of a signal is distributed across different frequency components. It is often used in the context of analyzing signals in the frequency domain. The PSD can be calculated using techniques such as the Fourier transform or the Welch method and provides insight into how signal power varies with frequency.

2.2.3. Calculated Frequency of Signals

Electroencephalography (EEG) measures electrical activity in the brain through electrodes placed on the scalp. The calculated frequency of EEG signals is vital for understanding brain state and mental processes. Here is an overview of EEG frequency bands and their significance: Delta (0.5–4 Hz): Associated with deep sleep and restorative processes. Common in infants and deep anesthetic states. Theta (4–8 Hz): Linked to light sleep, relaxation, and creativity. Often observed during meditation and daydreaming. Alpha (8–12 Hz): Indicates relaxed, yet alert states, often present when the eyes are closed. Attenuates with mental tasks or distraction. Beta (12–30 Hz): Related to active thinking, problem-solving, and focus. Prominent during active concentration and anxiety. Gamma (30 Hz and above): Associated with higher-level cognitive functions, including perception and consciousness. Involves memory recall and sensory processing. Description shown in Figure 3.

2.2.4. Calculating Frequency

To analyze EEG signals, techniques such as fast Fourier Transform (FFT) is used, since this is a mathematical algorithm that transforms time-domain EEG signals into the frequency domain, allowing the identification of predominant frequency components. Wavelet transform: Useful for assessing frequency changes over time, providing a time–frequency representation of EEG data.

2.2.5. Calculated Amplitude of Signals

Signal amplitude refers to the magnitude or strength of a signal’s oscillation or variation over time. It represents the maximum deviation of the signal from its baseline or mean value and is a critical characteristic in analyzing and understanding various types of signals, such as electrical, audio, and biological signals. Key aspects of signal amplitude Measurement: Amplitude can be measured in various units depending on the type of signal: Voltage (V) for electrical signals. Decibels (dB) for sound intensity. Arbitrary units in specific applications. Types of amplitude: Peak amplitude: The maximum positive or negative value of the signal from the center line. Root mean square (RMS) amplitude: A statistical measure that reflects the effective value of a varying signal, often used to compute power in alternating current (AC) circuits. Peak-to-peak amplitude: The total range of the signal, calculated as the difference between the maximum positive and maximum negative peaks. Signal strength: Amplitude indicates the strength of the signal, with higher amplitude correlating to greater intensity or energy. Quality: In communication systems, a higher amplitude generally improves the signal-to-noise ratio (SNR), enhancing clarity and quality. Biological insights: In medical signals (e.g., EEG or ECG), amplitude variations can indicate neural or cardiac activity levels, revealing important health information.

3. Deep Learning

3.1. Fourier Neural Networks

(FNNs) can be particularly effective in analyzing electroencephalography (EEG) signals, which are inherently complex and often contain rhythmic and periodic patterns indicating brain activity. Below is an in-depth description of how FNNs can be applied specifically to EEG signal processing. Given an input vector x R d and a frequency matrix B R m × d , the Fourier feature mapping is defined as
γ ( x ) = sin ( 2 π B x ) , cos ( 2 π B x ) R 2 m
Here
  • B is a matrix with entries often sampled from N ( 0 , σ 2 ) .
  • γ ( x ) embeds x into a higher-dimensional space where periodic features are easier to learn.

3.2. FNN Architecture

An FNN uses the Fourier-mapped input as input to a standard neural network:
f ( x ) = N ( γ ( x ) ; θ )
where
  • N ( · ; θ ) is a multi-layer perceptron (MLP).
  • θ represents the learnable weights and biases.
A basic architecture looks like
f ( x ) = W 2 · σ ( W 1 · γ ( x ) + b 1 ) + b 2
where
  • W 1 R h × 2 m , W 2 R 1 × h
  • b 1 , b 2 are biases
  • σ is an activation function (e.g., ReLU)
The neural network architecture consists of an input layer followed by two hidden layers with 128 and 64 neurons, respectively. Both hidden layers use ReLU activation functions. The output layer employs a sigmoid activation to perform binary classification, distinguishing between seizure and non-seizure instances.
The model was trained using the Adam optimizer with a binary cross-entropy loss function, a batch size of 32, and over 10 epochs. This configuration was chosen to maintain a balance between computational efficiency and predictive performance.
Although no explicit regularization methods (such as dropout or L2 regularization) were applied, validation metrics were closely monitored throughout training. This helped ensure the model generalized well and did not exhibit signs of overfitting, particularly given the relatively short training duration.
Description for EEG signal processing EEG signal characteristics: EEG signals are composed of electrical activities from the brain, reflecting various states such as sleep, alertness, and cognitive engagement. These signals typically exhibit rhythmic patterns across different frequency bands (e.g., delta, theta, alpha, beta, and gamma). Fourier Transform applications: frequency domain analysis: FNNs can leverage Fourier transforms to convert EEG time-series data into the frequency domain. This transformation allows the network to directly analyze different frequency bands, which are essential for interpreting various mental states and conditions. Feature extraction: Through Fourier transformation, the FNN can automatically extract meaningful features related to brain activity, such as power spectral densities for specific frequency bands, without relying heavily on manual feature engineering. Network Architecture: FNNs designed for EEG may include layers that directly apply Fourier transforms, sinusoidal activations, and other elements suited to model periodic functions relevant to brain activities. Some architectures might blend traditional convolutional or recurrent layers with Fourier layers to capture both temporal and frequency-related information. Learning Temporal Dynamics: By integrating temporal dynamics within the framework of Fourier analysis, FNNs can adaptively learn how specific frequency patterns evolve over time, which is crucial for understanding cognitive processes, detecting seizures, or classifying mental states.

4. Result

We utilized the CHB-MIT Scalp EEG database, which contains recordings from 24 pediatric patients. From this dataset, a total of 827 usable EEG signal segments were extracted following initial preprocessing, which included
  • Removing segments with missing or corrupted values.
  • Normalizing signal amplitudes using z-score normalization to ensure a standardized range.
  • Truncating or zero-padding signals to a fixed length to maintain uniform input dimensions.
To simulate a realistic prediction scenario, the dataset was split chronologically based on recording times. This strategy ensures that the test data reflects unseen future samples, reducing data leakage and offering a more accurate measure of generalization. The data was divided as follows:
  • 289 signals were assigned to the test set.
  • 539 signals were used for training and validation.
This results in a test set comprising approximately 35% of the entire dataset. To enhance the robustness of the evaluation, the model was trained and assessed over 5 independent runs, each with different random seeds and data shuffling.
Table 1 presents a comparison of several deep learning models applied to EEG signal classification, each utilizing distinct preprocessing pipelines.
AUC-ROC (area under the receiver operating characteristic curve) quantifies the model’s ability to distinguish between preictal (pre-seizure) and interictal (non-seizure) states across all possible classification thresholds. An AUC of 1.0 indicates perfect discrimination, whereas an AUC of 0.5 suggests a performance equivalent to random guessing. This metric is particularly important in medical diagnosis tasks such as epilepsy prediction, where both false positives and false negatives can have significant consequences. A high AUC signifies that the model is effective at ranking true preictal events above interictal ones, which is vital for providing timely and accurate seizure warnings.
FPR (false positive rate) refers to the proportion of interictal (non-seizure) segments that are incorrectly classified as preictal. In the context of epilepsy prediction, maintaining a low FPR is crucial, as frequent false alarms can cause undue stress, trigger unnecessary interventions, and negatively impact the patient’s quality of life. This is especially important in real-time or wearable monitoring systems, where reliability and user trust are paramount.
As shown in Figure 4, the plot illustrates the classification accuracy of various seizure prediction and detection models. The x axis represents different models along with their corresponding preprocessing techniques, while the y axis indicates accuracy values ranging from 93% to 100%. This visualization enables a direct comparison of model performance in terms of classification accuracy.
Figure 5 presents a line graph comparing the AUC-ROC scores of several seizure prediction or detection models, providing insight into their discriminative power. Higher AUC values (closer to 1.0) indicate better performance. The y axis ranges from 0.88 to 1.02, focusing on high-performing models, while the x axis lists the models along with their EEG preprocessing methods: CapsNet (Raw Data), SVM (DWT), Hybrid AE + CNN (DWT), Transformer based (STFT), and FNN (DWT). The curve begins at approximately 0.92 for the Hybrid AE + CNN model, rises to about 0.98 for the Transformer-based model, and peaks near 1.0 for the FNN model, indicating the highest classification performance. CapsNet and SVM models are not plotted, possibly due to low or unavailable AUC values. Overall, the figure highlights the superior discriminative capability of the FNN model and the importance of effective EEG preprocessing combined with deep learning architectures.
Figure 6 displays a line graph showing the false positive rate (FPR) across various seizure detection models, where lower FPR values indicate better resistance to false alarms. The y axis spans from 0 to 0.20 to capture clinically significant variations, while the x axis shows the models alongside their respective EEG preprocessing techniques: CapsNet (raw data), SVM (DWT), hybrid AE + CNN (DWT), Transformer-based (STFT), and FNN (DWT). Among the visible data points, the SVM model starts at an FPR of approximately 0.13, and the hybrid AE + CNN model rises to around 0.19, indicating weaker performance. In contrast, the FNN model demonstrates the best outcome, with an FPR close to zero. CapsNet and Transformer-based models lack visible data points, possibly due to missing values or values outside the displayed range.

5. Conclusions

However, several challenges were identified:
  • Data scarcity and imbalance: Despite access to a relatively large EEG database, only 827 segments were usable after filtering, limiting model generalization. Furthermore, certain models showed skewed performance (e.g., perfect FPR but low AUC), likely due to class imbalance or overfitting.
  • Interpretability of deep models: While deep models like Transformers and CNNs yielded competitive results, their black-box nature raises concerns in clinical applications where decision transparency is critical.
  • Variability in signal quality: EEG signals are inherently noisy and patient-specific. Although normalization was applied, inter-patient variability remains a key obstacle, potentially impacting model robustness in broader clinical settings.
  • Computational Trade-offs: Some models, such as the Transformer-based approach, offer competitive accuracy with reduced prediction time, making them suitable for real-time use. Others, while more accurate, require more extensive computation or more complex preprocessing, which may limit deployment in resource-constrained environments.
The integration of discrete wavelet transform (DWT) with deep learning models led to significant improvements in performance. Notably, the combination of DWT with a Fourier neural network (FNN) achieved the highest performance across all metrics. This configuration recorded an accuracy of 98/96, an AUC-ROC score of 1.0, and an FPR of 0, with the shortest prediction time of 5 units. These results indicate a highly effective model capable of rapid and precise EEG signal classification.
In contrast, the use of raw EEG data with a CapsNet model, while achieving a reasonable accuracy of 95/7, resulted in the highest false positive rate (0/127) and the longest prediction time (30 units), underscoring the limitations of bypassing signal preprocessing. Other DWT-based approaches, such as DWT + SVM and DWT + hybrid AE+CNN, also demonstrated solid accuracy and low false positive rates, though they did not surpass the FNN model. Meanwhile, the STFT + Transformer-based method showed moderate accuracy (94/6) and AUC-ROC performance but fell short in comparison to the top-performing DWT-based configuration. The experimental results confirm that applying discrete wavelet transform (DWT) as a preprocessing step significantly enhances the effectiveness of deep learning models for EEG signal classification. Among the tested methods, the DWT + FNN configuration stands out for its superior accuracy, perfect AUC-ROC score, zero false positives, and minimal prediction time. These findings highlight the potential of combining multi-resolution signal analysis with lightweight neural architectures to develop robust and efficient EEG-based diagnostic and brain–computer interface systems.

Author Contributions

H.S.K.: Responsible for the implementation of the model and initial manuscript drafting. M.A.: Led the development of the mathematical modeling framework and performed validation and verification of the results. G.H.J.: Conducted result analysis and contributed to the generation and refinement of visual figures. H.M.: Performed detailed dataset analysis and preprocessing. F.F.: Conceived and defined the structure and characteristics of the dataset used in the study. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Acknowledgments

The authors would like to sincerely thank the anonymous referees for their careful reading, insightful comments, and valuable suggestions, which have greatly improved the clarity, quality, and overall presentation of this paper.

Conflicts of Interest

The authors declared that they have no conflict of interest.

References

  1. Li, C.; Zhao, Y.; Song, R.; Liu, X.; Qian, R.; Chen, X. Patient-specific seizure prediction from electroencephalogram signal via multichannel feedback capsule network. IEEE Trans. Cogn. Dev. Syst. 2022, 15, 1360–1370. [Google Scholar] [CrossRef]
  2. Tamanna, T.; Rahman, M.; Sultana, S.; Haque, M.; Parvez, M. Predicting seizure onset based on time-frequency analysis of eeg signals. Chaos Solitons Fract. 2021, 145, 110796. [Google Scholar] [CrossRef]
  3. Divya, P.; Devi, B.; Prabakar, S.; Porkumaran, K.; Kannan, R.; Nor, N.; Elamvazuthi, I. Identification of epileptic seizures using autoencoders and convolutional neural network. In Proceedings of the 2020 8th International Conference on Intelligent and Advanced Systems (ICIAS), Kuching, Malaysia, 13–15 July 2021; pp. 1–6. [Google Scholar]
  4. Zhang, X.; Li, H. Patient-specific seizure prediction from scalp eeg using vision transformer. In Proceedings of the 2022 IEEE 6th Information Technology and Mechatronics Engineering Conference (ITOEC), Chongqing, China, 4–6 March 2022; pp. 1663–1667. [Google Scholar]
  5. Wang, Y.; Cui, W.; Yu, T.; Li, X.; Liao, X.; Li, Y. Dynamic multi-graph convolution based channelweighted transformer feature fusion network for epileptic seizure prediction. IEEE Trans. Neural Syst. Rehabil. 2023, 31, 99. [Google Scholar] [CrossRef] [PubMed]
  6. Kapoor, B.; Nagpal, B. Hybrid cuckoo finch optimisation based machine learning classifier for seizure prediction using eeg signals in iot network. Clust. Comput. 2024, 27, 2239–2260. [Google Scholar] [CrossRef]
  7. Zhao, Y.; Li, C.; Liu, X.; Qian, R.; Song, R.; Chen, X. Patient-specific seizure prediction via adder network and supervised contrastive learning. IEEE Trans. Neural Syst. Rehabil. Eng. 2022, 30, 1536–1547. [Google Scholar] [CrossRef] [PubMed]
  8. Bhattacharya, A.; Baweja, T.; Karri, S.P.K. Epileptic seizure prediction using deep transformer model. Int. J. Neural Syst. 2022, 32, 2150058. [Google Scholar] [CrossRef] [PubMed]
  9. Torkey, H.; Hashish, S.; Souissi, S.; Hemdan, E.E.-D.; Sayed, A. Seizure detection in medical iot: Hybrid cnn-lstm-gru model with data balancing and xai integration. Algorithms 2025, 18, 77. [Google Scholar] [CrossRef]
  10. Kalitzin, S. Topological reinforcement adaptive algorithm (toreada) application to the alerting of convulsive seizures and validation with monte carlo numerical simulations. Algorithms 2024, 17, 516. [Google Scholar] [CrossRef]
  11. Li, Z.; Li, J.; Xia, Y.; Feng, P.; Feng, F. Variation trends of fractal dimension in epileptic eeg signals. Algorithms 2021, 14, 316. [Google Scholar] [CrossRef]
  12. Deng, Z.; Li, C.; Song, R.; Liu, X.; Qian, R.; Chen, X. EEG-based seizure prediction via hybrid vision transformer and data uncertainty learning. Eng. Appl. Artif. Intell. 2023, 123, 106401. [Google Scholar] [CrossRef]
  13. Pan, W.; Liu, J.; Shang, J. Epileptic seizure prediction via multidimensional transformer and recurrent neural network fusion. J. Transl. Med. 2024, 22, 895. [Google Scholar] [CrossRef] [PubMed]
  14. Wang, H.; Xu, L.; Yan, Z.; Gulliver, T.A.; Gulliver, T.A. Low-Complexity MIMO-FBMC Sparse Channel Parameter Estimation for Industrial Big Data Communications. IEEE Trans. Ind. Inform. 2021, 17, 3422–3430. [Google Scholar] [CrossRef]
  15. Xue, X.; Wen, F.; Wang, H. Two-Dimensional Estimation Method for Bistatic MIMO Radar Assisted by Intelligent Reflecting Surfaces. In Proceedings of the 2025 IEEE 34th Wireless and Optical Communications Conference (WOCC), Taipa, Macao, 20–22 May 2025; pp. 260–264. [Google Scholar] [CrossRef]
  16. Mansouri, A.; Singh, S.P.; Sayood, K. Online eeg seizure detection and localization. Algorithms 2019, 12, 176. [Google Scholar] [CrossRef]
Figure 1. Original EEG signal plotted over time. The signal exhibits high variability and nonstationary characteristics, highlighting the need for advanced preprocessing techniques such as the discrete wavelet transform (DWT) for effective analysis and feature extraction.
Figure 1. Original EEG signal plotted over time. The signal exhibits high variability and nonstationary characteristics, highlighting the need for advanced preprocessing techniques such as the discrete wavelet transform (DWT) for effective analysis and feature extraction.
Algorithms 18 00492 g001
Figure 2. The reconstruction signal from DWT preprocessing and ready to extracted features.
Figure 2. The reconstruction signal from DWT preprocessing and ready to extracted features.
Algorithms 18 00492 g002
Figure 3. Energy distribution of neural frequency bands (theta, alpha, beta, gamma) over a 1400-s period. Theta (4–8 Hz) and Alpha (8–12 Hz) dominate lower frequencies, while Beta (12–30 Hz) and Gamma (30–100 Hz) show intermittent spikes, suggesting varied cognitive states.
Figure 3. Energy distribution of neural frequency bands (theta, alpha, beta, gamma) over a 1400-s period. Theta (4–8 Hz) and Alpha (8–12 Hz) dominate lower frequencies, while Beta (12–30 Hz) and Gamma (30–100 Hz) show intermittent spikes, suggesting varied cognitive states.
Algorithms 18 00492 g003
Figure 4. Model accuracy rankings. Higher values denote a better classification performance.
Figure 4. Model accuracy rankings. Higher values denote a better classification performance.
Algorithms 18 00492 g004
Figure 5. AUC-ROC curves for model comparisons. Scores closer to 1 indicate superior classification ability.
Figure 5. AUC-ROC curves for model comparisons. Scores closer to 1 indicate superior classification ability.
Algorithms 18 00492 g005
Figure 6. False positive rate (FPR) across models. Lower values indicate better robustness against false alarms.
Figure 6. False positive rate (FPR) across models. Lower values indicate better robustness against false alarms.
Algorithms 18 00492 g006
Table 1. Comparison of EEG classification models with different preprocessing and deep learning techniques.
Table 1. Comparison of EEG classification models with different preprocessing and deep learning techniques.
PreprocessingDeep LearningPredict TimeAccuracyAUC-ROCFPR
Raw DataCapsNet3095/70/127
DWTSVM25/196/380/19
DWTHybrid AE+CNN94/540/9215
STFTTransformer based1094/60/989
DWTFNN598/9610
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Khansari, H.S.; Abbaszadeh, M.; Joonaghany, G.H.; Mohagerani, H.; Faraji, F. Epileptic Seizure Prediction Using a Combination of Deep Learning, Time–Frequency Fusion Methods, and Discrete Wavelet Analysis. Algorithms 2025, 18, 492. https://doi.org/10.3390/a18080492

AMA Style

Khansari HS, Abbaszadeh M, Joonaghany GH, Mohagerani H, Faraji F. Epileptic Seizure Prediction Using a Combination of Deep Learning, Time–Frequency Fusion Methods, and Discrete Wavelet Analysis. Algorithms. 2025; 18(8):492. https://doi.org/10.3390/a18080492

Chicago/Turabian Style

Khansari, Hadi Sadeghi, Mostafa Abbaszadeh, Gholamreza Heidary Joonaghany, Hamidreza Mohagerani, and Fardin Faraji. 2025. "Epileptic Seizure Prediction Using a Combination of Deep Learning, Time–Frequency Fusion Methods, and Discrete Wavelet Analysis" Algorithms 18, no. 8: 492. https://doi.org/10.3390/a18080492

APA Style

Khansari, H. S., Abbaszadeh, M., Joonaghany, G. H., Mohagerani, H., & Faraji, F. (2025). Epileptic Seizure Prediction Using a Combination of Deep Learning, Time–Frequency Fusion Methods, and Discrete Wavelet Analysis. Algorithms, 18(8), 492. https://doi.org/10.3390/a18080492

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Article metric data becomes available approximately 24 hours after publication online.
Back to TopTop