AI helps neurologists distinguish epilepsy from functional seizures
Similar symptoms can complicate seizure diagnosis, prompting researchers to test whether AI can identify useful clues in routine medical notes before confirmatory monitoring.
Study: Early epilepsy detection from electronic health records with large language models.
In a recent study published in the journal npj Digital Medicine, researchers describe the development and validation of “EpiScreen”, a novel artificial intelligence (AI) system designed to distinguish epilepsy from psychogenic non-epileptic seizures (PNES) using clinical notes from routinely documented electronic health records (EHRs).
The retrospective, two-institution study used 13,633 patient records to assess whether fine-tuned large language models (LLMs) could accurately differentiate epilepsy from PNES.
EpiScreen outperformed the comparison models, achieving an area under the receiver operating characteristic curve (AUC) of up to 0.992 in within-institution testing and 0.980 in cross-institutional testing. AUC measures a model’s ability to distinguish between the two conditions across different classification thresholds.
In a retrospective case-review assessment, EpiScreen improved clinicians’ classification accuracy, supporting its potential in future epilepsy screening applications.
Background
Epilepsy is clinically defined as a chronic neurological disorder characterized by recurring, unprovoked seizures. Seizures arise from sudden, abnormal electrical discharges in the brain, with public health records estimating that approximately 50 million individuals live with the condition globally.
Epilepsy’s diagnosis can be complicated by PNES, also termed functional or dissociative seizures. These involve paroxysmal events (sudden, temporary seizure-like episodes) that resemble epileptic seizures but are not caused by epileptic electrical activity.
Since epilepsy and PNES have different underlying mechanisms and management needs, timely differentiation and accurate diagnoses are critical for appropriate care. Misdiagnosis remains common, with prior studies indicating that 20%–30% of patients
Prolonged inpatient video-electroencephalography (vEEG) is the diagnostic gold standard for distinguishing epileptic seizures from PNES. The method records synchronized brain waves alongside behavioral data. But vEEG is costly and time-consuming, often costing over US$15,000 per admission in the United States, with reported wait times of 8 to 12 weeks that vary across healthcare systems.
Beyond direct expenses, diagnostic delays can lead to unnecessary treatment and delay appropriate care. Researchers are investigating whether routinely collected clinical notes can support earlier screening for both conditions.
Routine clinical notes contain extensive diagnostic signals, but seizure semiology (the symptoms, signs, and sequence of a seizure-like event) overlaps considerably across disorders. Earlier narrative-based approaches have shown limited diagnostic performance.
About the study
The researchers adapted existing LLMs to address this diagnostic bottleneck and differentiate between epilepsy and PNES using only unstructured clinical narratives.
The system was named “EpiScreen” and was trained and evaluated using a collated dataset comprising 3,451 records from the Beth Israel Deaconess Medical Center’s Medical Information Mart for Intensive Care IV (MIMIC-IV) database and 10,182 records from the University of Minnesota (UMN) Clinical Data Repository. Labels reflected clinicians’ final documented diagnoses, and we processed notes to approximate information available before diagnosis. Patients with coexisting epilepsy and PNES were excluded.
EpiScreen was developed by instruction fine-tuning open-source LLMs, including Qwen-2.5-32B, DeepSeek-R1-32B, Llama-3.3-70B, and Med42-70B, using Quantized Low-Rank Adaptation (QLoRA). This method reduces the memory and training demands of adapting large models.
To explain the model, the study used sentence-level Integrated Gradients (IG), a mathematical technique that computes attribution scores to highlight the sentences most influential in the algorithm’s decisions across 11 predefined clinical feature categories.
Finally, the study conducted a retrospective clinician-AI assessment in which four medical teams (six neurology residents and two senior attending physicians) evaluated 300 MIMIC-IV test cases. Each pair reached decisions by consensus.
Study findings
EpiScreen consistently outperformed conventional supervised baselines, including ClinicalBERT, achieving AUCs of 0.891 on MIMIC-IV and 0.976 on UMN for its Med42-based variant. Qwen- and DeepSeek-based variants reached 0.992 on UMN.
Cross-institutional evaluations also outperformed the comparison models, with the best AUCs reaching 0.875 on MIMIC-IV and 0.980 on UMN. These evaluations tested models on records from institutions that did not supply their training data.
In the clinician assessment, standalone EpiScreen achieved 81.0% diagnostic accuracy, compared with unaided senior attendings (81.7%) and unaided neurology residents (76.3%–79.3%). These differences were not statistically significant. Providing clinicians with AI predictions and sentence attributions improved resident-group accuracy to 87.7%–89.0% and attending accuracy to 89.3%. The largest improvement among the reported group accuracies was about 12.7 percentage points.
Finally, error-pattern analyses showed that AI assistance reduced resident Group A’s false negatives (missed epilepsy cases) from 36 to 14, while the attending pair reduced false positives from 37 to 19.
Not all diagnostic labels were vEEG-confirmed, but sensitivity analyses in confirmed cases supported the findings. Documentation bias remains possible, and other seizure mimics, including syncope and sleep disorders, were not evaluated.
Conclusions
The findings support further evaluation of EpiScreen as a neurological decision-support tool. The authors suggest using it during or after neurology referral, before confirmatory vEEG, to support earlier assessment and help clinicians prioritize urgent monitoring. The authors propose reduced diagnostic delays, costs, and unnecessary antiseizure medication exposure, but these remain benefits rather than measured outcomes.
Future investigations must prioritize prospective, real-time trials to confirm how this collaborative AI system performs in real-world clinical settings using minimally curated notes. EpiScreen is intended to support clinical judgment alongside definitive testing.