Seizure onset zone (SOZ) identification using effective brain connectivity of epileptogenic networks

Objective. To demonstrate the capability of utilizing graph feature-based supervised machine learning (ML) algorithm on intracranial electroencephalogram recordings for the identification of seizure onset zones (SOZs) in individuals with drug-resistant epilepsy. Approach. Utilizing three model-free measures of effective connectivity (EC)-directed information, mutual information-guided Granger causality index (MI-GCI), and frequency-domain convergent cross-mapping (FD-CCM) - directed graphs are generated. Graph centrality measures at different sparsity are used as the classifier’s features. Main results. The centrality features achieve high accuracies exceeding 90% in distinguishing SOZ electrodes from non-SOZ electrodes. Notably, a sparse graph representation with just ten features and simple ML models effectively achieves such performance. The study identifies FD-CCM centrality measures as particularly significant, with a mean AUC of 0.93, outperforming prior literature. The FD-CCM-based graph modeling also highlights elevated centrality measures among SOZ electrodes, emphasizing heightened activity relative to non-SOZ electrodes during ictogenesis. Significance. This research not only underscores the efficacy of automated SOZ identification but also illuminates the potential of specific EC measures in enhancing discriminative power within the context of epilepsy research.

A key challenge in treating drug-resistant patients is precisely localizing the seizure onset zone (SOZ), defined as the brain's region generating seizures [2].Resecting the SOZ through surgery can lead to seizure freedom for many patients.However, conventional visual analysis of intracranial electroencephalogram (iEEG) recordings needs better localization accuracy [3].Thus, new automated methods are critically needed to map the SOZ.In recent years, there has been growing interest in applying advanced analytics to iEEG data to enhance the characterization of complex brain networks and improve diagnosis and surgical planning [4].An emerging area involves mapping connectivity patterns across different brain regions.Three primary levels of connectivity types have been widely used [5,6].-structural, functional, and effective connectivity (EC).Structural connectivity refers to anatomical links derived from white matter tractography or histological data, revealing physical pathways enabling communication.Functional connectivity is defined statistically as lag-independent signal correlations between regional time series.Effective connectivity (EC) directly quantifies directional or causal signaling between neural elements using time series analysis or computational modeling.EC helps infer complex dynamic network communication supporting diverse cognitive processes [7][8][9].Localizing areas controlling these interactions provides clinically useful biomarkers for diagnosis and therapy [3].In epilepsy, assessing connectivity pattern alterations associated with seizures or the SOZ region could enhance localization to guide surgery.
EC estimation, particularly through data-driven methods, confronts various limitations.These methods rely on assumptions like stationarity and Markovian processes, potentially oversimplifying the complexity of brain activity.Moreover, the choice of lag parameters can significantly influence EC estimates, leading to varying interpretations of causal relationships within the brain network.Furthermore, the representation of EC measures as indicative of the actual causal mechanisms exhibited by neuron populations is a subject of ongoing debate.It is challenging to assert that the activity of billions of neurons can be accurately captured by only a few hundred channels of electrophysiological recordings, especially within a noisy and non-stationary environment [10].Despite these challenges, EC measures have been shown to be useful in tasks such as identifying seizure foci, detecting Parkinson's disease, and distinguishing patients with prefrontal cortex lesions from healthy controls during working memory trials [11][12][13][14][15][16].Nonetheless, researchers must exercise caution when interpreting results, mindful of the inherent limitations of datadriven estimation techniques.
A robust approach for modeling neural interconnectivity involves graph theory-based network representations [17][18][19].Here, neural elements (recording contacts, regions) constitute nodes interconnected by edges denoting connectivity.The resultant graphical network representations allow quantitative analysis.Compared to simplistic focal models, whole-brain graphs better recapitulate distributed processing intricacies in epilepsy [20].Connectivity graph modeling enables mathematical examination of topological architecture and embedded dynamics to characterize normal or pathological states [19].Key local metrics include centrality algorithms quantifying the relative influence of nodes in facilitating communication [21].
During seizures, propagation may occur along specific cortical pathways due to disrupted inhibition [22].Connectivity graph measures can trace these dynamic evolutions in epileptogenic networks to identify initial sites of failure as biomarkers for the SOZ [23,24].Recent advances in machine learning (ML) have shown promise for improving seizure focus localization by leveraging features extracted from iEEG data [3].However, the development and rigorous assessment of robust ML methods integrating EC measures remains an open challenge.
This study aims to apply novel data-driven techniques for estimating the directed propagation of signals from iEEG recordings to localize the SOZ precisely.Specifically, we extract EC graphs from three emerging methods-directed information, mutual information-guided Granger causality (GC) index, and frequency domain convergent crossmapping.Graph features capturing network alterations are analyzed through interpretable machinelearning models.We utilize an open-source dataset of drug-resistant epilepsy patients from OpenNeuro (ds004100) to enable reproducibility [25].Key innovations include the standardized application and comparison of distinct EC algorithms to improve automated SOZ mapping.Extensive cross-validation evaluates localization accuracy against clinicianlabeled ground truth onset regions.By enhancing data-driven SOZ localization, we seek to guide surgical planning better to control seizures through precisely targeted resection while minimizing negative impacts on healthy brain tissue.Translating these tools to improve presurgical mapping could expand treatment options for patients and assist clinicians in managing growing volumes of neurological data.

Effective brain connectivity measures and the role of ML for automated SOZ identification
SOZ is clinically marked by the brain regions that generate seizures.This predominantly coincides with the irritative zone that triggers interictal spikes.During a surgical resection for epilepsy treatment, the surgeon resects the epileptogenic zone (EZ) which encompasses the SOZ and the neighboring cortex of potential SOZ.Accurate identification of EZ forms the holy grail for any epilepsy treatment.
In recent years, researchers exploring graph-based brain connectivity modeling have illustrated the viability of topological graph features as biomarkers for SOZ.The foundational work of GC [26] has paved the way for potential investigations into causal-graphbased approaches to localize the SOZ.These studies have unveiled elevated high-frequency GC relationships among channels associated with the SOZ in the seconds leading up to seizure initiation [27].Bolstering these findings, an analysis involving a cohort of 25 patients highlighted a pronounced clustering of causal nodes proximal to the SOZ, exhibiting an exceptionally high statistical significance (p < 10 −20 ) [28].Moreover, leveraging graph-based analysis through the directed transfer function, the frequency domain equivalent of GC, has demonstrated increased graph-centrality within SOZ-related channels [29,30].While the GC measures are effective and straightforward, their drawbacks, including wide-sense stationarity assumption and employing linear predictors through auto-regressive (AR) models, make them unable to adequately capture nonlinear interactions.Given the brain's predominantly nonlinear inter-regional interactions, GC falls short in directly inferring these connections, necessitating modifications or alternate methods to accommodate the nonlinearity.
The advancements in high-temporal-resolution iEEG recording have also led to information-theorybased data-driven modeling to capture the underlying dynamics.For example, the model-free directed information (DI) measure [31] extracted from iEEG recordings has proven convergent in [12].Furthermore, this DI-based graph model revealed a higher net outflow of information from SOZ compared to non-SOZ channels among all subjects, albeit with two instances of false positives.The combination of DI and GC in [32] utilized a 2-step inference process, successfully identifying the SOZ in 17 out of 19 patients studied, achieving a success rate of 0.895.In this instance, the success rate is defined as achieving a minimum of 50% overlap between the SOZ channels identified by the algorithm and either the ground truth SOZ channels or their immediate neighbors identified by epileptologists.
While the above-discussed methodologies often cater to individual electrode-level predictions, their limitations in transferring insights across diverse subjects prompt the exploration of group-level analyses, allowing for a broader perspective and the potential automation of detection processes.The increased availability of data can enable the development of group-level inference algorithms by leveraging the predictive capabilities of ML models from the collective patterns learned from diverse datasets.This was demonstrated in [33], where a supervised support vector machines (SVM) model using a combination of known biomarkers extracted from a large cohort of 82 epileptic patients predicted SOZ with an AUC of 0.79.The SZLoc deep neural network architecture proposed by [34] also revealed the capability to build an end-to-end neural network adept at automatic feature extraction, achieving superior predictability using non-invasive scalp EEG recordings with a mean accuracy of 71.1%.Building upon the successful demonstration of these methods, our goal is to enhance knowledge by developing a supervised ML model that utilizes EC-based graph centrality measures as an alternative set of features.This endeavor holds significant benefits as it broadens the scope for feature exploration, potentially uncovering novel associations and improving the model's predictive accuracy and generalizability.

Data and methods
Figure 1 offers an overview of the steps involved in the classification process at a high level.Each of these steps is elucidated in detail within this section.

Dataset description
Our investigation utilized de-identified iEEG data obtained from 58 individuals undergoing surgical treatment for drug-resistant epilepsy at the Hospital of the University of Pennsylvania (HUP) [25].Every participant involved in this research provided written informed consent in alignment with the Institutional Review Board at the University of Pennsylvania.Subjects underwent intracranial EEG using subdural grids, strip, and depth electrodes (ECoG) or stereotactically-placed depth electrodes (SEEG), followed by surgical resection or laser ablation.The sampling frequency (F s ) and the number of electrodes varied based on the subject and type of electrode used.The dataset encompasses iEEG recordings during interictal and ictal periods and electrode localizations in ICBM152 MNI space [35].Additionally, it includes bad channel information, clinically identified seizure onset channels, channels intersecting with the resection/ablation zone, and the surgical outcome per the Engel Epilepsy Surgery Outcome Scale [36] for each subject.
Given the subjective nature of determining the actual SOZ channels, contingent upon seizure freedom post-resection or ablation, our analysis focused solely on patients achieving seizure-free status (Engel class I).Subsequently, the investigation is confined to seizure-free subjects with complete electrode location data, resulting in a subset of 28 individuals from the initial 58.Including detailed electrode location information is crucial for addressing the high correlation between neighboring electrodes and SOZ electrode activity, necessitating precise considerations in algorithm development for distinguishing SOZ from non-SOZ electrodes.Finally, as data-driven methods are used to estimate EC, which requires a sufficient sample size, we excluded recordings from a single subject whose iEEG was sampled at 256 Hz.The appendix table presents a synopsis of patient details, including epilepsy type, iEEG type, and SOZ location (see appendix A).
To select the best time frame for constructing the classifier, features were extracted from preictal, ictal, and interictal time windows.We then compared discriminability using Welch's two-sample test, assessing both the number of features with statistically significant mean differences (p < 0.05) and the t-statistic value for measuring the magnitude of feature distinctions between the groups.Analysis revealed that the 30 s window centered around the seizure onset displayed a higher average t-value for the ten features of the two classes-SOZ vs. non-SOZ (see appendix B).Consequently, the graph model is derived from the 30 s interval centered around the onset of each ictal recording.The preprocessing steps executed before generating the graphs include eliminating iEEG data from unreliable electrodes identified by the experts during data curation, employing a 6th-order notch filter centered at 60 Hz to eliminate power noise, applying a 6th-order high-pass filter with a passband greater than 0.25 Hz to eliminate drift, and conducting average referencing of signals from reliable electrodes.

Effective connectivity (EC) measures
The iEEG recordings during seizure onset are converted from time-series to graph signals.For this, three model-free brain EC measures are assessed.These three measures are described below: (i) Directed information (DI): This is a measure rooted in information theory that quantifies the impact of one process on inferring causality in another process [31].With reference to [12], the DI from channel 'x' to 'y', denoted by where ĥ(Y N ) and ĥ(Y N ||X N ), respectively, denote the differential entropy of Y N and the differential entropy of Y N causally conditioned by X N [12].Data-driven likelihood estimator adapted from [11] is used to obtain the differential entropy estimates.The mathematical expressions are provided by the equations ( 2) and ( 3), where J yy and K yx are the Markovian parameters that correspond to the number of past samples of X N and Y N that influence the present sample of Y N , respectively ĥ ( )} . ( (ii) Mutual information-guided Granger causality index (MI-GCI): This is a data-driven causality index that uses mutual information (MI) to overcome the limitations of GC, i.e. linearity and stationarity assumptions.In the context of GC, MI assesses the predictability of one variable based on the past values of another variable beyond what can be explained by the past values of the variable itself.The GC index using MI is estimated by calculating the Kullback-Leibler (KL) divergence [37] between the probability distributions p(Y) and p(Y|X) [38].Note that the two distributions are equal when X N and Y N are independent.The KL divergence is given by where I(; ) and h() represent mutual information and differential entropy, respectively.The entropies are estimated using covariance-based approximations discussed in [38].(iii) Frequency-domain convergent crossmapping (FD-CCM): This is a novel measure that infers causality in the frequency domain [13] (https://github.com/parhi/Freq-domain-CCM),inspired by the time domain causality index of convergent cross-mapping [39].The motive behind this measure is that if a timeseries X N has a causal influence on the timeseries Y N , then X N will influence the frequency dynamics of Y N .Hence, it becomes feasible to determine the frequency dynamics of X N from those of Y.This involves initially projecting the time-series into a higher-dimensional space derived from the time-frequency mapping of the two series.Subsequently, the embedding of X N (M X ) is estimated based on the embeddings of Y N (M Y ) using a straightforward projection • The stationary assumption confirmed using the augmented Dickey-Fuller (ADF) test [40] and the optimal lag/Markovian parameters are determined using average mutual information (AMI) [41] to be Jyy = Kyx = 5 samples.• The likelihood or probability density function is estimated using Gaussian kernel function-based estimators.

MI-GCI
• The estimation of MI-GCI and suitable windows are adapted from the Frites python toolbox [42,43].• The iEEG recording is resampled to 500 Hz to maintain uniformity across the different subjects.• The 30 s recording is divided into smaller windows of 1 s with a high overlap of 0.8 s to avoid the effects of windowing.• Using an optimal lag of 10 samples determined using AMI, the MI-GCI value is estimated for each time window and is averaged across the windows to obtain the mean MI-GCI estimate for the 30s recording.

FD-CCM •
The 500 Hz resampled recording is split into 500 ms windows with 95% overlap, as suggested in [13].• The higher-dimensional embedding process included partitioning the signal into distinct frequency bands.We divided the signal evenly in the logspace.This approach leads to more bands at lower frequencies, where most spectral information is concentrated, and fewer bands at higher frequencies, which contain more sparsely distributed spectral information.• The CMS is evaluated using the coefficient of determination (R 2 value) averaged across the different time windows.
estimate.The cross-mapping score (CMS), represented by the absolute correlation coefficient between the original signal X N and its reconstructed version from Y N , serves as a metric for causal coupling Here XN is the reconstructed version of X N obtained from the weighted estimates of the projections from M Y .A higher CMS signifies a strong correlation between the reconstructed and original signals, indicating a strong causal effect of X N on Y N .Table 1 describes the underlying assumptions, crucial parameters, and the EC estimation process for the three EC measures.

Extraction of graph centrality features
Graph centrality refers to mathematical measures that assign each node in a network a quantitative score based on its position and connectivity patterns within the broader topology.These measures characterize the structural importance of nodes in facilitating communication across the graph.Key local centrality metrics such as degree centrality and eigenvector centrality reward connections to highly influential nodes.Global metrics like betweenness centrality instead assess integral roles in mediating flows between distal regions.
Brain graphs created from electrode connections based on electrical signal correlations have been extensively studied to understand healthy cognition and neurological disorders.Nodes with high centrality serve as critical points for information transfer or computational hubs within brain systems.When centrality measures are applied to EC measures, they can capture directional influences that shape brainwide dynamics more accurately.In epilepsy, changes in network communication patterns are thought to trigger transitions into hypersynchronous ictal states.Analyzing centrality metrics in epileptogenic networks could pinpoint regions impacted by altered functional roles and interactions.
Sparsifying a graph when extracting centrality measures provides practical benefits such as computational efficiency, improved interpretability, noise reduction, and a focus on key features, making the analysis more manageable and insightful.Hence, we examined centrality measures across various sparsity levels, considering only the top k% of directed edges.Ten different centrality measures are used as input features to the classifier.They are extracted for the three types of graphs generated by the three EC measures, and their predictability performance is compared for different sparsity levels.A brief description of these centrality measures is provided in table 2.

Classifier model
The ten centrality values derived from an EC measure serve as input features for the classifier.Given the low dimensionality, no additional dimensionality reduction techniques are included.The grouplevel mean classifier performance is evaluated using a 10-fold cross-validation scheme.Ensuring that each The sum of the edge weights of edges directed into a node and those directed out from a node, respectively, describe indegree and outdegree. deg Here, N is the total number of nodes in the graph, is the standardization factor and X ij denotes the weight of edge from node j to node i. • Brain regions with high indegree act as central processing hubs, aggregating information from diverse sources before further processing.
• Nodes with high outdegree may be responsible for generating signals that influence other cortical regions.
Closeness centrality: In-closeness (CC(i) − ) and out-closeness (CC(i) + ) [44] Measures how quickly a node can be reached by (in-closeness) or can reach (out-closeness) other nodes in the network, taking into account the shortest path lengths.
Here d(i, j) represents the distance of the edge from node j to node i, usually the reciprocal of the edge weight.
• Identifies nodes that are central to information diffusion or spreading.
• Captures the efficiency of information flow from a node to other nodes in the network.
• Useful for understanding the accessibility and influence of a node in the network.
Local clustering coefficient [45] The geometric mean of all triangles associated with a node.
where X is the weight matrix, the subscript ii denotes the ii th element of the matrix, deg tot and is the number of bidirectional edges linking node i. • The clustering coefficient reflects the network's resilience and robustness.
• Analyzing clustering coefficients aids in identifying cohesive subgroups, providing insights into the network's modular structure and functional organization.
• High clustering coefficients can signify localized information processing.
Local efficiency [46] The average of inverse shortest path length, also called global efficiency (GE), computed on the neighborhood of a node.
where G is the overall graph, G i is the sub-graph of neighbors of node i with sub-graph GE is the GE if the sub-graph was fully connected.
• Measures the fault tolerance of a network, capturing how efficient communication is between a node's neighbors when that node fails.
• High global and local efficiency together characterizes the 'small world' property of a network with efficient global and regional information propagation. (Continued.) Table 2. (Continued.) Betweenness centrality [47] Measures the extent to which a node lies on the shortest paths between other nodes in a network. ) where σ( j, k) represents the total number of shortest paths between nodes j and k, and σ( j, k|i) represents the number of those shortest paths that pass through node i.
• Identifies nodes that act as important bridges or connectors in the network.
• Particularly useful for identifying nodes that control information flow or act as bottlenecks.
• Captures the importance of a node in facilitating communication between other nodes.
PageRank Centrality [48] PageRank assigns a score to a node based on the probability of randomly traversing the network and landing on that node.
where incident edges to node i exist from the neighboring nodes T1, T2 , . . .
. δ is the damping factor that accounts for the probability of random jumps in the network.
• Views links as votes and considers the importance of the nodes that link to a particular node.
• Rewards nodes that receive links from other high-ranking nodes.
• Suitable for capturing importance in directed or weighted networks.
Hubs and Authorities [49] Hubs are nodes serving as central points for information dissemination, and authorities are nodes endorsed by hubs, representing nodes with significant relevance.There is no closed-form expression.The algorithm [49] estimates hubs and authorities iteratively by initially assigning each node equal hub and authority scores, then updating these scores based on the contributions from neighboring nodes' authority scores for hubs and vice versa, repeating this process until convergence.
• The HITS algorithm, designed for search engine and web link analysis, identifies hubs as wellconnected pages and authorities as pages highly endorsed by other reputable sources, thereby improving the relevance of search results.The same logic is used to analyze brain networks to identify critical brain regions subject appears only once in a fold enhances model generalization to diverse data and mitigates biases or information leakage specific to individual subjects.Thus, the frequency of seizures of a subject does not influence the identification of the SOZ.Even if one subject experiences more seizures, those data points are exclusively used to train the model tested on another subject.Due to a significant class imbalance, with approximately 11 times more data points for non-SOZ channels than SOZ channels, the training data is oversampled using the synthetic minority oversampling technique (SMOTE) [50] before model training.
By employing data-driven feature extraction guided by domain knowledge and focusing on a limited set of pertinent features, it becomes feasible to leverage simple ML models for classification instead of opting for deep neural networks.A range of techniques, such as SVM, ensemble methods, multilayer perceptrons (MLP), boosting strategies, and decision trees, are tested for classification.This approach provides flexibility in model selection, catering to the specific characteristics of the problem while still preserving interpretability.
The electrodes are classified into SOZ and non-SOZ based on expert-marked locations.However, it is essential to acknowledge that the electrical activity of electrodes neighboring SOZ can be highly correlated with the activity of SOZ electrodes.Therefore, additional steps are required to address neighboring electrodes, and various methods can be employed.For instance, in [32], the unsupervised algorithm's success is defined by achieving at least a 50% overlap between algorithm-identified SOZ channels and the ground truth.Meanwhile, in [51], a comparative analysis involves nullifying the activity of k nearest electrodes neighboring the k SOZ electrodes.In this study, though the class labels for training rely solely on expert identification, the loss computation is modified to avoid penalizing misclassifications of neighboring electrodes during training, i.e. the loss associated with the neighboring electrodes is not included in the loss function.This involves calculating the Euclidean distance between each pair of electrodes and identifying the k neighbors nearest to SOZ, where k corresponds to the number of expert-identified SOZ electrodes for a specific subject.An example showing the identified neighbors for one patient (HUP065) is shown in figure 2. The open-source Python packages sci-kit-learn [52] and sci-kit-optimize [53] are used to build the classifiers and optimize the loss function.

Statistical analysis of graph centrality measures
The predictability of a feature is defined by the notable variation in its value among distinct classes.Hence, we compared ten centrality measures derived from each EC measure at different sparsities.The goal is to identify the optimal sparsity level capable of effectively distinguishing between the two classes-SOZ and non-SOZ electrodes.This analysis uses a two-means t-test with a significance level α set at 0.05.In a two-means t-test, the t-value measures the difference between the means of two groups, considering the variability within each group.Meanwhile, the pvalue reflects the likelihood of observing such a difference under the assumption that no genuine disparities exist between the groups.If the p-value falls below the designated significance level (0.05 in this case), it indicates that the observed difference is statistically significant.A preference for a higher t-value arises in the context of classification, as it denotes a more noticeable differentiation between the groups.This becomes particularly crucial for classification, as a more pronounced disparity facilitates the establishment of meaningful boundaries.Higher t-values contribute to better discrimination, aiding in identifying features or variables relevant for classification.
Figures 3 and 4 provide an overview of the ttest outcomes for the three measures across various sparsity levels.The sparsity level, spanning from 10% to 100%, indicates the top k% of edges preserved from the initial fully connected graph rather than the proportion of all edges present in the SOZ. Figure 3 emphasizes the count of centrality features among the ten extracted that exhibit a significant difference in mean values between the two classes with statistical significance, considering different sparsity levels.Figure 4, on the other hand, portrays the fluctuation in mean t-values for the statistically significant features.As previously mentioned, the preference is for more discriminative features with a higher average t-value.Hence, the sparsity that results in the highest product of the mean t-value and the number of significant features is chosen as the optimal choice  for a given EC measure.Following this criterion, the optimal sparsity, measured by the% of retained edges, is 10% for centrality measures derived from DI and FD-CCM and 90% for MI-GCI.

Classifier results
The classification performance of graph centrality extracted from each of the three EC measures is summarized in table 3. Due to the unbalanced nature of the data, in addition to overall accuracy, mean sensitivity, specificity, and AUC values were computed for each case to understand class-level accuracy measures.Furthermore, the table also includes information on the classifier model that yielded the best performance and the sparsity level used for each EC measure while generating the centrality features.All three EC measures demonstrated strong performance in the classification task, achieving a mean accuracy exceeding 90%.
The centrality features derived from DI required a sparse model, retaining only 10% of the top edges.The applied MLP model, comprising two layers with ten neurons in the first layer and 20 neurons in the second layer and sigmoid activation at the output layer, yielded a mean accuracy of 92.12%.This model exhibited a mean AUC value of 0.89, a sensitivity of 85.3% for the SOZ class, and a specificity of 92.8% for the non-SOZ class.In contrast, the MI-GCIbased features necessitated a denser graph model with 90% of the edges to achieve comparable performance.Employing a SVM classifier with radial basis function (RBF) kernels, this feature set achieved the highest mean accuracy among the three EC measures, reaching 96.32%.The superior accuracy was accompanied by a sensitivity of 89.74%, which is lower than that of the FD-CCM-based model described below.
Like DI, the FD-CCM-based centrality measures required a sparse graph model with the top 10% of the edges to attain competitive performance using a standard SVM classifier.Notably, this feature set exhibited reduced bias in the trained model compared to the MI-GCI-based model, with a mean sensitivity of 92.3%, specificity of 94.25%, and the highest mean AUC value of 0.93.
While all three EC measures demonstrated strong classification performance, each exhibited unique characteristics.DI-based features, implemented in a sparse graph model and an MLP architecture, yielded a balanced accuracy profile.MI-GCI features achieved the highest mean accuracy, albeit with a trade-off in sensitivity.With a sparse graph model, FD-CCM features demonstrated superior discrimination ability, boasting the highest mean AUC value.For this classification scheme, we prioritized higher sensitivity to ensure the identification of all SOZ electrodes.However, this choice leads to increased false positives (or lower positive predicted values (PPV)), especially in heavily imbalanced test data, exacerbating the issue of false positives.These results emphasize the need to customize connectivity measures and models for specific neuroscientific applications, carefully balancing accuracy, sensitivity, and specificity.

Testing pre-trained models on subjects with seizure recurrance
The classifier models, trained using recordings from 27 subjects, are evaluated on subjects from the dataset who did not achieve seizure freedom post-surgery (Engel classes II, III, and IV).Since most electrodes in a given recording are labeled as non-SOZ, the models are anticipated to exhibit higher specificity.To ascertain the actual agreement between SOZ electrodes identified by epileptologists and those identified by the algorithm, the sensitivity values (accuracy of SOZ classification) for the three EC measures are examined.It is important to note that channel location data is unavailable for all subjects.Thus, we only applied the relaxation of misclassification for neighboring electrodes to recordings with channel location information.The sensitivity, i.e. the overlap percentage of algorithm-identified SOZ with that identified by the experts, is depicted through a boxplot for the three EC measures in figure 5. Here, each data point on the boxplot represents the sensitivity of the model tested on a seizure episode.The figure illustrates that the median sensitivity ranges from 45% to 50% for the three measures across subjects belonging to Engel classes II to IV.The lower percentages indicate a weaker agreement between algorithm-identified and epileptologist-identified SOZ electrodes.This observation reveals a correlation trend between a lower sensitivity and the absence of seizure freedom post-surgery.Figures 6 and 7 depict specific examples of model prediction employing FD-CCM-based graphs for subjects HUP065 (Engel I) and HUP075 (Engel IV), respectively, to aid in visualizing the results.Note that these two figures do not show non-SOZ electrodes.The minimum redundancy maximum relevance (mRMR) technique is employed to rank the ten input features for the three trained models.By assessing MI scores, the algorithm prioritizes features that exhibit high relevance to the target variable while minimizing redundancy among the selected set [54].The superior ranking of features obtained through mRMR enhances the performance of ML models [55].
Figure 8 displays the feature ranking based on mRMR.Notably, the importance scores of FD-CCM measures stand out significantly compared to the other two EC measures.This outcome aligns with expectations, considering the higher separability of features, as indicated by the elevated tvalues observed when comparing centrality measures between the two classes.Across both MI-GCI and FD-CCM-based models, the consistently top-ranked features include Authority, betweenness centrality  The discerning outcomes of the feature ranking underscore the nuanced significance of centrality measures derived from diverse EC methods.With a specific emphasis on the distinctive contributions of FD-CCM measures, our subsequent exploration delves into a thorough examination of their feature characteristics.This entails a focused investigation into the discriminative power and potential variations within FD-CCM features, primarily through analyzing the distribution of centrality measures across the two classes.Figure 9 portrays this distribution using boxplots representing different features of FD-CCM measures.This thorough examination aims to clarify how specific centrality measures contribute to the classification process and to pinpoint any unique patterns or characteristics that may further refine our understanding of these measures in the context of EC.
All ten centrality measures consistently demonstrated elevated values in the SOZ electrodes compared to the non-SOZ electrodes, and this difference was found to be statistically significant (p < 0.05).
The heightened centrality values across these measures suggest that the nodes corresponding to SOZ electrodes hold increased significance or influence within the network.In the specific context of seizure onset, the nodes exhibiting heightened centrality are pivotal in initiating or facilitating the spread of seizures.Consequently, the algorithm rightfully identifies these nodes as SOZ electrodes, underlining their critical role in the epileptic network dynamics.

Comparison of the performance with previously established methods
The performance of EC-based graph centrality aligns with established state-of-the-art methodologies in identifying SOZ [12, 32-34, 56, 58, 59], and particularly the FD-CCM-based measure outperforms the prior literature.The primary impediment to direct comparisons lies in the limited availability of public datasets.Additionally, the recording stages of iEEG vary across different studies.Findings from the above-mentioned methods suggest that ictal recordings offer superior performance in localizing SOZ.However, ensuring electrode implantation and signal recording during seizures is only sometimes feasible.This renders interictal recordings more advantageous as they capture data during the subject's resting state.Furthermore, the inherently invasive nature  4 offers a comprehensive comparison of our work with select prior literature.We note that the proposed approach achieves the best accuracy and sensitivity among all prior approaches despite the heterogeneity of data and methods.When evaluating performance, we encourage readers to take into account the trade-off considerations highlighted earlier.

Conclusion
SOZ identification among individuals with drugresistant epilepsy poses a challenge due to the subjective nature of the ground truth, which can only be confirmed post-surgery upon observing seizure freedom following ablation or resection of the seizureinducing brain region.Various factors contribute to the ultimate patient outcome, ranging from the epileptologist's identification of SOZ based on MRI to the precision of surgical procedures.Moreover, the presence of unknown cortical activities adds complexity, as their effects are not fully comprehensible.
The recent availability of high-density iEEG recordings opens up possibilities for exploring the feasibility of AI-assisted seizure localization, potentially mitigating the challenges associated with the subjective and multifaceted nature of the current clinical approaches.This study demonstrates the effectiveness of graph centrality measures derived from model-free EC measures for classifying brain regions as SOZ or non-SOZ.Among the three EC measures examined, FD-CCM exhibited superior classification performance, minimized bias in the trained model, and revealed higher mean centrality measures of SOZ electrodes relative to non-SOZ electrodes during ictogenesis.Furthermore, the analysis of trained models on nonseizure-free subjects revealed a significantly lower overlap between the algorithm-identified SOZ with that identified by experts.These outcomes emphasize the importance of delving into directional brain connectivity within the frequency domain for epilepsy analysis using data-driven automated algorithms to address neurological disorders arising from disruptions in brain network connectivity.
Nevertheless, it is crucial to acknowledge the limitations of this analysis.The study is confined to a smaller cohort of 27 subjects, necessitating further validation on a larger dataset to establish the statistical significance of the proposed model for seizure localization.Additionally, the EC measures utilized in this study were derived from ictal iEEG recordings.Given the challenge of consistently recording during seizures, further exploration is warranted to extend these findings to feature extraction during the interictal phase, providing insights into the normal brain function of epileptic patients when not experiencing seizures.signal followed by 15 s of ictal signal, demonstrated a higher average t-value across the ten features for the two classes.Additionally, all ten features exhibited a significant distinction between the two classes for FD-CCM and nine out of ten features for the other two measures.

Figure 1 .
Figure 1.Methodology overview: Identifying SOZ from iEEG recordings through the application of graph centrality measures for the classification of electrodes into SOZ or non-SOZ types.

Figure 2 .
Figure 2. Schematic of the cerebral cortex with grid electrode locations of the good electrodes for the subject HUP065.The loss function of the classifier omits any misclassification of the neighboring electrodes (in blue) closest to SOZ electrodes (red).The non-SOZ electrodes further away from SOZ electrodes are marked in green.

Figure 3 .
Figure 3. SOZ vs. non-SOZ electrodes: number of statistically significant (α = 0.05) graph centrality features extracted from the three EC measures for different levels of sparsity.

Figure 4 .
Figure 4. SOZ vs. non-SOZ electrodes: mean t-value of statistically significant (α = 0.05) graph centrality features extracted from the three EC measures for different levels of sparsity.

Figure 5 .
Figure 5.Comparison of sensitivity for the three EC measures of models pre-trained on recordings from the 27 Engel I subjects and tested on the 22 subjects with Engel II-IV surgical outcomes.Additionally, the sensitivity of seizure episodes from the 27 Engel I subjects is provided for comparison.

Figure 6 .
Figure 6.Schematic of the brain of subject HUP065 (Engel (I) with electrode locations showing the ground truth of SOZ identified by experts and the algorithm-identified SOZ.Non-SOZ electrodes are not shown in this figure.

Figure 7 .
Figure 7. Schematic of the brain of subject HUP075 (Engel IV) with electrode locations showing the ground truth of SOZ identified by experts and the algorithm-identified SOZ.Electrodes on the inferior surface are spatially projected outward for visualization.Non-SOZ electrodes are not shown in this figure.

4. 4 .
Feature rankingPerforming feature ranking after classification is an indispensable step with multiple benefits.It facilitates the identification of the most informative features, shedding light on the key factors influencing the classification outcomes.Additionally, it enhances model interpretability, enabling researchers to discern the variables driving the classification results.This process also guides researchers in focusing on critical variables, optimizing resource allocation, and refining data collection strategies for future studies.

Figure 9 .
Figure 9.The distribution of the ten graph centrality measures extracted from the FD-CCM-based graph at 10% sparsity.SOZ = 1 and SOZ = 0 correspond to the SOZ and non-SOZ electrodes, respectively.

Table 1 .
Key parameters and steps used in estimating different EC measures.S.No EC measure Assumptions, key parameters, and estimation method 1. DI • The 30 s iEEG recording is resampled to 100 Hz and is split into 1 s windows.

Table 2 .
A brief summary of Centrality Measures in Directed Graph Network Analysis used for locating SOZ.

Table 3 .
SOZ vs. non-SOZ: Mean 10-fold cross-validation performance of graph centrality features extracted from the three EC measures from 27 subjects.The mean performance is measured by sensitivity (SS), specificity (SP), accuracy (ACC), and AUC.Additionally, the F1-score and positive predicted value (PPV) are shown.

Table 4 .
Performance comparison of FD-CCM-based graph centrality measures with prior work on identifying SOZ.