Epileptic Seizure Detection and Prediction from EEG Data: A Machine Learning Approach with Clinical Validation

In recent years, machine learning has become an increasingly powerful tool for supporting seizure detection and monitoring in epilepsy care. Traditional approaches focus on identifying seizures only a

Epileptic Seizure Detection and Prediction from EEG Data: A Machine Learning Approach with Clinical Validation

In recent years, machine learning has become an increasingly powerful tool for supporting seizure detection and monitoring in epilepsy care. Traditional approaches focus on identifying seizures only after they begin, which limits the opportunity for early intervention and proactive treatment. In this study, we propose a novel approach that integrates both real-time seizure detection and prediction, aiming to capture subtle temporal patterns in EEG data that may indicate an upcoming seizure. Our approach was evaluated using the CHB-MIT Scalp EEG Database, which includes 969 hours of recordings and 173 seizures collected from 23 pediatric and young adult patients with drug-resistant epilepsy. To support seizure detection, we implemented a range of supervised machine learning algorithms, including K-Nearest Neighbors, Logistic Regression, Random Forest, and Support Vector Machine. The Logistic Regression achieved 90.9% detection accuracy with 89.6% recall, demonstrating balanced performance suitable for clinical screening. Random Forest and Support Vector Machine models achieved higher accuracy (94.0%) but with 0% recall, failing to detect any seizures, illustrating that accuracy alone is insufficient for evaluating medical ML models with class imbalance. For seizure prediction, we employed Long Short-Term Memory (LSTM) networks, which use deep learning to model temporal dependencies in EEG data. The LSTM model achieved 89.26% prediction accuracy. These results highlight the potential of developing accessible, real-time monitoring tools that not only detect seizures as traditionally done, but also predict them before they occur. This ability to predict seizures marks a significant shift from reactive seizure management to a more proactive approach, allowing patients to anticipate seizures and take precautionary measures to reduce the risk of injury or other complications.


💡 Research Summary

This paper presents an integrated machine‑learning framework that simultaneously detects ongoing epileptic seizures and predicts imminent seizures from scalp electroencephalogram (EEG) recordings. The authors used the publicly available CHB‑MIT Scalp EEG Database, which contains 969 hours of continuous EEG from 23 pediatric and young‑adult patients with drug‑resistant epilepsy and 173 documented seizure events.

Data preprocessing involved segmenting the 23‑channel recordings into 1‑second sliding windows and extracting a rich set of features from multiple domains, including power spectral density, parametric PSD, and wavelet coefficients. Because seizure windows are vastly outnumbered by non‑seizure windows, the authors applied a combined oversampling (SMOTE) and undersampling strategy to balance the training set before model development.

For seizure detection, four supervised classifiers were evaluated under identical feature sets and a rigorous cross‑validation pipeline: K‑Nearest Neighbors (k = 5), Logistic Regression with L2 regularization, Random Forest (100 trees, max depth = 10), and Support Vector Machine with an RBF kernel. Performance was measured using accuracy, recall (sensitivity), precision, F1‑score, and ROC‑AUC. Logistic Regression achieved 90.9 % accuracy, 89.6 % recall, and an AUC of 0.91, indicating a well‑balanced trade‑off between sensitivity and specificity suitable for clinical screening. In contrast, Random Forest and SVM reported higher overall accuracy (≈94 %) but a recall of 0 %, meaning they failed to detect any seizures. This stark discrepancy underscores the inadequacy of accuracy alone as a metric in highly imbalanced medical datasets and highlights the importance of sensitivity‑oriented evaluation.

For seizure prediction, the authors designed a Long Short‑Term Memory (LSTM) network to capture temporal dynamics preceding a seizure. Input sequences comprised 30‑second EEG segments (128 Hz sampling per channel). The architecture consisted of two stacked LSTM layers (128 units each), a dropout layer (0.3), and a sigmoid output neuron. Training employed the Adam optimizer, binary cross‑entropy loss, early stopping, and learning‑rate decay to mitigate overfitting. In five‑fold cross‑validation the LSTM attained an average prediction accuracy of 89.26 % and an AUC of 0.88, with particular strength in distinguishing the 5‑ to 30‑second pre‑ictal window from inter‑ictal background. These results support the hypothesis that subtle, temporally evolving EEG patterns precede clinical seizure onset and can be learned by recurrent neural networks.

The study contributes three key insights: (1) evaluation metrics must prioritize recall and AUC in imbalanced seizure detection tasks; (2) relatively simple linear models such as Logistic Regression can deliver clinically acceptable sensitivity while being computationally lightweight for real‑time deployment; and (3) deep recurrent models can effectively predict seizures minutes before they manifest, opening the door to proactive interventions.

Limitations include the exclusive focus on a pediatric/young‑adult cohort, a fixed 23‑channel montage that may not capture all spatial seizure signatures, and the absence of a real‑time implementation benchmark (e.g., latency, power consumption). Future work should expand to multi‑center, age‑diverse datasets, explore channel‑reduction strategies for wearable devices, and develop optimized, edge‑compatible neural architectures (e.g., TinyML) to bring both detection and prediction capabilities to bedside or ambulatory settings.

In conclusion, the authors demonstrate that a combined detection‑prediction pipeline based on conventional machine‑learning classifiers and LSTM deep learning can shift epilepsy care from reactive seizure monitoring toward anticipatory management, potentially reducing injury risk and improving quality of life for patients and caregivers.


📜 Original Paper Content

🚀 Synchronizing high-quality layout from 1TB storage...