Learning Where Seizures Start from What Surgeons Treated and Whether It Worked

Epilepsy surgery planning increasingly relies on stereoelectroencephalography (SEEG). In this technique, thin depth electrodes are pushed through small drill holes so that each one records from a line of points, called contacts, deep inside the brain. Machine learning models that mark which contacts sit in the seizure onset zone (SOZ, the tissue where seizures begin) are still trained on contact-by-contact labels drawn by epileptologists. Those labels are slow to produce, vary between raters, and, as outcome studies suggest, are often wrong. Every SEEG patient who goes on to treatment also leaves behind a different, cheaper kind of supervision: a record of which contacts were destroyed or removed, and whether the patient became seizure-free. When the treatment is radiofrequency thermocoagulation through the electrodes themselves, the treated set is literally a list of recorded contacts. The record therefore needs no image registration and no expert marking.

We propose to train contact-level SOZ detectors using only this treatment-plus-outcome record. The core idea fits in two sentences. If a patient became seizure-free after treating contacts $T$, then most of the brain's seizure-generating activity probably lay inside $T$; if seizures continued, a meaningful share lay outside it. We turn this into a training loss that rewards the model for concentrating predicted onset activity inside the treated set in successes and outside it in failures. The result is a contact-level map learned without any expert contact labels. It can then be tested against the clinicians' own marks and against post-treatment outcome.

Core Claim

Routine treatment records are a weak label at the level of a whole patient. This is analogous to the single "maximum severity" score per colonoscopy patient that Domain Adaptation for Ulcerative Colitis Severity Estimation Using Patient-Level Diagnoses used to grade individual video frames, and to the routine RECIST diameter lines that Weakly Supervised Lesion Co-Segmentation on Ct Scans turned into dense lesion masks. Our claim is that this label, used with a loss built around treatment coverage, is strong enough to learn contact-level SOZ maps that transfer across patients. We also expect those maps to predict surgical outcome at least as well as the best label-free physiological marker.

The file contains no prior work that trains SEEG localizers from outcome. Neural Fragility as an EEG Marker of the Seizure Onset Zone computes, for each electrode, how small a change to a fitted linear network model would make that node unstable. It uses resection margins and outcome only after the fact, to validate the marker, and never trains on them. We turn that validation logic into a training objective.

Research Program

Each contact is first summarized by a representation learned without labels. We adopt the recipe of PPi: Pretraining Brain Signal Model for Patient-independent Seizure Detection, which pretrains on unlabeled SEEG with two tasks: telling whether two segments come from the same channel, and detecting temporally swapped context. It then subtracts each patient's resting background embedding, which counters the strong tendency of intracranial features to cluster by patient identity. That tendency is documented by Cross-patient Seizure Onset Zone Classification by Patient-Dependent Weight, so PPi supplies the method for the representation stage. We feed ictal and interictal windows into this representation and append each contact's neural fragility value, so the learned model can never do worse than simply ignoring the learned features.

A small scoring head maps each contact $i$ of patient $p$ to a non-negative onset score $s_i$. The supervision is the treated set $T_p$ and the binary outcome $y_p$, where 1 means seizure-free (Engel class I). We define the predicted coverage of a treatment as

$$q_p = \frac{\sum_{i \in T_p} s_i}{s_{0,p} + \sum_{i} s_i},$$

where $s_{0,p}$ is a learned score for a per-patient "unsampled" pseudo-contact. This term exists because SEEG often misses the true origin, a failure mode emphasized by Hui Ming Khoo et al.. We train with binary cross-entropy between $q_p$ and $y_p$, adding a mild sparsity penalty on $s$. In a seizure-free patient, the model is pushed to place its onset mass inside $T_p$. In a failure, it must place mass either on untreated recorded contacts or on the unsampled term. The unsampled term keeps failures caused by missed coverage from corrupting the contact scores.

The loss is a multiple-instance formulation, meaning labels attach to groups of contacts rather than individual contacts. It is close in spirit to the positive-unlabeled learning of Classification of the Epileptic Seizure Onset Zone Based on Partial Annotation, which trains SOZ classifiers on a few expert-confirmed positives while treating everything else as unlabeled. The difference is that our positives are never expert-marked: they are implied by outcome, and failures supply a signal that PU learning cannot use. Robustness to noisy seeds matters here, because errors in initial pseudo-labels propagate. Learning to Segment Medical Images with Scribble-Supervision Alone shows this for scribble-expanded masks and needs explicit uncertainty estimation to contain it. That paper constrains our design: we avoid iterative self-labeling entirely, so that the only supervision is the fixed treatment record.

One concern must be faced directly. Clinicians chose $T_p$ using their own SOZ judgment, so a model trained to cover $T_p$ in successes could simply learn to imitate the clinicians. Failures are the counterweight, because they are exactly the cases where clinician judgment was insufficient. Whether the learned map ever departs from clinician marks in a useful direction is an empirical question, and it is the central check below.

Data

The best-suited cohorts in the file are three. The first is the five-center, 91-patient retrospective cohort of Neural Fragility as an EEG Marker of the Seizure Onset Zone: 462 seizures, over 14,000 electrodes, resection or ablation regions, and a near-balanced 44 successes and 47 failures. The second consists of SEEG-guided thermocoagulation series, such as Xiaotong Fan et al. and the pediatric tuberous sclerosis cohorts of Xinhua Wang et al. and Optimization and high-density array of stereoelectroencephalography-guided radiofrequency thermocoagulation for the treatment of pediatric tuberous sclerosis complex with epilepsy. In these series the treated contacts are recorded contacts by construction. The third is the 10-patient Xuanwu interictal cohort of Automatic Localization of Seizure Onset Zone Based on Multi-Epileptogenic Biomarkers Analysis of Single-Contact from Interictal SEEG, which carries clinician contact labels and is useful as an external label-quality check.

Access to the first two is not established by the file, and securing them is the main practical risk. Unlabeled pretraining can use the large PPi clinical set (123 patient files, 738 hours) together with the MAYO and FNUSA SEEG data.

Baselines

The do-nothing reference point is a model that ranks contacts uniformly, or by distance to the treated-set centroid. It shows how much of any outcome-prediction score comes merely from the size and placement of the treatment.

The strongest label-free competitor is neural fragility as reported by Neural Fragility as an EEG Marker of the Seizure Onset Zone. On the 91-patient cohort it predicted outcome with an AUC of 0.88 and 76% accuracy, against 48% for clinicians, and correctly flagged 43 of 47 failures. We will recompute fragility on our exact splits. Its outcome prediction will use the same coverage statistic $q_p$, with fragility in place of $s_i$, so that the scoring rule is identical and only the per-contact score differs. Beating this baseline means a higher held-out outcome AUC under leave-one-center-out evaluation, with a paired bootstrap interval that excludes zero.

The strongest supervised competitor is the same network trained with clinician-marked SOZ contacts as labels. It gets equal pretraining, equal hyperparameter search budget, and the same splits. For reference, the expert-label pipeline of Automatic Localization of Seizure Onset Zone Based on Multi-Epileptogenic Biomarkers Analysis of Single-Contact from Interictal SEEG reports 89.27% sensitivity, 90.37% specificity and 81.38% positive predictive value in leave-one-patient-out testing on its 10 Xuanwu patients. The cross-patient method of Cross-patient Seizure Onset Zone Classification by Patient-Dependent Weight reports 76.99% average accuracy on 11 Juntendo patients, up from 66.18%. These figures come from different cohorts and are not directly comparable to ours; we will rerun the methods rather than quote them. Matching this baseline on contact-level AUC against clinician marks in seizure-free patients, while using zero contact labels, counts as success. Exceeding it on outcome prediction would be the stronger result.

Three ablations isolate the key ingredient. In the first, treated contacts are simply labeled positive and all others negative, across all patients. In the second, a PU learner in the style of Classification of the Epileptic Seizure Onset Zone Based on Partial Annotation uses only seizure-free patients' treated contacts as positives. In the third, the full model runs without the unsampled term $s_{0,p}$. If either of the first two matches the full model, failures carry no useful signal and the coverage loss is unnecessary.

Why not just…?

Why not just use neural fragility, which already needs no labels? This is the most serious threat. Fragility already reaches an outcome AUC of 0.88 in Neural Fragility as an EEG Marker of the Seizure Onset Zone. We include fragility as an input feature, so the learned model can recover it. The proposal is justified only if outcome-supervised training adds measurable value on top of fragility under the same coverage-based outcome rule. If it does not, the honest conclusion is that fragility already extracts what treatment records contain, and we will report that.

Why not just train on the clinicians' SOZ marks, which are in every SEEG report? Those marks are cheap to collect, but they encode exactly the judgment that outcome studies show to be fallible: clinicians were 48% accurate at predicting outcome in the fragility cohort. A model trained on them is capped at reproducing them. The clinician-mark baseline above tests this directly. If it equals our model on outcome prediction, outcome supervision adds nothing beyond the reports.

Why not just label treated contacts as positives? That labeling assumes every treatment was correct. Failures make up about half of the fragility cohort, and naive labeling turns each of them into confidently wrong labels. The first ablation measures the cost. If naive labeling performs as well, the coverage loss is unnecessary.

Proposed Experiments and Decisive Checks

The primary experiment trains on all but one center and tests on the held-out center, repeated for every center. It reports two quantities: outcome AUC from $q_p$ on held-out patients, and contact-level AUC against clinician SOZ marks restricted to held-out seizure-free patients, where those marks are most trustworthy. Holding out whole centers addresses the patient- and site-level clustering that Cross-patient Seizure Onset Zone Classification by Patient-Dependent Weight documents, and the spurious hospital cues flagged by SpurCon: Weighted Supervised Contrastive Learning for Mitigating Spurious Cues in Medical Imaging.

The decisive check concerns failure patients. If the model is only copying clinician choices, its predicted onset mass in failures will sit inside $T_p$. If it has learned something new, a substantial share will fall on specific untreated recorded contacts or on the unsampled term. Where reoperation or re-ablation records exist, we test whether the untreated contacts the model highlights were the ones later treated, and whether later treatment of them produced seizure freedom.

A secondary check repeats training on the thermocoagulation cohorts alone, where no registration error is possible. If performance improves there relative to resection cohorts, imprecise mapping of resection volumes onto contacts is a measurable source of label noise. Finally, we test whether learned interictal-only scores predict outcome. If they do, the approach would extend to the interictal setting of Automatic Localization of Seizure Onset Zone Based on Multi-Epileptogenic Biomarkers Analysis of Single-Contact from Interictal SEEG, shortening monitoring stays without any expert labeling.