Imagine you’re a doctor looking at a patient’s brainwaves (EEG). You’ve seen thousands of common seizures, but suddenly, you see something... weird. It doesn’t fit any of the standard categories. As a human, you’d say, "I’m not sure what this is; let’s investigate." Most AI models, however, are forced to guess. They’ll confidently tell you it’s a "Type A" seizure just because that’s the closest thing they were taught, even if they're dead wrong. This paper introduces a way to give these models an "I don't know" button.
TL;DR
Most seizure-classification AI assumes it has seen every possible seizure type during training, but real-world patients often present with rare or atypical brainwaves. This paper establishes the first "Open-Set Recognition" benchmark for EEG, testing whether models can detect when they've encountered a seizure type they weren't trained on—and the results show we still have a long way to go.
What Problem Does This Paper Address?
In machine learning, we often play in a "closed-set" sandbox: we train a model on five classes and test it on those same five classes. But clinical reality is an "open-set" world. Rare seizure types exist, and a model that forces a wrong label is arguably more dangerous than one that simply abstains.
The challenge is that EEG data is notoriously "noisy" and varies wildly from person to person. The authors tackle a critical question: Can an AI distinguish between a new seizure type it hasn't seen before and just a new patient whose brainwaves look slightly different?
Methods
The researchers didn't just build a simple classifier; they started with a heavy hitter: an EEG Foundation Model (EFM). This is a massive model pretrained on 10,000 recordings to understand the "language" of brainwaves before it ever sees a specific seizure label.
They fine-tuned this model on "known" seizure types and then applied seven different post-hoc scorers. These are mathematical "vibe checks" performed after the model makes a prediction to see how confident it actually is. They tested:
- Baselines: Like Maximum Softmax Probability (MSP).
- Energy-based models: Looking at the "energy" of the model's internal state.
- Feature-based methods: Like Mahalanobis distance, which measures how far a new input is from the "average" example of known classes.
- Fairness-focused methods: Like GHOST, designed to ensure the model doesn't unfairly reject data from certain groups.
To test these, they used a Leave-One-Class-Out (LOCO) protocol: they’d train the model on three types of seizures and then see if it could flag the fourth, "held-out" type as "unknown."
Datasets
The study uses the Temple University Hospital Seizure Corpus (TUSZ v2.0.3), the gold standard for public EEG data.
- Known Classes: Seizure types with at least 12 subjects (e.g., focal non-specific, generalized non-specific).
- Unknown Classes: Rare types (e.g., absence, tonic, myoclonic seizures).
The authors are releasing their specific subject splits and code to serve as a standardized benchmark for the community.
Key Insights and Ideas
- The Subject Confound: This is the "aha" (or "oh no") moment. The models struggled to tell the difference between a brand-new seizure type and a brand-new person. If a model hasn't seen you before, it might flag your normal seizure as "unknown" just because your brainwaves are unique.
- Taxonomy is Tricky: Some seizure types are defined by a lack of specific features (non-specific seizures). Because these classes are already "blurry," it's much harder for a model to draw a line between them and something truly new.
- Fairness isn't Automatic: Even methods like GHOST, which are supposed to make rejection rates more even across different people, didn't significantly improve fairness in this EEG context. Rejection rates remained highly uneven across subjects.
Key Results
The bottom line? Open-set recognition in EEG is hard.
- True Unknowns: The best-performing scorer (Mahalanobis) achieved a mean AUROC of 0.66. For context, 0.5 is a coin flip, and 1.0 is perfect. It’s better than guessing, but not by a huge margin.
- LOCO Performance: When trying to detect a common seizure type that was simply left out of training, performance dropped even further to 0.54–0.58 AUROC.
- Visualizing the Struggle: Figure 1 shows the "Open-Set Correct Classification Rate" (OSCR) curves. You can see that for most seizure types, the models are barely hugging the baseline, indicating they struggle to maintain accuracy while correctly rejecting unknowns.
Limitations and Future Work
The authors are refreshingly honest about the hurdles:
- Small Samples: Rare seizures are, well, rare. Some test sets only had 3–5 subjects, making the results "noisy."
- Window vs. Patient: The model looks at 15-second "windows" of data. In a clinic, doctors look at the whole patient over time. Future work needs to move toward patient-level evaluation.
- Pretraining Overlap: The foundation model might have seen some of the "unlabeled" versions of these patients during its initial training, which could slightly skew the results.
The paper concludes that while foundation models are a great start, we need models trained with explicit open-set objectives if we want them to be truly reliable in a hospital setting.
Summary updated