Multiple mechanisms shape the relationship between pathway and duration of focal seizures

Abstract A seizure’s electrographic dynamics are characterized by its spatiotemporal evolution, also termed dynamical ‘pathway’, and the time it takes to complete that pathway, which results in the seizure’s duration. Both seizure pathways and durations have been shown to vary within the same patient. However, it is unclear whether seizures following the same pathway will have the same duration or if these features can vary independently. We compared within-subject variability in these seizure features using (i) epilepsy monitoring unit intracranial EEG (iEEG) recordings of 31 patients (mean: 6.7 days, 16.5 seizures/subject), (ii) NeuroVista chronic iEEG recordings of 10 patients (mean: 521.2 days, 252.6 seizures/subject) and (iii) chronic iEEG recordings of three dogs with focal-onset seizures (mean: 324.4 days, 62.3 seizures/subject). While the strength of the relationship between seizure pathways and durations was highly subject-specific, in most subjects, changes in seizure pathways were only weakly to moderately associated with differences in seizure durations. The relationship between seizure pathways and durations was strengthened by seizures that were ‘truncated’ versions, both in pathway and duration, of other seizures. However, the relationship was weakened by seizures that had a common pathway, but different durations (‘elasticity’), or had similar durations, but followed different pathways (‘semblance’). Even in subjects with distinct populations of short and long seizures, seizure durations were not a reliable indicator of different seizure pathways. These findings suggest that seizure pathways and durations are modulated by multiple different mechanisms. Uncovering such mechanisms may reveal novel therapeutic targets for reducing seizure duration and severity.


Supplementary Materials
Supplementary Text 1 Subject metadata Table 1 provides the following metadata for the epilepsy monitoring unit (EMU) patients: • Hospital: hospital at which the patient underwent presurgical monitoring.
• Age: age, in years, at the time of the presurgical monitoring.
• Hemisphere: purported hemisphere of onset of the patient's seizures, based on clinical findings.
• Lobe: purported lobe of onset of the patient's seizures, based on clinical findings. Note that some patients had seizures arising from multiple lobes/at the boundary of two lobes (e.g., OP = occipital/parietal onset).
• ILAE surgical outcome: patient surgical outcome according to the International League Against Epilepsy classification (1 = seizure free, 2 = only auras, 3+ = not seizure free). A dash indicates that the patient did not undergo surgery or their surgical outcome is unavailable. For IEEG Portal patients (MC and HUP hospitals), the surgical outcome provided by the database is given. For University College London Hospital (UCLH) patients, the 12 months post-surgical outcome is provided.
• Total recording time: total duration of the presurgical intracranial recording time.
• # seizures analysed: number of the patient's seizures analysed in this work.
• # electrodes analysed: number of recording electrodes included in the analysis, after removing noisy electrodes.
• Sampling frequencies: sampling frequencies at which intracranial data was acquired and stored.
• AED reduction performed: whether patient antiepileptic drug (AED)s were systematically reduced during the presurgical recording. A dash indicates that this information is unavailable. Table 2 provides the following metadata for the NeuroVista patients: • Age (yrs): patient age in years.
• Age at diagnosis (yrs): patient age when they were diagnosed with epilepsy, in years.
• Lobe: purported lobe of onset of the patient's seizures, based on clinical findings. Note that some patients had seizures arising from multiple lobes (e.g., OP = occipital/parietal onset).
• Previous resection: whether the patient had undergone surgical resection prior to the chronic recording.
• # seizures analysed: number of the patient's seizures analysed in this work.
• # electrodes analysed: number of recording electrodes included in the analysis after removing noisy electrodes.
• Total recording time (days): total duration of the intracranial recording time, in days.
• Sampling frequency: sampling frequency at which intracranial data was acquired and stored. Table 3 provides the following metadata for the dogs: • Total recording time: total duration of the intracranial EEG (iEEG) recording.
• # seizures analysed: number of the subjects's seizures analysed in this work.
• # electrodes analysed: number of recording electrodes included in the analysis, after removing noisy electrodes.
• Sampling frequencies: sampling frequencies at which intracranial data was acquired and stored.

Supplementary Text 2 Distributions of seizure durations
The following figures show the seizure duration distribution within each subject as a histogram ( Fig. Supplementary Figure 1). We show the distributions in duration, as well as natural log duration for reference. In general, we observed a wide range of seizures with different durations within most subjects.
Interestingly, we also observed that the variance of a duration distribution tended to grow with the mean of the distribution -a phenomenon also known as heteroscedasticity. We also show this in Fig. Supplementary Figure 2. Heteroscedasticity is generally not a desirable feature of the data for subsequent analysis, and we therefore log transformed the seizure duration. This transformation removed the heteroscedasticity in the data ( Fig. Supplementary Figure 2). I.e., in a subject that has seizures of 40 seconds most of the time, a seizure of 20 seconds is unusual, whereas in a subject with seizures of mostly 3 minutes, a seizure of 2 minutes 40 seconds is more common. Therefore, instead of comparing absolute time differences (in this case 20 seconds for both), it is more informative to compare time ratios (i.e. difference of log time). Similarly, within subjects, the difference between 3 minutes and 2 minutes 40 seconds is also more expected than the difference between 40 seconds and 20 seconds.

Supplementary Text 3 Dogs: identifying seizure terminations
For recordings from the dogs, seizure onset was determined using the seizure onsets provided on the IEEG Portal; however, seizure termination times were not marked in this dataset. Therefore, seizure termination was identified algorithmically using an approach similar to [7]. For each dog, the time periods around each marked seizure onset were extracted, beginning with 300s before seizure onset and ending with sufficient time after seizure onset to capture all seizure terminations, based on visual inspection (460s for Dog 1, 250s for Dog 2, and 150s for Dog 3). Because identifying seizure termination relied on reference preictal data, dog seizures were only included in the analysis if 1) there was at least 300s between the seizure start and the termination of the previous seizure, and 2) if the preictal period, defined as three minutes to one minute before seizure start, lacked large noisy or missing segments.
After the preprocessing steps described in Methods section "Intracranial EEG preprocessing for epilepsy monitoring unit patients and dogs", we identified the time period containing seizure activity for each channel in each iEEG segment. Seizure activity was identified based on an increase in signal absolute slope, S(t), compared to each seizure's preictal period. The absolute slope S of each channel i was given by where x i is the time series voltage value of channel i and ∆t is size of the time step between successive iEEG time points. S i (t) was then normalised to S i (t) by dividing each time point by σ i,pre , the standard deviation of the absolute slope of channel i during the seizure's preictal period, and smoothed by applying a 5s moving average sliding window. Channel i was considered epileptic at time point t if S i (t) was greater than 2.5. Seizure termination was marked as the first time, following the clinically marked seizure start, when the number of epileptic channels fell below and remained below two channels for at least 1.5s.  Fig. 2J showing the distribution of correlations between pathway dissimilarities and duration differences across subjects. Each marker corresponds to a subject, with the marker shape and colour indicating the subject's cohort. B) The same distribution as in A, but with markers now coloured by whether the subjects correlation was significant after FDR correction for multiple comparisons. To test this hypothesis, we compared the correlation between pathway dissimilarities and duration differences to the maximum duration difference (Fig. Supplementary Figure 5A) and maximum pathway dissimilarity (Fig. Supplementary Figure 5B) in each subject. The maximum duration difference describes the greatest proportional change in seizure duration within each subject, while the maximum pathway dissimilarity captures the largest level of variability in the subject's seizure pathways. In other words, these measures serves as ranges for each subject's seizure durations and seizure pathways.

Supplementary Text 4 Significance test results for pathway dissimilarities/duration differences correlations
Supplementary Figure 5: The relationship between pathway and duration variability does not depend on the range in either feature. A) The correlation between pathway dissimilarities and duration differences plotted versus the maximum duration difference of each subject. The colour and shape of each marker corresponds to the subject's cohort. B) The correlation between pathway dissimilarities and duration differences plotted versus the maximum pathway dissimilarity of each subject.
In both cases, we found no significant relationship between the extent of variability and the correlation between pathway dissimilarities and duration differences. There was a weak, but insignificant, positive association between pathway dissimilarity/duration difference correlations and maximum durations differences. As such, there was a slight tendency for subjects with greater duration variability to have a stronger relationship between pathways and durations. Future work could investigate this relationship in a larger cohort. However, overall, the relationship between pathways and durations does not depend on the range of these features. Fig. Supplementary Figure 6 describes the prevalence, as well as the level of elasticity and semblance in each subject (see Methods, section "Defining elasticity and semblance", for definitions).  Supplementary Figure 6: Prevalence and features of elasticity and semblance. In all plots, markers correspond to subjects and their colour and shape indicates the subjects' cohorts. A) Proportion of seizure pairs with similar pathways that were elastic (i.e., that had different durations) in each subject. B) Proportion of seizure pairs with semblance (i.e., that had different pathways). C,E) In subjects with elasticity pairs, the median (C) and maximum (E) duration difference of the elastic pathways. D,F) In subjects with semblance pairs, the median (D) and maximum (F) pathway dissimilarity of the semblance.

Supplementary Text 6 Prevalence and features of elasticity and semblance
The level of pathway elasticity, which can be quantified by the duration differences of the elastic seizure pairs, varied across subjects (Fig. Supplementary Figure 6C,E). On average, duration differences of 0.2 to 0.55 (equivalent to a e 0.2 to e 0.55 = 1.22 to 1.73 fold change in seizure duration), were common, but extremes of e 1 = 2.72 or higher were also observed in many subjects.
Thus, seizures with similar pathways could have drastically different durations. Likewise, the level of pathway dissimilarity between seizure pairs with similar durations varied across subjects ( Fig.   Supplementary Figure 6D,F). Average pathway dissimilarities of approximately 1.2 to 2 were common, but higher dissimilarities of 3 or higher were also observed in many subjects. Therefore, seizures with similar durations could have very different pathways.

Supplementary Text 7 Comparison of duration populations and pathway dissimilarities
Fig . Supplementary Figure 7 shows the adjusted Rand indices (Fig. Supplementary Figure 7A,B) and Rand indices (Fig. Supplementary Figure 7C,D) between duration populations and pathway clusters in subjects with two duration populations (see Methods). The significance of each index for will depend on the index value as well as the number of seizures and cluster sizes. The Rand index is the proportion of seizure pairs that have the same relationship in both partitions (i.e., in the same cluster in both partitions or in different clusters in both partitions), and is therefore easily interpretable. However, the Rand Index greatly depends on the relative cluster sizes, making the adjusted Rand index a better measure for understanding the strength of the agreement of the two partitions. We therefore provide both measures here to evaluate the agreement between duration populations and pathway clusters.

Supplementary Text 8 Clinical metadata comparisons
To determine if patterns of pathway and duration variability were related, we compared nine subject-specific pathway and duration measures to four clinical variables in the EMU patients.
The pathway and duration measures were 1. The patients' International League Against Epilepsy (ILAE) surgical outcomes (n = 26).
ILAE surgical outcomes and disease duration were associated with the variability measures using Spearman's correlation. The variability measures of temporal versus extratemporal patients and left versus right hemisphere onset patients were compared using Wilcoxon rank sum tests.
There were no significant relationships between seizure pathway/duration measures and surgical outcome after FDR correction for multiple comparisons, although there was a trend (Spearman's correlation ρ = 0.45, p = 0.0209) for surgical outcome to worsen as median seizure duration increased. This association may have been driven by other clinical factors that influence both surgical outcome and seizure duration, such as whether a patient has focal to bilateral tonic-clonic seizures [1,4,5] and the localisation of the epileptogenic zone [3,6]. There were also no significant differences between patients with different onset locations, and the only trend was for patients with temporal onset to have higher median seizure duration than patients with extratemporal onset (Wilcoxon rank sum test, p = 0.0381), consistent with previous findings [6].
Disease duration was significantly inversely correlated to median seizure duration (Spearman's correlation ρ = −0.56, p = 0.0011), with median seizure duration decreasing as disease duration increased. Additionally, the tendency of similar seizure pathways to be elastic significantly decreased with disease duration (Spearman's correlation ρ = −0.51, p = 0.0038). Disease duration at the time of the iEEG recording was not sampled at a random time for each patient, but determined by the clinical decision to undergo presurgical monitoring. Therefore, disease duration in our cohort could also be associated with clinical considerations such as seizure severity and the patient's level of antiepileptic medication resistance. As such factors could also influence measures such as seizure duration, it is difficult to interpret the observed associations with disease duration.
In this supplementary analysis, we investigated the relative contribution of each frequency band to dissimilarities in seizure pathways. We turned to our NMF components (Fig. Supplementary   Figure 8), which provided the basic building blocks of all seizures in a subject in terms of their seizure functional connectivity. Each seizure in a given subject is composed of a sequence of time windows, where in each time window, the functional connectivity can be reconstructed as a (sparse) linear combination of these components. Effectively, the seizures can be understood as a pathway through the space spanned by these components. This representation has the advantage of capturing the sequence of functional connectivity over the duration of a seizure with minimal loss of information. It is also a general representation in terms of pairwise interactions between channels in each frequency band (e.g. it can faithfully represent seizures that slowly spread to different regions, as well as seizures that never spread from onset, or diffuse onset seizures, etc.).
It is, however, important to note this representation is not directly clinically interpretable, and may highlight pairwise interactions that are not salient in the visual impression of the EEG.
In an example subject ( Fig. Supplementary Figure 8), we can see that different frequency bands contribute to different components, indicating that several frequency bands were relevant to this subject's seizures. Moreover, multiple frequency bands contribute to changes across frequency bands. To quantify the contribution of different frequency bands to pathway dissimilarities, we calculated the pairwise difference between components as cityblock distance and normalised this difference to 1 across frequency bands, yielding a relative contribution of each frequency band to the component distances. (Fig. Supplementary Figure 9). If components represented changes in seizure functional connectivity in a single frequency band, we would see the largest pairwise differences between components in a single frequency band, which is not the case for this subject. This example patient is qualitatively representative of all subjects, and the median relative contributions of each frequency band were approximately equal in most subjects. Even the outlier maximum relative contribution of a single frequency band did not exceed 50% (Fig. Supplementary Figure 10).