ABSTRACT
Patients with drug-resistant temporal lobe epilepsy often undergo intracranial EEG recording to capture multiple seizures in order to lateralize the seizure onset zone. This process is associated with morbidity and often ends in postoperative seizure recurrence. Abundant interictal (between-seizure) data is captured during this process, but these data currently play a small role in surgical planning. Our objective was to predict the laterality of the seizure onset zone using interictal (between-seizure) intracranial EEG data in patients with temporal lobe epilepsy. We performed a retrospective cohort study (single-center study for model development; two-center study for model validation). We studied patients with temporal lobe epilepsy undergoing intracranial EEG at the University of Pennsylvania (internal cohort) and the Medical University of South Carolina (external cohort) between 2015 and 2022. We developed a logistic regression model to predict seizure onset zone laterality using interictal EEG. We compared the concordance between the model-predicted seizure onset zone laterality and the side of surgery between patients with good and poor surgical outcomes. 47 patients (30 women; ages 20-69; 20 left-sided, 10 right-sided, and 17 bilateral seizure onsets) were analyzed for model development and internal validation. 19 patients (10 women; ages 23-73; 5 left-sided, 10 right-sided, 4 bilateral) were analyzed for external validation. The internal cohort cross-validated area under the curve for a model trained using spike rates was 0.83 for a model predicting left-sided seizure onset and 0.68 for a model predicting right-sided seizure onset. Balanced accuracies in the external cohort were 79.3% and 78.9% for the left- and right-sided predictions, respectively. The predicted concordance between the laterality of the seizure onset zone and the side of surgery was higher in patients with good surgical outcome. In conclusion, interictal EEG signatures are distinct across seizure onset zone lateralities. Left-sided seizure onsets are easier to distinguish than right-sided onsets. A model trained on spike rates accurately identifies patients with left-sided seizure onset zones and predicts surgical outcome.
INTRODUCTION
Temporal lobe epilepsy (TLE) is the most common localization of drug-resistant epilepsy in adults 1. Determining the laterality of TLE — left, right, or bilateral — is a common clinical question that dictates the type and location of surgery. One standard clinical approach to confirming the localization and laterality of suspected TLE is to implant intracranial electrodes and wait 1-2 weeks for the patient to have multiple seizures 2. This process is time-consuming and exposes the patient to morbidity associated with electrode implantation, recurrent seizures, and prolonged hospitalization. Ironically, it may also be too short to determine epilepsy laterality: Data from chronic intracranial EEG recordings reveal that, in patients with bilateral seizure onsets, it often takes several weeks to months to capture the first contralateral seizure 3. Even in the setting of weaning medications in the Epilepsy Monitoring Unit, patients with a moderate pretest probability of multifocal seizures may need seven or more seizures to achieve a high posttest probability of unifocal epilepsy, which is more seizures than can often be obtained in a 1-2 week intracranial EEG evaluation 4. There is a pressing need to identify biomarkers of epilepsy laterality that are persistently abnormal, and thus identifiable during the limited duration of a typical pre-surgical evaluation. Such biomarkers could be used to reduce morbidity, shorten the hospital length of stay, and improve surgical planning.
During the course of a typical intracranial EEG evaluation, massive amounts of interictal data — in between the seizures — are obtained. However, these data are clinically underutilized because, up until now, we have lacked methods to interpret such large quantities of data. In this study, we hypothesized that features of the interictal EEG differ between patients with left-sided, right-sided, and bilateral TLE. We studied interictal intracranial EEG data from patients with drug-resistant TLE. We calculated several interictal EEG features and compared these features between patients with left, right, and bilateral TLE. Next, in order to understand if lateralizing interictal features exist across modalities, we studied functional MRI (fMRI) connectivity in a separate group of patients with TLE. Finally, we developed a machine learning algorithm to predict the clinician-defined seizure onset zone laterality using interictal data, and then validated this model across patients from two epilepsy centers.
MATERIALS AND METHODS
Patient selection
This retrospective study was approved by the Institutional Review Boards of the Hospital of the University of Pennsylvania (HUP) and Medical University of South Carolina (MUSC). We analyzed patients with drug-resistant epilepsy who underwent intracranial EEG recording as part of surgical evaluation from 2015-2022. Inclusion criteria were 1) clinical determination of TLE, and 2) bilateral electrode coverage of the temporal lobes. Details on electrode configurations, recording, and determination of seizure onset zone and surgical outcome are in the Supplemental Methods. Seizure times and the anatomical seizure onset localization were identified by a board-certified epileptologist reviewing the EEG record for clinical purposes, and confirmed in a clinical case conference consisting of multiple epileptologists. For patients who underwent resection or ablation, we measured surgical outcome at one year post-surgery using both the ILAE and Engel classification scales 5,6.
Intracranial EEG pre-processing, feature selection, and asymmetry index calculation
A full description of temporal and spatial sampling is in the Supplemental Methods. Briefly, we selected a continuous 12-hour period of EEG data and applied the SleepSEEG algorithm 7 to determine sleep stage. We divided the 12-hour EEG period into 72 10-minute segments, from which we randomly chose one-minute segments. We removed non-temporal lobe electrode contacts and those contacts lacking a contralateral pair (Fig. 1A) because analyzing symmetric electrode pairs limits the confounder of inter-contact distance affecting functional connectivity measurements 8,9. We identified and eliminated channels with artifacts 10 and employed three different referencing methods: machine reference, common average reference, and bipolar reference (referencing was performed after removing non-symmetric and non-temporal lobe contacts). We applied a 60 Hz notch filter and a 0.5-80 Hz bandpass filter.
We calculated several features, chosen based on their prior use in the literature for identifying the seizure onset zone (Fig. 1A). The Supplemental Materials fully describe the calculation of each feature. Briefly, these features included spike rates, univariate features such as bandpower and line length, and several bivariate features representing functional connectivity. Some features were calculated only over the broadband signal, and some were also calculated over the EEG signal filtered to five canonical frequencies. We separately examined features in sleep and wake given prior work suggesting that sleep-wake rhythms of seizure-risk differ between left and right TLE 10, and given work suggesting that interictal features in sleep better localize seizure generators than features in wakefulness 6,9.
We next calculated the asymmetry index (AI) for each feature, defined as:
Where FeatureLeft is the mean feature across left temporal lobe contacts, and FeatureRight is the mean feature across right temporal lobe contacts. A positive AI implies higher values of the feature on the left, and a negative AI implies higher values of the feature on the right.
fMRI analysis
To determine if interictal asymmetries from non-EEG modalities also lateralize TLE, we studied fMRI connectivity using the dataset and processing techniques from a recent paper published by our group 11. Subjects were 62 patients at HUP with drug-resistant TLE, six of whom overlapped with those in our intracranial EEG cohort. We calculated the average BOLD time series for each voxel within each parcel of the Brainnetome atlas 12 and created a functional connectivity matrix by computing the absolute value of the Pearson correlation between the time series in each pair of parcels. We identified Brainnetome parcels belonging to temporal lobe gray matter structures (Fig. 2C, Table S2), and measured the average left and right temporal connectivity. We defined AI as:
Where ConnectivityLeft is the mean connectivity in the left temporal lobe, and ConnectivityRight is the mean connectivity in the right temporal lobe.
Machine learning to predict SOZ laterality
Detailed steps are in the Supplemental Methods. Briefly, to separately examine the ease of predicting left versus right SOZ laterality, we built two classifiers: one predicting left-sided SOZ (as opposed to either right or bilateral), and one predicting right-sided SOZ (as opposed to left or bilateral), both using interictal EEG AI values as features. Missing features were estimated by median imputation. For each classifier, we performed principal component analysis (PCA) on the training data, retaining enough components to explain 95% of the variance in the features. We performed LASSO logistic regression (with λ equal to 1/N, where N is the training sample size) on the preserved principal components. For each classifier, we performed internal validation on the HUP dataset using leave-one-patient-out cross-validation, and then external validation on the MUSC dataset, trained on the full HUP dataset. To estimate feature importance, we multiplied the PCA transformation matrix by the classifier feature weights in order to derive standardized weights for the original set of AI features 13.
We next developed two single-feature models: The first included only mean spike rate AI. This model was developed to test whether spike rate asymmetry alone could successfully lateralize TLE. The second single-feature model included binarized mean spike rate AI, with the input being 1 if the spike rate AI was positive and 0 if negative. This model approximated a qualitative clinical approach of considering which side has more spikes, rather than the quantitative difference between sides. We primarily analyzed spikes detected in common average reference, with secondary analyses of bipolar and machine references to test the sensitivity of the results to this choice. In order to have a single feature, we also chose to only study spikes in sleep given work suggesting that interictal features in sleep better localize seizure generators than features in wakefulness 14,15.
Clinician determinations of SOZ laterality may be inaccurate. Given our hypothesis that interictal features reveal seizure generators, we predicted that our models would perform better in those with good surgical outcomes. To test this, we examined the subset of patients who underwent surgical resection or ablation targeting the temporal lobe and had at least one year of surgical follow up. For each patient, we identified the side of surgery, and we measured the spike rate model-predicted probability of SOZ laterality on that side. We selected the model (left vs. right/bilateral, or right vs. left/bilateral) corresponding to the side of surgery. We compared model probabilities between patients with a good surgical outcome and those with a poor surgical outcome.
Statistical analysis
For univariate analyses, we report mean and standard deviation (SD). To compare two paired or independent groups, we report t-tests (alpha = 0.05) and Cohen d for effect size. To compare more than two groups, we report ANOVA tests and η2 for effect size. Analyses were performed in Matlab R2022a (Mathworks).
Data and code availability
Raw EEG data is available on ieeg.org. All code used to perform analyses, along with an intermediate dataset containing electrode contact-level features, is publicly available on https://github.com/penn-cnt/cnt_tle_laterality/. The online calculator to predict SOZ laterality given temporal lobe spike rates is available on https://penn-cnt.github.io/epilepsy_lateralization/.
RESULTS
We examined 47 patients at HUP for model development and internal validation, and 19 patients at MUSC for external model validation (Table 1). We visually validated a random sample of 50 automated spike detections from each patient (bipolar montage). The median (IQR) percentage of automatically-detected spikes determined to be true spikes was 90.0% (82.0%-95.5%) for HUP and 90.0% (76.0%-94.0%) for MUSC.
Asymmetries in spike rates and relative entropy are distinct across SOZ lateralities
We compared interictal EEG feature AIs between patients with left-sided, right-sided, and bilateral SOZs. We ranked features in descending order by effect size (η2) at separating the three SOZ lateralities (Fig. 2A). The top-ranked AI features involved spike rates and relative entropy, and were predominantly in sleep. We next compared the set of features that best distinguished left from bilateral SOZs versus right from bilateral SOZs (Fig. 2B). Spike features significantly distinguished left from bilateral SOZs. For distinguishing right-sided SOZ, several other features performed best (though none were significant after correcting for the false discovery rate). This suggests that right-sided SOZs are harder to distinguish than left-sided SOZs in our dataset. Several interictal features were highly correlated, including spikes and relative entropy (see Fig. S1 and Supplemental Results). We performed a secondary analysis in which we excluded 15 unilateral patients who did not undergo surgery or who had one-year Engel outcomes >1. We observed similar trends in this smaller patient cohort (Supplemental Results, Fig. S2).
fMRI BOLD connectivity AI also distinguishes SOZ lateralities
We next asked if differences in interictal connectivity between TLE lateralities existed across modalities beyond just EEG. We tested whether fMRI connectivity asymmetry similarly distinguished left, right, and bilateral SOZs. Fig. 2C shows the left temporal Brainnetome atlas regions included for fMRI connectivity analysis. There was a significant difference in fMRI connectivity AI between TLE lateralities (ANOVA: F(2,59) = 6.1, p = 0.004, η2 = 0.17, Fig. 2D). Only the difference between the left and bilateral SOZ group was significant after correcting for multiple comparisons (p = 0.002). Similar to the result for interictal EEG data, this suggests that fMRI temporal lobe connectivity AI distinguishes patients with left from bilateral SOZs, but cannot distinguish between patients with right and bilateral SOZs.
A classifier incorporating interictal EEG features predicts SOZ laterality
We tested whether interictal features predict SOZ laterality in unseen patients. The AUCs of the ROC of the left- and right-sided internal cross-validation models trained on all features were 0.77 and 0.56, respectively (Fig. 3A). A model trained on only spike rates (restricted to CAR reference and sleep in order to have a single feature) achieved higher AUCs (0.83 and 0.68 for the left and right models, respectively (Fig. 3B)). Finally, a model trained only on binary spike rates indicating whether there were more spikes on the left or the right performed poorly (AUC of 0.57 and 0.39, respectively (Fig. 3C)). Spike rates, spike timing, and bandpower were the most important features for both the left- and the right-sided models (Fig. 3D).
We further probed the accuracy of the spike-rate only model. Confusion matrices for the left- and right-sided models at the optimal operating points are shown in Figs. 3E and 3F. The balanced accuracy was 78.9% for the model predicting left vs. right/bilateral SOZ, and 57.4% for the model predicting right vs. left/bilateral SOZ. Model accuracies rise quickly with duration sampled, achieving an accuracy similar to the full-duration models with 5 minutes of sampling (Fig. 3G). Finally, we tested how the spike-only models performed in the external MUSC dataset. The balanced accuracies were 79.3% and 78.9% for the left-sided and right-sided models, respectively (Fig. 3H and 3I).
These results suggest that models using only spike rate asymmetry accurately distinguished left from right or bilateral SOZs in both internal cross-validation and in a separate institution’s test dataset. However, although right-sided SOZs could be distinguished from left/bilateral SOZs in the external dataset set, they were not well-classified in the internal validation dataset. Results were similar, although with higher AUCs across all models, when we restricted analysis of unilateral HUP patients to be those with Engel 1 surgical outcomes to build and internally validate the SOZ laterality classifier (Fig. S3). Results were also similar when we used spikes detected in bipolar and machine references to build the SOZ laterality classifier (Fig. S4 and S5).
Concordance between spike-predicted laterality and surgical laterality is higher for patients with good surgical outcomes
18 of 26 (69.2%) patients had good one-year Engel outcomes (Engel I), and 8 of 26 (30.8%) had poor Engel outcomes (Engel 2+) (Fig. 4A). 17 of 26 (65.4%) patients had good one-year ILAE outcomes (ILAE 1-2), and 9 of 26 (34.6%) had poor ILAE outcomes (ILAE 3+) (Fig. 4D). The means of the numerical portions of the outcome scales were similar for patients who underwent left versus right-sided surgeries (Fig. 4B and 4E; Engel: t(24) = -0.0, p = 0.98; ILAE: t(24) = 1.0, p = 0.31). Left-sided surgeries were disproportionately ablations (12 ablations vs 3 resections), and right-sided surgeries were more often resections (4 ablations vs 7 resections). We hypothesized that patients with a good surgical outcome would have a higher modeled probability of SOZ laterality concordant with the side of surgery. We identified the spike rate model corresponding to the side of surgery. Mean concordant model probability was significantly higher in patients with good Engel outcomes (mean (SD) 0.64 (0.16)) than in patients with poor Engel outcomes (0.48 (0.19)) (t(24) = 2.2, p = 0.037) (Fig. 4C), and in patients with good ILAE outcomes (0.65 (0.15)) than in patients with poor ILAE outcomes (0.47 (0.18)) (t(24) = 2.6, p = 0.014) (Fig. 4F). Together, these results suggest that a model trained to predict the SOZ using spike rate asymmetry also predicts surgical outcome. Results were similar when we used spikes detected in bipolar and machine references (Fig. S6 and S7).
DISCUSSION
We compared interictal intracranial EEG features across TLE patients with different SOZ lateralities. Left-sided TLE was easier to distinguish than right-sided TLE, a finding we also observed in a separate interictal modality of fMRI connectivity. A model based on just spike rates predicts SOZ laterality in unseen patients.
Left-sided SOZs are easier to identify than right-sided SOZs
Our univariate analysis of interictal EEG features (Fig. 2B), our machine learning algorithm (Fig. 3A-C), and our fMRI analysis (Fig. 2D) all found that left-sided SOZs were easier to distinguish than right-sided SOZs in our internal HUP cohort. It is possible that this finding is specific to patients who undergo intracranial EEG recording: Patients with well-localized right-sided TLE are more likely to immediately pursue a temporal lobectomy given lower concern about cognitive impact from resecting the non-dominant hemisphere; thus, patients with right-sided TLE who undergo intracranial EEG implantation may have challenging features to their localization. This hypothesis may also explain the discrepancy in right-sided model performance across HUP and MUSC if these two centers have different approaches to select patients with suspected TLE for intracranial EEG monitoring. This hypothesis was not supported by our finding that patients with left-sided and right-sided TLE had similar surgical outcomes, however this is confounded by the fact that patients with left TLE more often underwent laser ablation, which is known to have lower rates of seizure freedom than temporal lobectomy 16,17. An alternate hypothesis is that right TLE may be associated with broader network dysfunction. This hypothesis is conceivable due to differences in language networks 18,19, and is supported by functional and structural neuroimaging studies demonstrating more widespread abnormalities in right-sided TLE 20–24.
A multivariate set of interictal features is worse than spikes alone
A model using only spike rates distinguished SOZ lateralities with higher accuracy than a model incorporating many interictal features (Fig. 3A and 3B). We suspect that the better performance of the spike-only model arises from the fact that spikes are the most important feature (Fig. 3D), and the benefit of adding more features is outweighed by the downside of overfitting to this more complex feature set. We included intracranial EEG features that have been reported to localize seizure generators in prior studies 14,25–29. Relative entropy, a recently-described metric that compares the distribution of amplitudes between EEG signals on electrode pairs 14,29, was the non-spike feature that differed the most across lateralities (Fig. 2A), although it was also strongly correlated with spike rates (Fig. S1A and S1C). Overall, we found no clear lateralizing value in these quantitative features beyond spikes alone.
Spike rate asymmetry identifies left-sided TLE in both internal and external cohorts
The spike-only model accurately identified left-sided TLE in both the internal cross-validation and external cohorts (Fig. 3E and 3H), suggesting good external validity. The performance of the model trained to identify right-sided TLE was low in the internal cross-validation cohort but high in the external cohort (Fig. 3F and 3I). Part of the discrepancy in performance between the two cohorts may result from the class imbalance between the two sites: HUP had more patients with left-sided TLE and MUSC had more patients with right-sided TLE. Alternatively, it may be related to different approaches to surgical planning in the two centers, as discussed above.
Importantly, clinician designations of SOZ laterality may be incorrect: a patient may have only unilateral seizures during the intracranial evaluation and receive a diagnosis of unilateral TLE, but actually have bilateral TLE 3. We found that the concordance between the spike model-predicted SOZ laterality and the side of surgery was associated with good one-year surgical outcomes (Fig. 4). This result suggests that a model incorporating spike rates reveals information about the laterality of the true seizure generators.
Prior studies found that spike rates in scalp EEG lateralize TLE, and in particular that when spikes are mostly unilateral, the side of the spikes usually agrees with the side of the clinician-defined epilepsy 30–34. Our study adds to these findings by 1) incorporating interictal intracranial EEG data, 2) providing a quantitative framework to interpret non-unilateral spike rates, and 3) evaluating patients undergoing intracranial EEG, who likely have more challenging lateralization than patients with TLE more generally. A future direction is to understand if quantitative analysis of interictal scalp EEG data is as effective as invasive data in these patients, which may help avoid intracranial evaluation in some cases.
Limitations
Both our internal validation cohort and our external validation cohort have relatively few patients, which limits the external validity. We had only six overlapping patients between our fMRI dataset and our IEEG dataset, which precluded us from assessing the complementary information they could provide in a multimodal approach. Finally, because our machine learning algorithm does not predict SOZ localization, we cannot identify patients whose seizure generators were correctly lateralized, but incorrectly localized. This is a particular limitation for those patients who underwent laser ablation, where precisely localizing seizure generators is crucial.
Clinical translation
As spike rates can be counted manually or with commercially available software, only short durations are required, and the spike rate model accurately predicted left-sided TLE in both our internal and external cohorts, we believe the spike rate model is clinically useful. The accuracy at predicting right-sided TLE was low in the internal cohort, and so we would not recommend using this model to predict right-sided TLE without further validation in larger external cohorts. To promote reproducibility of our results, we provide a free online calculator to apply our model. Clinicians and researchers can input spike rates from NREM sleep in the left and right temporal lobe, and the calculator returns the spike rate AI, along with the predicted probabilities of left-sided and right-sided SOZs derived from the left- and right-sided models. Our goal is for clinicians to be able to use this model, along with other electroclinical data, to help guide surgical planning.
Conclusion
The results of this study support the hypothesis that interictal abnormalities lateralize to the side of seizure generators in TLE. Furthermore, a simple model using spike rates can accurately predict left-sided SOZs in unseen patients. Given the limitations of using seizures to lateralize seizure generators, we believe our study provides additional motivation to use spike rates to aid in surgical planning in patients with suspected TLE.
Data Availability
Raw EEG data is available on ieeg.org. All code used to perform analyses, along with an intermediate dataset containing electrode contact-level features, is publicly available on https://github.com/penn-cnt/cnt_tle_laterality/. The online calculator to predict SOZ laterality given temporal lobe spike rates is available on https://penn-cnt.github.io/epilepsy_lateralization/.
Funding
Erin Conrad received support from the National Institute of Neurological Disorders and Stroke (NINDS K23 NS121401-01A1) and the Burroughs Wellcome Fund. William Ojemann was supported by the National Science Foundation Research Grant Fellowship (DGE-1845298).
Ryan Gallagher received support from NIH Grant T32NS091006. Joshua LaRocque was supported by the NINDS (5T32NS091006-08). Ezequiel Gleichgerrcht received support from Georgia CTSA UL1 (UL1TR002378) and KL2 (KL2TR002381) grants. Kathryn A. Davis received support from the National Institutes of Health (NIH; R01 NS116504, R01 NS125137, R61 NS125568).
Competing interests
Nothing to report.
Acknowledgments
None