The Seizure Embedding Map: A Spatio-Temporal Transformer for Comparing Patients by Ictal Intracranial EEG Features at Scale
Discuss this preprint
Start a discussion What are Sciety discussions?Listed in
This article is not in any list yet, why not save it to one of your lists.Abstract
Objective
Planning invasive treatment for medication-resistant epilepsy relies on qualitatively interpreting seizure recordings from intracranial EEG (iEEG) recordings. Clinicians recommend treatment by mapping seizure onset patterns and locations, integrating multimodal data with their clinical experience and interpretation of the literature. Referencing a new patient’s seizures against past cases remains subjective, as implant strategies, electrode placement, and the electrodes’ relation to seizure onset vary across patients and centers. This study aims to rigorize this process by introducing a transformer model that embeds spatial and temporal information in iEEG recordings to categorize seizure networks and their relation to outcome across a large cohort of drug-resistant epilepsy patients. Our ultimate goal is to quantitatively compare multiple characteristics of new patients presenting for surgical intervention to thousands of prior patients to recommend best treatment.
Methods
We design and implement a custom spatiotemporal transformer that extracts features from iEEG seizure onset epochs. The model consists of convolutional layers that tokenize multi-channel iEEG, a spatiotemporal positional encoder that learns the relationship between sequences of tokens and the anatomical regions of the implantation to extract features across channels and time. Importantly, our model is flexible regarding to the number of iEEG contacts and the location of implants, being trained on both stereotactic EEG and electrocorticography implants. We validate seizure embeddings using unsupervised clustering to group seizure onset patterns using a cross-validated multi-class logistic regression model.
Results
The spatiotemporal model is applied to 882 clinical seizures from 102 subjects with drug-resistant epilepsy. Unsupervised clustering reveals 74 clusters of seizures that span multiple subjects, and a multi-class logistic regression model with 10-fold cross-validation reveals significant clustering of onset patterns in embedding space (validation accuracy = 0.8159). At the group level, seizures occurring closer in time exhibit more similar embeddings ( p < 0.05), modeled with subject-specific random slopes and intercepts. Seizure clusters did not differentiate patients by therapy or postsurgical outcome, but they showed significant associations with the anatomical region of onset and seizure classification.
Conclusions
We propose a method for representing iEEG recordings of seizures with embeddings that contain spatial and temporal information. These embeddings can be characterized and compared across subjects to reveal common patterns in seizure onset. While this clustering did not separate patients by therapy and postsurgical outcome, there were significant associations with the anatomical region of onset and seizure classification. Future work will refine these methods to build a framework for characterizing seizures with deep learning incorporating multimodal data, including structural and functional imaging, semiology, patient history and demographics. We present this work as a first step toward quantitative, evidence-based decision making for patients with drug resistant epilepsy.