Localising the epileptogenic zone from single-pulse electrical stimulation responses using cross-trial attention
Journal:
medRxiv
Published Date:
Jul 31, 2026
Abstract
Background: Analysis of SPES responses often relies on averaging repeated stimulation trials to improve signal quality. However, this may obscure clinically relevant trial-to-trial variation. We tested whether explicitly modelling cross-trial dependencies improves localisation of the epileptogenic zone, using concordance with the clinical SOZ as a proxy endpoint, and explored whether resection of model-positive channels is associated with postsurgical seizure freedom. Methods: We developed an interleaved Hierarchical Attention Transformer (HAT) that models cross-trial and cross-channel dependencies in multi-trial SPES responses without averaging. We compared the HAT with two baselines that average either responses or trial embeddings. Models were evaluated with patient-held-out, repeated five-fold cross-validation on SPES data from 35 patients. Robustness to reduced trial availability at inference was assessed by restricting test inputs to 1 or 5 trials. Associations with surgical outcome were assessed using AUROC and patient-level tests on the proportion of model-positive channels resected. Results: The HAT had higher SOZ concordance than the trial-averaged baseline (AUROC 0.762 vs 0.721; mean paired difference 0.041; one-sided 95% lower confidence bound 0.009; Holm-adjusted p = 0.0197). Performance changed little when inference was restricted to 1 trial. Outcome analyses did not provide statistical evidence that seizure-free patients had a higher proportion of model-positive channels resected (AUROC 0.634; p = 0.102). Conclusions: Modelling cross-trial dependencies improved concordance with the SOZ compared with trial-averaged approaches, while remaining robust to reduced trial availability at inference. Associations with postsurgical outcome were inconclusive, consistent with limited sample size and training on SOZ labels rather than outcome-aligned labels.