The expert's knowledge combined with AI outperforms AI alone in seizure onset zone localization using resting state fMRI

We evaluated whether integration of expert guidance on seizure onset zone (SOZ) identification from resting state functional MRI (rs-fMRI) connectomics combined with deep learning (DL) techniques enhances the SOZ delineation in patients with refractory epilepsy (RE), compared to utilizing DL alone. Rs-fMRI was collected from 52 children with RE who had subsequently undergone ic-EEG and then, if indicated, surgery for seizure control (n = 25). The resting state functional connectomics data were previously independently classified by two expert epileptologists, as indicative of measurement noise, typical resting state network connectivity, or SOZ. An expert knowledge integrated deep network was trained on functional connectomics data to identify SOZ. Expert knowledge integrated with DL showed a SOZ localization accuracy of 84.8 ± 4.5% and F1 score, harmonic mean of positive predictive value and sensitivity, of 91.7 ± 2.6%. Conversely, a DL only model yielded an accuracy of <50% (F1 score 63%). Activations that initiate in gray matter, extend through white matter, and end in vascular regions are seen as the most discriminative expert-identified SOZ characteristics. Integration of expert knowledge of functional connectomics can not only enhance the performance of DL in localizing SOZ in RE but also lead toward potentially useful explanations of prevalent co-activation patterns in SOZ. RE with surgical outcomes and preoperative rs-fMRI studies can yield expert knowledge most salient for SOZ identification.


INTRODUCTION
The World Health Organization estimates that approximately 50 million individuals worldwide are affected by epilepsy ( [29]).Within this population, medically refractory epilepsy (RE), constitutes about 30%, where patients have not achieved seizure control for at least 12 months despite adequate trials of two tolerated and appropriately chosen anti-epileptic medications.RE significantly impacts the quality of life of those affected.The most successful approach for addressing RE involves surgical ablation, resection, or disconnection of brain regions associated with seizure genesis, seizure onset zone (SOZ) [1] [2] [4].Recent research emphasizes the importance of early diagnosis and surgical intervention to mitigate developmental complications and reduce the risk of sudden deaths [32].Despite advances in surgical interventions, for focal onset RE such as mesial temporal lobe epilepsy (TLE), a large number of patients (30% -40%) still suffer from continued debilitating seizures [5] and post-surgery developmental impairments [6] [7].Achieving a seizure-free surgical outcome is contingent upon accurately localizing the SOZ [8].The gold standard technique for localization of SOZ uses invasive intracranial electro-encephalography (ic-EEG), which requires implantation of depth electrodes [9].However, concordance between ic-EEG spike density and the SOZ is observed in only 56% of patients [10], due to sub-optimal lead implantation.As such, ic-EEG lead placement must be guided by determining the expected SOZ using non-invasive brain imaging modalities [11] [12].One non-invasive method, resting state functional magnetic resonance imaging (rs-fMRI), uses blood oxygen level-dependent (BOLD) correlations measured at rest to map functional connectomics [13].It is an effective measure of the plasticity of large-scale networks induced by repeated and synchronized co-activation of brain regions [14] caused by debilitating seizures.Independent component analysis (ICA) of rs-fMRI has been shown to have 90% agreement with ic-EEG determined SOZs [5] [10], and the usage of rs-fMRI guided ic-EEG to locate and surgically alter the SOZ has shown significant improvement in seizure free surgical outcomes for RE pediatric patients without any increase in developmental risks [15] [5].
One of the challenges in relating ICA's resulting independent components (IC) of rs-fMRI to SOZ is that abnormal BOLD correlations are variable across individuals, with activation foci varying across temporal, parietal, frontal lobes, hippocampus, and cortex [16].Furthermore, over 50% of the data comprises noise ICs, with the remaining 40-45% attributed to resting state network (RSN), leaving only a small percentage, around 5-10%, associated with SOZ ICs.Currently, a set of rules identified by a consortium of experts is meticulously applied with expert analysis of hundreds of ICs, rendering the pre-surgical screening process extremely time-consuming and not easily replicable [15].This calls for a need of a more streamlined, automated, and replicable pre-surgical screening process for SOZ localization.The existing methodology, relying on rules outlined by experts and involving detailed manual analysis of numerous ICs, is time-intensive, subjective, and lacks reproducibility.Given the demonstrated capability of large scale supervised statistical approaches, such as deep learning (DL), to identify abnormal patterns within complex datasets, recent advances have shown their application for SOZ localization from rs-fMRI data [17] [18].However, a limited study on 14 subjects with refractory TLE has shown poor positive predictive value (PPV) of 52% (± 3.9%) for a brain parcellation to be associated with SOZ [18].Moreover, the identified SOZs do not conform to the disease characteristics, as bilateral SOZ was identified for patients with unilateral focal TLE [18].Our prior research has demonstrated that automating the expert rules outlined in [15] and then implementing them in a carefully structured sequential manner result in a PPV of 65% (±7.8%), surpassing the performance of statistical approaches [16].One of the primary reasons for poor PPV of statistical approaches is that abnormal BOLD correlations, meaning non-noise, not normal resting state fMRI network, and thus is interpreted to be pathological, form less than 10% of the rs-fMRI ICs from ICA [16] [18].This triggers the fundamental Achillies heel of classification science, that is class imbalance [19], where the statistical approach lacks enough pathological data to effectively distinguish abnormal patterns amidst significant individual variation.A pure statistical approach like DL overlooks the valuable expert knowledge encoded in terms of rules applied to real data by experts and validated by the successful seizure free outcomes upon surgical resection/ablation of expert identified SOZ.In this study, we aimed to investigate whether integration of expert knowledge of SOZ characteristics combined with data-driven statistical supervised learning approaches could improve the identification accuracy of SOZ compared to purely statistical machine learning approach, for subjects with RE.We validated identification accuracy by comparing against manual evaluation by two independent experts and subsequent ic-EEG based SOZ identification, and in surgical patients, with surgical outcomes in terms of Engel scores.Additionally, we tested which knowledge component contributed most in improving DL performance of SOZ identification.Finally, we utilized the expert knowledge contributions to generate clinically relevant explanations of SOZ identification result.

Contribution
This study aims to automate localization of the SOZ using DL and expert knowledge, with the primary goal of facilitating the non-invasive assessment of iEEG lead placement by the surgical team.The main contributions of the paper include: • Demonstrating that the integration of AI with expert knowledge on SOZ characteristics results in superior automated SOZ localization compared to relying solely on AI techniques for the same purpose.
• Illustrating through knowledge ablation study that the expert knowledge of activations originating in gray matter, extending through white matter, and concluding in vascular regions, is identified as the most discriminative expert knowledge among expert-identified SOZ features.
• Validation of SOZ localization accuracy on a large dataset of 52 patients across various age ranges and gender.

Related works
Recent research can be broadly categorized into two main areas, as outlined in Table 1: epilepsy detection [35,34,33], which entails classifying patients as either epileptic or non-epileptic based on EN identification, and SOZ localization [ [29,16,5], the primary focus of this paper.Table 1 presents a comparative analysis of recent studies, considering factors such as the number of subjects, the proportion of the RE subgroup, age range, and the types of ICs identified.Within this domain, evaluations encompass diverse metrics such as concordance with iEEG, agreement with expert-identified SOZ, and consistency with physician assessments.
The reported results column in Table 1 presents the evaluation metrics from the original manuscripts for each study.Various manual techniques for identifying the SOZ involve expert-defined rules based on specific spatio-temporal characteristics of BOLD signals captured by rs-fMRI.Boerwinkle et al. [5] explored the agreement between the epileptogenic zone (EZ) identified through rs-fMRI and the SOZ identified using iEEG data.They employed prevalence-adjusted bias-adjusted kappa (PABAK) on a cohort of 40 patients, revealing a concordance rate of 89%.This study highlighted the limitations of previous approaches that focused on the most abnormal brain region for SOZ localization.However, no work is reported on automation of expert sorted ICA-based SOZ classification in this paper.Gil [36] manually studied 21 patients with extratemporal focal epilepsy to identify SOZ related ICs in fMRI data using the general linear model-derived EEG-fMRI time courses associated with epileptic activity.Lee et al. [37] also manually investigated the functional connectivity changes in the ENs from rs-fMRI data using intrinsic connectivity contrast (ICC) to evaluate the non-invasive pre-surgical diagnostic potential for SOZ localization.The agreement of fMRI-IC with intracranial EEG SOZ was 72.4%.
The first automation attempts were from Hunyadi et al. [29], who present a set of SOZ spatial and temporal features used to train a Least-Squares Support Vector Machine (LS-SVM).Evaluation on 18 RE patients showed sub-optimal results.DL was first explored by Nozais et al. [17] to classify RSN ICs on non-RE patients and reported an accuracy of 92%.However, they did not pursue SOZ identification.
Luckett et al. [38] used 2132 healthy control data for training of 3D CNN and tested it on temporal lobe epilepsy to detect the whole hemisphere of seizure onset.The training data was synthetically altered in randomly lateralized regions which helped in detection of biological SOZ's hemisphere.Note that ICs were not used here, so this work detected the whole brain hemisphere of seizure onset rather than the brain region pointing towards the SOZ.Their primary findings suggested the ICA guided by their technique has the potential to identify epilepsy-related ICs in patients with focal epilepsy.Naresh et al. [18] explored deep graph neural networks using the T1 weighted images from rs-fMRI along with Diffusion MRI (dMRI) measurements.Study on 14 subjects showed a sensitivity of 40% and precision of 52% while an accuracy of 88%.Not only the precision was sub optimal, the identified SOZs did not align with the expected disease characteristics, as bilateral SOZs were identified for patients diagnosed with unilateral focal temporal lobe epilepsy, rendering it irrelevant for pre-surgical screening.Zhang et al. [31] proposed ICA based automated method using unsupervised algorithm to localize the SOZ.SOZ ICs were screened based on peripheral noise IC removal, asymmetry and temporal features (excluding IC outside of frequency band 0.01-0.1hz).Consistency with the resection surgery on 10 patients was reported.If we assume consistency as true positive (TP), failure as FN and success in rejecting non-SOZ IC as true negative (TN) and failure to reject non-SOZ ICs as false positive (FP) then the results indicate significant FPs.Banerjee et al. [16] is the most recent study in the automation of SOZ localization.It uses six expert features combined from Boerwinkle et al. [5] and Hunyadi et al. [29].This technique reports high FPs.
Knowledge integration into DL models has been recently explored in many domains [40,41] including medical imaging [39] for diagnosis, lesion or organ segmentation with great success rate.Expert knowledge can be integrated in two broad ways [40]: a) scientific knowledge through mathematical models as performed in molecular dynamics analysis, or b) experiential knowledge, through logic rules.The current work falls in the second category.To the best of our knowledge, this is the first work exploring experiential knowledge integration with DL in epilepsy surgical planning.

Participants
52 consecutive patients with quality data of average age 8 years 8 months (±5 years 4 months) were retrospectively studied who were diagnosed to have RE based on International League Against Epilepsy (ILAE) criteria [20], from our previously published IRB approved retrospective cohort data who had ic-EEG and surgery.The evaluation involved rs-fMRI, continuous video monitoring while electroencephalography (EEG) is being performed, and anatomical 3T MRI as a part of standard MRI SOZ localization protocol followed at Phoenix Children's hospital (PCH) for epilepsy surgery evaluation.From this published study, the three imaging modalities were independently reviewed by two blinded experts, a neurologist, and a neurosurgeon, to determine the SOZ location in both anatomical MRI and rs-fMRI.For rs-fMRI, each expert sorted independent components (ICs) into three categories: NOISE, resting state network (RSN) and SOZ.(Henceforth, class labels are denoted by capitalized, bold and italicized text).In cases where there was any disagreement, a third reviewer was consulted for the final determination.Subsequently, each patient was subjected to ic-EEG based monitoring, which was independent of the rs-fMRI monitoring result.A clear indication of SOZ through observation of ic-EEG spikes determined the confirmed candidacy of the patient for surgical resection, ablation, or disconnection.For all patients, the SOZ ICs identified from rs-fMRI were manually verified by the experts.Hence, the expert manual denotation of an IC as NOISE, RSN or SOZ, supported by ic-EEG and/or surgical outcome, is considered as ground truth in this research.

RSN, SOZ
Prec = 93%, Sens = 89%, Acc = 84% For patients that did undergo surgery, the surgical location was determined by the expert epilepsy surgery conference team informed by the noninvasive imaging, including the expert identified rs-fMRI based SOZ location, and ic-EEG monitoring result.Validation of the manual SOZ determination was performed through evaluation of seizure free outcomes after surgical alteration of the rs-fMRI identified SOZ corroborated with ic-EEG.The patients were divided into three age groups to evaluate the effect of age on the SOZ localization performance.Patients in all age groups varied across many demographic and clinical characteristics (Table 2).Surgical outcomes were evaluated using Engel scores where Engel I meant seizure free, Engel II meant at-most one debilitating seizure in the first year after surgery.

Data acquisition and processing
The MRI images were obtained using a 3T MRI unit, Ingenuity Philips Medical systems, equipped with a 32-channel head-coil.The rs-fMRI settings were configured with a TR 2000 ms, TE 30 ms, matrix size 80 X 80, flip angle 80°and a total number of 46 slices.Each slice had a thickness of 3.4 mm without any gaps, and the in-plane resolution was set to 3 × 3 mm.The acquisition process involved interleaved acquisition, with a grand total of 600 volumes obtained across two 10-min runs, culminating in a total acquisition time of 20 mins.MELODIC tool [21] was employed to analyze the rs-fMRI and extract ICs using ICA [15].Pre-processing consisted of discarding the initial 5 volumes to remove T1 saturation effects, applying a high-pass filter at 100 seconds, correcting for slice time, implementing spatial smoothing with a full-width at half maximum of 1mm, and addressing motion artifacts through MCFLIRT [22], while excluding non-brain structures.Linear registration was done between the individual functional scans and the patient's high-resolution anatomical scan [23] which was further refined using boundary-based registration [24].

Computational approach overview
The SOZ localization approach utilized two types of models: a) deep supervised classification model or DL model, and b) expert knowledge integration (EKI) model.The approach combined the result of these two models following three steps (Figure 1): Step 1 Preprocessing: DL model used a labeled set of ICs, where each IC, I L is labeled as RSN, SOZ, or NOISE.DL model complexity drastically increases with input size potentially resulting in more data requirement to avoid under-fitting.Moreover, DL model expects all ICs to be of the same size.Hence, in the pre-processing step we resized each labeled IC, I L of size 709×1006×3, to an image I L R of size 270×470×3.I L R for use by the DL model, while I L was used by the EKI.I L R gave the most optimized DL model with the best accuracy for the given dataset, determined through hyper-parameter tuning [25].
Step 2 Training: In this phase, each RSN or SOZ IC was relabeled as NOISE.The DL was trained to recognize NOISE or NOISE classes.In parallel, each RSN and SOZ IC was passed through the expert knowledge feature extraction mechanism and a weight optimization was applied to obtain the best linear combination of expert knowledge components that were most discriminative between RSN and SOZ.
Step 3 Testing: A test patient's IC, I, was passed through DL and EKI models.EKI provided a confidence score ρ for I being SOZ.If DL categorized I R as NOISE, I retained EKI labels.However, if DL labeled I R as NOISE, I's classification then depended on ρ.Only if ρ > 0.9, I was marked as SOZ, else it retained DL label of NOISE.Having marked SOZ ICs, the SOZ was localized by designating the largest activation cluster, extracted using Density-Based Spatial Clustering of Applications with Noise (DBSCAN) [26].

Training Phase: Noise detection using labels through supervised learning
The ICs I L were relabeled to form I L{N } where ICs were either NOISE ICs or NOISE (RSN/SOZ).Five strategies with an 80-20 train/test split of the entire data were tested to classify I L{N } into the new class categories: a) 2D convolution neural network (CNN), b) Multilayer perceptron similar to [17], c) transfer learning using VGG-16 Imagenet model [27], d) problem reduction by treating the BOLD timeseries as images [28], and e) Vision Transformer (ViT).Validation result showed that the 2D CNN had the best precision and sensitivity in determining NOISE ICs (Comprehensive results table in supplementary document).Consequently, we opted for the utilization of the 2D CNN for the classification of noise ICs.The hyperparameters of the 2D CNN were obtained using the Keras-tuner's hyperband algorithm, with the objective of minimizing the validation loss.The hyperparameter tuning process involved exploring various configurations: • Number of convolution layers: [3,4,5], • Number of units or filters per convolution layer: 32-512, with a default of 128, • Number of neurons in the dense layer: 192 to 1024, with a step of 256, • Learning rates: 0.01, 0.001, or 0.0001, • Dropout rates: 0.2, 0.33, 0.4, 0.5, or 0.66, The optimized hyperparameter values, determined through the Keras-tuner, were as follows: three convolution layers, with 64, 64, and 256 3 × 3 filters in each respective layer; a dense fully connected layer with 704 neurons; a learning rate of 0.0001, and a dropout rate of 0.33.These specific hyperparameter values were selected to enhance the performance of the 2D CNN in accurately classifying noise ICs.Keras's image data generator was used to create batches of both NOISE and NOISE IC images.IC images were resized from I to I R using 'flow from directory' method.'Binary cross-entropy' loss function along with 'Adam' optimizer were chosen.Potential overfitting was addressed using dropout regularization and "early stopping" strategy.Activation function "ReLU" was chosen for input and hidden layers, and "Sigmoid" function for the output layer.Given the characteristics of our dataset, which features dark backgrounds and required extraction of sharp features while controlling variance and computational complexity, we inserted a max pooling layer of 2 × 2 after every convolution layer [25].

Training Phase: Expert Knowledge on rs-fMRI IC
Expert epileptologists use the RSN, NOISE, and SOZ indicators to manually sort the ICs (Figure 2) as compiled from the works of [29] and [15].In our methodology, we encoded the SOZ specific expert knowledge into the SOZ localization mechanism.This phase was subsequently divided into two steps.a) Extracting brain slices: Brain slices were derived from RSN and SOZ ICs through template matching.We used the Montreal Neurological Institute's 152 brain template (MNI152) for this purpose.With the help of the coordinates given by template matching, we extracted brain slices which enabled the subsequent extraction of features guided by expert knowledge.b) Extraction of expert knowledge: The expert knowledge about SOZ characteristics (Figure 2) is represented using the following features, F ex : 2. F ex (2) Activation extended to ventricles: A SOZ has activation extended from grey matter towards ventricles through the white matter.3. F ex (3) Dominant frequencies: SOZ's BOLD signal power spectra exhibit dominant frequencies greater than 6 Hz.
4. F ex (4) Sparsity in frequency domain: The rs-fMRI SOZ power spectrum is sparse with dominant frequency much more spread out throughout the spectrum than RSN.
The abovementioned features were extracted using the following method to form the feature vector F ex for each IC, I L .F ex extraction method: F ex (1) Number of clusters: From each IC, brain slices were extracted (Figure 3).From each slice, the number of clusters was estimated using DBSCAN [26].This approach had two adjustable parameters: neighborhood, which defined the distance metric and a value called ϵ, and v min , which determined the minimum number of neighboring voxels.Voxels with more than v min neighbors within the ϵ distance were considered core points and formed a cluster.Voxels that were not core points but were within ϵ distance of a core point were classified as border points and assigned to the nearest core point's cluster.All other points were disregarded.Clusters were formed by combining core points that were within ϵ distance of each other.Additionally, we set a threshold of 135 pixels, counting only those clusters that surpassed this threshold to determine the total number of clusters.The output of this step was the number of clusters in each IC slice (Figure 3).
F ex (2) Activation extended to ventricles: To identify the activation of the SOZ that extended from grey matter towards the ventricles through the white matter, a Sobel filter-based edge detection technique was applied, which extracted the contours for each slice, with the white matter exhibiting the most prominent contour within the slice [16].To obtain the ventricular regions, we applied edge detection to determine brain boundary.The ventricles run throughout the brain, however, they are less prominent in the slices that are towards the brain surface.Hence, we selected slices that are near the base of the brain.In these slices, the ventricle is more prominent and interrupts the continuity of the image.As such the contour detection gives multiple brain boundary contours, identified through the Sobel filter.The ventricular regions were within the convex hull of the brain boundary contours but did not intersect any brain boundary (Figure 3).Subsequently, a comprehensive analysis was conducted to determine if the larger clusters (with a size exceeding 135 pixels) had the overlapping with the white matter and extension towards the ventricles.In the overlapping process, from each slice of an IC, both clusters and contours were obtained.The presence of an overlapping cluster could potentially impede the contour detection algorithm, hindering the extraction of white matter and blood vessel contours.In the initial pass through the ICs, we obtained a version of each slice devoid of clusters, serving as a basis for contour identification.The algorithm then underwent a subsequent pass through each slice of an IC, detecting clusters and evaluating their intersection with the white matter.
F ex (3) Dominant frequencies and F ex (4) Sparsity in frequency domain: For temporal SOZ characteristics, ICs were analyzed for activelet and sine dictionary sparsity in their time courses.For calculating the sparsity in activelet basis, the BOLD signal was divided into windows of length 256 samples.From every window, four levels of activelet transformation coefficients using the 'a trous' algorithm with exponential-spline wavelets were extracted [29].The Gini Index metric was used for activelet coefficients and sine dictionary sparsity evaluation in the frequency band of 0.01Hz to 0.1Hz.

Training Phase: Balanced Dataset Creation
The data distribution is composed of approximately 51% NOISE, 43% RSN and merely 5% SOZ occurrences.To overcome class imbalance after the feature extraction process, synthetic SOZ features were created using SMOTE [30].Given the constraint of a restricted quantity of available SOZ ICs, approximately 5 ICs per subject, SMOTE identified authentic SOZ IC samples within the feature space and performed linear interpolation of features.

Training Phase: Expert Knowledge Combination logic
Ambiguity is inherent in expert knowledge, given the significant individual variance in seizure onset characteristics.Hence, F ex could not be used in isolation to represent expert knowledge and a carefully crafted combination was necessary.We utilized the subset of ICs, I L{R,S} ,that is labeled RSN or SOZ to configure a linear combination logic for the expert knowledge vector F I ex for an IC I that gave the best discriminative power between these two classes.For each I L{R,S} , we defined y i = −1 if it was RSN and y i = 1 if it was SOZ.We derived an expert knowledge weight vector ω ex , of size |F ex | ×1 that: Minimizes: such that: where F i ex is the expert knowledge vector of the i th IC in I LR,S , ∥F i ex ∥ is the L2 norm of a vector, and • denotes the dot product operator (Figure 3).

Testing Phase: SOZ localization approach
To obtain the robust estimate of our approach's performance on patient's data, we employed a leave-oneout cross-validation strategy, wherein each patient was given an opportunity to represent the entirety of the test datasets.This method of cross validation resulted in the most variance and a tight confidence interval through this approach, indicated robust performance across all patients.All rs-fMRI ICs of the test subject, I, went through a dual assessment using pre-trained DL model with I Otherwise, I was not marked as SOZ.At this point, the knowledge component with the highest contribution, ω j ex F I ex (j), in determining the SOZ was subsequently highlighted as the rationale/explanation behind selecting a specific IC as the SOZ.
The output of this step was a set I SOZ of ICs I SOZ i ∈ I SOZ that were marked as SOZ.The SOZ ICs were then further processed through the brain slice extraction and DBSCAN mechanism to obtain a set of clusters C i ∀ I SOZ i ∈ I SOZ .The localized SOZ was the largest cluster in each IC in I SOZ , SOZ area for

RESULTS
We evaluated: a) efficacy of our approach, its variation across age and sex and compare with state-of-the-art techniques, b) significance of localized SOZ through correlation with surgical outcomes and c) knowledge ablation to show relative importance of spatial and temporal expert knowledge in SOZ identification.

Comparative Techniques
We chose the following categories for comparison with our proposed approach supervised learning with both labels and expert knowledge (SLLEK): 1) Supervised learning with labels using CNN (SLL-CNN): We utilized a 2D CNN-based deep learning technique for comparison, solely using the labeled dataset in a supervised manner without incorporating any form of expert knowledge encoding.We also implemented cost-sensitive learning in CNN to ensure equal significance across all three classes during gradient updates.
2) Supervised learning with labels using ViT (SLL-ViT): We employed another DL approach of Vision Transformer (ViT) for our comparative analysis.This methodology also relied on the labeled dataset, embracing a supervised learning paradigm without integrating any explicit encoding of expert knowledge.To optimize the model's performance on our dataset, we leveraged Optuna to identify the most effective hyperparameters.Furthermore, to address class imbalance issue within the dataset, we set the weight parameter of the loss function to the computed class weights.This is particularly crucial when certain classes are underrepresented (SOZ in our case), as it helps the model to give more emphasis to the minority classes, preventing them from being overshadowed by the majority classes.Additionally, in order to prevent ViT from suffering from gradient explosion and gradient vanishing issues, we implemented gradient clipping and batch normalization respectively.
3) Statistical pattern learning with expert knowledge (SLEK): This methodology was inspired by Hunyadi et al. [29] which uses expert-guided features to facilitate model learning.To ensure an unbiased comparison with our own approach, we also applied the Synthetic Minority Over-sampling Technique (SMOTE) to generate ICs endowed with SOZ features, thereby achieving balance among the three classes (implementation details in the supplementary document).Table 3. SOZ Identification Performance Metrics.Expert Knowledge (EoK) denotes the effect of merging expert knowledge and labels in our approach.Supervised learning with labels (SLL), Supervised learning with expert knowledge (SLEK), Unsupervised learning with expert knowledge (ULEK), Supervised learning with both labels and expert knowledge (SLLEK).
4) Unsupervised learning with expert knowledge (ULEK): This approach was inspired by EPIK [16], which employs a cascade of six expert rules in a waterfall technique for IC classification (detailed implementation in the supplementary documents).

Evaluation Metrics
We employed a two-fold approach: a) We assessed the agreement between SOZ labelled ICs using our technique and the surgically targeted SOZ location for each Engel score group for 25 patients with available surgical resection/ablation outcomes in our dataset.b) For all 52 patients, we validated the accuracy of generated labels from various approaches against the expert's sorted labels.The evaluation was conducted using commonly employed metrics such as accuracy, precision, and sensitivity [29,31,37,44].

Statistical Methods
Statistical methods were utilized to derive the significance of: a) The effect of age and sex on the SOZ identification performance.b) The difference in standard metrics among algorithms.
For the first aim, we utilized a mixed effects model, incorporating age and sex as predictors, along with their combined effect, and a random effect on the patient.
For the second aim, we computed the variance of the evaluation metrics across various subsets of test data obtained through categorization by age and sex.The variance of each metric in the techniques that are closest in performance to SLLEK showed < 10% difference.Moreover, we utilized the Kolmogorov-Smirnov (KS) test [3] to verify that the distribution of evaluation metrics across the subsets of test data came from a normal distribution with significance value α < 0.05.The p value of the KS test is provided in Table III in supplementary document with a high p value indicating that the KS test could not reject the null hypothesis that the data came from a normal distribution.Since the variance of the evaluation metrics for the closest methods are similar and the metrics across test data subsets fit normal distribution, we utilized a one-sided t-test to evaluate the statistical significance of the difference between our approach and other comparative techniques.The 95% confidence p-values are provided in Table 3.

Performance Evaluation
Our approach (SLLEK) outperformed the other techniques across all evaluation metrics, as illustrated in Table 3 for the given patient population, warranting further investigation.The results encompassed standard metrics evaluations, considering variations in age and sex.
We observed the impact of incorporating expert knowledge with DL in our approach, quantified as the difference between SLLEK and SLL (EoK).The last column in Table 3 provides the statistical significance of the difference between SLLEK and comparative techniques implemented on our dataset.SLLEK exhibited high sensitivity, indicating a low False Negative (FN) rate compared to other methods.Proficiency in accurately identifying the correct SOZ ICs suggests that expert knowledge integration with DL enhances the SOZ ICs identification and warrants further exploration.SLLEK demonstrated higher accuracy, precision, and sensitivity across all age groups and sex distributions.In contrast, SLL and SLEK exhibited significant variability based on age and sex.ULEK emerged as the second-best performer after SLLEK.The p-values presented in Table 3 highlight the statistically significant differences between SLLEK and all other comparative techniques.Nevertheless, statistically, there is an insignificant difference between SLLEK and ULEK.
Comparison with state-of-the-art computer vision technique ViT is also presented in Table 3.As the results show, ViT didn't perform good for SOZ localization.This observation aligns with the understanding that ViTs may face challenges in generalizing well with smaller datasets.It's noteworthy that CNNs, in contrast, exhibit better generalization on smaller datasets, yielding better accuracy.This is attributed to the inherent capability of CNNs to excel in learning from limited data [42] [43].
Overall, the outcomes suggest that our approach has the potential to enhance the manual sorting workflow for the surgical team, positioning it as a promising and effective tool in detecting SOZ for pediatric RE patients.

Performance with Surgical Outcomes
Of the 25 subjects who had surgery to remove rs-fMRI determined SOZ, 16 (64%) achieved seizure freedom (Engel I), and 7 (28%) experienced significantly reduced postoperative seizure frequency (Engel II).This indicated that the removed regions likely represented a substantial portion of the epileptogenic network.
SLLEK showed the highest sensitivity of 93.3% for patients undergoing minimally invasive ablation surgery, making it a promising option in such cases.For patients undergoing resection, SLLEK maintained a consistent sensitivity of 85.7%, outperforming other techniques for the dataset.Furthermore, when analyzing patients with Engel I outcome, SLLEK exhibited a 93% agreement with expert sorting, reinforcing its suitability and reliability as a pre-surgical screening tool ( (Supervised learning with both labels and expert knowledge (SLLEK)).

Knowledge Ablation Studies
SLLEK's performance could be attributed to the influence of each expert knowledge component on the accuracy of SOZ identification.To better understand its capabilities, we assessed the impact of removing specific knowledge components (Table 5) from SLLEK in relation to standard metrics used in Table 3.

SLLEK without temporal features:
The BOLD signal temporal features were removed one by one from the expert knowledge model of SLLEK.We created two unique configurations: a) SLLEK without activelet domain sparsity, and b) SLLEK without sine domain sparsity.Table 5 reveals no significant impact on metrics, indicating that removing temporal features had limited effect on the classification of patient's ICs with SLLEK.
SLLEK without spatial features: The spatial features were removed one by one from the expert knowledge model to create two unique configurations: a) SLLEK without the number of clusters, and b) SLLEK without white matter overlap.An 11% reduction in accuracy and a 6% drop in F1 score were noted when the number of clusters feature was removed from the analysis.However, when the white matter overlap feature was omitted, a substantial 41% decrease in accuracy and a 27% reduction in the F1 score were observed.These findings underscore the pivotal role of white matter overlap as the most influential feature in the identification of the SOZ.

DISCUSSIONS AND LIMITATIONS
The results suggest an approach that combines expert features and AI for SOZ localization may possess the capability to generate connectivity classifications that align with ic-EEG and surgical outcomes.This stems from the design where expert knowledge integration model facilitates the derivation of weight contributions for each expert feature for SOZ identification.This provision not only enables explanations for the selection of an IC for SOZ but also amplifies its potential as an advanced tool for SOZ identification in clinical contexts.By furnishing transparent rationales for its classifications, our approach may equip the surgical team with invaluable insights.
The interplay between the deep supervised classification model and expert knowledge integration components in the SOZ localization approach is instrumental in achieving superior localization accuracy.The DL model excels in discerning noise images, as evidenced by its classification capabilities.Our PCH dataset of 52 patients had a total of 5616 IC images where only 5.6% of these images represented SOZ ICs, while 51.1% were attributed to Noise ICs, and 43.1% to RSN ICs.Due to such high data imbalance, where majority class is 16.6 times more prevalent than minority class, commonly used imbalanced data handling techniques such as cost sensitive training failed to provide good performance as seen in SLL-CNN, or SLL-ViT.Similarly under-sampling the majority classes to balance the data would have resulted in significant information loss from the majority class, potentially resulting in overall performance loss.
Due to balanced data between Noise and RSN ICs, DL could learn their distribution.However, due to the limited availability of SOZ ICs in the dataset, traditional DL techniques faced challenges in learning the intricate features of these rare events from such a small subset of SOZ data.To overcome this limitation, a need arose for a methodology that could leverage the wealth of expert knowledge on SOZ characteristics available in the literature review.Additionally, relying solely on expert knowledge also exhibits a suboptimal outcome as it struggles to capture the intricate details of brain networks, possibly because of the overlapping characteristics between Noise and SOZ ICs.For instance, an activation located in the white matter is associated with Noise, whereas an activation originating in the grey matter, extending into the white matter and reaching the ventricles, is indicative of SOZ.The minimal overlap of activation on grey matter can sometimes make these SOZ activations appear as a noise.This is a domain where DL excels in encoding the nuances of Noise ICs more effectively, benefiting from a slightly larger data of Noise ICs to learn and represent their characteristics.This unique integration of DL for noise IC classification and EKI for SOZ IC classification addresses the performance limitations inherent in relying solely on either DL or EKI strategies, offering a more robust and comprehensive solution to SOZ IC identification.
While our dataset is one of the largest in recent literature for pediatric patients with RE, a larger study is necessary to address the potential impact of variability in fMRI preprocessing and motion correction techniques, which can differ across centers.Before being used with minimal expert supervision, further testing of this technique in real-world settings is necessary, considering its intended application in local epilepsy care centers.

CONCLUSION
The most effective treatment for RE is surgical resection or ablation of the SOZ which requires accurate localization to avoid functional brain network damage and developmental impairments.While rs-fMRI, a non-invasive imaging technique, holds promise for SOZ localization and guiding iEEG lead placement, its clinical integration is hindered by the lack of expertise in manual seizure onset analysis.Additionally, manual sorting of ICs obtained from rs-fMRI data using ICA is a challenging and subjective task, as only a small fraction (less than 5%) of the ICs is related to the SOZ.This makes the process time-consuming and limits the reproducibility and availability of this non-invasive technique.Accurate, automated and reproducible SOZ localization is imperative for successful surgical treatment of RE while avoiding functional brain network damage and resultant developmental impairments.This study shows how expert knowledge can be integrated with powerful supervised learning approaches to automate SOZ localization.Reliable performance on a large dataset of children with RE, stratified across age, sex, and corroboration with one-year post-operative Engel outcomes for rs-fMRI guided surgery increases confidence of potential for clinical integrability of the approach.The Activations initiating in gray matter, extending through white matter and ending in vascular regions were seen as the most discriminative expert identified SOZ characteristics.The prospect of automating SOZ localization using advanced AI techniques and existing expert knowledge not only addresses existing challenges in manual analysis but also suggests a transformative shift towards more accessible, trustworthy and reproducible clinical application in epilepsy care.In the future, a multi-center study to evaluate general applicability of the technique irrespective of scanning protocols and measurement devices is contemplated.

Figure 1 .
Figure 1.Overview of the proposed SOZ IC localization.Top panel: preprocessing the data by reducing the image dimensions to alleviate computational overhead.Second panel -top: training involves relabeling RSN and SOZ as non-Noise components.Second panel -bottom: These components are then subjected to CNN.Additionally, we establish an expert knowledge integration model (EKI), which is trained based on the extracted expert knowledge from RSN and SOZ components.Third panel: testing involves classification task of rs-fMRI ICs into three categories: NOISE, RSN and SOZ using both DL and expert knowledge.Bottom panel: localization of SOZ involves identification of biggest cluster amongst a patient's SOZ slices.The operator • denotes dot product.

1 .Figure 2 .
Figure 2. Three types of information are encoded in rs-fMRI: NOISE, RSN and SOZ.Each of these categories adheres to specific rules that define their classification.

Figure 3 .
Figure 3. Expert Feature extraction and integration process.
R and EKI model with I.The DL model classified I R as either NOISE or NOISE.In parallel, EKI model assigned SOZ or RSN labels to the ICs I based on their confidence score ρ i = ωex•(F I ex ) ∥F I ex∥ , where ω ex is the weight configuration from the training phase of the EKI model.The test IC I is assigned the label SOZ under two conditions: a) I R was classified as NOISE by DL model but I was classified as SOZ by EKI model, or Frontiers b) I R was classified as NOISE by DL model but I was classified as SOZ with a classification score ρ > 0.9.

Table 2 .
Demographic and clinical characteristics of participants, including sex distribution, age at onset, surgical procedures, seizure frequencies, seizure outcomes, and ethnicity breakdown.

Table 4 .
Performance comparison of Methods across surgical procedures and Engel outcomes.Supervised learning with labels (SLL, Supervised learning with expert knowledge (SLEK), Unsupervised learning with expert knowledge (ULEK), Supervised learning with both labels and expert knowledge (SLLEK).