Brain sodium MRI-derived priors support the estimation of epileptogenic zones using personalized model-based methods in epilepsy

Abstract Patients presenting with drug-resistant epilepsy are eligible for surgery aiming to remove the regions involved in the production of seizure activities, the so-called epileptogenic zone network (EZN). Thus the accurate estimation of the EZN is crucial. Data-driven, personalized virtual brain models derived from patient-specific anatomical and functional data are used in Virtual Epileptic Patient (VEP) to estimate the EZN via optimization methods from Bayesian inference. The Bayesian inference approach used in previous VEP integrates priors, based on the features of stereotactic-electroencephalography (SEEG) seizures’ recordings. Here, we propose new priors, based on quantitative 23Na-MRI. The 23Na-MRI data were acquired at 7T and provided several features characterizing the sodium signal decay. The hypothesis is that the sodium features are biomarkers of neuronal excitability related to the EZN and will add additional information to VEP estimation. In this paper, we first proposed the mapping from 23Na-MRI features to predict the EZN via a machine learning approach. Then, we exploited these predictions as priors in the VEP pipeline. The statistical results demonstrated that compared with the results from current VEP, the result from VEP based on 23Na-MRI prior has better balanced accuracy, and the similar weighted harmonic mean of the precision and recall.

in the VEP pipeline, we demonstrated that 23 Na-MRI prior based VEP estimation of the EZN improved 23 the results in terms of balanced accuracy and as good as SEEG priors in terms of the weighted harmonic 24 mean of the precision and recall.

25
. CC-BY-NC-ND 4.0 International license It is made available under a is the author/funder, who has granted medRxiv a license to display the preprint in perpetuity. (which was not certified by peer review) preprint The copyright holder for this this version posted December 16, 2022. ; https://doi.org/10.1101/2022.12.14.22283389 doi: medRxiv preprint NOTE: This preprint reports new research that has not been certified by peer review and should not be used to guide clinical practice.

== D R A F T ==
Title: 23 Na-MRI Derived Priors Support Estimation of EZ Using Model Methods

AUTHOR SUMMARY
For the first time quantitative 23 Na-MRI were used as prior information to improve estimation of EZN 26 using the model-based method of VEP pipeline. The priors were based on logistic regression predictions 27 of the EZN, using 23 Na-MRI features as predictors. The 23 Na-MRI priors inferred EZNs significantly 28 closer to the clinical hypotheses -in terms of balanced accuracy -than the previously used priors or the 29 no-prior condition.

30
-2-. CC-BY-NC-ND 4.0 International license It is made available under a is the author/funder, who has granted medRxiv a license to display the preprint in perpetuity. (which was not certified by peer review) preprint The copyright holder for this this version posted December 16, 2022. ; https://doi.org/10.1101/2022.12.14.22283389 doi: medRxiv preprint

INTRODUCTION
Epilepsy is a neurological disorder that affects about 1% of the world population, of which approximately 31 30% are drug-resistant (Picot, Baldy-Moulinier, Daurès, Dujols, & Crespel, 2008). The epileptogenic 32 zone (EZ), corresponding to the cerebral region generating the seizure, might be arduous to locate, and its 33 localization is crucial in refractory epilepsy that requires surgery. Indeed, surgery success is based on the 34 accurate delineation of the EZ, but this area is rarely reduced to a limited brain region (Bartolomei,   2022) but also on synthetic data (Hashemi et al., 2020;Vattikonda et al., 2021). In addition, the VEP has 51 been compared in a retrospective study of 53 patients to EI type quantification methods and to clinical 52 analysis showing encouraging performances . The VEP provides the first fully 53 nonlinear system analysis of whole brain NMM and works on the whole brain source spaces rather than 54 the sensor recording spaces alone. Here the NMM is Epileptor and was developed by Jirsa, Stacey, 55 Quilichini, Ivanov, and Bernard (2014). Epileptor is a phenomenological model based on a system of 56 coupled nonlinear differential equations with five state variables. All together, these equations generate 57 epileptic dynamics called seizure-like events (SLEs). The parameter x 0 in Epileptor, the excitability for 58 -3-. CC-BY-NC-ND 4.0 International license It is made available under a is the author/funder, who has granted medRxiv a license to display the preprint in perpetuity. (which was not certified by peer review) preprint The copyright holder for this this version posted December 16, 2022. ; https://doi.org/10.1101/2022.12.14.22283389 doi: medRxiv preprint challenge because the sodium signal is weak (Madelin, Lee, Regatte, & Jerschow, 2014). In epilepsy, the 76 first 23 Na-MRI study performed at 3T in a group of human focal epilepsy showed a significant increase of 77 total sodium concentration (T SC) in EZN compared to propagation zone (PZ) and non-involved zone 78 (NIZ) (Ridley et al., 2017). Nevertheless, T SC has limited specificity for epileptogenicity as it likely 79 reflects intracellular and/or extracellular changes as well as differences in cell density or organization. 80 The quadrupolar interactions of the 3/2 spin of sodium with the electric field gradient of surrounding 81 molecules (Rooney & Springer, 1991) dictate variation in T 2 * decay behavior, of which multiparametric 82 investigation has been made with the biexponential fit of the T 2 * decay of the sodium MR signal (Ridley 83 et al., 2018). In this paper, we used 23 Na-MRI at 7T with the enhanced signal-to-noise. The study of 84 quadrupolar interactions gives an indication of the tissue organization and the molecular environment. 85 Bi-exponential of the T 2 * decay enables the characterization of the apparent short fraction sodium 86 concentration (N a SF ) and the apparent long fraction (N a LF ), which when added together gives the T SC 87 (Ridley et al., 2018). In addition, by quantifying the sodium signal fraction with the short T 2 * decay 88 -4-. CC-BY-NC-ND 4.0 International license It is made available under a is the author/funder, who has granted medRxiv a license to display the preprint in perpetuity. (which was not certified by peer review) preprint potentially provide a better link between sodium homeostasis and neuronal excitability in human 90 epilepsy. In a recent study an increase of f in the EZN compared to controls and to PZ and NIZ has been 91 reported, whereas TSC was increased in all regions including PZ and NIZ (Azilinon et al., 2022). 92 We hypothesized that 23 Na-MRI data can provide complementary knowledge to the VEP through prior.

93
Thus in this paper, we systematically evaluate the added value of 23 Na-MRI information to improve the 94 performance of VEP for estimation of EZN. In order to study the individual patterns and to find common 95 features between the different patterns, we combined the different sodium features via machine learning 96 approaches using classification models to classify and predict if a region is epileptogenic or not. In the 97 present study, we exploited the resulting predictions as priors in the VEP framework.

RESULTS
VEP workflow with 23 Na-MRI prior 99 The VEP workflow, in Figure 1, starts from clinical imaging (anatomical and diffusion MRI) and 100 electrophysiology (SEEG) data to estimate the EZN via a whole brain neuronal modeling. Briefly, the 101 brain network model is formed by nodes defined by the regions of the VEP atlas linked by the structural 102 connectivity, obtained from the patient-specific imaging data. Note that here the network is 103 patient-specific. Epileptor, a phenomenological neural mass model, is then used to simulate seizure-like 104 activity on each brain region. The signals are generated in the source space and then projected onto the 105 sensors, thus obtaining the simulated activity within each channel of the SEEG electrodes, previously 106 localized.

107
The model inversion module infers the free parameters of the model from data recording for a 108 personalized simulation. The data features are extracted through SEEG recordings. Here we used the 109 optimization method although a sampling method is also available. The optimization pipeline requires a 110 prior and the likelihood function. Using the L-BFGS algorithm, the goal is to obtain the maximum of the 111 posterior distribution of the model parameters, called maximum a posteriori (MAP). To obtain an EV 112 we bootstrapped 100 MAPs by randomly removing one sensor, which gave us an EV distribution. The 113 regions with the highest EV distribution are labeled as EZN.

114
-5-. CC-BY-NC-ND 4.0 International license It is made available under a is the author/funder, who has granted medRxiv a license to display the preprint in perpetuity. (which was not certified by peer review) preprint predictions of the two models tested were used as priors (Na-MRI priors 1 and 2).

128
Feature Importance and Models tuning and selection 129 The permutation feature importance benefits from being model agnostic and can be calculated many 130 times with different permutations of the feature. Here we estimated the cross-validated permutation 131 importance, with 10 repeats and with balanced accuracy as scoring metric. Balanced accuracy is the 132 accuracy adapted to imbalanced data and is defined as the arithmetic mean of sensitivity (true positive 133 rate) and specificity (true negative rate). While thresholding at 0.05, we obtained 6 features for the 134 training dataset 1 and 8 features for the training dataset 2. The 2 sets of features have 3 common features: 135 N a LF , T SC and f 2 . Therefore, we can consider these 3 features as "universal" epileptogenic markers, as 136 they are important independently of the training dataset. The difference in features highlights the fact that 137 each training dataset has a different pattern selective of EZN. Some features, were totally useless, with a 138 poor permutation feature importance score, such as the categorical features "lesional patient" and 139 "lesional zone", make this information not meaningful to predict EZN with these models.

140
The selected features are used in the models for hyper-parameters tuning stage. The model selection 141 was based on a cross-validated validation-score higher than 0.65 and a difference score lower than 0.1, 142 resulting in 12 models selected. Next, models were trained on their respective training dataset and 143 provide a (optimized) prediction for each patient. The model with the highest mean testing balanced 144 accuracy, for each training split, was selected for the next stage. The retained parameters for these 2 145 models are summarized in table 1. Both models get a tolerance C=10, a L2 regularization and similar 146 class weight. On the other hand, solvers differ, logistic regression 1 getting a L-BFGS solver, and logistic 147 regression 2 the SAGA solver.

150
Before converting prediction into x 0 and running simulations in the VEP framework, we evaluated 151 performances of the two best logistic regressions, tuned using each training sub-dataset. Models 152 -6-. CC-BY-NC-ND 4.0 International license It is made available under a is the author/funder, who has granted medRxiv a license to display the preprint in perpetuity. (which was not certified by peer review) preprint The copyright holder for this this version posted December 16, 2022. ; https://doi.org/10.1101/2022.12.14.22283389 doi: medRxiv preprint == D R A F T == Title: 23 Na-MRI Derived Priors Support Estimation of EZ Using Model Methods  (Figure 2).

159
The predictions used to estimate the balanced accuracy were binarized model probability prediction.

166
The threshold was optimized for each model and each patient in order to obtain the best prediction of the 167 EZN. These probabilities are represented in Supplemental Figure 2 for each region's clinical hypothesis. 168 We observe a clear gradient, with higher probabilities in effective EZN -in the clinical hypothesis -and 169 lower probabilities in NIZ, while PZ probabilities are in between. It is likely that this is due to the 170 predictors, namely 23 Na-MRI features.

172
The VEP workflow was applied to empirical data from a female patient in her 20s, with no surgical 173 intervention yet. The patient was initially diagnosed with bilateral temporal plus epilepsy and a 174 radiologically observed bilateral periventricular nodular heterotopia (Supplemental Table 1). The   At the group level, we analyzed 26 seizures from 9 patients as the test dataset using the VEP pipeline. We  CC-BY-NC-ND 4.0 International license It is made available under a is the author/funder, who has granted medRxiv a license to display the preprint in perpetuity. (which was not certified by peer review) preprint The copyright holder for this this version posted December 16, 2022. ; https://doi.org/10.1101/2022.12.14.22283389 doi: medRxiv preprint == D R A F T == Title: 23 Na-MRI Derived Priors Support Estimation of EZ Using Model Methods previous section logistic regression 1 and logistic regression 2, respectively. Parameters resulting from 216 model inversion permit simulation proper to each prior. This was also done for the clinical hypothesis of 217 the EZN, using the VEP-EI prior, and the resulting EZN estimation was used as reference in the 218 performance evaluation approach. Evaluation of performance was made with 2 different metrics 219 specifically used while dealing with imbalanced data: balanced accuracy and F 0.5 -score ( Figure 3). These 220 scores were computed for each prior' EZN estimation against the EZN estimation of the VEP-EI prior.

221
Bootstrapped paired t-test shows a significantly (p < 0.01) higher accuracy of Na-MRI-prior 1 and 222 Na-MRI-prior 2 compared to no-prior. We also can visually see the higher balanced accuracy compared 223 to VEP-M and VEP-W priors, but with lower significance (p < 0.05). Bootstrapped paired t-test does 224 not identify any significant difference of F 0.5 -score between priors.

244
Using 7T MRI we also used f , N a SF and N a LF , measures estimated from the biexponential fit 245 parameters of the 24 TEs (see section 'Data Processing'). f reflects the apparent ratio of short and long 246 T 2 * sodium signal decays, and thus encompasses the smallest measurable effects at each TE, with a 247 weighting for short TEs. While in free liquid such as the CSF, the T 2 * signal decay is mono-exponential, 248 the quadrupolar interaction of sodium nuclei with the electric field of molecules lead to bi-exponential 249 T 2 * decay in the tissues (Berendsen & Edzes, 1973). Here we assumed that N a SF and N a LF will be  Figure 1). We could therefore imagine in the future, to refine these measures by 254 improving the compartmental models of sodium (multi-exponential decays accounting for intracellular, 255 extracellular, CSF and vascular compartments) for a better characterization of the epileptogenic network.

256
Together, these measurements provide information on several aspects: (i) sodium homeostasis, (ii) 257 microstructure as the sodium signal may also reflect the structure of the medium in which the sodium is  Studying logistic regression predictions probabilities, searching for the optimal threshold for the best 290 performance (balanced accuracy score) we observed that the model seems to be sensitive to clinical 291 hypotheses. In fact there is a gradient of prediction probabilities with EZN the higher, NIZ the lower and 292 PZ in between. This means that although the model was trained on binary targets (EZN vs. non-EZN, i.e.

293
PZ and NIZ), the 23 Na-MRI features used as predictors show that PZs are not quite NIZs nor quite EZNs.

294
The average probability of EZN is very high (around 0.8), that of NIZ is below 0.4, while that of PZ is 295 slightly higher than NIZ. This is even more pronounced in logistic regression 2 than in logistic regression 296 1 (Supplemental Figure 2) showing that the model is rather indecisive about PZ. It would be very 297 interesting to study multi-class classification in this context, which would also address the issue of The clinical hypothesis used here depict the Epileptogenic zone network (EZN), the propagation zone 301 (PZ) and the non-involved zone (NIZ), but to simplify the procedure we have binarized these assumptions 302 -corresponding to our classification targets -considering a "one vs the rest" strategy, since we are 303 interested in the EZN specifically. This is a strong assumption that affects the choice of x 0 (either -1.5 for 304 a strong excitability or -3 otherwise). Nevertheless, when we look at the probabilities of the models, we 305 notice a gradient, which shows that the models consider the PZs as fuzzy zones between pathological and 306 healthy excitability. It also reflects a continuum of the excitability, referred to in the literature 307 (Bartolomei et al., 2008) We could therefore deepen this study by making a multi-class classification 308 aiming at predicting the EZN, the PZ and the NIZ, to then fix the values of x 0 according to each 309 prediction, with an x 0 between -1.5 and -3 for the propagation zones.  The parameters provided by the optimization procedure using MAP tune the neural mass model, which 318 in turn generate simulated brain activity of a bulk group of neurons. Indeed, reducing 1000 vertices of 319 source activity into one node mapped to a VEP region cancels out the directionality of the current dipole 320 of the folded cortical sheet, which may lead to wrong mapping from sources to sensors and thus possibly 321 introduce errors into the estimation of EZN. Neural Field Model (NFM) might be a solution, simulating 322 brain activity at the vertex level. But tje relatively low resolution of 23 Na-MRI will complicate the 323 mapping of sodium features onto the vertices. Moreover, the important bias that partial volume effect 324 might introduce in the vertex level sodium estimates will eventually mistake the 23 Na-MRI based priors.

325
An improvement of the 23 Na-MRI resolution will facilitate the approach. is the author/funder, who has granted medRxiv a license to display the preprint in perpetuity. (which was not certified by peer review) preprint The copyright holder for this this version posted December 16, 2022. ; https://doi.org/10.1101/2022.12.14.22283389 doi: medRxiv preprint == D R A F T == Title: 23 Na-MRI Derived Priors Support Estimation of EZ Using Model Methods not take into account the seizure-specific aspect, since only one interictal prior will be used for all 331 seizures of a given patient. Interestingly, this did not have any impact on the outcome, given the high 332 balanced accuracy obtained for 23 Na-MRI priors. This may mean that commonalities between different 333 seizures could be detected with non-invasive interictal measures such as 23 Na-MRI, but more studies are 334 needed to make this claim.

336
In the present study, we based data selection on the clinical hypothesis which lies on SEEG recording 337 analyzes and implantation spatial sampling, considering it as ground truth. As SEEG recordings analyzes 338 may suffer from spatial sampling problems, using it as ground truth is debatable, especially when the 339 ground truth is usually considered to be the brain region which once removed leads to no more seizures 340 (Lüders, Najm, Nair, Widdess-Walsh, & Bingman, 2006). Nevertheless, we had to make a choice for a 341 ground truth using such a prospective database, where the majority of the patients do not have had a 342 surgery, and the choice was to use the best estimation of the EZN common to all patients at the moment 343 of this study. In future, applying a similar approach on seizure-free patients only will be needed to 344 confirm these results. 345 We have considered a normal distribution of excitability to compute parameter likelihood. The 346 excitability of a region, in the context of a phenomenological model such as Epileptor, is the cumulative 347 sum of the effects of the components that play a role in seizure generation. If these components can be 348 random independent variables then, according to the central limit theorem , their sum 349 converges to a normal distribution. However, we can imagine that in the case of some epileptogenic 350 lesions, which may or may not generate seizures, a bimodal distribution would be more appropriate.

351
This last point can also be improved by introducing the regional variance. Currently the 352 parameterization is identical for all the parameters of the model except x 0 , and this for all the sources. It 353 would be interesting to vary the parameters according to other biological information, such as cell 354 density, cell type within a region, as well as functional specialization of brain regions. The regional 355 variance can also depend on the functional specialization of regions or the structural connectome.

356
Regional activity variance has been demonstrated using power spectra and peak frequency of functional 357 data such as SEEG (Frauscher et al., 2018). Most of the anatomical and functional data related to 358 regional variance are available at the group level, making it challenging to use this information in an 359 -13-. CC-BY-NC-ND 4.0 International license It is made available under a is the author/funder, who has granted medRxiv a license to display the preprint in perpetuity. (which was not certified by peer review) preprint The copyright holder for this this version posted December 16, 2022. ; https://doi.org/10.1101/2022.12.14.22283389 doi: medRxiv preprint == D R A F T == Title: 23 Na-MRI Derived Priors Support Estimation of EZ Using Model Methods individualized approach like the one used in this study. In the future it would be interesting to explore 360 how 23 Na-MRI data can provide information in this sense; now that we are able to extract 23 Na-MRI data 361 in the whole brain via VEP atlas, we need to determine the right model parameters which can be tuned 362 based on these data to address regional activity variance from the homeostatic point of view.  were assessed in the non-invasive evaluation. The subjects' clinical data are given in Supplemental Table   379 1. The evaluation included non-invasive T 1 -weighted imaging (see MRI acquisition section of the article In addition, 23 Na-MRI was acquired using a dual-tuned 23 Na/ 1 H QED birdcage coil and a multi-echo 386 density adapted 3D projection reconstruction pulse sequence on a whole-body 7-Tesla Magnetom Step 2 -17-. CC-BY-NC-ND 4.0 International license It is made available under a is the author/funder, who has granted medRxiv a license to display the preprint in perpetuity. Solving the forward problem and estimating a source-to-sensor matrix permit to map the neural activity from sources (VEP brain regions) to the sensors (SEEG electrods contacts). This matrix g j,k from source brain region j to sensor k -also called Gain matrix -is equal to the sum of the inverse of the squared Euclidean distance d i,k from vertex i to sensor k, weighted by the area a i of the vertex on the surface. Each frequency band is defined by the combination of a lower bound ranging from 10 to 90Hz and an upper bound ranging from lower bound + 10 to 120Hz, both in steps of 10Hz. Averaging spectrograms across a given frequency band gives an average time series per SEEG channel, which is thresholded by its 90% percentile. Early increase in a specific frequency band is illustrated by high values of normalized reciprocal value (reciprocal of the first time point above the threshold in each channel). This is -18-. CC-BY-NC-ND 4.0 International license It is made available under a is the author/funder, who has granted medRxiv a license to display the preprint in perpetuity.  The "not EZN" label corresponds to the concatenation of PZ and NIZ labels. These labels are mostly 473 diagnosed based on SEEG recordings processing, using the Epileptogenic Index (EI) (Bartolomei et al.,474 2008). Hence, the classification was focused on the region with one of those labels. While setting the 475 procedure, we observe a huge variability in Na features patterns, making the model performing poorly. 476 We then decided to split the training dataset to deal with this issue. We tuned the models on both training 477 datasets. The resulting tuned models were used to predict the EZN in of the test dataset patients, 478 providing 2 priors for the VEP pipeline. The whole procedure is detailed below. All priors definitions are 479 summarized and illustrated in Figure 5. The train-test split was performed over the 25 patients dataset, training dataset used only 484 for hyperparameter tuning, model selection and model fitting, and a testing dataset from which we get the 485 predictions of fitted models and use them as priors in the VEP pipeline. Not all of the 25 patients had all 486 the necessary data for the VEP pipeline, so we put those patients into the train dataset. The final training 487 dataset contained 16 patients (9 in the testing dataset). 488 We observed heterogeneous 23 Na-MRI feature patterns at the individual level, which initially provided 489 weak performance. So we opted to split the train set to train the models on data with different patterns. 490 We arbitrarily choose to split into 2 different datasets using spectral embedding (Luxburg, 2007)   The next step was permutation feature importance which corresponds to the decrease in the model 508 score when a feature values are randomly permuted (Breiman, 2001). This procedure can be applied computed the reference score of the model on the data, in this instance balanced accuracy. Next, each 513 feature was randomly permuted 10 times, computing at each repetition the permuted score. The 514 importance was finally obtained from the difference between the reference score and the permuted scores.  (Table 1) the best mixture of parameters. Each mixture provides 525 a model that will fit on the training dataset, and then provide a performance score, here balanced 526 accuracy. Cross-validated grid search over a parameter grid optimizes parameters of the models. We used 527 a nested cross validation (CV) approach (Wainer & Cawley, 2018), resampling the train-split of each CV 528 fold using SMOTEENN (Batista, Prati, & Monard, 2004). In our nested CV, the outer fold contains 2 529 patients and the inner fold is composed of 1 patient. For each fold the minority class is oversampled to 60 530 points while the majority class is oversampled to 180 points before undersampling by ENN, which 531 preserves a relative imbalance, managed by model class weights. The decision about the sets of 532 parameters to use is based on their respective models performance, using the mean cross-validated 533 validation score and the scores difference (mean CV train score -mean CV validation score). The models 534 should have a mean cross-validated score above 0.65 to remove all the models with a performance close 535 to the chance-level. A score difference lower than 0.1 removes all models that overfit, i.e. train score is 536 much higher than the validation score.

537
The parameters combinations retained provide 12 models. In order to reduce the number of models, To infer the epileptogenicity parameter and source time series for each seizure, we apply a Bayesian modeling approach. According to Bayes' theorem, the posterior probability distribution p(θ | y) of a parameter θ given the data y is equal to the product of the likelihood L(y | θ) of the data given the parameter and the prior probability distribution p(θ) of the parameter divided by the marginal likelihood p(y) of the data.
In such a complex multivariate models as (Epileptor) VEP, the marginal likelihood p(y) = L(y | θ)p(θ)dy is unsolvable; but as it scales to 1 the integrale across the posterior distribution, one can state the Bayes theorem as Where the posterior probability is proportional to the unnormalized posterior probability up(θ|y). The optimization algorithm performs an iterative process to find θ M AP . It starts with an initial assumption of the parameter before moving through parameter space following the direction of the gradient of the probability distribution. The algorithm terminates after either a maximum of 20,000 steps or convergence has been reached. When changes in parameters, gradients, or probability density between steps are below a certain threshold, convergence is detected. In the current work exploiting the VEP model, the product of prior probability of each parameter and the likelihood of the data provides the posterior probability. Stan (Carpenter et al., 2017) transforms probability into log proba, resulting in a log of posterior proba which corresponds to the sum of log likelihood and log prior probability of all parameters. We specified the prior probabilities for the epileptogenicity parameter x i,0 for brain region i, the time scale of the slow variable τ 0 , one scaling s and one additive constant of the simulated SEEG, the global coupling scaling factor K, and the initial conditions for state variables x i (t 0 ) and z i (t 0 ) in region i, as well as the distribution width of the extracted data features ϵ ν .
where N (µ, σ) is a normal distribution with mean µ and dispersion σ and x i,m ∈ {−3, −1.5} is the epileptogenicity prior for each brain region. Some prior probabilities are truncated by setting a possible minimum value. The likelihood function is given by CC-BY-NC-ND 4.0 International license It is made available under a is the author/funder, who has granted medRxiv a license to display the preprint in perpetuity. there are no values above 0, meaning no estimated seizure in a brain region, the onset value is set to t i = 200. We calculate the EV i of brain region i by Once the EV vector is normalized to [0, 1] for each optimization run, the optimization pipeline gives the 556 distribution of EVs while considering the sensitivity of the sensor spatial sampling. Usually, the performance scores used to evaluate binary classification models, 567 especially when the dataset is imbalanced; they are derived from the confusion matrix. The confusion 568 -24-. CC-BY-NC-ND 4.0 International license It is made available under a is the author/funder, who has granted medRxiv a license to display the preprint in perpetuity. (which was not certified by peer review) preprint The copyright holder for this this version posted December 16, 2022. ; https://doi.org/10.1101/2022.12.14.22283389 doi: medRxiv preprint == D R A F T == Title: 23 Na-MRI Derived Priors Support Estimation of EZ Using Model Methods matrix summarizes the correct and the wrong predictions and thus, helps to understand the number of 569 predictions made by a model for each class, and the classes to which those predictions actually belong. It 570 helps to understand the kind of prediction errors the model made. Figure 3 illustrates   Balanced accuracy, the imbalanced data adapted accuracy, is the arithmetic mean of sensitivity and 579 specificity (Kelleher, Namee, & D'Arcy, 2015). The classic accuracy score tends to be inflated due to the 580 imbalanced nature of the dataset, which balanced accuracy prevents. The F-beta score used in this project 581 is the harmonic mean of recall and precision Baeza-Yates and Ribeiro-Neto (1999) ( Figure 6). As we are 582 more interested in the precision than in recall, we gave more importance to precision than to recall, 583 setting beta = 0.5. These two metrics were first used in combination during parameter tuning procedure 584 as scoring functions, as well as to evaluate VEP pipeline EZN estimation. The model selection is based 585 on balanced accuracy.

VEP outcome analysis
Over the 9 patients of the test dataset that we virtualized using all the described 587 priors (VEP-EI, VEP-M, VEP-W, Na-MRI-prior 1, Na-MRI-prior 2, VEP-no-prior), the VEP pipeline 588 provides results for a total of 26 seizures. In order to evaluate the performance of each prior we compute 589 the balanced accuracy and the F 0.5 -score for each seizure, using VEP-EI results as reference. Next, we 590 compared the resulting balanced accuracy and F 0.5 -score with a bootstrapped (1000000 resampling) 591 paired t-test comparing each pair of priors. We used the classical threshold of 0.05 for the p-value, also 592 considering the threshold of 0.01.

ACKNOWLEDGMENTS
The authors would like to thank L. Pini, C. Costes, and V. Gimenez for data acquisition and study

SUPPORTING INFORMATION
Supplemental materials can be downloaded here.

COMPETING INTERESTS
The authors declare that they have no known competing financial interests or personal relationships that 603 could have appeared to influence the work reported in this paper.

DATA AVAILABILITY STATEMENT
The data that support the findings of this study are available on request from the corresponding author.

605
The data are not publicly available due to sensitive information that could compromise the privacy of   CC-BY-NC-ND 4.0 International license It is made available under a is the author/funder, who has granted medRxiv a license to display the preprint in perpetuity. (which was not certified by peer review) preprint The copyright holder for this this version posted December 16, 2022. ; https://doi.org/10.1101/2022.12.14.22283389 doi: medRxiv preprint 10.1016/S1388-2457(01)00591-0 645 -27-. CC-BY-NC-ND 4.0 International license It is made available under a is the author/funder, who has granted medRxiv a license to display the preprint in perpetuity.  CC-BY-NC-ND 4.0 International license It is made available under a is the author/funder, who has granted medRxiv a license to display the preprint in perpetuity. (which was not certified by peer review) preprint The copyright holder for this this version posted December 16, 2022. ; https://doi.org/10.1101/2022.12.14.22283389 doi: medRxiv preprint modeling in the virtual brain. NeuroImage, 111, 385-430. Retrieved from 746 -31-. CC-BY-NC-ND 4.0 International license It is made available under a is the author/funder, who has granted medRxiv a license to display the preprint in perpetuity. (which was not certified by peer review) preprint The copyright holder for this this version posted December 16, 2022. ; https://doi.org/10.1101/2022.12.14.22283389 doi: medRxiv preprint -32-. CC-BY-NC-ND 4.0 International license It is made available under a is the author/funder, who has granted medRxiv a license to display the preprint in perpetuity. (which was not certified by peer review) preprint The copyright holder for this this version posted December 16, 2022. ; https://doi.org/10.1101/2022.12.14.22283389 doi: medRxiv preprint