## 4 Discussion  
To our knowledge, this study is the first to test the use of a computer-vision deep learning tool for interpreting intercital iEEG TF images and the localization of epileptogenic points of interest within the brain of children with drug-resistant epilepsy. As outlined in the flowchart in Figure 2, we combined deep learning-based algorithms for the analysis of the image visual complexity with medical image co-registration techniques and thresholding and machine learning algorithms with the ultimate goal of identifying the epileptogenic points of interest in the patient's brain MRI. Figure 6: **(a)** Points of Interest and their proximity to the EZ when using each individual layer or the support vector machine (SVM) model and (**b**) the percentage of points of interest estimated using SVM and their proximity to the EZ. The whiskers of the boxplots extend to the most extreme data points not considered outliers (product of 1.5 and the inter-quartile range), while the outliers are plotted individually using the red ‘+’ marker symbol. This study was driven by two main hypotheses that have been supported by our main findings: (1) the electrodes recording from the epileptogenic brain tissue reflect underlying epileptiform activity rather than chaotic background and thus have lower TF visual complexity as compared to others, and (2) the UAE of the iEEG TF images can help locate the EZ in the patient's MRI. Our first main finding is that the UAE values of the TF images extracted from the contacts inside the SOZ are significantly lower than those from non-SOZ contacts when using various (shallow, intermediate, and deep) layers of the deep learning network (see Figure 5). Several deep layers (layers 10, 12, and 13) exhibit strongly significant differences (\(p<0.001\)), while these are seen less in the shallow layers, indicating that complex features (which quantify characteristics that are not easily interpretable by the human eye and are reflected by the deep layers' UAE) play an important role in the differentiation of electrodes in EZ versus the healthy tissue. Interestingly, the deep layers exhibit comparatively lower UAE values (see Figure 5) than the shallow or intermediate layers. This might be due to the funneling nature of the neural network, where deeper layers have fewer weights. This result is particularly interesting if put into the context of the recent literature on deep learning visual complexity [25], which provides valuable insights into the correlation of the various layers with human perception. It is noteworthy that the first and last two layers of deep learning networks exhibit a lower correlation with the human perception scores compared to the intermediate layers (layers 4-8). The first layer primarily captures information related to edges and corners but lacks the high-level information required to evaluate visual complexity. On the other hand, the last layers are primarily tuned for classification tasks but do not correlate with the human assessment of visual complexity (as they capture highly complex features that may be unperceivable to the human naked eye). The intermediate layers, which encompass a combination of both low-level and high-level features, prove to be particularly correlated with human perception of visual complexity [25]. This literature adds depth to our understanding of how deep learning networks perceive and evaluate visual complexity and helps interpret our findings. Our data indicate that the deepest layers of the deep learning network are the most relevant when analyzing interictal iEEG TF images: this may suggest that the image characteristics that reflect underlying epileptogenicity are highly complex and not easily perceivable by the human reader. This further underscores the importance of a computerized tool that complements human perception and vision.