Fig 1.
Main concepts and organization of the work.
(A) Observation of a spreading seizure in the brain network. Due to the sparseness of the implanted electrodes, only some regions are observed; for those we know their state, non-seizing or seizing, and the onset time in the latter case. (B) Generative model of the seizure and the problem of the inference. We assume that the region onset times result from initially unknown propagation dynamics, shared among all seizures, and depend on the known patient-specific network structure and unknown seizure-specific region excitabilities. The goal of the inference is to infer the form of the propagation dynamics and the seizure-specific region excitabilites, and thus also the missing onset times. (C) The workflow used in this study for the validation on real data of 45 subjects. From the SEEG recordings the channel onset times were extracted and mapped onto brain regions. The data set was then divided into two folds, and each was fitted separately with the multi-seizure model to infer the model hyperparameters. The leave-one-out validation and the resection validation were then performed using the single-seizure model with hyperparameters obtained from the other fold.
Fig 2.
Example of a simulated seizure in real brain network.
(A) The region excitabilities c are randomly sampled from a standard normal distribution. Brain regions are located on the vertical axis, colored bars indicate the anatomical grouping of the regions. (B) Slow variable z, simulated using the sampled excitabilities and strong coupling excitation function (see Fig 2 in S1 Text) on a brain network of subject 1. (C) Seizure state of the regions, obtained by thresholding the slow variable at z = 1. Due to the elevated excitability of the regions, the seizure starts in the Rhinal cortex in left temporal lobe (white triangle), and with some delay in Pars orbitalis in left frontal lobe (light green triangle). Eventually, large portion of the left temporal lobe is recruited (magenta circle). Abbreviations: Lxx/Rxx—left/right hemisphere, Fr—frontal lobe, Ci—cingulate cortex, In—Insula, Te—temporal lobe, Pa—parietal lobe, Oc—occipital lobe, Sc—subcortical structures. See Table 2 in S1 Text for a full list of regions.
Fig 3.
Onset time detection and mapping to brain regions.
(A) Example of the onset time detection. The onset time on a bipolar SEEG channel is detected by computing the power in lower and high frequencies, normalizing it to preictal levels, and detecting when the power increases above a given threshold. This results in marking a channel as seizing (with detected onset time, upper trace) or non-seizing (lower trace). (B) Channels are assigned to brain regions based on their physical distance. If multiple channels are assigned to the same region, the seizing or non-seizing status is determined based on the majority of channels. If the region is seizing, the region onset time is defined as the median of all assigned onset times, taking the non-seizing regions into account as well with onset time equal to infinity. (C) Histogram of observed regions among all patients in the study. (D) Histogram of assigned SEEG channels per observed region. (E) Histogram of regions based on the seizing state of the assigned channels, indicating where the channel to region mapping leads to a conflict in the region seizing state. Ideally, there would be no regions with some seizing and some non-seizing assigned channels. (F) Histogram of differences between the earliest and latest onset time of assigned channels. Vertical lines indicate the 80th and 95th percentile. (G-H) Results of the detection and mapping. (G) Histogram of the fractions of the seizing regions for all seizures. (H) Difference of the detected onset times of all seizing regions from the clinically marked seizure onset. (I) Difference of the detected onset times of the first seizing region of every seizure from the clinically marked seizure onset.
Fig 4.
Results of the hyperparameter learning and posterior predictive checks.
(A) Posterior (full lines) and prior (black dashed lines) distributions of the hyperparameters for the models fitted with two data folds. Hyperparameters parameterize the right-hand side function fq of the dynamical model of seizure propagation (1). The text shows the split-chain scale reduction factor
and number of effective samples Neff. Note the different x and y ranges of the panels. (B) Results of the posterior predictive checks with the fitted models. In all panels, the red histogram shows the properties of the real seizure ensemble, while the solid lines show the mean of the hundred ensembles of simulated seizures and the shaded areas indicate the 5 to 95 percentile range. The panels show, left to right, distribution of the fraction of the seizing regions in one seizure, standard deviation of the onset times of seizing regions, and 10th, 50th, and 90th percentile of the onset times of seizing regions.
Fig 5.
Example of the inference results on a seizure from subject 33.
(A) Observation of the seizure. On vertical axis are the brain regions with color bars on the left indicating the anatomical grouping (abbreviations as in Fig 2). On the horizontal axis is the time; the onset time of the first observed seizing region is always aligned to t = 30s. The black and white column on the right shows which regions were observed. (B) Results of the inference. The partial observations from panel A are completed by the inference; the plot shows the recruitment probability ri(t) = p(ti ≤ t), i.e. the posterior probability that a region i is recruited at time t. In the observed regions the inferred probabilities follow closely the observations with some blurring around the onset due to the assumed observation noise. (C) Snapshots of the recruitment probabilities at three time points. Color code same as in panel B. The spheres and the cubes represent the hidden and observed regions respectively. Only top three percent of the strongest connections are shown for visual clarity, their thickness is proportional to the maximum of the two oriented connection strengths. Axes notation: R, Left-Right axis; A, Posterior-Anterior axis; S, Inferior-Superior axis. (D) Inferred excitability. Left subpanel shows the posterior distributions of the excitabilities, dashed line indicates the threshold of high excitability at ch = 2. Right subpanel shows the probability of high excitability p(c > ch). (A-D) The seizure is observed to start and remain restricted in the right temporal lobe (yellow circle, panels A, B). The result of the inference in addition points to the involvement of several regions in the right occipital lobe (magenta square, panel B). The regions identified by the inference as possibly epileptogenic are mainly located in the right temporal lobe (green circle, panel D), however, the inference also points to a possible epileptogenic zone in the right occipital lobe (blue square, panel D).
Fig 6.
Results of the leave-one-out (LOO) validation.
(A) Distributions of the state prediction accuracies (PA), top, and onset prediction accuracies, bottom, calculated with the inference (Inf) method and the unweighted estimate (Est) and weighted estimate (wEst). In the upper panel, each data point (n = 2863) corresponds to one observed region in one seizure (nseizures = 137) of one patient (npatients = 44) for which LOO analysis was successfully performed. In the lower panel, only the seizing regions are considered (n = 1679). (B) Pairwise differences between the accuracies obtained by the inference and the two estimates. In both A and B, the violin plots show a kernel density estimate of a given variable. The inner boxplots show the median (white dot), interquartile range (IQR, gray bar) and adjacent values (upper/lower quartile +/- 1.5 IQR, gray line). (C) Feature importances for predicting the differences in B. On vertical axis, features on region level (blue), seizure level (red), and patient level (green) are shown. Horizontal axis contains the target variables, that is the four prediction accuracies differences. Higher values of feature importance indicate a stronger dependency of the target variable on the feature. Three features are identified as most relevant: seizing/non-seizing state of a region, node strength in a network, and a fraction of seizing region in a seizure. (D) The partial dependency plots of the PA differences on features identified by the feature importance analysis in C. These are the fraction of seizing nodes, and the node strength, both for seizing and non-seizing regions. Full line shows the median, and filled area represents the 10 to 90 percentile range.
Fig 7.
(A-C) Example of a virtual resection on a seizure from patient 17, cf. Fig 7 in S1 Text. (A) Inferred probability of high excitability. Anatomical abbreviations as in Fig 2. (B) Pre-operative seizure dynamics as inferred from the data. (C) Post-operative seizure dynamics. The resected regions were removed from the model, and the dynamics was simulated using the excitabilities inferred from the pre-operative observations. The seizure activity is not completely stopped, but the number of seizing regions is reduced. (D) Outcome of virtual surgeries on a group level. Each point corresponds to an operated patient (n = 18). Top panel shows the number of post-operative seizing regions npostop (i.e. the regions with recruitment probability above 50% at t = tlim), bottom panel shows the relative reduction of the seizing regions compared to the pre-operative level, (npreop − npostop)/npreop. For patients where multiple seizures were available, the values were averaged across seizures. (E) Precision-recall curves for evaluating the match between the performed resection and the inferred epileptogenicity. The precision and recall values were calculated for varying threshold pt on high epileptogenicity, p(c > ch) > pt; the threshold on high excitability ch = 2 was kept constant.
Fig 8.
Parameterization of the excitation function.
The helper bilinear function is described by four values qaa, qab, qba, qbb in four interpolation points.