Introduction: Over 70 million people worldwide are impacted by epilepsy, with approximately one-third experiencing drug-resistant forms. Surgical resection of the epileptogenic zone (EZ) is the most effective route to seizure freedom. Though promising, automated EZ detection algorithms such as neural fragility are hindered by technical complexity and inconsistent results. Our objective is to facilitate transparency and reproducibility of neural fragility by providing open-source code for EZ localization, validated with machine learning on public datasets.
Methods: We developed a neural fragility module integrated into the open source “Reproducible analysis and visualization of iEEG" from "R" (RAVE) platform. The module features a voltage trace viewer, fragility map, average fragility-over-time plot, and quantile plot of fragility percentiles. We tested on N = 24 publicly available patients from Fragility, NIH, and HUP datasets to verify voltage reconstruction accuracy and patient outcome prediction. We employed a random forest model with 100 decision trees to predict outcome. Pairwise comparisons were adjusted using Bonferroni correction for multiple p-value testing.
Results: We analyzed 64 iEEG recordings from 24 patients (22 ECoG and 2 sEEG, average age 36.25 ± 10.57 years), of which 14 patients were seizure-free post-surgery and 10 were not. Trials were chosen by calculating average R2 of the model’s voltage reconstruction and removing those that resulted in inaccurate models (possibly due to suboptimal sampling or implantation). The mean 10th percentile of R2 was 0.836 ± 0.113. In the first 20 seconds after seizure onset, resected EZ electrodes in seizure-free patients showed significantly higher AUC for fragility over time compared to non-EZ electrodes (p = 2.11e-07), while non-seizure-free patients did not show significant differences (p = 0.151). Our model achieved an AUC of 0.707 for prediction of patient outcome using leave-one-out cross-validation.
Conclusion : The neural fragility RAVE module offers easy fragility visualization, interaction, and analysis, making it a valuable research tool freely available for surgical epilepsy programs. Voltage reconstruction verification gives insight into adequacy of iEEG recordings for analysis. A random forest model was able to predict patient outcomes.