We measured the Mahalanobis distance (dm), or the distance from the center of the distribution, of 1000 randomly sampled patches from normal cortex across HVs and 1000 patches selected from FCD lesion masks. Patches consisted of all neighboring vertices within a 5 mm radius of each vertex. We observed a fairly wide variation in degree of outlierness in both normal cortex and FCDs. To explore whether there were reproducible spatial patterns in this variability, we plotted the dm onto the cortical surface, averaged across all HVs, then thresholded this map at d> 2.7 to identify the top ~5% of patches (p = 0.043), retaining clusters with > 30 nodes.  We selected 2 of the resulting outlier regions of interest (ROI) in the anterior insula and primary motor cortex as exemplars, and compared their average dm to those of the randomly selected HV  and FCD patches. 

Projections to Measure Similarity

Having observed significant overlap in the outlierness of FCDs and some regions of normal cortex, we then wished to explore whether FCDs appeared different from normal cortex in terms of the underlying features. In our representation, similarities in the combinations of features found in different ROIs can be represented as differences in direction, angle or cosine similarity.  For the motor and insular ROIs, we defined the center and direction as the average of the patches within that ROI across all HVs, and for the FCD ROI as the average all of the patches within each MRI+ FCD mask (n=11), then averaged across the FCDs, to give each lesion equal weighting regardless of size.  We computed the angles between the 3 ROI centers as an estimate of difference in feature space.  To provide a single measure of similarity of all cortical patches to each ROI, we computed the scalar projection of the mean feature vector for each patch onto the ROI average unit vector.  For our 3 ROIs, we calculated similarity maps for each healthy control and displayed the average similarity map for each ROI on the cortical surface.
Across subjects, homotopic and heterotopic patches were defined as patches in the same or different locations, respectively. For each patch $p$, the center $\mathbf{m}_p$ was computed by averaging the feature vectors of the vertices within the patch: $\mathbf{m}_p = \sum_{\mathbf{x}\in p} \mathbf{f}(\mathbf{x})$.  The direction $\mathbf{\hat{u}}_p$, the unit vector pointing in the direction of the patch's center, was computed by dividing the patch's mean feature vector by its length $\hat{u}_p = \mathbf{m}_p / \| \mathbf{m}_p \|$. In this feature space, the probability of finding a patch with a given average feature vector $\mathbf{m}_p$, depends only on the magnitude of the feature vector $\| \mathbf{m}_p \|$, i.e. the Mahalanobis distance, $d$, the distance from the origin to the patch's center, with $d^2$ following a cumulative chi-squared distribution.  The similarity between two patches $p_i$ and $p_j$ can be assessed using simple metrics, such as 1) the Euclidean distance between their centers $d_{ij} = \| \mathbf{m}_i - \mathbf{m}_j \|$, and 2) the cosine similarity between their directions $s_{ij} = \hat{u}_i \cdot \hat{u}_j$.

FCDs as Local Outliers

As FCDs were not more globally anomalous and also appeared to have similar features to some portions of normal cortex, we then hypothesized that to be identifiable, FCDs must differ from the expected appearance at their underlying location, or homotopic region, in HVs.  We implemented a local normalization procedure by removing the local mean, calculated across homotopic patches in HVs, followed by variance normalization, calculating the local standard deviation for each patch across HVs after local mean removal for each control subject individually.  We then again compared the Mahalanobis distances of normal cortex, the outlier ROIs, and FCDs as above.  
Finally, we wished to characterize the variability within FCDs as a class before and after local normalization.  To visualize the degree of "outlierness" and similarity in direction, we used a singular value decomposition (SVD) to select the 2 components explaining the most variance across the FCDs and used these as the x- and y-axes to create 2D plots of the location of 1) each FCD patch, 2) the center of each individual FCD lesion, and 3) the overall average FCD center across all subjects, and compared these to the insular ROI center, as well as 1000 randomly sampled HV patches (see supplementary materials for further comparisons). We also computed the average angles between FCD lesion centers before and after local normalization.

FCD Detection

Lastly, we implemented several automated FCD detection algorithms.
We also implemented a two stage machine-learning method using a quadratic discriminant analysis implemented in Scikit-learn, and a leave-one-out cross-validation strategy for each FCD patient and each healthy volunteer to build a subject specific model trained using the labeled data from the other subjects (see supplementary materials for details).  For each surviving cluster, we computed a cluster weight, calculated as area \(\times\)mean FCD probability, as well as the cluster's rank among surviving clusters in that subject.
Statistical Analysis
All statistical analysis was carried out using XXX.  For the logistic regression feature prediction models, performance was evaluated for each model using the coefficient of determination \(r{^2}\); effect size was reported as in \cite{cohen1988statistical}\(r=0.1\) as small\(r=0.3\) as medium, and \(r=0.5\) as large.  For each distance-wise comparison between patches, Welch's t-test was used to estimate the effect size of the differences, reported as in \cite{cohen1988statistical}\(d=0.2\) as small\(d=0.5\) as medium, and \(d=0.5\) as large
Sensitivity of each classifier was assessed initially for MRI+ patients and then for all patients.  We calculated a receiver operating characteristics (ROC) curve and area under the curve (AUC).  True positives were defined as MRI+ patients with co-localization of a detected cluster and the manual lesion mask, and for MRI- patients, as overlap of a detected cluster with the resection mask.  False positives were defined as HVs with detected clusters detected above a given threshold.  The optimal threshold to apply to the resulting clusters for each method was determined using the Youden Index (calculated as sensitivity + specificity - 1 for each threshold).  Lesion detection and number of extralesional clusters (outside of the lesion or resection masks or in HVs) were assessed for all patients and HVs individually.  

Results

Study Participants

A total of 15 patients with drug resistant focal epilepsy and FCD (median age 27, range 15-53, 11 females) and 30 healthy controls (median age 23, range 8-63, 12 females) were included in this study.  FCDs were identified in the radiological reports in 6/15 patients, an additional 5 patients had lesions identifiable on post-hoc analysis (MRI+ n=11).  See Table 1 for further details.