Next Article in Journal
Preface to the First International Conference on Computational Intelligence and Soft Computing (CISCom 2025)
Previous Article in Journal
Data-Driven Approach for Asthma Classification: Ensemble Learning with Random Forest and XGBoost
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Proceeding Paper

Enhanced Early Detection of Epileptic Seizures Through Advanced Line Spectral Estimation and XGBoost Machine Learning †

by
K. Rama Krishna
and
B. B. Shabarinath
*
Department of Electronics and Communication Engineering (ECE), VNR Vignana Jyothi Institute of Engineering and Technology, Hyderabad 500090, Telangana, India
*
Author to whom correspondence should be addressed.
Presented at the First International Conference on Computational Intelligence and Soft Computing (CISCom 2025), Melaka, Malaysia, 26–27 November 2025.
Comput. Sci. Math. Forum 2025, 12(1), 4; https://doi.org/10.3390/cmsf2025012004
Published: 17 December 2025

Abstract

This paper proposes a fast epileptic seizure detection method to allow for early clinical intervention. The primary goal is to enhance computational and predictive performance to make the method viable for online implementation. An advanced Line Spectral Estimation (LSE)-based method for EEG analysis was developed with Bayesian inference and Toeplitz structure-based fast inversion with Capon and non-uniform Fourier transforms to reduce computational requirements. XGBoost classifier with parallel boosting was employed to increase prediction performance. The method was tested with patients’ EEG data using multiple embedded Graphic Processing Unit (GPU) platforms and achieved 95.5% accuracy, and 23.48 and 33.46 min average and maximum lead times before a seizure, respectively. The sensitivity and specificity values (92.23% and 93.38%) show the method to be reliable. The integration of LSE and XGBoost can be extended to create an efficient and practical online seizure detection and management tool.

1. Introduction

Epilepsy is a common neurological disorder, and particularly one that frequently occurs in children [1]. The World Health Organization estimates that almost fifty million people have this condition, making it a significant health issue worldwide [2]. According to one study, India witnesses many thousands of pediatric cases each year. With advancements in medical facilities and diagnostic equipment, this problem is slowly being tackled but still lacks accurate and personalized treatment.
Electroencephalography (EEG) remains the primary diagnostic tool for recording brain signals because it most widely detects abnormal patterns linked to seizure activity [3]. However, interpreting EEG recordings is a manual, intensive process. In addition to these issues, clinical datasets suffer from an imbalance of normal versus seizure events that further complicates traditional analysis methods [4].
Machine learning (ML), on the other hand, presents a viable alternative to these methods. ML models can autonomously learn seizure patterns, anticipate their occurrence, and send prompt warnings [5]. This minimizes the diagnostic load on experts while also delivering more prompt and dependable results. This work aims to integrate state-of-the-art ML algorithms with an exhaustive set of EEG recordings to create a predictive model that would aid clinicians in clinical decision making in a timely and accurate manner.
Predicting a seizure requires a detailed examination of the neurological phases. The epileptic process is defined as four different phases with distinguishable characteristics.
  • Interictal Phase: This phase can be defined as the interictal or normal phase. This is the resting phase where the patient is aware and in good mental status. There is a possibility of milder symptoms, which may be identified on EEG as changes in brain waves, signifying epilepsy or the potential for it.
  • Preictal Phase: The preictal phase refers to the time period right before a seizure occurs. During this time, there are often physiological changes that can act as early warning signs of a seizure. Detecting the preictal phase allows for interventions to be put in place that may prevent a seizure or reduce its severity.
  • Ictal Phase: This phase also includes the seizure itself, during which there is normal electrical activity and physical symptoms. Detecting the seizure in real time is important for medical response and for monitoring the safety of the patient.
  • Postictal Phase: The postictal phase involves the return to baseline function and may include confusion, drowsiness, or other transient neurological deficits.
We propose a more sophisticated seizure prediction system that fuses Advanced Line Spectral Estimation (ALSE) and XGBoost, a powerful machine learning classifier. The method uses detailed frequency-domain features extracted from EEG signals and then trains a ML model to predict preictal states. In particular, this work makes the following contributions:
  • The inclusion of ALSE in the model enables it to identify subtle variations in raw EEG signals that suggest imminent seizure activity.
  • We selected XGBoost for seizure prediction because of its high precision combined with its ability to manage complex data patterns effectively.
  • The model makes robust and dependable predictions for early seizure detection because evaluations are conducted through multiple metrics alongside visualizations.
The remaining paper is organized as follows: Section 2 presents an overview of related work on classification techniques used in seizure detection. Section 3 illustrates mathematical preliminaries, and Section 4 details the proposed method. Section 5 reports the obtained results and analysis, and finally, Section 6 presents the conclusions and future work.

2. Literature Review

Numerous studies have investigated automatic epileptic seizure detection and prediction through the analysis of EEG recordings. In particular, deep learning techniques have been frequently considered in recent years, for their inherent ability to learn patterns from raw data in a hierarchical manner [6]. Shoeib et al. [7] provide an overview of a broad range of deep learning approaches for epileptic seizure detection, highlighting the benefits to classification performance of convolutional and recurrent neural networks.
Feature extraction methods also continue to be of paramount importance [8]. Boonyakitanont et al. [9] presented a systematic review on feature engineering strategies for EEG-based seizure analysis, which discussed the extraction of time- and frequency-domain representations, as well as how the feature space could be optimized for different classifier architectures. Machine learning has also found extensive application in predictive modeling endeavors [10]. Selim et al. [11] performed an analysis of various ML models, emphasizing the role of decision trees, support vector machines, and ensemble methods in creating effective early seizure warning systems. From a hardware implementation perspective, Wang et al. [12] presented an FPGA-based solution for multiclass SVM classification, highlighting the advantages of custom hardware in accelerating real-time detection while also optimizing power efficiency. In another related work, Hasen, Fleury, and Bhaskar [13] developed the Superfast Line Spectral Estimation (SLISE) technique and provided an efficient algorithm for spectral decomposition. This work is extended in this study and applied to seizure prediction in EEG signals. Overall, these previous works have highlighted a wide variety of algorithmic possibilities, but also the need for computational efficiency, which forms the motivation for the hybrid design presented in this study.

3. Background

EEG signals are composed of interesting features and noise components such as artifacts (muscle activity or external interference). The signals are then filtered and normalized (components of no interest are removed) prior to classification.
  • Raw Signal Acquisition: EEG signals represent neural activity during normal (interictal) and pre-seizure (preictal) periods. EEG recordings, however, may also include noise such as electromyographic artifacts, line noise, and movement artifacts, among others, which need to be carefully removed.
  • Dimensionality Reduction: The other problem with using raw EEG is the high dimensionality. This causes overfitting and computational overheads. Dimensionality reduction is required to extract only the most informative signal features.
  • Data Augmentation: The last data pre-processing problem is class imbalance in the dataset. The amount of seizure intervals is far less than the normal ones. Synthetic minority oversampling or SMOTE is used to synthesize more training samples and balance the classes to decrease model bias to the majority class.
  • Temporal Segmentation: EEG data are segmented to preserve the temporal characteristics and to provide adequate resolution for feature extraction. Window size and overlap are chosen such that they are appropriate for the seizure prediction horizon.
The goal of Superfast Line Spectral Estimation (SLSE) is to represent EEG signals as a superposition of sinusoids with certain amplitude, frequency, and phase. This representation of EEG signals, in turn, allows the power spectral density to be estimated efficiently, making it possible to perform online analysis of seizure detection.
The line spectral signal model expresses EEG data through a combination of sinusoidal waves:
s n = k = 1 K A k e j ( 2 π f k n + k ) + w ( n )
where
  • s ( n ) represents the discrete-time EEG signal;
  • A k denotes the amplitude of the kth spectral line;
  • f k represents the normalized frequency of the kth component;
  • k is the phase of the kth sinusoid;
  • w ( n ) represents additive white noise;
  • K is the total number of spectral bands.
The power spectral density is expressed as:
P f =   k = 1 K A k 2 δ ( f f k )
where δ ( f f k ) represents the Dirac delta function indicating spectral lines at frequencies f k .

4. Proposed Methodology

In this work, we propose a new seizure prediction pipeline that implements XGBoost and Advanced Line Spectral Estimation (ALSE) to extract features from raw EEG signals. Algorithm 1 extracts line spectral frequencies, amplitude, and phase shifts from EEG data using ALSE and is then used to create a feature matrix. The data is then split into training and test datasets, and the XGBoost classifier learns the features with tuned hyperparameters.
Algorithm 1 Seizure Prediction using XGBoost with ALSE Feature Extraction
  Input:
  - X r a w : Raw EEG signals (N samples × M time points)
  - y Binary labels (0 = interictal, 1 = preictal/seizure)
  Output:
  - Evaluation Metrics, Confusion Matrix
  - ROC Curve Visualization, Feature importance plot for XGBoost
1 :   Load   EEG   X r a w data
2 :   For   each   EEG   signal   x i   in   X r a w /* Apply Advanced Line Spectral Estimation (ASLE) */
3: Extract frequency-domain features fi = [ f1, f2, …, fk ] where k is the number of features
4: Concatenate all features fi = Line Spectral Frequencies, Amplitude, Phase shifts
5: Construct the feature matrix Xalse = [ f1, f2, …, fN ]
6: Split Xalse (Xtrain, Xtest), (ytrain, ytest)
7: max_depth, learning_rate, n_estimators/* Define XGBoost Model */
8: Optimize using L θ =   i = 1 n [ y i log p i 1 y i l o g ( 1 p i ) ] /*Objective function */
9 :   Define   p i = σ ( f i . θ ) /*Probability of Seizure*/
10: model.fit(Xtrain, ytrain)/* Train Model */
11: ypred = model.predict(Xtest)/* Predict Seizure Event */
12: Evaluate the model using standard metrics
13: ConfMatrix = confusion_matrix(ytest, ypred)/* Plot confusion matrix */
14: ROC = plot_roc_curve(ytest, yprob)/* Plot ROC Curve */
Few metrics are used to determine the efficacy of the model. Visualizations such as the ROC curve and confusion matrix are also used to analyze the performance of the classifier. The above approach enhances the seizure prediction by utilizing detailed frequency-domain features. This method allows us to develop an interpretable machine learning-based framework for preictal identification to improve early intervention.

Computational Optimization

The suggested framework uses various optimization techniques, some of which are listed below:
  • Toeplitz Matrix Inversion: In the Toeplitz structure of autocorrelation matrices, using the Levinson–Durbin algorithm, the autocorrelation matrix can be inverted in a fast way; this reduces the time complexity from O(N3) to O(N2).
  • Capon Beamforming: Spatial filtering can be used to improve the signal-to-noise ratio by attenuating interference while maintaining signals in desired directions.
  • Non-uniform FFT: Fast evaluation of the Fourier transform at arbitrary frequency samples can be performed with reduced computation while retaining spectral resolution.

5. Experimental Results and Analysis

In this part, a detailed interpretation of the results obtained from experimentation, the optimization of feature selection, classifier performances, and the comparison of various ML approaches are presented.
Two large datasets were combined, from two different sources: 40 iEEG recordings of patients with medically refractory epilepsy from Nizam Institute of Medical Sciences (NIMS) and 23 scalp EEG recordings of pediatric patients from the benchmarking dataset [14]. A dataset from multiple institutes not only ensures the generalization of the algorithms but is also applicable to any arbitrary patient group and data acquisition type.
The original feature set (X1–178) has varied discriminability:
  • Main spectral features (X1–X10) contribute high discriminability for seizure detection;
  • Temporal dynamics features (X170–X178) constitute a moderate contribution to classification accuracy;
  • Mid-range statistical features (X50–X150) make a consistent but lower individual contribution.

5.1. Advanced Line Spectral Estimation Results

The comparison between true and estimated frequency values presented in Figure 1 concerns multiple spectral components. As can be seen in Figure 1, the SLSE algorithm performs very well on all spectral components.
The important points to be noted about the spectral estimation are as follows:
  • True and estimated frequencies have a similar increasing trend for each index.
  • A slight deviation in estimated frequency from the true frequency is observed at the sixth and ninth index.
  • True and estimated frequency are in very good agreement in the high-frequency part (11th and 12th index).
  • The mean square error between true and estimated frequency is 0.0034 Hz.
  • The largest error in the estimation is 0.12 Hz at the sixth index.

5.2. Classification Results on GPU

The hyperparameters and performance of the seizure classification system are provided in Table 1. The performance metrics field shows an accuracy of 95.50%, a sensitivity/recall of 92.23%, a specificity of 93.38%, and an F1-score of 94.12%. In the case of GPU execution, the average (23.48 min) and maximum (33.46 min) prediction time are also provided. The SLSE window length was 256 samples, and the window overlap ratio was set at 50%. The primary classifier was an XGBoost ensemble. The dataset used includes 24 participants, with each participant recorded for 4 h at a 256 Hz sampling rate. This table displays the most important settings and evaluation parameters.

5.3. Comparative Analysis

Multiple classifiers were compared in order to choose an optimal method for sei-zure prediction:
  • Decision Tree Classification: Decision trees divide the feature space into a set of simple decision rules. These rules are easily interpretable, but a single tree may not have the desired properties, such as overfitting in high dimensional EEG feature spaces. As such, a tree requires tuning via pruning methods.
  • Random Forest Ensemble: Random forests are an ensemble of decision trees trained on random subsets of the data. Random forests decrease the variance of predictions, while also being more robust. Additionally, random forests provide feature importance rankings.
  • Neural Network Architectures: Deep neural networks, particularly CNN and RNN architectures, are capable of modeling non-linear temporal dependencies in EEG signals but require substantial computational resources. Convolutional layers are adept at capturing spatial patterns, while recurrent structures model temporal dependencies.
  • XGBoost Implementation: The XGBoost classifier employs gradient boosting with regularization to avoid overfitting while maintaining high predictive accuracy. It also supports parallel processing for efficient training on large EEG datasets.
Classification reports for XGBoost and NN are presented in Table 2. It can be seen that XGBoost has a perfect performance with accuracy equaling 1.00 and precision, recall, and F1-score equaling 1.00 for all classes. On the other hand, it can be clearly seen that the performance of NN is extremely poor with accuracy equaling 0.49 and relatively low precision, recall, and F1-score for all classes. This simple comparison of XGBoost and NN shows that XGBoost outperforms NN in seizure classification on the given dataset, as XGBoost can better capture the class distribution and provide a more robust and reliable prediction.
Table 3 shows the classification results of the XGBoost and random forest algorithms. XGBoost reaches an accuracy of 1.00, suggesting that it perfectly classifies both classes. Random forest has an accuracy of 0.93, but its precision, recall, and F1-scores are all slightly below those of XGBoost. This suggests that XGBoost outperforms random forest in classifying seizures, as it generalizes better and reaches better results across all metrics.
Table 4 also displays the different results for XGBoost and decision tree. XGBoost once again shows perfect precision, recall, and F1-scores of 1.00 for both classes, while the decision tree classifier has an accuracy of 0.83 and lower precision, recall, and F1-scores. This table, like the others, shows that XGBoost is more effective than decision tree in classifying the seizure data, as it is able to make more accurate and consistent predictions for both classes.
The decrease in accuracy of XGBoost on GPU shown in Table 1 versus CPU may be due to a number of factors, such as differences in numerical precision (e.g., reduced floating-point precision on GPUs), increased parallelization overhead, or poor memory management. These factors can lead to small errors or slower convergence in the calculations performed on a GPU.

6. Conclusions and Future Scope

This work provides an efficient pipeline for epileptic seizure detection by combining advanced signal processing and machine learning techniques. The SLSE algorithm has reduced computational complexity for efficient EEG spectral analysis. The XGBoost classification model achieves high performance metrics. Online detection is obtained with clinically relevant lead time. Generalizability across different datasets and patient populations is also achieved. The developed system is suitable for real-time applications and can be integrated into clinical seizure prediction systems. Future work will include clinical validation and integration with therapeutic intervention systems.

Author Contributions

The study’s concept was developed by K.R.K. who also contributed to study design and the Advanced Line Spectral Estimation. XGBoost modeling, testing, and verification were performed by B.B.S. The two authors contributed jointly to data analysis, the interpretation of the results, and manuscript writing. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

Data are available from the authors upon reasonable request.

Conflicts of Interest

The authors declare no conflicts of interest.

References

  1. Kunekar, P.; Gupta, M.K.; Gaur, P. Detection of epileptic seizure in EEG signals using machine learning and deep learning techniques. J. Eng. Appl. Sci. 2024, 71, 21. [Google Scholar] [CrossRef]
  2. Ein Shoka, A.A.; Dessouky, M.M.; El-Sayed, A.; Hemdan, E.E. EEG seizure detection: Concepts, techniques, challenges, and future trends. Multimed. Tools Appl. 2023, 82, 42021–42051. [Google Scholar] [CrossRef] [PubMed]
  3. Rasyaad, F.; Rizal, A.; Wijayanto, I. Enhancing epileptic seizure classification using entropy measures on EEG signals. In Proceedings of the 2025 4th International Conference on Electronics Representation and Algorithm (ICERA), Yogyakarta, Indonesia, 12 June 2025; pp. 382–387. [Google Scholar] [CrossRef]
  4. Yu, A.; Singh, M.; Pandey, A.; Dybas, E.; Agarwal, A.; Kao, Y.; Zhao, G.; Kao, T.-J.; Li, X.; Shin, D.S.; et al. Integrating manual preprocessing with automated feature extraction for improved rodent seizure classification. Epilepsy Behav. 2025, 165, 110306. [Google Scholar] [CrossRef] [PubMed]
  5. Shabarinath, B.B.; Challagulla, K.; Visodhan, M.R. A comparative study of epileptic seizure detection framework using SVM and ELM. In Proceedings of the 2019 International Conference on Intelligent Computing and Control Systems (ICCS), Madurai, India, 15–17 May 2019; pp. 302–306. [Google Scholar] [CrossRef]
  6. Zhao, Y.; Chu, D.; He, J.; Xue, M.; Jia, W.; Xu, F.; Zheng, Y. Interactive local and global feature coupling for EEG-based epileptic seizure detection. Biomed. Signal Process. Control 2023, 81, 104441. [Google Scholar] [CrossRef]
  7. Aboyeji, S.T.; Ahmad, I.; Wang, X.; Chen, Y.; Yao, C.; Li, G.; Tong, M.C.F.; Siu, A.K.Y.; Zhao, G.; Chen, S. DCSENets: Interpretable deep learning for patient-independent seizure classification using enhanced EEG-based spectrogram visualization. Comput. Biol. Med. 2025, 185, 109558. [Google Scholar] [CrossRef] [PubMed]
  8. Shoeibi, A.; Ghassemi, N.; Khodatars, M.; Jafari, M.; Hussain, S.; Alizadehsani, R. Application of deep learning techniques for automated detection of epileptic seizures: A review. Biomed. Signal Process. Control. 2020, 57, 101–118. [Google Scholar]
  9. Boonyakitanont, P.; Lek-Uthai, A.; Chomtho, K.; Songsiri, J. A review of feature extraction and performance evaluation in epileptic seizure detection using EEG. Biomed. Signal Process. Control. 2019, 48, 222–235. [Google Scholar] [CrossRef]
  10. Selim, S.; Elhinamy, E.; Othman, H.; Abouelsaadat, W.; Salem, M.A.-M. A review of machine learning approaches for epileptic seizure prediction. IEEE Trans. Biomed. Eng. 2019, 66, 2798–2809. [Google Scholar]
  11. Wang, Y.; Li, Z.; Feng, L.; Bai, H.; Wang, C. Hardware design of multiclass SVM classification for epilepsy and epileptic seizure detection. IET Circuits Devices Syst. 2018, 12, 469–478. [Google Scholar] [CrossRef]
  12. Hansen, T.L.; Fleury, B.H.; Bhaskar, D. Superfast Line Spectral Estimation. IEEE Trans. Signal Process. 2018, 66, 2511–2526. [Google Scholar] [CrossRef]
  13. Shabarinath, B.B.; Muralidhar, P. Epileptic seizure inference using kernelized SVM with integrated training on PYNQ-Z2. In Proceedings of the 2022 IEEE International Symposium on Smart Electronic Systems (iSES), Warangal, India, 18–22 December 2022; pp. 251–256. [Google Scholar] [CrossRef]
  14. Guttag, J. CHB-MIT Scalp EEG Database (Version 1.0.0); RRID:SCR_007345; PhysioNet; MIT Laboratory for Computational Physiology: Cambridge, MA, USA, 2010. [Google Scholar] [CrossRef]
Figure 1. Superfast Line Spectral Estimation: true vs. estimated frequencies.
Figure 1. Superfast Line Spectral Estimation: true vs. estimated frequencies.
Csmf 12 00004 g001
Table 1. System performance metrics and configuration parameters.
Table 1. System performance metrics and configuration parameters.
ParameterValue
Overall Accuracy95.50%
Sensitivity (Recall)92.23%
Specificity93.38%
F1-Score94.12%
Average Prediction Time (GPU)23.48 min
Maximum Prediction Time (GPU)33.46 min
SLSE Window Length256 samples
Window Overlap Ratio50%
Primary ClassifierXGBoost ensemble
CHB-MIT Participants24 subjects
NIMS Participants24 subjects
Total Recording Duration4 h per subject
Sampling Rate256 Hz
Table 2. Classification reports for XGBoost and neural network.
Table 2. Classification reports for XGBoost and neural network.
XGBoostNeural Network
PrecisionRecallF1-ScorePrecisionRecallF1-Score
01.001.001.000.46 0.410.43
11.001.001.000.50 0.60.53
Accuracy1.000.49
Macro avg1.001.001.000.480.480.48
Weighted avg1.001.001.000.480.490.48
Table 3. Classification reports for XGBoost and random forest.
Table 3. Classification reports for XGBoost and random forest.
XGBoostRandom Forest
PrecisionRecallF1-ScorePrecisionRecallF1-Score
01.001.01.000.950.940.94
11.001.01.000.920.910.91
Accuracy1.000.93
Macro avg1.001.001.000.940.920.92
Weighted avg1.001.001.000.940.930.93
Table 4. Classification reports for XGBoost and decision tree.
Table 4. Classification reports for XGBoost and decision tree.
XGBoostDecision Tree
PrecisionRecallF1-ScorePrecisionRecallF1-Score
01.001.01.000.850.800.82
11.001.01.000.810.80.84
Accuracy1.000.83
Macro avg1.001.001.000.830.830.83
Weighted avg1.001.001.000.830.830.83
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

Krishna, K.R.; Shabarinath, B.B. Enhanced Early Detection of Epileptic Seizures Through Advanced Line Spectral Estimation and XGBoost Machine Learning. Comput. Sci. Math. Forum 2025, 12, 4. https://doi.org/10.3390/cmsf2025012004

AMA Style

Krishna KR, Shabarinath BB. Enhanced Early Detection of Epileptic Seizures Through Advanced Line Spectral Estimation and XGBoost Machine Learning. Computer Sciences & Mathematics Forum. 2025; 12(1):4. https://doi.org/10.3390/cmsf2025012004

Chicago/Turabian Style

Krishna, K. Rama, and B. B. Shabarinath. 2025. "Enhanced Early Detection of Epileptic Seizures Through Advanced Line Spectral Estimation and XGBoost Machine Learning" Computer Sciences & Mathematics Forum 12, no. 1: 4. https://doi.org/10.3390/cmsf2025012004

APA Style

Krishna, K. R., & Shabarinath, B. B. (2025). Enhanced Early Detection of Epileptic Seizures Through Advanced Line Spectral Estimation and XGBoost Machine Learning. Computer Sciences & Mathematics Forum, 12(1), 4. https://doi.org/10.3390/cmsf2025012004

Article Metrics

Back to TopTop