Classification of spatial patterns of lymphocyte infiltration in gliomas from whole slide imaging | Research Square window.SnipcartSettings = { analytics: { enabled: false } }; (function() { var accessVector = localStorage.getItem('access_vector') || ''; window.dataLayer = window.dataLayer || []; if (accessVector) { window.dataLayer.push({ user: { profile: { profileInfo: { snid: accessVector } } } }); } })(); (function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src='https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);})(window,document,'script','dataLayer','GTM-K279D39R'); Browse Preprints In Review Journals COVID-19 Preprints AJE Video Bytes Research Tools Research Promotion AJE Professional Editing AJE Rubriq About Preprint Platform In Review Editorial Policies Our Team Advisory Board Help Center Sign In Submit a Preprint Cite Share Download PDF Research Article Classification of spatial patterns of lymphocyte infiltration in gliomas from whole slide imaging Aravindan Arun Nadaradjane, Julie Lerond, Mehdi Touat, Franck Bielle, and 1 more This is a preprint; it has not been peer reviewed by a journal. https://doi.org/ 10.21203/rs.3.rs-7631009/v1 This work is licensed under a CC BY 4.0 License Status: Under Revision Version 1 posted 12 You are reading this latest preprint version Abstract Primary malignant brain tumors are among the most lethal cancers and are associated with poor survival. T cells are crucial components of the immune response against tumors. However, the spatial organization of T cells in brain tumors and their potential association with outcomes is poorly understood. In this study, we investigated the spatial distribution of T cells in human gliomas on microscopic images obtained after immunostaining the CD3 protein (T cell marker) on tumor tissue sections. First, recurrent, distinct, infiltration patterns of CD3 positive (CD3+) T cells were manually annotated by an expert pathologist. To predict these patterns, we implemented a two-step strategy. In the first step, we aimed to distinguish microscopic images with or without CD3 + T cells using two input types. A 2D convolutional neural network (CNN) was trained on density maps derived from CD3 + segmentation, while an XGBoost model was applied to features extracted by a VGG16-pretrained network. Both models performed well, achieving accuracy greater than 0.8. In the second step, we analyzed spatial patterns of lymphocyte aggregation on image patches. The lymphocyte presence and their aggregation types were further classified into two classes (T cell aggregation close to blood vessels versus diffuse infiltration of tumor tissue) with a final combined global accuracy of 0.81. These results demonstrate that the proposed novel approach allows for automated classification of tumor samples according to spatial patterns of T cell infiltration. This will enable future investigations of biological mechanisms underlying distinct immune responses and their potential association with outcomes. Primary brain tumors cd3 immunostaining lymphocyte diffusion t-cell infiltration image classification spatial pattern recognition machine learning. Figures Figure 1 Figure 2 Figure 3 Figure 4 Figure 5 Figure 6 Figure 7 Figure 8 Figure 9 Figure 10 Introduction Primary brain tumors are rare but contribute significantly to disability and mortality. The incidence of malignant primary brain tumors is estimated to approximately 7 per 100,000 individuals annually, increasing with age (Schaff & Mellinghoff, 2023 ). Glioblastoma (GBM) is the most common and aggressive adult primary brain tumor, representing approximately 50% of malignant cases, while infiltrating lower-grade gliomas account for 30% (Boylan et al., 2023 ). Despite intensive treatment including surgery, radiotherapy, and temozolomide chemotherapy, GBM patients have a median survival of 1.5 years, and only 5% survive beyond five years (Stupp et al., 2005 ). MRI remains the primary diagnostic tool for longitudinal monitoring, associated with biopsy or resection for histomolecular evaluation at diagnosis or relapse. Recent investigations suggest that the immunosuppressive microenvironment of GBM with low T cell infiltration may be in part responsible for the poor outcomes and modest response from immunotherapy. To enable further investigation of the role of T cells, a key aspect of the anti-tumor immune response, we used whole-slide images (WSI) with CD3 staining (a T cell marker) and machine learning algorithms to more systematically characterize the spatial patterns of T cell infiltration in GBM. WSI consists of high-resolution digital scans of histological slides, allowing for the spatial analysis of cellular architecture in tumor tissues. Due to their size (1–2 GB per image), WSIs are computationally intensive to process. A common strategy involves dividing WSIs into smaller patches for manageable analysis, enabling applications in cancer detection, classification, and prognosis. For instance, Pataki and coauthors (Pataki et al., 2022 ) processed colorectal cancer (CRC) WSIs into 512×512 patches annotated for ten pathological conditions (low-grade dysplasia, high-grade dysplasia, adenocarcinoma, suspicious for invasion, inflammation, resection edge, tumor necrosis, lymph vascular invasion, artifact and normal). For the prediction process, they applied a ResNet50 model that achieved AUC from 0.73 to 0.98. However, manual annotation remains a bottleneck. Neto and coauthors (Neto et al., 2024 ) addressed this by proposing weak labeling strategies to train models with fewer annotations, achieving 0.93 accuracy and 0.996 sensitivity between positive (low-grade and high-grade dysplasia) and non-neoplastic samples on a large CRC WSI dataset. Similarly, Chen and authors (C.-L. Chen et al., 2021 ) introduced a WSI training method to bypass patch-level annotation, preserving performance while reducing the labeling burden. In recent years, computational pathology has made significant strides in the analysis of brain tumors particularly gliomas and glioblastoma using deep and weakly supervised learning on whole slide images. Chen and colleagues (C. Chen et al., 2022 ) laid foundational work by introducing a self-supervised method for large scale WSI retrieval, achieving over 0.90 top 5 retrieval accuracy, offering a powerful tool for exploring histological patterns across brain tumor cohorts without needing manual annotations. Building on this, Hsu and colleagues (Hsu et al., 2022 ) integrated WSIs with multiparametric MRI in a weakly supervised model to classify glioma subtypes, reporting AUC above 0.90 for critical biomarkers like IDH mutation and 1p/19q codeletion, highlighting the potential of multimodal learning in neuro oncology. Baheti and coauthors (Baheti et al., 2024 ) approached glioblastoma from a different angle unsupervised clustering of WSI derived morphology patterns which revealed patient subgroups with different survival outcomes (p < 0.01), suggesting that the tumor microarchitecture alone can stratify prognosis. In parallel, Li and coauthors applied Vision Transformers to WSIs of primary brain tumors, achieving classification accuracies up to 0.93 while also providing attention based heatmaps to interpret the model (Li et al., 2023 ). Advanced methods now integrate segmentation to further improve WSI analysis. For instance, Khened and coauthors developed a segmentation and patch-based pipeline for liver cancer analysis, validated through challenges like CAMELYON and PAIP (Khened et al., 2021 ). Then, Saltz and coauthors (Saltz et al., 2018 ) analyzed tumor-infiltrating lymphocytes (TILs) in Hematoxylin and Eosin (H&E) stained The Cancer Genome Atlas (TCGA) slides using convolutional neural network (CNN), linking spatial TIL patterns to tumor subtypes and outcomes. These strategies laid the groundwork for our study, in which we employed available tools to accurately segment nuclei and CD3-positive T cells in GBM. This enabled the study of T cell infiltration patterns across tumors. In GBM, the tumor microenvironment comprises immune cells, neurons, blood vessels, and biochemical factors influencing progression and therapy response (Sharma et al., 2023 ). Understanding the lymphocyte behavior remains a key to enhance therapeutic efficacy in brain tumors. As classifications based on T cell infiltration are being developed to predict outcomes and response to therapy in other cancers (El Sissy et al., 2024 ; Ghiringhelli et al., 2023 ; Mlecnik et al., 2023 ), our study aimed to support pathologists and oncologists by developing a novel classifier based on small or medium deep learning models to recognize T cell infiltration patterns in GBM from WSIs. Over 200 glioma cases were selected and digitalized at the Paris Brain Institute, with experts assigning global scores reflecting T cell spatial diffusion. Unlike previous approaches, our method leverages precise CD3-positive T cell segmentation masks to train models that predict global scores and analyze infiltration patterns within the tumor microenvironment. We implemented a two-step pipeline: first, distinguishing WSIs with or without CD3 + T cells (global score A vs non-A) using a 2D CNN trained on density maps and an XGBoost model (using decision trees with gradient boosting) trained on VGG16-derived features, both achieving over 0.8 accuracy. Secondly, we analyzed spatial grouping of lymphocytes at the patch level, classifying aggregation types with similar accuracy (global scores B vs D). This approach enhances understanding of T cell infiltration in gliomas and holds promise for future prognostic applications. Materials and Methods The data and methodological approach used in this study are summarized in Fig. 1 and Fig. 2 . The first step consists in classifying pathologist-defined scores A versus non-A, in terms of global scores. The second step aims at refining the classification of the predicted non-A into B and D scores using subcluster annotations. Images of Brain Tumor Samples, Annotations and Segmentation Brain tumor samples were obtained from the Onconeurotek collection of the Pitié-Salpêtrière Hospital. The protocol was approved by the IRB (Onconeurotek 2.0). Tumor specimens and clinicopathological information were collected with informed consent and approval by an Institutional Review Board (N° IDRCB: 2023-A02763-42, NCT06314607) in accordance with the national laws and the Declaration of Helsinki. The dataset includes diverse glioma types as defined by the reference classification of the World Health Organization (WHO) 2021: oligodendroglioma IDH-mutant and 1p/19q codeleted, astrocytoma IDH-mutant, glioblastoma IDH-wildtype, pleomorphic xanthoastrocytoma, ganglioglioma, and other rare variants. Tumor tissue sections were immunostained for the T cell marker CD3 with an automated stainer (Ultra, Roche Ventana), and scanned using a Zeiss Axioscan Z1 at 0.22 microns, generating CZI WSI images (2–3 GB per image). The total dataset comprised 214 images. Neuropathologists annotated all images for tumor infiltration and peritumor zones and categorized them into four groups (A, B, C, D) based on the amount and pattern of T cell infiltration, referred to as the global score of the image. The groups were defined as follows (Fig. 1 ): global score A: absence or presence of few CD3-positive cells within the tumor, as defined by neuropathologists. Global score B: presence of CD3-positive cells primarily surrounding blood vessels inside the tumor. Global score C: presence of CD3-positive cells primarily outside the tumor infiltration zone. Global score D: diffuse infiltration of CD3-positive cells within the tumor. Cases with a global score C were excluded from the dataset as CD3-positive cells were mainly out of the tumor zone. The final dataset consisted of 134 WSIs with global score A, 60 WSIs with global score B and 20 with global score D. In the two-step strategy, the first goal was to distinguish between the global score A vs non-A (B and D) given the imbalance in the dataset. Data split into training, validation and test datasets was performed once and was the same for both the models (XGBoost and 2D CNN). Although the dataset was initially split once, it was later partitioned using a 10-fold split approach, resulting in ten separate subsets, each containing its own training, validation, and test sets for cross-validation analysis. Visiopharm® was used to perform manual segmentation of tumor zones and automatically segment the nuclei, and CD3 + cells within tumor areas. The output XML files contained several object types: ROI (Type 1), CD3-positive cells (Type 4), CD3-positive cells nuclei (Type 5), and negative zones (Type 0). Types 0, 1, and 4 were parsed using 'xmltodict' (v0.13.0). Lymphocyte coordinates were extracted and their centers computed. Using Matplotlib (v3.9.0), we visualized CD3-positive cells centers and tumor zones, excluding CD3-positive cells from non-tumor regions. To normalize tumor sizes, we defined consistent global boundaries across all cases based on coordinate ranges. Each full mask had a size of 7200×7200 pixels, in two versions: with or without the tumor area (type 1). Patch-based analysis To cope with the lymphocyte infiltration details of the images, full masks were patchified into 50x50-pixel tiles using Python (python package patchify). Patches with less than 25% white pixels (i.e. without lymphocytes) were retained. In total, 93,214 patches were created from 214 full masks. VGG16 (Keras v2.11.0) was used for feature extraction (Fig. 2 ). It is a pretrained neural network, which outputs 512 features, that were then used as input to K-means clustering algorithm (Sklearn v1.3.0) to group patches into 75 clusters. The method clustered visually similar image patches and integrated these clusters into a classification model. VGG-16 was selected for feature extraction due to evidence supporting its accuracy in brain tumor classification (Srinivas et al., 2022 ). Chen and coauthors used a fusion of ResNet101, DenseNet121, and EfficientNetB0, achieving 0.9918 accuracy (W. Chen et al., 2024 ), while Saeedi et al. applied deep learning for early tumor detection (Saeedi et al., 2023 ). Beyond brain tumors, VGG-16 has been used in breast cancer detection with principal component analysis (PCA) for dimensionality reduction (Alrubaie et al., 2023 ), and in pancreatic cancer detection combined with XGBoost (Bakasa & Viriri, 2023 ), highlighting its effectiveness in diverse medical imaging tasks. In our study, after obtaining 75 clusters, we counted the number of patches assigned to each cluster within a given mask image. Next, we calculated the proportion of patches in each cluster relative to the total number of patches in that mask. In this way, each mask image was represented by a percentage distribution across clusters (see Table 1 in the supplementary material). This compact representation was paired with the corresponding global score and effectively preserved biologically relevant spatial information related to the diffusion patterns of CD3 positive cells. To search for the best method, H2O AutoML ( https://docs.h2o.ai/h2o/latest-stable/h2o-docs/automl.html ) was run for 24 hours using 5-fold cross-validation, class balancing, and accuracy as the main evaluation measure. The best model (ranked by AUC), a XGBoost model, was selected from more than 1000 candidates. XGBoost constructs an ensemble of decision trees in a sequential manner, where each new tree corrects the errors of the previous ones using gradient descent on a loss function. It incorporates regularization, shrinkage, and column subsampling to improve generalization and prevent overfitting. To estimate the global score, a patch-based method was developed using features extracted from VGG16, followed by clustering and classification with this XGBoost model. This model was trained to distinguish WSIs classified as Group A from non-A (Groups B and D combined). The selected model used XGBoost with “Dropouts meet Multiple Additive Regression Trees” (DART) algorithm for binary classification, with 37 trees (depth = 15) and 5-fold cross-validation. Density Map Analysis A second approach relied on the density of T cells. Grayscale density maps were created to capture T cell density. CD3-positive cells full masks (without the border line of the tumoral zone) were divided into overlapping 100x100-pixel windows (50-pixel stride). The mean lymphocyte density was computed in each window and represented as grayscale maps. These maps were then used in a classifier (Fig. 2). To estimate the global score in a different manner, a density-map-based approach was implemented using a custom 2D CNN architecture. This model also performed Group A vs non-A classification. This 2D CNN (implemented with TensorFlow) had 4 Conv2D layers (3x3, ReLU), MaxPooling2D (2x2), Flatten, Dense (256, ReLU), and final Dense (1, sigmoid) layers. It was trained over 3000 epochs with batch size 15 and learning rate decay from 10 − 4 to 10 − 6 over 3000 steps. Finally, the model has 20.18M trainable parameters. Grad-CAM visualizations were generated using the final convolutional layer of the CNN model to highlight regions contributing to the classification (Chattopadhyay et al., 2018; Selvaraju et al., 2020). Spatial Analysis based on Labeled Patterns To differentiate between different types of lymphocyte aggregation (corresponding to global scores B and D), expert pathologists annotated the patch clusters (Fig. 3 ). A total of 75 clusters were classified into six subclusters (1, 2, 3, 4, E, and O), based on tissue morphology and CD3 positive lymphocyte density. For each cluster, 25 random patches were selected to determine its label, amounting to approximately 2% of the entire dataset (75 x 25 / 93,214). This is our weak labelling process of patches. Subclusters 1 to 4 reflected increasing levels of T cell infiltration, with subcluster 4 indicating the highest diffusion among the tumor tissue. Subcluster E (for Exclusion) corresponded to patches where T cells were densely packed near blood vessels without evidence of infiltration. Subcluster O included background patches with no relevant tissue or cellular information. A pattern was defined as a 3x3 array of patches, i.e. a pattern was composed of 9 patches, with their corresponding label (one of each subcluster). This array inherently contains the spatial organization of the patches. However, knowing that a specific subcluster label comes after or before another patch in the mask image is irrelevant for our analysis. Therefore, we rearranged the labels in alphabetic order (see Fig. 4). We observed that there are unique patterns of sub-cluster groups per global score group. Thus, we hypothesized that the presence or absence of these distinct and unique patterns could allow us to distinguish between the global score groups B and D given the ability to distinguish between A and non-A. Following this, we analyzed the top 50 most frequent patterns per group in order to see if there were specific patterns of sub-cluster groups describing the global score groups B and D. Patterns were eliminated if background (represented by O) or absence of T cells in tumoral zone (represented by subcluster 1) were found for more than or equal to 5 patches in the array. For each global score group, we selected the top 50 most frequent patterns as a reference. This approach resulted in having three reference groups (A, B, D). To classify a query case, we compared its patterns to the reference patterns of each group and counted the common patterns. Even though we identified the patterns describing the global score A, these patterns had to be ignored at this stage as classifying A vs non-A was already achieved. The package R ggseglogo ( https://cran.r-project.org/web/packages/ggseqlogo/index.html ) was used to visualize the top 50 most frequent patterns in the reference groups. Results Comparable performance of XGBoost and of 2D CNN models: Classification of A vs nonA Table 1 . Evaluation of two models: XGBoost and 2D CNN classifying global score A vs nonA (B & D) Metrics Training Validation Test XGBoost 2D CNN XGBoost 2D CNN XGBoost 2D CNN Accuracy 0.97 0.87 0.97 0.91 0.82 0.85 Precision 0.98 0.93 1.00 1.00 0.89 0.94 Recall 0.98 0.85 0.95 0.85 0.81 0.81 F1-score 0.98 0.89 0.97 0.92 0.85 0.87 Specificity 0.96 0.89 1.00 1.00 0.83 0.92 Table 2. XGBoost: Confusion Matrix: Test dataset. All misclassified cases were studied in detail using GradCam methodology. Especially, we observed 2 misclassified cases for nonA from XGBoost A nonA A 17 4 nonA 2 10 Table 3. 2D CNN: Confusion Matrix: Test dataset. All misclassified cases were studied in detail using GradCam methodology. They are the same cases for both the models. Especially, we observed 2 misclassified cases for nonA from XGBoost while 2DCNN model misclassified only one nonA case. A nonA A 17 4 nonA 1 11 The performance comparison between XGBoost and 2D CNN reveals distinct learning behaviors. XGBoost achieves near-perfect results on the training data (accuracy and F1 > 0.97), suggesting potential overfitting, especially with a test accuracy drop to 0.82 (Table 1, 2, 3). By contrast, 2D CNN trains at a lower accuracy (0.87), indicating better generalization. On validation data, both models perform similarly, though XGBoost often shows higher precision, recall, and specificity. On the test set, 2D CNN slightly outperforms XGBoost in accuracy (0.85 vs. 0.82), precision, specificity, and F1 score, though it has slightly lower recall for class A (0.81 vs. 0.89), see Figure 5. For class nonA, 2D CNN achieves better recall and F1 on test data, showing stronger generalization, especially under class imbalance. The sharp drop from training to test results highlights its sensitivity to data distribution. This overfitting limits its reliability on unseen or real-world data. By contrast, 2D CNN offers more stable and robust performance, making it more suitable for deployment in practical applications. Given the small test set, minor prediction changes can significantly impact accuracy. A 10-fold split analysis, however, shows that XGBoost has a higher accuracy (0.93 ± 0.05) on the test data than 2D CNN (0.83 ± 0.08), suggesting more consistent performance across splits despite its overfitting tendency. Density emerges as the most influential variable across both models We conducted an analysis of variable importance using XGBoost, focusing on a selection of 12 patch cluster descriptors. These descriptors accounted for more than 90% of the cumulative variance explained in the model (Figure 6), highlighting their relevance to the predictive performance. The selected descriptors were further divided into two groups based on their average density. The first group, consisting of six patch clusters, exhibited an average density in the range [0.4, 1.0], while the second group of six clusters had an average density between 0 and 0.39 (Figure 6). Notably, group non-A was found to contain a greater proportion of descriptors from the high-density group (i.e., with an average density more than 0.34), whereas group A included more descriptors from the lower-density group (i.e., with average density less than or equal to 0.34). High density patch clusters included patch clusters 3, 11, 55, 47, 28 and 5. On the other hand, low density patch clusters were composed of patch clusters 69, 49, 50, 45, 1, and 12. This distribution suggested distinct underlying patterns in the data between the two groups, potentially linked to varying structural or spatial properties represented by the patch clusters. Our 2D CNN model was analyzed using Grad-CAM to visualize the importance of pixels in density maps. Regions with low intense coloration indicate areas with a lower density of CD3+ T cells. These cells were depicted in dark blue and white. The orange and red regions, which had a significant influence on the model predictions, corresponded to areas with higher densities of CD3+ T cells (Figures 7 and 8). Wrongly predicted cases Figures 7 and 8 show the wrongly predicted cases issued from our test dataset by XGBoost model and 2D CNN model. Figure 7(A) displays all wrongly predicted global score A cases. Here, we observed an increased presence of lymphocytes, with distinct regions displaying multiple lymphocyte aggregations. This pattern strongly suggested that this case was misclassified by experts. Conversely, (B), (C), and (D) illustrate cases with a mix of low- and high-density lymphocyte areas, as well as zones without lymphocytes. This variability was indicative of tumor heterogeneity, a well-documented caveat in glioma characterization. Tumor heterogeneity not only complicates expert annotations, but also hampers model training and predictions, as evidenced in Figure 8(A) and (B), where similar misclassifications occurred. Figure 8 shows all the wrongly predicted global score B cases or non-A cases. The density map generation strategy, when paired with a 2D CNN model, proved efficient to recover the case demonstrated in Figure 8(B). Our whole methodology involving XGBoost and 2D CNN models is still limited to addressing the inherent complexity and variability of the brain tumor microenvironments. Prediction of global score B and D using subclusters Table 4. Confusion matrix: Prediction of B versus D using patterns. B D B 8 2 D 0 2 Here, all non-A cases in the test dataset were considered for classification into groups B or D. The test dataset included 10 cases with global score B and 2 with global score D. The patterns issued from a given query case were compared and quantified. The query case was assigned to the global score group (B or D) with the highest number of common patterns with the reference group (Figure 9). Using this methodology, we successfully classified 8 out of 10 global score B, and we classified 2 out of 2 global score D correctly. Given the small size of our test dataset, even minor modifications can lead to significant changes in the accuracy measures, and this should be taken into careful consideration. We reached an accuracy of 83% based on the confusion matrix displayed in Table 4. Table 5. Combined confusion matrix: Two step strategy predictions of A, B and D. Identical performance from both the strategies (Patch clustering and Density maps). In both cases, final accuracy: 0.81 A B D A 17 2 2 B 1 6 1 D 0 0 2 We also implemented a two-step classification strategy integrating machine learning (ML) models, XGBoost and a 2D Convolutional Neural Network (2D CNN) with spatial pattern analysis to predict global infiltration scores (A, B, or D). In this pipeline, if the first step (ML prediction) identified a sample as class A, the final prediction is directly assigned to A. In cases predicted as non-A, the second step refines the prediction by selecting the class (B or D) with the highest spatial pattern count (Figure 10). Two cases with equal counts for B and D were excluded from the final accuracy calculation due to classification ambiguity. Both ML approaches demonstrated identical performance, achieving a final prediction accuracy of 0.81 (Table 5), whether using the patch clustering or density map method. The density map approach offered greater scalability and practicality when applied to new cases. By contrast, the patch clustering method required assigning new patches to predefined clusters using distance metrics, which may not align accurately with the original clustering outcomes. In both evaluations, we observed multiple predicted cases. Tumor heterogeneity and the presence of small tumor zones posed significant challenges to ML-based classification, often necessitating expert review, as seen in ambiguous or potentially misclassified cases. Overall, our combined ML and expert-informed strategy provide a robust framework for tumor infiltration classification, with reliable performance despite intrinsic biological variability. To further validate this approach, we conducted a 10-fold analysis involving separate training, validation, and test splits. For each split, the respective predicted nonA cases (either by XGBoost or 2D CNN models) were classified into B or D using the same methodology. Across all splits, we achieved an average classification accuracy of 0.77±0.07 for the XGBoost model while it was 0.74±0.09 for the 2D CNN model. Discussion and Conclusion This study underlines the complementary strengths of XGBoost and 2D CNN models in analyzing lymphocyte (T cell) density and predicting global scores in glioma. While XGBoost achieved higher accuracy on training data (0.97) and better precision, recall, and F1 scores, it demonstrated signs of overfitting, generalizing less effectively to unseen data (test accuracy 0.82) compared to the 2D CNN (0.85). This performance gap likely stems from tumor heterogeneity, class imbalance, limited test data, and the under-representation of non-A cases. To address these issues, a weakly supervised pattern analysis approach was introduced, involving expert review of only 25 patches per cluster, allowing for scalable and minimally biased annotation. This revealed distinct spatial signatures: high-density lymphocyte clusters were enriched in group non-A, while low-density patterns characterized group A, reflecting biologically meaningful differences. Using the 50 most frequent spatial motifs per group, the method achieved 0.83 accuracy, correctly classifying 8 of 10 B cases and both D cases, with minimal pattern overlap between A and B/D. A two-step prediction strategy was then developed: if the model predicted A, the label remained A; otherwise, if non-A, the final label was decided based on the majority pattern count between B and D. Both the patch clustering and density map approaches reached a final accuracy of 0.81, with the latter proving more scalable. Importantly, the pattern-based method offers a robust alternative when conventional models struggle, and splitting the dataset into 10 folds, each including at least two D cases, appears more legitimate for fair evaluation. These findings highlight the value of hybrid approaches that integrate machine learning with spatial pattern analysis and expert insights to address the biological complexity of glioma. Ongoing work focuses on incorporating genomic, cellular, and survival data to better understand prognostic differences, especially in relation to T cell aggregation. Future improvements will explore multi-scale and 3D spatial modeling, along with advanced architecture such as transformers and ensembles, to improve generalization, manage uncertainty, and enhance clinical applicability. Declarations Ethics approval and consent to participate We do have the clearance of the ethics committee. Brain tumor samples were obtained from the Onconeurotek collection of the Pitié-Salpêtrière Hospital. The protocol was approved by the IRB (Onconeurotek 2.0). Tumor specimens and clinicopathological information were collected with informed consent and approval by an Institutional Review Board (N° IDRCB: 2023-A02763-42, NCT06314607) in accordance with the national laws and the Declaration of Helsinki. Consent for publication All authors consent for the submission and the publication of this work. Clinical trial (Not applicable) Availability of data and material The datasets used and/or analysed during the current study are available from the corresponding author on reasonable request. Competing interests M.T. reports research funding from Sanofi and Amgen; consulting or advisory role for Servier, Novocure, NH TherAguiX, Agios Pharmaceutical, Integragen, Resilience, GSK, and Taiho Oncology; honoraria from Ono, Servier, Novocure. F.B. discloses a next-of-kin employed by Bristol Myers-Squibb, service contracts with Owkin and Treefrog Therapeutics via the institution, and personal funding from Owkin for scientific presentation. A.A.N, J.L. and I.B. declare that they have no competing interests. Funding The project received financial support by the grants of INCa-DGOS-Inserm 12560, Site de Recherche Intégré sur le Cancer (SiRIC CURAMUS) (F.B., M.T). F.B. received fundings Emergence 2019 from Sorbonne Université and PL-BIO 2023 from the National Institute of Cancer (Inca, France). A.A.N. was supported by a grant from INCa, Ligue contre le cancer, and Fondation ARC (grant PAIR TUMC21-001). M.T. is supported by Paris Brain Institute (PBI), Paris Brain Institute America (PBIA), FNAB, ARTC, INCa, Ligue contre le cancer, and Fondation ARC (grant PAIR TUMC21-001), Sorbonne Université, Cancéropôle Ile-de-France, Fondation de France, INSERM ATIP Avenir, Paris Ile de France Region, and SiRIC CURAMUS, which is funded by the Institut National du Cancer, the French Ministry of Health and Prevention and by ITMO Cancer of Aviesan within the framework of the 2021-2030 Cancer Control Strategy, on funds administered by Inserm (INCa-DGOS-INSERM-ITMO Cancer_18010). Authors’ contribution F.B. and J.L. worked for the image acquisition. J.L. and A.A.N. processed images using Visiopharm. A.A.N. preprocessed, produced machine learning & deep learning models, spatial pattern analysis and result analysis under the supervision of M.T., F.B. and I.B. M.T. and F.B. annotated all images to get the global scores. J.L. prepared Figure 1 and F.B. prepared Figure 4. F.B. provided all expert knowledge for the pattern annotation and pattern analysis. A.A.N. and I.B. wrote the main manuscript text. All authors reviewed the manuscript. Acknowledgements We are grateful to the technical staff of the Department of Neuropathology of the Pitié-Salpêtrière Hospital for immunostainings, to HISTOMICS platform and Lev Stimmer for the support to digitalize immunostaining and to run Visiopharm software. References Alrubaie, H. D., Aljobouri, H. K., & Aljobawi, Z. J. (2023). Efficient Feature Selection Using CNN, VGG16 and PCA for Breast Cancer Ultrasound Detection. Revue d’Intelligence Artificielle , 37 (5), 1255‑1261. Baheti, B., Innani, S., Nasrallah, M., & Bakas, S. (2024). Prognostic stratification of glioblastoma patients by unsupervised clustering of morphology patterns on whole slide images furthering our disease understanding. Frontiers in Neuroscience , 18 , 1304191. https://doi.org/10.3389/fnins.2024.1304191 Bakasa, W., & Viriri, S. (2023). VGG16 Feature Extractor with Extreme Gradient Boost Classifier for Pancreas Cancer Prediction. Journal of Imaging , 9 (7), 138. Boylan, J., Byers, E., & Kelly, D. F. (2023). The Glioblastoma Landscape : Hallmarks of Disease, Therapeutic Resistance, and Treatment Opportunities. Medical Research Archives , 11 (6), 10.18103/mra.v11i6.3994. Chattopadhyay, A., Sarkar, A., Howlader, P., & Balasubramanian, V. N. (2018). Grad-CAM++ : Improved Visual Explanations for Deep Convolutional Networks. 2018 IEEE Winter Conference on Applications of Computer Vision (WACV) , 839‑847. https://doi.org/10.1109/WACV.2018.00097 Chen, C., Lu, M. Y., Williamson, D. F. K., Chen, T. Y., Schaumberg, A. J., & Mahmood, F. (2022). Fast and scalable search of whole-slide images via self-supervised deep learning. Nature Biomedical Engineering . https://doi.org/10.1038/s41551-022-00929-8 Chen, C.-L., Chen, C.-C., Yu, C.-Y., .., & Chen, C.-Y. (2021). An Annotation-Free Whole-Slide Training Approach to Pathological Classification of Lung Cancer Types Using Deep Learning. Nature Communications , 12 (1), 1193. Chen, W., Tan, X., Zhang, Q., .., & Jiang, H. (2024). A robust approach for multi-type classification of brain tumor using deep feature fusion. Frontiers in Neuroscience , 18 . El Sissy, C., Kirilovsky, A., Lagorce Pagès, C., Marliot, ... Torben Frøstrup, Jensen, L. H., Beets, G., Zeitoun, G., & Pagès, F. (2024). International Validation of the Immunoscore Biopsy in Patients With Rectal Cancer Managed by a Watch-and-Wait Strategy. Journal of Clinical Oncology , 42 (1), 70‑80. Hsu, W.-W., Guo, J.-M., Pei, L., Chiang, L.-A., Li, Y.-F., Hsiao, J.-C., Colen, R., & Liu, P. (2022). A weakly supervised deep learning-based method for glioma subtype classification using WSI and mpMRIs. Scientific Reports . https://doi.org/10.1038/s41598-022-09985-0 Khened, M., Kori, A., Rajkumar, H., Krishnamurthi, G., & Srinivasan, B. (2021). A Generalized Deep Learning Framework for Whole-Slide Image Segmentation and Analysis. Scientific Reports , 11 (1). Li, Z., Cong, Y., Chen, X., Qi, J., Sun, J., Yan, T., Yang, H., Liu, J., Lu, E., Wang, L., Li, J., Hu, H., Zhang, C., Yang, Q., Yao, J., Yao, P., Jiang, Q., Liu, W., Song, J., … Gao, X. (2023). Vision transformer-based weakly supervised histopathological image analysis of primary brain tumors. iScience , 26 , 105872. https://doi.org/10.1016/j.isci.2022.105872 Mlecnik, B., Lugli, A., Bindea, G., Marliot, F., Bifulco, C., Lee, J.-K. J., Zlobec, I., Rau, T. T., Berger, M. D., Nagtegaal, I. D., Vink-Börger, E., Hartmann, ... Shashank J., Shukla, S. N., Wang, Y., Zhang, G., Kawakami, Y., Marincola, F. M., Ascierto, P. A., Fox, B. A., … Galon, J. (2023). Multicenter International Study of the Consensus Immunoscore for the Prediction of Relapse and Survival in Early-Stage Colon Cancer. Cancers , 15 (2), 418. Neto, P. C., Montezuma, D., Oliveira, I. M., .., & Cardoso, J. S. (2024). An Interpretable Machine Learning System for Colorectal Cancer Diagnosis from Pathology Slides. NPJ Precision Oncology , 8 (1). Pataki, B. Á., Olar, A., Ribli, P., .., & Csabai, I. (2022). HunCRC: Annotated Pathological Slides to Enhance Deep Learning Applications in Colorectal Cancer Screening. Scientific Data , 9 (1). Saeedi, S., Rezayi, S., Keshavarz, H., & R. Niakan Kalhori, S. (2023). MRI-based brain tumor detection using convolutional deep learning methods and chosen machine learning techniques. BMC Medical Informatics and Decision Making , 23 (1). Saltz, J., Gupta, R., Hou, L., Kurc, N. D., .., & Mariamidze, A. (2018). Spatial Organization and Molecular Correlation of Tumor-Infiltrating Lymphocytes Using Deep Learning on Pathology Images. Cell Reports , 23 (1), 181-193.e7. Schaff, L. R., & Mellinghoff, I. K. (2023). Glioblastoma and Other Primary Brain Malignancies in Adults : A Review. JAMA , 329 (7), 574. Selvaraju, R. R., Cogswell, M., Das, A., Vedantam, R., Parikh, D., & Batra, D. (2020). Grad-CAM : Visual Explanations from Deep Networks via Gradient-based Localization. International Journal of Computer Vision , 128 (2), 336‑359. https://doi.org/10.1007/s11263-019-01228-7 Sharma, P., Aaroe, A., Liang, J., & Puduvalli, V. K. (2023). Tumor Microenvironment in Glioblastoma : Current and Emerging Concepts. Neuro-Oncology Advances , 5 (1), vdad009. Srinivas, C., K. S., K., .., Partibane, B., & Awal, H. (2022). Deep Transfer Learning Approaches in Performance Analysis of Brain Tumor Classification Using MRI Images. Journal of Healthcare Engineering , 2022 , 1‑17. Stupp, R., Mason, J. G., .., Eisenhauer, E., & Mirimanoff, R. O. (2005). Radiotherapy plus Concomitant and Adjuvant Temozolomide for Glioblastoma. New England Journal of Medicine , 352 (10), 987‑996. Additional Declarations No competing interests reported. Supplementary Files Supplementarytables.docx Cite Share Download PDF Status: Under Revision Version 1 posted Editorial decision: Revision requested 21 Dec, 2025 Reviews received at journal 10 Dec, 2025 Reviewers agreed at journal 08 Dec, 2025 Reviewers agreed at journal 05 Dec, 2025 Reviews received at journal 27 Nov, 2025 Reviewers agreed at journal 21 Nov, 2025 Reviewers agreed at journal 04 Oct, 2025 Reviewers invited by journal 30 Sep, 2025 Editor assigned by journal 25 Sep, 2025 Editor invited by journal 25 Sep, 2025 Submission checks completed at journal 24 Sep, 2025 First submitted to journal 24 Sep, 2025 You are reading this latest preprint version Research Square lets you share your work early, gain feedback from the community, and start making changes to your manuscript prior to peer review in a journal. As a division of Research Square Company, we’re committed to making research communication faster, fairer, and more useful. We do this by developing innovative software and high quality services for the global research community. Our growing team is made up of researchers and industry professionals working together to solve the most critical problems facing scientific publishing. Also discoverable on Platform About Our Team In Review Editorial Policies Advisory Board Help Center Resources Author Services Accessibility API Access RSS feed Manage Cookie Preferences © Research Square 2026 | ISSN 2693-5015 (online) Privacy Policy Terms of Service Do Not Sell My Personal Information {"props":{"pageProps":{"initialData":{"identity":"rs-7631009","acceptedTermsAndConditions":true,"allowDirectSubmit":false,"archivedVersions":[],"articleType":"Research Article","associatedPublications":[],"authors":[{"id":527824479,"identity":"3fb54f7d-6400-4e28-97a3-71f825aff124","order_by":0,"name":"Aravindan Arun Nadaradjane","email":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZAAAAAyAQMAAABI0h/eAAAABlBMVEX///8AAABVwtN+AAAACXBIWXMAAA7EAAAOxAGVKw4bAAABCElEQVRIie3PMUvDQBTA8XccJA6BrC9I069w4SDGxc/SIDgJCoIIFRooXDZdDwr6FSxCcX+gy9FZ0KEidI5LJ5Fejdjpqm4O9x/ee8sP7gB8vn8cq+xAtCMO7d1A+geSDFnFNMhfktUlCIBvbSDxyOQzdrfXuRzRy2Nx/pxK4urVyiMXwenhjmBmX+rpgSzwfi5zYrU8BrFbuYyJcmSKl5WBHDGgckJMbWt4Fy7RbcmgvDbhAvGDBrdDSyIQTiJaQuXN6kgU9QT/gWQmOMVSPcixiU6K5IIybf+SaeEmqeETfFP9zpUJx0+4oG5c1/NZc+Ymn/W+Nsd2B/bBG8E61nwTn8/n861bAgfCUPyq4lX1AAAAAElFTkSuQmCC","orcid":"","institution":"Sorbonne Université, CNRS, LIP6","correspondingAuthor":true,"prefix":"","firstName":"Aravindan","middleName":"Arun","lastName":"Nadaradjane","suffix":""},{"id":527824480,"identity":"da3e2b8e-d9a5-4b90-8589-b889712da675","order_by":1,"name":"Julie Lerond","email":"","orcid":"","institution":"CNRS UMR 7225, Sorbonne Université","correspondingAuthor":false,"prefix":"","firstName":"Julie","middleName":"","lastName":"Lerond","suffix":""},{"id":527824481,"identity":"32aa89a5-ce8c-46a6-9043-579e24e8390e","order_by":2,"name":"Mehdi Touat","email":"","orcid":"","institution":"CNRS UMR 7225, Sorbonne Université","correspondingAuthor":false,"prefix":"","firstName":"Mehdi","middleName":"","lastName":"Touat","suffix":""},{"id":527824482,"identity":"aa4cc39c-b2f8-4aef-9dcf-df41328a7dd4","order_by":3,"name":"Franck Bielle","email":"","orcid":"","institution":"CNRS UMR 7225, Sorbonne Université","correspondingAuthor":false,"prefix":"","firstName":"Franck","middleName":"","lastName":"Bielle","suffix":""},{"id":527824484,"identity":"5f867cfa-7d33-43a5-8b77-7ca59959b804","order_by":4,"name":"Isabelle Bloch","email":"","orcid":"","institution":"Sorbonne Université, CNRS, LIP6","correspondingAuthor":false,"prefix":"","firstName":"Isabelle","middleName":"","lastName":"Bloch","suffix":""}],"badges":[],"createdAt":"2025-09-16 13:28:27","currentVersionCode":1,"declarations":"","doi":"10.21203/rs.3.rs-7631009/v1","doiUrl":"https://doi.org/10.21203/rs.3.rs-7631009/v1","draftVersion":[],"editorialEvents":[],"editorialNote":"","failedWorkflow":false,"files":[{"id":93542081,"identity":"bf47aa7b-818e-4622-9a81-50294329aadb","added_by":"auto","created_at":"2025-10-15 02:36:50","extension":"docx","order_by":0,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":206743,"visible":true,"origin":"","legend":"","description":"","filename":"Figure1.docx","url":"https://assets-eu.researchsquare.com/files/rs-7631009/v1/38c2e72659f9323d8c0420db.docx"},{"id":93543763,"identity":"ff4a9eb5-bcf6-4bdd-b6ef-7072c10444ad","added_by":"auto","created_at":"2025-10-15 02:44:51","extension":"docx","order_by":1,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":158761,"visible":true,"origin":"","legend":"","description":"","filename":"Figure10.docx","url":"https://assets-eu.researchsquare.com/files/rs-7631009/v1/21ad1aca12a61efc24983b6b.docx"},{"id":93542066,"identity":"04e9c0ff-96a3-4bb4-99f3-bfacb18828e9","added_by":"auto","created_at":"2025-10-15 02:36:50","extension":"docx","order_by":2,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":149398,"visible":true,"origin":"","legend":"","description":"","filename":"Figure2.docx","url":"https://assets-eu.researchsquare.com/files/rs-7631009/v1/38cfa0ef563313569e3c7c56.docx"},{"id":93542085,"identity":"0b57d3fa-accd-44ca-b496-470f3159dca5","added_by":"auto","created_at":"2025-10-15 02:36:50","extension":"docx","order_by":3,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":1496276,"visible":true,"origin":"","legend":"","description":"","filename":"paperfinalversion1IBANfigv2.docx","url":"https://assets-eu.researchsquare.com/files/rs-7631009/v1/ed789c271db4fcab0e4853d5.docx"},{"id":93542065,"identity":"03712aae-85ab-4ad5-a222-21b0dceb960e","added_by":"auto","created_at":"2025-10-15 02:36:50","extension":"docx","order_by":4,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":174885,"visible":true,"origin":"","legend":"","description":"","filename":"Figure3.docx","url":"https://assets-eu.researchsquare.com/files/rs-7631009/v1/41657d7e0000676338ddf773.docx"},{"id":93542083,"identity":"5ce62a26-b9df-43fd-9c40-ba570fbab67e","added_by":"auto","created_at":"2025-10-15 02:36:50","extension":"docx","order_by":5,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":155546,"visible":true,"origin":"","legend":"","description":"","filename":"Figure4.docx","url":"https://assets-eu.researchsquare.com/files/rs-7631009/v1/b01535b9ad50677239a8d067.docx"},{"id":93543766,"identity":"f88bc390-2148-442f-9af4-dcef4daaf556","added_by":"auto","created_at":"2025-10-15 02:44:52","extension":"docx","order_by":6,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":221621,"visible":true,"origin":"","legend":"","description":"","filename":"Figure5.docx","url":"https://assets-eu.researchsquare.com/files/rs-7631009/v1/3a1160cf18e36b2c2f8a2359.docx"},{"id":93542077,"identity":"2760e577-6d98-4be8-aede-b23bf39b6afa","added_by":"auto","created_at":"2025-10-15 02:36:50","extension":"docx","order_by":7,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":196608,"visible":true,"origin":"","legend":"","description":"","filename":"Figure6.docx","url":"https://assets-eu.researchsquare.com/files/rs-7631009/v1/bd193a9e49ae969711728702.docx"},{"id":93543758,"identity":"fe85aa3a-9257-4f85-8167-2466801776fa","added_by":"auto","created_at":"2025-10-15 02:44:50","extension":"docx","order_by":8,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":102564,"visible":true,"origin":"","legend":"","description":"","filename":"Figure7.docx","url":"https://assets-eu.researchsquare.com/files/rs-7631009/v1/5c1f4c9d4a09c0e28335baaa.docx"},{"id":93543769,"identity":"5e229293-2bed-478a-abd3-8237b31c1f5c","added_by":"auto","created_at":"2025-10-15 02:44:52","extension":"docx","order_by":9,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":79012,"visible":true,"origin":"","legend":"","description":"","filename":"Figure8.docx","url":"https://assets-eu.researchsquare.com/files/rs-7631009/v1/7e0d445d2b4e0da035daa3a5.docx"},{"id":93543757,"identity":"f50aed4e-b13d-4aec-982c-72ad1461c5bf","added_by":"auto","created_at":"2025-10-15 02:44:50","extension":"docx","order_by":10,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":155534,"visible":true,"origin":"","legend":"","description":"","filename":"Figure9.docx","url":"https://assets-eu.researchsquare.com/files/rs-7631009/v1/acbece3420f4f30042742b6f.docx"},{"id":93542079,"identity":"098e420d-b901-4d52-bb4c-ea77324020a3","added_by":"auto","created_at":"2025-10-15 02:36:50","extension":"json","order_by":11,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":7311,"visible":true,"origin":"","legend":"","description":"","filename":"ff1e935610f048b4800ae31045ca4095.json","url":"https://assets-eu.researchsquare.com/files/rs-7631009/v1/7d2b254be8dc2f16730ee35c.json"},{"id":93544226,"identity":"2bbfd74d-d95b-45ea-93da-ddf890603552","added_by":"auto","created_at":"2025-10-15 02:52:50","extension":"docx","order_by":12,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":13719,"visible":true,"origin":"","legend":"","description":"","filename":"Supplementarytables.docx","url":"https://assets-eu.researchsquare.com/files/rs-7631009/v1/0c96f0d9646e3d213ae34d9d.docx"},{"id":93543762,"identity":"e4a82b05-8009-4f7e-9974-7015e4f87084","added_by":"auto","created_at":"2025-10-15 02:44:51","extension":"xml","order_by":13,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":100688,"visible":true,"origin":"","legend":"","description":"","filename":"ff1e935610f048b4800ae31045ca40951enriched.xml","url":"https://assets-eu.researchsquare.com/files/rs-7631009/v1/34ac33519ca60aa02b110922.xml"},{"id":93542089,"identity":"562d7456-f2c6-4663-9517-648b7400274e","added_by":"auto","created_at":"2025-10-15 02:36:51","extension":"jpeg","order_by":14,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":185566,"visible":true,"origin":"","legend":"","description":"","filename":"floatimage1.jpeg","url":"https://assets-eu.researchsquare.com/files/rs-7631009/v1/9959d0b53cfb1ad88236718d.jpeg"},{"id":93542086,"identity":"2e232a49-c3ab-4435-a59f-e97b328221c3","added_by":"auto","created_at":"2025-10-15 02:36:50","extension":"jpeg","order_by":15,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":175616,"visible":true,"origin":"","legend":"","description":"","filename":"floatimage10.jpeg","url":"https://assets-eu.researchsquare.com/files/rs-7631009/v1/146392982f9316ecc9f65625.jpeg"},{"id":93542069,"identity":"e4d770b5-1bfb-4975-8658-32ca9c6ad4be","added_by":"auto","created_at":"2025-10-15 02:36:50","extension":"jpeg","order_by":16,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":185566,"visible":true,"origin":"","legend":"","description":"","filename":"floatimage1.jpeg","url":"https://assets-eu.researchsquare.com/files/rs-7631009/v1/2d9eec8a8ac34a5ded7a8dc8.jpeg"},{"id":93542119,"identity":"a3baabda-e06b-4bb8-bb0e-54c6f1aececf","added_by":"auto","created_at":"2025-10-15 02:36:53","extension":"jpeg","order_by":17,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":128338,"visible":true,"origin":"","legend":"","description":"","filename":"floatimage12.jpeg","url":"https://assets-eu.researchsquare.com/files/rs-7631009/v1/560637af6b5abea913cdb0f0.jpeg"},{"id":93542104,"identity":"c87b185b-33c8-44c9-b402-f9fadf077f71","added_by":"auto","created_at":"2025-10-15 02:36:52","extension":"jpeg","order_by":18,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":153702,"visible":true,"origin":"","legend":"","description":"","filename":"floatimage13.jpeg","url":"https://assets-eu.researchsquare.com/files/rs-7631009/v1/8f3b95006dfffd67bdcc3b44.jpeg"},{"id":93542082,"identity":"416aa88f-e9cc-46f7-9827-24d4f03ad8c8","added_by":"auto","created_at":"2025-10-15 02:36:50","extension":"jpeg","order_by":19,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":1122391,"visible":true,"origin":"","legend":"","description":"","filename":"floatimage14.jpeg","url":"https://assets-eu.researchsquare.com/files/rs-7631009/v1/ff25f1f07c4dd4e379245080.jpeg"},{"id":93542090,"identity":"073093df-cc3b-4566-a630-c0f08741d274","added_by":"auto","created_at":"2025-10-15 02:36:51","extension":"png","order_by":20,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":200428,"visible":true,"origin":"","legend":"","description":"","filename":"floatimage15.png","url":"https://assets-eu.researchsquare.com/files/rs-7631009/v1/0578353135786cd104c68f3a.png"},{"id":93542105,"identity":"2e08248a-ad18-4a74-910c-90094ac77d59","added_by":"auto","created_at":"2025-10-15 02:36:52","extension":"jpeg","order_by":21,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":175469,"visible":true,"origin":"","legend":"","description":"","filename":"floatimage16.jpeg","url":"https://assets-eu.researchsquare.com/files/rs-7631009/v1/bc1bfddb256d8ec198612ba1.jpeg"},{"id":93542084,"identity":"4e339a23-d8f0-41fb-b92c-f43f77b679b1","added_by":"auto","created_at":"2025-10-15 02:36:50","extension":"jpeg","order_by":22,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":81530,"visible":true,"origin":"","legend":"","description":"","filename":"floatimage17.jpeg","url":"https://assets-eu.researchsquare.com/files/rs-7631009/v1/9e84b0c950e9d389876a417b.jpeg"},{"id":93543759,"identity":"127d48ed-618b-4c55-bf75-a3747620b1b4","added_by":"auto","created_at":"2025-10-15 02:44:50","extension":"jpeg","order_by":23,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":57964,"visible":true,"origin":"","legend":"","description":"","filename":"floatimage18.jpeg","url":"https://assets-eu.researchsquare.com/files/rs-7631009/v1/dbaaf580372d344c98367735.jpeg"},{"id":93542068,"identity":"20ba7df6-fb4c-4425-b3bd-cbf585c1eb48","added_by":"auto","created_at":"2025-10-15 02:36:50","extension":"jpeg","order_by":24,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":134368,"visible":true,"origin":"","legend":"","description":"","filename":"floatimage19.jpeg","url":"https://assets-eu.researchsquare.com/files/rs-7631009/v1/48a14ebd126abefba563efd0.jpeg"},{"id":93542076,"identity":"3bdace5d-18b5-46fa-bfa8-5bfc5232b347","added_by":"auto","created_at":"2025-10-15 02:36:50","extension":"jpeg","order_by":25,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":128338,"visible":true,"origin":"","legend":"","description":"","filename":"floatimage12.jpeg","url":"https://assets-eu.researchsquare.com/files/rs-7631009/v1/ab4b640635f815a71ff588e6.jpeg"},{"id":93542108,"identity":"9ba1cc70-df3b-4852-b390-dd36e5412467","added_by":"auto","created_at":"2025-10-15 02:36:52","extension":"png","order_by":26,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":137626,"visible":true,"origin":"","legend":"","description":"","filename":"floatimage20.png","url":"https://assets-eu.researchsquare.com/files/rs-7631009/v1/c048dd3523eff743609e9b9c.png"},{"id":93544229,"identity":"803a9713-14ca-4c98-ae28-cdcea03b5b97","added_by":"auto","created_at":"2025-10-15 02:52:51","extension":"jpeg","order_by":27,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":1053084,"visible":true,"origin":"","legend":"","description":"","filename":"floatimage3.jpeg","url":"https://assets-eu.researchsquare.com/files/rs-7631009/v1/d5e3e374a8065d5428b9358d.jpeg"},{"id":93542115,"identity":"f2027147-cd42-49b5-9be6-28b632f53ca7","added_by":"auto","created_at":"2025-10-15 02:36:52","extension":"jpeg","order_by":28,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":524166,"visible":true,"origin":"","legend":"","description":"","filename":"floatimage4.jpeg","url":"https://assets-eu.researchsquare.com/files/rs-7631009/v1/b218c458d2fb129311f1ce7e.jpeg"},{"id":93542074,"identity":"fc3704aa-ec38-4aed-a86f-4f8a4edeaf7b","added_by":"auto","created_at":"2025-10-15 02:36:50","extension":"png","order_by":29,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":200428,"visible":true,"origin":"","legend":"","description":"","filename":"floatimage15.png","url":"https://assets-eu.researchsquare.com/files/rs-7631009/v1/1609403cf7d7dd6d58197048.png"},{"id":93542112,"identity":"e7f8ff46-20c7-4869-bb62-bf2d23298e73","added_by":"auto","created_at":"2025-10-15 02:36:52","extension":"jpeg","order_by":30,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":175469,"visible":true,"origin":"","legend":"","description":"","filename":"floatimage16.jpeg","url":"https://assets-eu.researchsquare.com/files/rs-7631009/v1/35c686a388c889d44380a1f9.jpeg"},{"id":93542118,"identity":"ce40490f-b676-46fd-a785-0d4d9bc6f2a8","added_by":"auto","created_at":"2025-10-15 02:36:53","extension":"jpeg","order_by":31,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":81530,"visible":true,"origin":"","legend":"","description":"","filename":"floatimage17.jpeg","url":"https://assets-eu.researchsquare.com/files/rs-7631009/v1/7b2ed3ce11a78b559e4ab505.jpeg"},{"id":93543764,"identity":"0eafacc2-4526-4b0f-b6ce-bc0223cf3d0b","added_by":"auto","created_at":"2025-10-15 02:44:51","extension":"jpeg","order_by":32,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":57964,"visible":true,"origin":"","legend":"","description":"","filename":"floatimage18.jpeg","url":"https://assets-eu.researchsquare.com/files/rs-7631009/v1/55c1eeff701efe55ae2eb582.jpeg"},{"id":93542109,"identity":"df5d4ee4-9164-480b-8e28-cf59243ce146","added_by":"auto","created_at":"2025-10-15 02:36:52","extension":"jpeg","order_by":33,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":134368,"visible":true,"origin":"","legend":"","description":"","filename":"floatimage19.jpeg","url":"https://assets-eu.researchsquare.com/files/rs-7631009/v1/7f739ecdd8da33031ac03dfc.jpeg"},{"id":93542102,"identity":"ab186dfe-c140-4ac8-8ba9-07acc55239e3","added_by":"auto","created_at":"2025-10-15 02:36:51","extension":"png","order_by":34,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":165432,"visible":true,"origin":"","legend":"","description":"","filename":"Onlinefloatimage1.png","url":"https://assets-eu.researchsquare.com/files/rs-7631009/v1/0f24954c8b2d0ad1ec052f59.png"},{"id":93544228,"identity":"a1974b43-2892-4f0e-bac4-9bb15065a607","added_by":"auto","created_at":"2025-10-15 02:52:50","extension":"png","order_by":35,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":29511,"visible":true,"origin":"","legend":"","description":"","filename":"Onlinefloatimage10.png","url":"https://assets-eu.researchsquare.com/files/rs-7631009/v1/1f8543022f9c480c808ba2a4.png"},{"id":93542095,"identity":"d7824d70-d2ce-451a-9543-57db866f55f7","added_by":"auto","created_at":"2025-10-15 02:36:51","extension":"png","order_by":36,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":165432,"visible":true,"origin":"","legend":"","description":"","filename":"Onlinefloatimage11.png","url":"https://assets-eu.researchsquare.com/files/rs-7631009/v1/d0635709fb7e2f8695d21e64.png"},{"id":93542123,"identity":"7ce56a53-6856-41bb-b309-c59a672924d2","added_by":"auto","created_at":"2025-10-15 02:36:53","extension":"png","order_by":37,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":70116,"visible":true,"origin":"","legend":"","description":"","filename":"Onlinefloatimage12.png","url":"https://assets-eu.researchsquare.com/files/rs-7631009/v1/8c8840db461d429231ab9593.png"},{"id":93542100,"identity":"aed7773e-88fb-4224-8ef8-0e00be043d70","added_by":"auto","created_at":"2025-10-15 02:36:51","extension":"png","order_by":38,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":63587,"visible":true,"origin":"","legend":"","description":"","filename":"Onlinefloatimage13.png","url":"https://assets-eu.researchsquare.com/files/rs-7631009/v1/ccdd0233a2f0c0190fa61674.png"},{"id":93543772,"identity":"6e1ce7ec-3cc4-4d35-be3b-2b3759a6db39","added_by":"auto","created_at":"2025-10-15 02:44:53","extension":"png","order_by":39,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":276790,"visible":true,"origin":"","legend":"","description":"","filename":"Onlinefloatimage14.png","url":"https://assets-eu.researchsquare.com/files/rs-7631009/v1/30c80c7f36f0363d649b7fdc.png"},{"id":93543768,"identity":"cd3d38d8-ff64-450e-b4f7-c58e6a5027f5","added_by":"auto","created_at":"2025-10-15 02:44:52","extension":"png","order_by":40,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":45487,"visible":true,"origin":"","legend":"","description":"","filename":"Onlinefloatimage15.png","url":"https://assets-eu.researchsquare.com/files/rs-7631009/v1/2e2446737aab7b6744431669.png"},{"id":93542121,"identity":"6cbac41f-f7b8-403f-a4b0-cb451ec49a08","added_by":"auto","created_at":"2025-10-15 02:36:53","extension":"png","order_by":41,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":50895,"visible":true,"origin":"","legend":"","description":"","filename":"Onlinefloatimage16.png","url":"https://assets-eu.researchsquare.com/files/rs-7631009/v1/b536a725aa0b7fc216c51eaf.png"},{"id":93542111,"identity":"f33f9e1f-7a5a-4701-b4d3-e17b173dca08","added_by":"auto","created_at":"2025-10-15 02:36:52","extension":"png","order_by":42,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":41062,"visible":true,"origin":"","legend":"","description":"","filename":"Onlinefloatimage17.png","url":"https://assets-eu.researchsquare.com/files/rs-7631009/v1/cc3012f2156040d54599322f.png"},{"id":93543767,"identity":"4364caa0-a0f2-4b79-af62-e251fcd133d2","added_by":"auto","created_at":"2025-10-15 02:44:52","extension":"png","order_by":43,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":24738,"visible":true,"origin":"","legend":"","description":"","filename":"Onlinefloatimage18.png","url":"https://assets-eu.researchsquare.com/files/rs-7631009/v1/cd102ddd294f81b05a555088.png"},{"id":93544230,"identity":"48182895-6224-417a-a69e-5f2f46d80891","added_by":"auto","created_at":"2025-10-15 02:52:52","extension":"png","order_by":44,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":189285,"visible":true,"origin":"","legend":"","description":"","filename":"Onlinefloatimage19.png","url":"https://assets-eu.researchsquare.com/files/rs-7631009/v1/6b06f98c0302644762bc6913.png"},{"id":93542094,"identity":"ec643a6e-e0a6-4585-82e4-5634afcefcde","added_by":"auto","created_at":"2025-10-15 02:36:51","extension":"png","order_by":45,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":70116,"visible":true,"origin":"","legend":"","description":"","filename":"Onlinefloatimage12.png","url":"https://assets-eu.researchsquare.com/files/rs-7631009/v1/5950750ad8339b98d9831d73.png"},{"id":93543770,"identity":"58d23c43-2d83-45de-859b-2f68ce6735df","added_by":"auto","created_at":"2025-10-15 02:44:52","extension":"png","order_by":46,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":16689,"visible":true,"origin":"","legend":"","description":"","filename":"Onlinefloatimage20.png","url":"https://assets-eu.researchsquare.com/files/rs-7631009/v1/3e13d7b788aeb5e850baebcf.png"},{"id":93542093,"identity":"77dc90b0-cf15-4838-bfb2-64777eefae82","added_by":"auto","created_at":"2025-10-15 02:36:51","extension":"png","order_by":47,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":257450,"visible":true,"origin":"","legend":"","description":"","filename":"Onlinefloatimage3.png","url":"https://assets-eu.researchsquare.com/files/rs-7631009/v1/ab9f1ea92554f18e46e14c9e.png"},{"id":93542078,"identity":"f5d03352-8f63-4e34-ac2d-d022375167b0","added_by":"auto","created_at":"2025-10-15 02:36:50","extension":"png","order_by":48,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":130170,"visible":true,"origin":"","legend":"","description":"","filename":"Onlinefloatimage4.png","url":"https://assets-eu.researchsquare.com/files/rs-7631009/v1/5122b983223f1db5b950daf5.png"},{"id":93542116,"identity":"e47ba003-c215-44f3-a4cf-509a7bf6febf","added_by":"auto","created_at":"2025-10-15 02:36:52","extension":"png","order_by":49,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":45487,"visible":true,"origin":"","legend":"","description":"","filename":"Onlinefloatimage15.png","url":"https://assets-eu.researchsquare.com/files/rs-7631009/v1/6f965c2cba39360988d27297.png"},{"id":93542114,"identity":"c3fab0a2-e93a-4fa9-bfb9-3553a46a298c","added_by":"auto","created_at":"2025-10-15 02:36:52","extension":"png","order_by":50,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":50895,"visible":true,"origin":"","legend":"","description":"","filename":"Onlinefloatimage16.png","url":"https://assets-eu.researchsquare.com/files/rs-7631009/v1/37ca28a18dafddb7522b75d8.png"},{"id":93542087,"identity":"b1d51af1-8c81-404d-99b4-82319cee8aa6","added_by":"auto","created_at":"2025-10-15 02:36:51","extension":"png","order_by":51,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":41062,"visible":true,"origin":"","legend":"","description":"","filename":"Onlinefloatimage17.png","url":"https://assets-eu.researchsquare.com/files/rs-7631009/v1/288e71573ca4f2242e6453e9.png"},{"id":93543765,"identity":"4ba1c6ac-76e8-429b-b9db-fcb956f6e627","added_by":"auto","created_at":"2025-10-15 02:44:51","extension":"png","order_by":52,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":24738,"visible":true,"origin":"","legend":"","description":"","filename":"Onlinefloatimage18.png","url":"https://assets-eu.researchsquare.com/files/rs-7631009/v1/a378b7ab2cd30e88049f020f.png"},{"id":93542107,"identity":"8908b50d-e93f-460b-9dfe-cb9cf7dd7770","added_by":"auto","created_at":"2025-10-15 02:36:52","extension":"png","order_by":53,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":189285,"visible":true,"origin":"","legend":"","description":"","filename":"Onlinefloatimage19.png","url":"https://assets-eu.researchsquare.com/files/rs-7631009/v1/5b3435253f9eb6892a4590c3.png"},{"id":93542124,"identity":"350778f2-bc10-4c95-b74d-2a20dc8e68b6","added_by":"auto","created_at":"2025-10-15 02:36:53","extension":"xml","order_by":54,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":99867,"visible":true,"origin":"","legend":"","description":"","filename":"ff1e935610f048b4800ae31045ca40951structuring.xml","url":"https://assets-eu.researchsquare.com/files/rs-7631009/v1/b3dbe57c78b430dc78d50415.xml"},{"id":93542097,"identity":"d6d4495a-ef61-4128-9c45-46cb0670bfd6","added_by":"auto","created_at":"2025-10-15 02:36:51","extension":"html","order_by":55,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":107164,"visible":true,"origin":"","legend":"","description":"","filename":"earlyproof.html","url":"https://assets-eu.researchsquare.com/files/rs-7631009/v1/9d3bd134645d4f77dd49bf0b.html"},{"id":93544852,"identity":"cff4a2f2-d370-4f05-ae7a-403edfbe9d6c","added_by":"auto","created_at":"2025-10-15 03:00:50","extension":"png","order_by":1,"title":"Figure 1","display":"","copyAsset":false,"role":"figure","size":1040734,"visible":true,"origin":"","legend":"\u003cp\u003eGlobal score description, with an example of each class. Annotated by Neuropathologists.\u003c/p\u003e","description":"","filename":"1.png","url":"https://assets-eu.researchsquare.com/files/rs-7631009/v1/ba2f7e3a22c152e44bb30c23.png"},{"id":93543755,"identity":"c866fd57-836f-49b2-b716-5036e405dddf","added_by":"auto","created_at":"2025-10-15 02:44:50","extension":"png","order_by":2,"title":"Figure 2","display":"","copyAsset":false,"role":"figure","size":507104,"visible":true,"origin":"","legend":"\u003cp\u003eLymphocyte mask description: (A) Panel in light orange: Conversion of simple representations of CD3 positive lymphocytes (in blue) into density maps. These density maps are used to train a model to classify the Global scores manually annotated by neurologists. (B) Panel in light blue: Transformation of the same simple representations of CD3 positive lymphocytes (in blue) into patches. Feature extraction is performed by using VGG16 pretrained network, and patch clustering is done with K-means algorithm. Each mask was recomposed into patch counts per cluster. Frequencies were normalized into proportions per mask. These proportions are used to train another model to classify the Global scores.\u003c/p\u003e","description":"","filename":"2.png","url":"https://assets-eu.researchsquare.com/files/rs-7631009/v1/661d64f81f2da826c95693ff.png"},{"id":93542060,"identity":"7b57ff28-8487-4d61-8adb-b86a54c9255e","added_by":"auto","created_at":"2025-10-15 02:36:49","extension":"png","order_by":3,"title":"Figure 3","display":"","copyAsset":false,"role":"figure","size":523985,"visible":true,"origin":"","legend":"\u003cp\u003ePatch annotation by experts.\u003c/p\u003e","description":"","filename":"3.png","url":"https://assets-eu.researchsquare.com/files/rs-7631009/v1/e906c0ae94f9ac4a9c2646b5.png"},{"id":93542072,"identity":"e880c1fd-1f59-472c-9d75-e7b4a73085a0","added_by":"auto","created_at":"2025-10-15 02:36:50","extension":"png","order_by":4,"title":"Figure 4","display":"","copyAsset":false,"role":"figure","size":185343,"visible":true,"origin":"","legend":"\u003cp\u003eGeneration and selection of patterns from full masks.\u003c/p\u003e","description":"","filename":"4.png","url":"https://assets-eu.researchsquare.com/files/rs-7631009/v1/1a776c8e44388b2a9f0bb345.png"},{"id":93542067,"identity":"18c5d805-4baf-4711-a249-c6f48b9b35aa","added_by":"auto","created_at":"2025-10-15 02:36:50","extension":"png","order_by":5,"title":"Figure 5","display":"","copyAsset":false,"role":"figure","size":123650,"visible":true,"origin":"","legend":"\u003cp\u003eComparison of performances of two models: XGBoost and 2D CNN classifying global score A vs nonA (B \u0026amp; D). (A) Training and validation accuracy curves of 2D CNN model. (B) Training and validation loss curves of 2D CNN model. Performance measures compared between two models of training dataset (C), validation dataset (D) and test dataset (E). The colors represent XGBoost with Group A (dark blue) and Group nonA (green), 2D CNN model with Group A (red) and Group nonA (orange).\u003c/p\u003e","description":"","filename":"5.png","url":"https://assets-eu.researchsquare.com/files/rs-7631009/v1/722f21ec7225b59bd022140e.png"},{"id":93543752,"identity":"955dc212-4f81-4370-bac1-1bb7b164e76d","added_by":"auto","created_at":"2025-10-15 02:44:50","extension":"png","order_by":6,"title":"Figure 6","display":"","copyAsset":false,"role":"figure","size":412247,"visible":true,"origin":"","legend":"\u003cp\u003e(A): A random patch from the top 12 important patch clusters for the predictions. They are represented in the order of variable importance in terms of the percentage. (B): Cumulated percentage of variable importance per cluster id. (C): Average density of top 12 important patch clusters. (D): Mean of patch cluster proportion in our dataset.\u003c/p\u003e","description":"","filename":"6.png","url":"https://assets-eu.researchsquare.com/files/rs-7631009/v1/8355fb805a6844a48793d8b8.png"},{"id":93542096,"identity":"99091632-2d3a-45b6-8233-30585e9f198d","added_by":"auto","created_at":"2025-10-15 02:36:51","extension":"png","order_by":7,"title":"Figure 7","display":"","copyAsset":false,"role":"figure","size":160923,"visible":true,"origin":"","legend":"\u003cp\u003eWrongly predicted global score A. (A), (B), (C) and (D) are different samples issued from different patients. Left column: lymphocytes (in blue) segmented via Visiopharm, a commercial software. Middle column: corresponding density maps. Right column: result of GradCam for each density map.\u003c/p\u003e","description":"","filename":"7.png","url":"https://assets-eu.researchsquare.com/files/rs-7631009/v1/c5a6286b8fa4931c5ec87166.png"},{"id":93542061,"identity":"ea922966-e3b0-4a4c-b1b4-7937919d43ae","added_by":"auto","created_at":"2025-10-15 02:36:50","extension":"png","order_by":8,"title":"Figure 8","display":"","copyAsset":false,"role":"figure","size":95099,"visible":true,"origin":"","legend":"\u003cp\u003eWrongly predicted global score B (nonA). (A) and (B) are different samples issued from different patients. Same representation as in Figure 7.\u003c/p\u003e","description":"","filename":"8.png","url":"https://assets-eu.researchsquare.com/files/rs-7631009/v1/51ca4291bdd12025bfabba3d.png"},{"id":93543760,"identity":"9e951226-f68c-4476-a99a-419ca8159d32","added_by":"auto","created_at":"2025-10-15 02:44:51","extension":"png","order_by":9,"title":"Figure 9","display":"","copyAsset":false,"role":"figure","size":190673,"visible":true,"origin":"","legend":"\u003cp\u003eEach panel (A–C) displays a pattern logo where the x-axis represents sequence positions (1–9), and the y-axis corresponds to the probability of each character at each position. The size of each character reflects its relative frequency, enabling a visual assessment of conservation and variability across different patterns. (A) Global score A: The patterns show strong conservation at nearly all positions. Characters such as 1 (positions 1–3) and 2 (positions 4–5, 7–8) are highly prominent, indicating consistent sequence features within this group. Some minor variability is present, especially at positions 4–6, where smaller characters like E and 4 occasionally appear. However, these do not substantially disrupt the overall conserved structure. (B) Global score B: Moderate conservation is observed in this group. Characters 2 (positions 1–2) and 4 (positions 3–5) appear more frequently, suggesting some degree of shared patterning. However, variability increases toward the latter positions (7–9), where characters such as 3, 2, E, and 4 appear in more balanced proportions. Early positions also exhibit minor diversity, reflecting a less strongly conserved pattern overall. (C) Global score D: This panel illustrates widespread variability. No single dominant character is present at most positions. While some characters like E (position 1), 4 (positions 3–4), and 0 (positions 5–6) show relative prominence, nearly all positions include multiple similarly sized characters (e.g., E, 3, 2, and 4), indicating significant sequence heterogeneity and low conservation. Only the top 50 most frequent patterns are shown for each reference group: Global score A, B, and D. CD3+ lymphocyte presence is indicated by numbers: 1 represents absence or very few, and values progressing toward 4 indicate increasing lymphocyte presence. Reference groups align with this expected trend.\u003c/p\u003e","description":"","filename":"9.png","url":"https://assets-eu.researchsquare.com/files/rs-7631009/v1/f821d1604dcf16c90d981285.png"},{"id":93542099,"identity":"8d33daca-ada3-4d36-9815-abd8d26425f3","added_by":"auto","created_at":"2025-10-15 02:36:51","extension":"png","order_by":10,"title":"Figure 10","display":"","copyAsset":false,"role":"figure","size":58926,"visible":true,"origin":"","legend":"\u003cp\u003e(A) Sankey diagram of our test dataset to visualize the number of cases in each of global scores A, B and D. (B) Sankey diagram of our test dataset including the quantification of the correctly predicted cases. Here, the number of correctly predicted cases were displayed (in yellow). Number of correctly predicted cases are identical in both the strategies (Patch clustering and Density maps). Online tool to produce Sankey diagram: https://sankeymatic.com/build/\u003c/p\u003e","description":"","filename":"10.png","url":"https://assets-eu.researchsquare.com/files/rs-7631009/v1/4614a9d8ae17b253b8503c20.png"},{"id":93544860,"identity":"0debd0a2-1bd6-4451-8ed2-8e8ce3d91fde","added_by":"auto","created_at":"2025-10-15 03:00:56","extension":"pdf","order_by":0,"title":"","display":"","copyAsset":false,"role":"manuscript-pdf","size":3909609,"visible":true,"origin":"","legend":"","description":"","filename":"manuscript.pdf","url":"https://assets-eu.researchsquare.com/files/rs-7631009/v1/d33366a3-6546-40a3-95b2-7a17dea89780.pdf"},{"id":93542059,"identity":"46d9ba43-591a-440a-80cd-432fb1d30529","added_by":"auto","created_at":"2025-10-15 02:36:49","extension":"docx","order_by":0,"title":"","display":"","copyAsset":false,"role":"supplement","size":13719,"visible":true,"origin":"","legend":"","description":"","filename":"Supplementarytables.docx","url":"https://assets-eu.researchsquare.com/files/rs-7631009/v1/2922cdd7607689a8c616dd40.docx"}],"financialInterests":"No competing interests reported.","formattedTitle":"Classification of spatial patterns of lymphocyte infiltration in gliomas from whole slide imaging","fulltext":[{"header":"Introduction","content":"\u003cp\u003ePrimary brain tumors are rare but contribute significantly to disability and mortality. The incidence of malignant primary brain tumors is estimated to approximately 7 per 100,000 individuals annually, increasing with age (Schaff \u0026amp; Mellinghoff, \u003cspan citationid=\"CR18\" class=\"CitationRef\"\u003e2023\u003c/span\u003e). Glioblastoma (GBM) is the most common and aggressive adult primary brain tumor, representing approximately 50% of malignant cases, while infiltrating lower-grade gliomas account for 30% (Boylan et al., \u003cspan citationid=\"CR4\" class=\"CitationRef\"\u003e2023\u003c/span\u003e). Despite intensive treatment including surgery, radiotherapy, and temozolomide chemotherapy, GBM patients have a median survival of 1.5 years, and only 5% survive beyond five years (Stupp et al., \u003cspan citationid=\"CR22\" class=\"CitationRef\"\u003e2005\u003c/span\u003e). MRI remains the primary diagnostic tool for longitudinal monitoring, associated with biopsy or resection for histomolecular evaluation at diagnosis or relapse. Recent investigations suggest that the immunosuppressive microenvironment of GBM with low T cell infiltration may be in part responsible for the poor outcomes and modest response from immunotherapy. To enable further investigation of the role of T cells, a key aspect of the anti-tumor immune response, we used whole-slide images (WSI) with CD3 staining (a T cell marker) and machine learning algorithms to more systematically characterize the spatial patterns of T cell infiltration in GBM.\u003c/p\u003e\u003cp\u003eWSI consists of high-resolution digital scans of histological slides, allowing for the spatial analysis of cellular architecture in tumor tissues. Due to their size (1\u0026ndash;2 GB per image), WSIs are computationally intensive to process. A common strategy involves dividing WSIs into smaller patches for manageable analysis, enabling applications in cancer detection, classification, and prognosis. For instance, Pataki and coauthors (Pataki et al., \u003cspan citationid=\"CR15\" class=\"CitationRef\"\u003e2022\u003c/span\u003e) processed colorectal cancer (CRC) WSIs into 512\u0026times;512 patches annotated for ten pathological conditions (low-grade dysplasia, high-grade dysplasia, adenocarcinoma, suspicious for invasion, inflammation, resection edge, tumor necrosis, lymph vascular invasion, artifact and normal). For the prediction process, they applied a ResNet50 model that achieved AUC from 0.73 to 0.98. However, manual annotation remains a bottleneck. Neto and coauthors (Neto et al., \u003cspan citationid=\"CR14\" class=\"CitationRef\"\u003e2024\u003c/span\u003e) addressed this by proposing weak labeling strategies to train models with fewer annotations, achieving 0.93 accuracy and 0.996 sensitivity between positive (low-grade and high-grade dysplasia) and non-neoplastic samples on a large CRC WSI dataset. Similarly, Chen and authors (C.-L. Chen et al., \u003cspan citationid=\"CR7\" class=\"CitationRef\"\u003e2021\u003c/span\u003e) introduced a WSI training method to bypass patch-level annotation, preserving performance while reducing the labeling burden.\u003c/p\u003e\u003cp\u003eIn recent years, computational pathology has made significant strides in the analysis of brain tumors particularly gliomas and glioblastoma using deep and weakly supervised learning on whole slide images. Chen and colleagues (C. Chen et al., \u003cspan citationid=\"CR6\" class=\"CitationRef\"\u003e2022\u003c/span\u003e) laid foundational work by introducing a self-supervised method for large scale WSI retrieval, achieving over 0.90 top 5 retrieval accuracy, offering a powerful tool for exploring histological patterns across brain tumor cohorts without needing manual annotations. Building on this, Hsu and colleagues (Hsu et al., \u003cspan citationid=\"CR10\" class=\"CitationRef\"\u003e2022\u003c/span\u003e) integrated WSIs with multiparametric MRI in a weakly supervised model to classify glioma subtypes, reporting AUC above 0.90 for critical biomarkers like IDH mutation and 1p/19q codeletion, highlighting the potential of multimodal learning in neuro oncology. Baheti and coauthors (Baheti et al., \u003cspan citationid=\"CR2\" class=\"CitationRef\"\u003e2024\u003c/span\u003e) approached glioblastoma from a different angle unsupervised clustering of WSI derived morphology patterns which revealed patient subgroups with different survival outcomes (p\u0026thinsp;\u0026lt;\u0026thinsp;0.01), suggesting that the tumor microarchitecture alone can stratify prognosis. In parallel, Li and coauthors applied Vision Transformers to WSIs of primary brain tumors, achieving classification accuracies up to 0.93 while also providing attention based heatmaps to interpret the model (Li et al., \u003cspan citationid=\"CR12\" class=\"CitationRef\"\u003e2023\u003c/span\u003e).\u003c/p\u003e\u003cp\u003eAdvanced methods now integrate segmentation to further improve WSI analysis. For instance, Khened and coauthors developed a segmentation and patch-based pipeline for liver cancer analysis, validated through challenges like CAMELYON and PAIP (Khened et al., \u003cspan citationid=\"CR11\" class=\"CitationRef\"\u003e2021\u003c/span\u003e). Then, Saltz and coauthors (Saltz et al., \u003cspan citationid=\"CR17\" class=\"CitationRef\"\u003e2018\u003c/span\u003e) analyzed tumor-infiltrating lymphocytes (TILs) in Hematoxylin and Eosin (H\u0026amp;E) stained The Cancer Genome Atlas (TCGA) slides using convolutional neural network (CNN), linking spatial TIL patterns to tumor subtypes and outcomes.\u003c/p\u003e\u003cp\u003eThese strategies laid the groundwork for our study, in which we employed available tools to accurately segment nuclei and CD3-positive T cells in GBM. This enabled the study of T cell infiltration patterns across tumors. In GBM, the tumor microenvironment comprises immune cells, neurons, blood vessels, and biochemical factors influencing progression and therapy response (Sharma et al., \u003cspan citationid=\"CR20\" class=\"CitationRef\"\u003e2023\u003c/span\u003e). Understanding the lymphocyte behavior remains a key to enhance therapeutic efficacy in brain tumors.\u003c/p\u003e\u003cp\u003eAs classifications based on T cell infiltration are being developed to predict outcomes and response to therapy in other cancers (El Sissy et al., \u003cspan citationid=\"CR9\" class=\"CitationRef\"\u003e2024\u003c/span\u003e; Ghiringhelli et al., \u003cspan citationid=\"CR12\" class=\"CitationRef\"\u003e2023\u003c/span\u003e; Mlecnik et al., \u003cspan citationid=\"CR13\" class=\"CitationRef\"\u003e2023\u003c/span\u003e), our study aimed to support pathologists and oncologists by developing a novel classifier based on small or medium deep learning models to recognize T cell infiltration patterns in GBM from WSIs. Over 200 glioma cases were selected and digitalized at the Paris Brain Institute, with experts assigning global scores reflecting T cell spatial diffusion. Unlike previous approaches, our method leverages precise CD3-positive T cell segmentation masks to train models that predict global scores and analyze infiltration patterns within the tumor microenvironment. We implemented a two-step pipeline: first, distinguishing WSIs with or without CD3\u0026thinsp;+\u0026thinsp;T cells (global score A vs non-A) using a 2D CNN trained on density maps and an XGBoost model (using decision trees with gradient boosting) trained on VGG16-derived features, both achieving over 0.8 accuracy. Secondly, we analyzed spatial grouping of lymphocytes at the patch level, classifying aggregation types with similar accuracy (global scores B vs D). This approach enhances understanding of T cell infiltration in gliomas and holds promise for future prognostic applications.\u003c/p\u003e\u003cp\u003e\u003c/p\u003e\u003cp\u003e\u003c/p\u003e"},{"header":"Materials and Methods","content":"\u003cp\u003eThe data and methodological approach used in this study are summarized in Fig.\u0026nbsp;\u003cspan refid=\"Fig1\" class=\"InternalRef\"\u003e1\u003c/span\u003e and Fig.\u0026nbsp;\u003cspan refid=\"Fig2\" class=\"InternalRef\"\u003e2\u003c/span\u003e. The first step consists in classifying pathologist-defined scores A versus non-A, in terms of global scores. The second step aims at refining the classification of the predicted non-A into B and D scores using subcluster annotations.\u003c/p\u003e\u003cdiv id=\"Sec3\" class=\"Section2\"\u003e\u003ch2\u003eImages of Brain Tumor Samples, Annotations and Segmentation\u003c/h2\u003e\u003cp\u003eBrain tumor samples were obtained from the Onconeurotek collection of the Piti\u0026eacute;-Salp\u0026ecirc;tri\u0026egrave;re Hospital. The protocol was approved by the IRB (Onconeurotek 2.0). Tumor specimens and clinicopathological information were collected with informed consent and approval by an Institutional Review Board (N\u0026deg; IDRCB: 2023-A02763-42, NCT06314607) in accordance with the national laws and the Declaration of Helsinki. The dataset includes diverse glioma types as defined by the reference classification of the World Health Organization (WHO) 2021: oligodendroglioma IDH-mutant and 1p/19q codeleted, astrocytoma IDH-mutant, glioblastoma IDH-wildtype, pleomorphic xanthoastrocytoma, ganglioglioma, and other rare variants. Tumor tissue sections were immunostained for the T cell marker CD3 with an automated stainer (Ultra, Roche Ventana), and scanned using a Zeiss Axioscan Z1 at 0.22 microns, generating CZI WSI images (2\u0026ndash;3 GB per image). The total dataset comprised 214 images.\u003c/p\u003e\u003cp\u003eNeuropathologists annotated all images for tumor infiltration and peritumor zones and categorized them into four groups (A, B, C, D) based on the amount and pattern of T cell infiltration, referred to as the global score of the image. The groups were defined as follows (Fig.\u0026nbsp;\u003cspan refid=\"Fig1\" class=\"InternalRef\"\u003e1\u003c/span\u003e): global score A: absence or presence of few CD3-positive cells within the tumor, as defined by neuropathologists. Global score B: presence of CD3-positive cells primarily surrounding blood vessels inside the tumor. Global score C: presence of CD3-positive cells primarily outside the tumor infiltration zone. Global score D: diffuse infiltration of CD3-positive cells within the tumor. Cases with a global score C were excluded from the dataset as CD3-positive cells were mainly out of the tumor zone. The final dataset consisted of 134 WSIs with global score A, 60 WSIs with global score B and 20 with global score D. In the two-step strategy, the first goal was to distinguish between the global score A vs non-A (B and D) given the imbalance in the dataset. Data split into training, validation and test datasets was performed once and was the same for both the models (XGBoost and 2D CNN). Although the dataset was initially split once, it was later partitioned using a 10-fold split approach, resulting in ten separate subsets, each containing its own training, validation, and test sets for cross-validation analysis.\u003c/p\u003e\u003cp\u003eVisiopharm\u0026reg; was used to perform manual segmentation of tumor zones and automatically segment the nuclei, and CD3\u0026thinsp;+\u0026thinsp;cells within tumor areas. The output XML files contained several object types: ROI (Type 1), CD3-positive cells (Type 4), CD3-positive cells nuclei (Type 5), and negative zones (Type 0). Types 0, 1, and 4 were parsed using 'xmltodict' (v0.13.0). Lymphocyte coordinates were extracted and their centers computed. Using Matplotlib (v3.9.0), we visualized CD3-positive cells centers and tumor zones, excluding CD3-positive cells from non-tumor regions. To normalize tumor sizes, we defined consistent global boundaries across all cases based on coordinate ranges. Each full mask had a size of 7200\u0026times;7200 pixels, in two versions: with or without the tumor area (type 1).\u003c/p\u003e\u003c/div\u003e\n\u003ch3\u003ePatch-based analysis\u003c/h3\u003e\n\u003cp\u003eTo cope with the lymphocyte infiltration details of the images, full masks were patchified into 50x50-pixel tiles using Python (python package patchify). Patches with less than 25% white pixels (i.e. without lymphocytes) were retained. In total, 93,214 patches were created from 214 full masks.\u003c/p\u003e\u003cp\u003eVGG16 (Keras v2.11.0) was used for feature extraction (Fig.\u0026nbsp;\u003cspan refid=\"Fig2\" class=\"InternalRef\"\u003e2\u003c/span\u003e). It is a pretrained neural network, which outputs 512 features, that were then used as input to K-means clustering algorithm (Sklearn v1.3.0) to group patches into 75 clusters. The method clustered visually similar image patches and integrated these clusters into a classification model. VGG-16 was selected for feature extraction due to evidence supporting its accuracy in brain tumor classification (Srinivas et al., \u003cspan citationid=\"CR21\" class=\"CitationRef\"\u003e2022\u003c/span\u003e). Chen and coauthors used a fusion of ResNet101, DenseNet121, and EfficientNetB0, achieving 0.9918 accuracy (W. Chen et al., \u003cspan citationid=\"CR8\" class=\"CitationRef\"\u003e2024\u003c/span\u003e), while Saeedi et al. applied deep learning for early tumor detection (Saeedi et al., \u003cspan citationid=\"CR16\" class=\"CitationRef\"\u003e2023\u003c/span\u003e). Beyond brain tumors, VGG-16 has been used in breast cancer detection with principal component analysis (PCA) for dimensionality reduction (Alrubaie et al., \u003cspan citationid=\"CR1\" class=\"CitationRef\"\u003e2023\u003c/span\u003e), and in pancreatic cancer detection combined with XGBoost (Bakasa \u0026amp; Viriri, \u003cspan citationid=\"CR3\" class=\"CitationRef\"\u003e2023\u003c/span\u003e), highlighting its effectiveness in diverse medical imaging tasks.\u003c/p\u003e\u003cp\u003eIn our study, after obtaining 75 clusters, we counted the number of patches assigned to each cluster within a given mask image. Next, we calculated the proportion of patches in each cluster relative to the total number of patches in that mask. In this way, each mask image was represented by a percentage distribution across clusters (see Table\u0026nbsp;\u003cspan refid=\"Tab1\" class=\"InternalRef\"\u003e1\u003c/span\u003e in the supplementary material). This compact representation was paired with the corresponding global score and effectively preserved biologically relevant spatial information related to the diffusion patterns of CD3 positive cells.\u003c/p\u003e\u003cp\u003eTo search for the best method, H2O AutoML (\u003cspan class=\"ExternalRef\"\u003e\u003cspan class=\"RefSource\"\u003ehttps://docs.h2o.ai/h2o/latest-stable/h2o-docs/automl.html\u003c/span\u003e\u003cspan address=\"https://docs.h2o.ai/h2o/latest-stable/h2o-docs/automl.html\" targettype=\"URL\" class=\"RefTarget\"\u003e\u003c/span\u003e\u003c/span\u003e) was run for 24 hours using 5-fold cross-validation, class balancing, and accuracy as the main evaluation measure. The best model (ranked by AUC), a XGBoost model, was selected from more than 1000 candidates. XGBoost constructs an ensemble of decision trees in a sequential manner, where each new tree corrects the errors of the previous ones using gradient descent on a loss function. It incorporates regularization, shrinkage, and column subsampling to improve generalization and prevent overfitting.\u003c/p\u003e\u003cp\u003eTo estimate the global score, a patch-based method was developed using features extracted from VGG16, followed by clustering and classification with this XGBoost model. This model was trained to distinguish WSIs classified as Group A from non-A (Groups B and D combined). The selected model used XGBoost with \u0026ldquo;Dropouts meet Multiple Additive Regression Trees\u0026rdquo; (DART) algorithm for binary classification, with 37 trees (depth\u0026thinsp;=\u0026thinsp;15) and 5-fold cross-validation.\u003c/p\u003e\n\u003ch3\u003eDensity Map Analysis\u003c/h3\u003e\n\u003cp\u003eA second approach relied on the density of T cells. Grayscale density maps were created to capture T cell density. CD3-positive cells full masks (without the border line of the tumoral zone) were divided into overlapping 100x100-pixel windows (50-pixel stride). The mean lymphocyte density was computed in each window and represented as grayscale maps. These maps were then used in a classifier (Fig. 2).\u003c/p\u003e\n\u003cp\u003eTo estimate the global score in a different manner, a density-map-based approach was implemented using a custom 2D CNN architecture. This model also performed Group A vs non-A classification. This 2D CNN (implemented with TensorFlow) had 4 Conv2D layers (3x3, ReLU), MaxPooling2D (2x2), Flatten, Dense (256, ReLU), and final Dense (1, sigmoid) layers. It was trained over 3000 epochs with batch size 15 and learning rate decay from 10\u003csup\u003e− 4\u003c/sup\u003e to 10\u003csup\u003e− 6\u003c/sup\u003e over 3000 steps. Finally, the model has 20.18M trainable parameters.\u003c/p\u003e\n\u003cp\u003eGrad-CAM visualizations were generated using the final convolutional layer of the CNN model to highlight regions contributing to the classification (Chattopadhyay et al., 2018; Selvaraju et al., 2020).\u003c/p\u003e\n\u003ch3\u003eSpatial Analysis based on Labeled Patterns\u003c/h3\u003e\n\u003cp\u003eTo differentiate between different types of lymphocyte aggregation (corresponding to global scores B and D), expert pathologists annotated the patch clusters (Fig.\u0026nbsp;\u003cspan refid=\"Fig3\" class=\"InternalRef\"\u003e3\u003c/span\u003e). A total of 75 clusters were classified into six subclusters (1, 2, 3, 4, E, and O), based on tissue morphology and CD3 positive lymphocyte density. For each cluster, 25 random patches were selected to determine its label, amounting to approximately 2% of the entire dataset (75 x 25 / 93,214). This is our weak labelling process of patches. Subclusters 1 to 4 reflected increasing levels of T cell infiltration, with subcluster 4 indicating the highest diffusion among the tumor tissue. Subcluster E (for Exclusion) corresponded to patches where T cells were densely packed near blood vessels without evidence of infiltration. Subcluster O included background patches with no relevant tissue or cellular information.\u003c/p\u003e\u003cp\u003eA pattern was defined as a 3x3 array of patches, i.e. a pattern was composed of 9 patches, with their corresponding label (one of each subcluster). This array inherently contains the spatial organization of the patches. However, knowing that a specific subcluster label comes after or before another patch in the mask image is irrelevant for our analysis. Therefore, we rearranged the labels in alphabetic order (see Fig.\u0026nbsp;4). We observed that there are unique patterns of sub-cluster groups per global score group. Thus, we hypothesized that the presence or absence of these distinct and unique patterns could allow us to distinguish between the global score groups B and D given the ability to distinguish between A and non-A. Following this, we analyzed the top 50 most frequent patterns per group in order to see if there were specific patterns of sub-cluster groups describing the global score groups B and D. Patterns were eliminated if background (represented by O) or absence of T cells in tumoral zone (represented by subcluster 1) were found for more than or equal to 5 patches in the array. For each global score group, we selected the top 50 most frequent patterns as a reference. This approach resulted in having three reference groups (A, B, D). To classify a query case, we compared its patterns to the reference patterns of each group and counted the common patterns. Even though we identified the patterns describing the global score A, these patterns had to be ignored at this stage as classifying A vs non-A was already achieved. The package R ggseglogo (\u003cspan class=\"ExternalRef\"\u003e\u003cspan class=\"RefSource\"\u003ehttps://cran.r-project.org/web/packages/ggseqlogo/index.html\u003c/span\u003e\u003cspan address=\"https://cran.r-project.org/web/packages/ggseqlogo/index.html\" targettype=\"URL\" class=\"RefTarget\"\u003e\u003c/span\u003e\u003c/span\u003e) was used to visualize the top 50 most frequent patterns in the reference groups.\u003c/p\u003e"},{"header":"Results","content":"\u003ch3\u003eComparable performance of XGBoost and of 2D CNN models: Classification of A vs nonA\u003c/h3\u003e\n\u003cp\u003e\u003cstrong\u003eTable 1\u003c/strong\u003e. Evaluation of two models: XGBoost and 2D CNN classifying global score A vs nonA (B \u0026amp; D)\u003c/p\u003e\n\u003ctable border=\"1\" cellspacing=\"0\" cellpadding=\"0\" width=\"559\"\u003e\n \u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd rowspan=\"2\" style=\"width: 80px;\"\u003e\n \u003cp\u003eMetrics\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd colspan=\"2\" style=\"width: 160px;\"\u003e\n \u003cp\u003eTraining\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd colspan=\"2\" style=\"width: 160px;\"\u003e\n \u003cp\u003eValidation\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd colspan=\"2\" style=\"width: 160px;\"\u003e\n \u003cp\u003eTest\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd style=\"width: 80px;\"\u003e\n \u003cp\u003eXGBoost\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd style=\"width: 80px;\"\u003e\n \u003cp\u003e2D CNN\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd style=\"width: 80px;\"\u003e\n \u003cp\u003eXGBoost\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd style=\"width: 80px;\"\u003e\n \u003cp\u003e2D CNN\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd style=\"width: 80px;\"\u003e\n \u003cp\u003eXGBoost\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd style=\"width: 80px;\"\u003e\n \u003cp\u003e2D CNN\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd style=\"width: 80px;\"\u003e\n \u003cp\u003eAccuracy\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd style=\"width: 80px;\"\u003e\n \u003cp\u003e0.97\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd style=\"width: 80px;\"\u003e\n \u003cp\u003e0.87\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd style=\"width: 80px;\"\u003e\n \u003cp\u003e0.97\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd style=\"width: 80px;\"\u003e\n \u003cp\u003e0.91\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd style=\"width: 80px;\"\u003e\n \u003cp\u003e0.82\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd style=\"width: 80px;\"\u003e\n \u003cp\u003e0.85\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd style=\"width: 80px;\"\u003e\n \u003cp\u003ePrecision\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd style=\"width: 80px;\"\u003e\n \u003cp\u003e0.98\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd style=\"width: 80px;\"\u003e\n \u003cp\u003e0.93\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd style=\"width: 80px;\"\u003e\n \u003cp\u003e1.00\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd style=\"width: 80px;\"\u003e\n \u003cp\u003e1.00\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd style=\"width: 80px;\"\u003e\n \u003cp\u003e0.89\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd style=\"width: 80px;\"\u003e\n \u003cp\u003e0.94\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd style=\"width: 80px;\"\u003e\n \u003cp\u003eRecall\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd style=\"width: 80px;\"\u003e\n \u003cp\u003e0.98\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd style=\"width: 80px;\"\u003e\n \u003cp\u003e0.85\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd style=\"width: 80px;\"\u003e\n \u003cp\u003e0.95\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd style=\"width: 80px;\"\u003e\n \u003cp\u003e0.85\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd style=\"width: 80px;\"\u003e\n \u003cp\u003e0.81\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd style=\"width: 80px;\"\u003e\n \u003cp\u003e0.81\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd style=\"width: 80px;\"\u003e\n \u003cp\u003eF1-score\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd style=\"width: 80px;\"\u003e\n \u003cp\u003e0.98\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd style=\"width: 80px;\"\u003e\n \u003cp\u003e0.89\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd style=\"width: 80px;\"\u003e\n \u003cp\u003e0.97\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd style=\"width: 80px;\"\u003e\n \u003cp\u003e0.92\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd style=\"width: 80px;\"\u003e\n \u003cp\u003e0.85\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd style=\"width: 80px;\"\u003e\n \u003cp\u003e0.87\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd style=\"width: 80px;\"\u003e\n \u003cp\u003eSpecificity\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd style=\"width: 80px;\"\u003e\n \u003cp\u003e0.96\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd style=\"width: 80px;\"\u003e\n \u003cp\u003e0.89\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd style=\"width: 80px;\"\u003e\n \u003cp\u003e1.00\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd style=\"width: 80px;\"\u003e\n \u003cp\u003e1.00\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd style=\"width: 80px;\"\u003e\n \u003cp\u003e0.83\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd style=\"width: 80px;\"\u003e\n \u003cp\u003e0.92\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003c/tbody\u003e\n\u003c/table\u003e\n\u003cp\u003eTable 2. XGBoost: Confusion Matrix: Test dataset. All misclassified cases were studied in detail using GradCam methodology. Especially, we observed 2 misclassified cases for nonA from XGBoost\u003c/p\u003e\n\u003ctable border=\"1\" cellspacing=\"0\" cellpadding=\"0\"\u003e\n \u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd style=\"width: 128px;\"\u003e\n \u003cp\u003e\u0026nbsp;\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd style=\"width: 128px;\"\u003e\n \u003cp\u003eA\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd style=\"width: 128px;\"\u003e\n \u003cp\u003enonA\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd style=\"width: 128px;\"\u003e\n \u003cp\u003eA\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd style=\"width: 128px;\"\u003e\n \u003cp\u003e17\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd style=\"width: 128px;\"\u003e\n \u003cp\u003e4\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd style=\"width: 128px;\"\u003e\n \u003cp\u003enonA\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd style=\"width: 128px;\"\u003e\n \u003cp\u003e2\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd style=\"width: 128px;\"\u003e\n \u003cp\u003e10\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003c/tbody\u003e\n\u003c/table\u003e\n\u003cp\u003eTable 3. 2D CNN: Confusion Matrix: Test dataset. All misclassified cases were studied in detail using GradCam methodology. They are the same cases for both the models. Especially, we observed 2 misclassified cases for nonA from XGBoost while 2DCNN model misclassified only one nonA case.\u003c/p\u003e\n\u003ctable border=\"1\" cellspacing=\"0\" cellpadding=\"0\"\u003e\n \u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd style=\"width: 130px;\"\u003e\n \u003cp\u003e\u0026nbsp;\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd style=\"width: 130px;\"\u003e\n \u003cp\u003eA\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd style=\"width: 130px;\"\u003e\n \u003cp\u003enonA\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd style=\"width: 130px;\"\u003e\n \u003cp\u003eA\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd style=\"width: 130px;\"\u003e\n \u003cp\u003e17\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd style=\"width: 130px;\"\u003e\n \u003cp\u003e4\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd style=\"width: 130px;\"\u003e\n \u003cp\u003enonA\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd style=\"width: 130px;\"\u003e\n \u003cp\u003e1\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd style=\"width: 130px;\"\u003e\n \u003cp\u003e11\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003c/tbody\u003e\n\u003c/table\u003e\n\u003cp\u003eThe performance comparison between XGBoost and 2D CNN reveals distinct learning behaviors. XGBoost achieves near-perfect results on the training data (accuracy and F1 \u0026gt; 0.97), suggesting potential overfitting, especially with a test accuracy drop to 0.82 (Table 1, 2, 3). By contrast, 2D CNN trains at a lower accuracy (0.87), indicating better generalization. On validation data, both models perform similarly, though XGBoost often shows higher precision, recall, and specificity. On the test set, 2D CNN slightly outperforms XGBoost in accuracy (0.85 vs. 0.82), precision, specificity, and F1 score, though it has slightly lower recall for class A (0.81 vs. 0.89), see Figure 5. For class nonA, 2D CNN achieves better recall and F1 on test data, showing stronger generalization, especially under class imbalance. The sharp drop from training to test results highlights its sensitivity to data distribution. This overfitting limits its reliability on unseen or real-world data. By contrast, 2D CNN offers more stable and robust performance, making it more suitable for deployment in practical applications. Given the small test set, minor prediction changes can significantly impact accuracy. A 10-fold split analysis, however, shows that XGBoost has a higher accuracy (0.93 \u0026plusmn; 0.05) on the test data than 2D CNN (0.83 \u0026plusmn; 0.08), suggesting more consistent performance across splits despite its overfitting tendency.\u003c/p\u003e\n\u003ch3\u003eDensity emerges as the most influential variable across both models\u003c/h3\u003e\n\u003cp\u003eWe conducted an analysis of variable importance using XGBoost, focusing on a selection of 12 patch cluster descriptors. These descriptors accounted for more than 90% of the cumulative variance explained in the model (Figure 6), highlighting their relevance to the predictive performance. The selected descriptors were further divided into two groups based on their average density. The first group, consisting of six patch clusters, exhibited an average density in the range [0.4, 1.0], while the second group of six clusters had an average density between 0 and 0.39 (Figure 6).\u003c/p\u003e\n\u003cp\u003eNotably, group non-A was found to contain a greater proportion of descriptors from the high-density group (i.e., with an average density more than 0.34), whereas group A included more descriptors from the lower-density group (i.e., with average density less than or equal to 0.34). High density patch clusters included patch clusters 3, 11, 55, 47, 28 and 5. On the other hand, low density patch clusters were composed of patch clusters 69, 49, 50, 45, 1, and 12. This distribution suggested distinct underlying patterns in the data between the two groups, potentially linked to varying structural or spatial properties represented by the patch clusters. Our 2D CNN model was analyzed using Grad-CAM to visualize the importance of pixels in density maps. Regions with low intense coloration indicate areas with a lower density of CD3+ T cells. These cells were depicted in dark blue and white. The orange and red regions, which had a significant influence on the model predictions, corresponded to areas with higher densities of CD3+ T cells (Figures 7 and 8).\u003c/p\u003e\n\u003ch3\u003eWrongly predicted cases\u003c/h3\u003e\n\u003cp\u003eFigures 7 and 8 show the wrongly predicted cases issued from our test dataset by XGBoost model and 2D CNN model. Figure 7(A) displays all wrongly predicted global score A cases. Here, we observed an increased presence of lymphocytes, with distinct regions displaying multiple lymphocyte aggregations. This pattern strongly suggested that this case was misclassified by experts. Conversely, (B), (C), and (D) illustrate cases with a mix of low- and high-density lymphocyte areas, as well as zones without lymphocytes. This variability was indicative of tumor heterogeneity, a well-documented caveat in glioma characterization. Tumor heterogeneity not only complicates expert annotations, but also hampers model training and predictions, as evidenced in Figure 8(A) and (B), where similar misclassifications occurred. Figure 8 shows all the wrongly predicted global score B cases or non-A cases. The density map generation strategy, when paired with a 2D CNN model, proved efficient to recover the case demonstrated in Figure 8(B). Our whole methodology involving XGBoost and 2D CNN models is still limited to addressing the inherent complexity and variability of the brain tumor microenvironments.\u003c/p\u003e\n\u003ch3\u003ePrediction of global score B and D using subclusters\u003c/h3\u003e\n\u003cp\u003eTable 4. Confusion matrix: Prediction of B versus D using patterns.\u003c/p\u003e\n\u003ctable border=\"1\" cellspacing=\"0\" cellpadding=\"0\"\u003e\n \u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd style=\"width: 114px;\"\u003e\n \u003cp\u003e\u0026nbsp;\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd style=\"width: 114px;\"\u003e\n \u003cp\u003eB\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd style=\"width: 114px;\"\u003e\n \u003cp\u003eD\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd style=\"width: 114px;\"\u003e\n \u003cp\u003eB\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd style=\"width: 114px;\"\u003e\n \u003cp\u003e8\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd style=\"width: 114px;\"\u003e\n \u003cp\u003e2\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd style=\"width: 114px;\"\u003e\n \u003cp\u003eD\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd style=\"width: 114px;\"\u003e\n \u003cp\u003e0\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd style=\"width: 114px;\"\u003e\n \u003cp\u003e2\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003c/tbody\u003e\n\u003c/table\u003e\n\u003cp\u003eHere, all non-A cases in the test dataset were considered for classification into groups B or D. The test dataset included 10 cases with global score B and 2 with global score D. The patterns issued from a given query case were compared and quantified. The query case was assigned to the global score group (B or D) with the highest number of common patterns with the reference group (Figure 9). Using this methodology, we successfully classified 8 out of 10 global score B, and we classified 2 out of 2 global score D correctly. Given the small size of our test dataset, even minor modifications can lead to significant changes in the accuracy measures, and this should be taken into careful consideration. We reached an accuracy of 83% based on the confusion matrix displayed in Table 4. \u0026nbsp;\u003c/p\u003e\n\u003cp\u003eTable 5. Combined confusion matrix: Two step strategy predictions of A, B and D. Identical performance from both the strategies (Patch clustering and Density maps). In both cases, final accuracy: 0.81\u003c/p\u003e\n\u003ctable border=\"1\" cellspacing=\"0\" cellpadding=\"0\"\u003e\n \u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd style=\"width: 85px;\"\u003e\n \u003cp\u003e\u0026nbsp;\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd style=\"width: 85px;\"\u003e\n \u003cp\u003eA\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd style=\"width: 85px;\"\u003e\n \u003cp\u003eB\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd style=\"width: 85px;\"\u003e\n \u003cp\u003eD\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd style=\"width: 85px;\"\u003e\n \u003cp\u003eA\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd style=\"width: 85px;\"\u003e\n \u003cp\u003e17\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd style=\"width: 85px;\"\u003e\n \u003cp\u003e2\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd style=\"width: 85px;\"\u003e\n \u003cp\u003e2\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd style=\"width: 85px;\"\u003e\n \u003cp\u003eB\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd style=\"width: 85px;\"\u003e\n \u003cp\u003e1\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd style=\"width: 85px;\"\u003e\n \u003cp\u003e6\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd style=\"width: 85px;\"\u003e\n \u003cp\u003e1\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd style=\"width: 85px;\"\u003e\n \u003cp\u003eD\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd style=\"width: 85px;\"\u003e\n \u003cp\u003e0\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd style=\"width: 85px;\"\u003e\n \u003cp\u003e0\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd style=\"width: 85px;\"\u003e\n \u003cp\u003e2\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003c/tbody\u003e\n\u003c/table\u003e\n\u003cp\u003eWe also implemented a two-step classification strategy integrating machine learning (ML) models, XGBoost and a 2D Convolutional Neural Network (2D CNN) with spatial pattern analysis to predict global infiltration scores (A, B, or D). In this pipeline, if the first step (ML prediction) identified a sample as class A, the final prediction is directly assigned to A. In cases predicted as non-A, the second step refines the prediction by selecting the class (B or D) with the highest spatial pattern count (Figure 10). Two cases with equal counts for B and D were excluded from the final accuracy calculation due to classification ambiguity. Both ML approaches demonstrated identical performance, achieving a final prediction accuracy of 0.81 (Table 5), whether using the patch clustering or density map method. The density map approach offered greater scalability and practicality when applied to new cases. By contrast, the patch clustering method required assigning new patches to predefined clusters using distance metrics, which may not align accurately with the original clustering outcomes. In both evaluations, we observed multiple predicted cases. Tumor heterogeneity and the presence of small tumor zones posed significant challenges to ML-based classification, often necessitating expert review, as seen in ambiguous or potentially misclassified cases. Overall, our combined ML and expert-informed strategy provide a robust framework for tumor infiltration classification, with reliable performance despite intrinsic biological variability.\u003c/p\u003e\n\u003cp\u003eTo further validate this approach, we conducted a 10-fold analysis involving separate training, validation, and test splits. For each split, the respective predicted nonA cases (either by XGBoost or 2D CNN models) were classified into B or D using the same methodology. Across all splits, we achieved an average classification accuracy of 0.77\u0026plusmn;0.07 for the XGBoost model while it was 0.74\u0026plusmn;0.09 for the 2D CNN model.\u003c/p\u003e"},{"header":"Discussion and Conclusion","content":"\u003cp\u003eThis study underlines the complementary strengths of XGBoost and 2D CNN models in analyzing lymphocyte (T cell) density and predicting global scores in glioma. While XGBoost achieved higher accuracy on training data (0.97) and better precision, recall, and F1 scores, it demonstrated signs of overfitting, generalizing less effectively to unseen data (test accuracy 0.82) compared to the 2D CNN (0.85). This performance gap likely stems from tumor heterogeneity, class imbalance, limited test data, and the under-representation of non-A cases. To address these issues, a weakly supervised pattern analysis approach was introduced, involving expert review of only 25 patches per cluster, allowing for scalable and minimally biased annotation. This revealed distinct spatial signatures: high-density lymphocyte clusters were enriched in group non-A, while low-density patterns characterized group A, reflecting biologically meaningful differences. Using the 50 most frequent spatial motifs per group, the method achieved 0.83 accuracy, correctly classifying 8 of 10 B cases and both D cases, with minimal pattern overlap between A and B/D. A two-step prediction strategy was then developed: if the model predicted A, the label remained A; otherwise, if non-A, the final label was decided based on the majority pattern count between B and D. Both the patch clustering and density map approaches reached a final accuracy of 0.81, with the latter proving more scalable. Importantly, the pattern-based method offers a robust alternative when conventional models struggle, and splitting the dataset into 10 folds, each including at least two D cases, appears more legitimate for fair evaluation. These findings highlight the value of hybrid approaches that integrate machine learning with spatial pattern analysis and expert insights to address the biological complexity of glioma.\u003c/p\u003e\n\u003cp\u003eOngoing work focuses on incorporating genomic, cellular, and survival data to better understand prognostic differences, especially in relation to T cell aggregation. Future improvements will explore multi-scale and 3D spatial modeling, along with advanced architecture such as transformers and ensembles, to improve generalization, manage uncertainty, and enhance clinical applicability.\u003c/p\u003e"},{"header":"Declarations","content":"\u003ch3\u003eEthics approval and consent to participate\u003c/h3\u003e\n\u003cp\u003eWe do have the clearance of the ethics committee.\u0026nbsp;Brain tumor samples were obtained from the Onconeurotek collection of the Pitié-Salpêtrière Hospital. The protocol was approved by the IRB (Onconeurotek 2.0). Tumor specimens and clinicopathological information were collected with informed consent and approval by an Institutional Review Board (N° IDRCB: 2023-A02763-42, NCT06314607) in accordance with the national laws and the Declaration of Helsinki.\u003c/p\u003e\n\u003ch3\u003eConsent for publication\u003c/h3\u003e\n\u003cp\u003eAll authors consent for the submission and the publication of this work.\u003c/p\u003e\n\u003ch3\u003eClinical trial (Not applicable)\u003c/h3\u003e\n\u003ch3\u003eAvailability of data and material\u0026nbsp;\u003c/h3\u003e\n\u003cp\u003eThe datasets used and/or analysed during the current study are available from the corresponding author on reasonable request.\u003c/p\u003e\n\u003ch3\u003eCompeting interests\u003c/h3\u003e\n\u003cp\u003eM.T. reports research funding from Sanofi and Amgen; consulting or advisory role for Servier, Novocure, NH TherAguiX, Agios Pharmaceutical, Integragen, Resilience, GSK, and Taiho Oncology; honoraria from Ono, Servier, Novocure. F.B. discloses a next-of-kin employed by Bristol Myers-Squibb, service contracts with Owkin and Treefrog Therapeutics via the institution, and personal funding from Owkin for scientific presentation. A.A.N, J.L. and I.B. declare that they have no competing interests.\u003c/p\u003e\n\u003ch3\u003eFunding\u003c/h3\u003e\n\u003cp\u003eThe project received financial support by the grants of INCa-DGOS-Inserm 12560, Site de Recherche Intégré sur le Cancer (SiRIC CURAMUS) (F.B., M.T). F.B. received fundings Emergence 2019 from Sorbonne Université and PL-BIO 2023 from the National Institute of Cancer (Inca, France).\u003c/p\u003e\n\u003cp\u003eA.A.N. was supported by a grant from INCa, Ligue contre le cancer, and Fondation ARC (grant PAIR TUMC21-001). M.T. is supported by Paris Brain Institute (PBI), Paris Brain Institute America (PBIA), FNAB, ARTC, INCa, Ligue contre le cancer, and Fondation ARC (grant PAIR TUMC21-001), Sorbonne Université, Cancéropôle Ile-de-France, Fondation de France, INSERM ATIP Avenir, Paris Ile de France Region, and SiRIC CURAMUS, which is funded by the Institut National du Cancer, the French Ministry of Health and Prevention and by ITMO Cancer of Aviesan within the framework of the 2021-2030 Cancer Control Strategy, on funds administered by Inserm (INCa-DGOS-INSERM-ITMO Cancer_18010).\u003c/p\u003e\n\u003ch3\u003eAuthors’ contribution\u003c/h3\u003e\n\u003cp\u003eF.B. and J.L. worked for the image acquisition. J.L. and A.A.N. processed images using Visiopharm. A.A.N. preprocessed, produced machine learning \u0026amp; deep learning models, spatial pattern analysis and result analysis under the supervision of M.T., F.B. and I.B. \u0026nbsp;M.T. and F.B. annotated all images to get the global scores. J.L. prepared Figure 1 and F.B. prepared Figure 4. F.B. provided all expert knowledge for the pattern annotation and pattern analysis. A.A.N. and I.B. wrote the main manuscript text. All authors reviewed the manuscript.\u003c/p\u003e\n\u003ch3\u003eAcknowledgements\u003c/h3\u003e\n\u003cp\u003eWe are grateful to the technical staff of the Department of Neuropathology of the Pitié-Salpêtrière Hospital for immunostainings, to HISTOMICS platform and Lev Stimmer for the support to digitalize immunostaining and to run Visiopharm software.\u003c/p\u003e"},{"header":"References","content":"\u003col\u003e\n\u003cli\u003eAlrubaie, H. D., Aljobouri, H. K., \u0026amp; Aljobawi, Z. J. (2023). Efficient Feature Selection Using CNN, VGG16 and PCA for Breast Cancer Ultrasound Detection. \u003cem\u003eRevue d\u0026rsquo;Intelligence Artificielle\u003c/em\u003e, \u003cem\u003e37\u003c/em\u003e(5), 1255‑1261.\u003c/li\u003e\n\u003cli\u003eBaheti, B., Innani, S., Nasrallah, M., \u0026amp; Bakas, S. (2024). Prognostic stratification of glioblastoma patients by unsupervised clustering of morphology patterns on whole slide images furthering our disease understanding. \u003cem\u003eFrontiers in Neuroscience\u003c/em\u003e, \u003cem\u003e18\u003c/em\u003e, 1304191. https://doi.org/10.3389/fnins.2024.1304191\u003c/li\u003e\n\u003cli\u003eBakasa, W., \u0026amp; Viriri, S. (2023). VGG16 Feature Extractor with Extreme Gradient Boost Classifier for Pancreas Cancer Prediction. \u003cem\u003eJournal of Imaging\u003c/em\u003e, \u003cem\u003e9\u003c/em\u003e(7), 138.\u003c/li\u003e\n\u003cli\u003eBoylan, J., Byers, E., \u0026amp; Kelly, D. F. (2023). The Glioblastoma Landscape : Hallmarks of Disease, Therapeutic Resistance, and Treatment Opportunities. \u003cem\u003eMedical Research Archives\u003c/em\u003e, \u003cem\u003e11\u003c/em\u003e(6), 10.18103/mra.v11i6.3994.\u003c/li\u003e\n\u003cli\u003eChattopadhyay, A., Sarkar, A., Howlader, P., \u0026amp; Balasubramanian, V. N. (2018). Grad-CAM++ : Improved Visual Explanations for Deep Convolutional Networks. \u003cem\u003e2018 IEEE Winter Conference on Applications of Computer Vision (WACV)\u003c/em\u003e, 839‑847. https://doi.org/10.1109/WACV.2018.00097\u003c/li\u003e\n\u003cli\u003eChen, C., Lu, M. Y., Williamson, D. F. K., Chen, T. Y., Schaumberg, A. J., \u0026amp; Mahmood, F. (2022). Fast and scalable search of whole-slide images via self-supervised deep learning. \u003cem\u003eNature Biomedical Engineering\u003c/em\u003e. https://doi.org/10.1038/s41551-022-00929-8\u003c/li\u003e\n\u003cli\u003eChen, C.-L., Chen, C.-C., Yu, C.-Y., .., \u0026amp; Chen, C.-Y. (2021). An Annotation-Free Whole-Slide Training Approach to Pathological Classification of Lung Cancer Types Using Deep Learning. \u003cem\u003eNature Communications\u003c/em\u003e, \u003cem\u003e12\u003c/em\u003e(1), 1193.\u003c/li\u003e\n\u003cli\u003eChen, W., Tan, X., Zhang, Q., .., \u0026amp; Jiang, H. (2024). A robust approach for multi-type classification of brain tumor using deep feature fusion. \u003cem\u003eFrontiers in Neuroscience\u003c/em\u003e, \u003cem\u003e18\u003c/em\u003e.\u003c/li\u003e\n\u003cli\u003eEl Sissy, C., Kirilovsky, A., Lagorce Pag\u0026egrave;s, C., Marliot, ... Torben Fr\u0026oslash;strup, Jensen, L. H., Beets, G., Zeitoun, G., \u0026amp; Pag\u0026egrave;s, F. (2024). International Validation of the Immunoscore Biopsy in Patients With Rectal Cancer Managed by a Watch-and-Wait Strategy. \u003cem\u003eJournal of Clinical Oncology\u003c/em\u003e, \u003cem\u003e42\u003c/em\u003e(1), 70‑80.\u003c/li\u003e\n\u003cli\u003eHsu, W.-W., Guo, J.-M., Pei, L., Chiang, L.-A., Li, Y.-F., Hsiao, J.-C., Colen, R., \u0026amp; Liu, P. (2022). A weakly supervised deep learning-based method for glioma subtype classification using WSI and mpMRIs. \u003cem\u003eScientific Reports\u003c/em\u003e. https://doi.org/10.1038/s41598-022-09985-0\u003c/li\u003e\n\u003cli\u003eKhened, M., Kori, A., Rajkumar, H., Krishnamurthi, G., \u0026amp; Srinivasan, B. (2021). A Generalized Deep Learning Framework for Whole-Slide Image Segmentation and Analysis. \u003cem\u003eScientific Reports\u003c/em\u003e, \u003cem\u003e11\u003c/em\u003e(1).\u003c/li\u003e\n\u003cli\u003eLi, Z., Cong, Y., Chen, X., Qi, J., Sun, J., Yan, T., Yang, H., Liu, J., Lu, E., Wang, L., Li, J., Hu, H., Zhang, C., Yang, Q., Yao, J., Yao, P., Jiang, Q., Liu, W., Song, J., \u0026hellip; Gao, X. (2023). Vision transformer-based weakly supervised histopathological image analysis of primary brain tumors. \u003cem\u003eiScience\u003c/em\u003e, \u003cem\u003e26\u003c/em\u003e, 105872. https://doi.org/10.1016/j.isci.2022.105872\u003c/li\u003e\n\u003cli\u003eMlecnik, B., Lugli, A., Bindea, G., Marliot, F., Bifulco, C., Lee, J.-K. J., Zlobec, I., Rau, T. T., Berger, M. D., Nagtegaal, I. D., Vink-B\u0026ouml;rger, E., Hartmann, ... Shashank J., Shukla, S. N., Wang, Y., Zhang, G., Kawakami, Y., Marincola, F. M., Ascierto, P. A., Fox, B. A., \u0026hellip; Galon, J. (2023). Multicenter International Study of the Consensus Immunoscore for the Prediction of Relapse and Survival in Early-Stage Colon Cancer. \u003cem\u003eCancers\u003c/em\u003e, \u003cem\u003e15\u003c/em\u003e(2), 418.\u003c/li\u003e\n\u003cli\u003eNeto, P. C., Montezuma, D., Oliveira, I. M., .., \u0026amp; Cardoso, J. S. (2024). An Interpretable Machine Learning System for Colorectal Cancer Diagnosis from Pathology Slides. \u003cem\u003eNPJ Precision Oncology\u003c/em\u003e, \u003cem\u003e8\u003c/em\u003e(1).\u003c/li\u003e\n\u003cli\u003ePataki, B. \u0026Aacute;., Olar, A., Ribli, P., .., \u0026amp; Csabai, I. (2022). HunCRC: Annotated Pathological Slides to Enhance Deep Learning Applications in Colorectal Cancer Screening. \u003cem\u003eScientific Data\u003c/em\u003e, \u003cem\u003e9\u003c/em\u003e(1).\u003c/li\u003e\n\u003cli\u003eSaeedi, S., Rezayi, S., Keshavarz, H., \u0026amp; R. Niakan Kalhori, S. (2023). MRI-based brain tumor detection using convolutional deep learning methods and chosen machine learning techniques. \u003cem\u003eBMC Medical Informatics and Decision Making\u003c/em\u003e, \u003cem\u003e23\u003c/em\u003e(1).\u003c/li\u003e\n\u003cli\u003eSaltz, J., Gupta, R., Hou, L., Kurc, N. D., .., \u0026amp; Mariamidze, A. (2018). Spatial Organization and Molecular Correlation of Tumor-Infiltrating Lymphocytes Using Deep Learning on Pathology Images. \u003cem\u003eCell Reports\u003c/em\u003e, \u003cem\u003e23\u003c/em\u003e(1), 181-193.e7.\u003c/li\u003e\n\u003cli\u003eSchaff, L. R., \u0026amp; Mellinghoff, I. K. (2023). Glioblastoma and Other Primary Brain Malignancies in Adults : A Review. \u003cem\u003eJAMA\u003c/em\u003e, \u003cem\u003e329\u003c/em\u003e(7), 574.\u003c/li\u003e\n\u003cli\u003eSelvaraju, R. R., Cogswell, M., Das, A., Vedantam, R., Parikh, D., \u0026amp; Batra, D. (2020). Grad-CAM : Visual Explanations from Deep Networks via Gradient-based Localization. \u003cem\u003eInternational Journal of Computer Vision\u003c/em\u003e, \u003cem\u003e128\u003c/em\u003e(2), 336‑359. https://doi.org/10.1007/s11263-019-01228-7\u003c/li\u003e\n\u003cli\u003eSharma, P., Aaroe, A., Liang, J., \u0026amp; Puduvalli, V. K. (2023). Tumor Microenvironment in Glioblastoma : Current and Emerging Concepts. \u003cem\u003eNeuro-Oncology Advances\u003c/em\u003e, \u003cem\u003e5\u003c/em\u003e(1), vdad009.\u003c/li\u003e\n\u003cli\u003eSrinivas, C., K. S., K., .., Partibane, B., \u0026amp; Awal, H. (2022). Deep Transfer Learning Approaches in Performance Analysis of Brain Tumor Classification Using MRI Images. \u003cem\u003eJournal of Healthcare Engineering\u003c/em\u003e, \u003cem\u003e2022\u003c/em\u003e, 1‑17.\u003c/li\u003e\n\u003cli\u003eStupp, R., Mason, J. G., .., Eisenhauer, E., \u0026amp; Mirimanoff, R. O. (2005). Radiotherapy plus Concomitant and Adjuvant Temozolomide for Glioblastoma. \u003cem\u003eNew England Journal of Medicine\u003c/em\u003e, \u003cem\u003e352\u003c/em\u003e(10), 987‑996.\u003c/li\u003e\n\u003c/ol\u003e"}],"fulltextSource":"","fullText":"","funders":[],"hasAdminPriorityOnWorkflow":false,"hasManuscriptDocX":true,"hasOptedInToPreprint":true,"hasPassedJournalQc":"","hasAnyPriority":false,"hideJournal":false,"highlight":"","institution":"","isAcceptedByJournal":false,"isAuthorSuppliedPdf":false,"isDeskRejected":"","isHiddenFromSearch":false,"isInQc":false,"isInWorkflow":false,"isPdf":false,"isPdfUpToDate":true,"isWithdrawnOrRetracted":false,"journal":{"display":true,"email":"
[email protected]","identity":"bmc-biomedical-engineering","isNatureJournal":false,"hasQc":true,"allowDirectSubmit":false,"externalIdentity":"bbme","sideBox":"Learn more about [BMC Biomedical Engineering](http://bmcbiomedeng.biomedcentral.com)","snPcode":"","submissionUrl":"https://www.editorialmanager.com/bbme/default.aspx","title":"BMC Biomedical Engineering","twitterHandle":"BMC_series","acdcEnabled":true,"dfaEnabled":false,"editorialSystem":"em","reportingPortfolio":"BMC Series","inReviewEnabled":true,"inReviewRevisionsEnabled":true},"keywords":"Primary brain tumors, cd3 immunostaining, lymphocyte diffusion, t-cell infiltration, image classification, spatial pattern recognition, machine learning.","lastPublishedDoi":"10.21203/rs.3.rs-7631009/v1","lastPublishedDoiUrl":"https://doi.org/10.21203/rs.3.rs-7631009/v1","license":{"name":"CC BY 4.0","url":"https://creativecommons.org/licenses/by/4.0/"},"manuscriptAbstract":"\u003cp\u003ePrimary malignant brain tumors are among the most lethal cancers and are associated with poor survival. T cells are crucial components of the immune response against tumors. However, the spatial organization of T cells in brain tumors and their potential association with outcomes is poorly understood. In this study, we investigated the spatial distribution of T cells in human gliomas on microscopic images obtained after immunostaining the CD3 protein (T cell marker) on tumor tissue sections. First, recurrent, distinct, infiltration patterns of CD3 positive (CD3+) T cells were manually annotated by an expert pathologist. To predict these patterns, we implemented a two-step strategy. In the first step, we aimed to distinguish microscopic images with or without CD3\u0026thinsp;+\u0026thinsp;T cells using two input types. A 2D convolutional neural network (CNN) was trained on density maps derived from CD3\u0026thinsp;+\u0026thinsp;segmentation, while an XGBoost model was applied to features extracted by a VGG16-pretrained network. Both models performed well, achieving accuracy greater than 0.8. In the second step, we analyzed spatial patterns of lymphocyte aggregation on image patches. The lymphocyte presence and their aggregation types were further classified into two classes (T cell aggregation close to blood vessels versus diffuse infiltration of tumor tissue) with a final combined global accuracy of 0.81. These results demonstrate that the proposed novel approach allows for automated classification of tumor samples according to spatial patterns of T cell infiltration. This will enable future investigations of biological mechanisms underlying distinct immune responses and their potential association with outcomes.\u003c/p\u003e","manuscriptTitle":"Classification of spatial patterns of lymphocyte infiltration in gliomas from whole slide imaging","msid":"","msnumber":"","nonDraftVersions":[{"code":1,"date":"2025-10-15 02:36:43","doi":"10.21203/rs.3.rs-7631009/v1","editorialEvents":[{"type":"communityComments","content":0},{"type":"decision","content":"Revision requested","date":"2025-12-21T17:20:27+00:00","index":"","fulltext":""},{"type":"editorInvitedReview","content":"","date":"2025-12-10T10:04:07+00:00","index":"hide","fulltext":""},{"type":"reviewerAgreed","content":"338859275039611224489545463176072949938","date":"2025-12-08T10:43:23+00:00","index":"hide","fulltext":""},{"type":"reviewerAgreed","content":"94083841249387712537812330064277357960","date":"2025-12-06T01:57:24+00:00","index":"hide","fulltext":""},{"type":"editorInvitedReview","content":"","date":"2025-11-27T21:20:18+00:00","index":"hide","fulltext":""},{"type":"reviewerAgreed","content":"243761529869869218804946138154637704862","date":"2025-11-21T15:16:21+00:00","index":"hide","fulltext":""},{"type":"reviewerAgreed","content":"319137579491206691695808744597377493984","date":"2025-10-04T15:06:37+00:00","index":"hide","fulltext":""},{"type":"reviewersInvited","content":"","date":"2025-09-30T17:44:59+00:00","index":"","fulltext":""},{"type":"editorAssigned","content":"","date":"2025-09-25T15:24:15+00:00","index":"","fulltext":""},{"type":"editorInvited","content":"","date":"2025-09-25T13:40:14+00:00","index":"","fulltext":""},{"type":"checksComplete","content":"","date":"2025-09-25T00:25:44+00:00","index":"","fulltext":""},{"type":"submitted","content":"BMC Biomedical Engineering","date":"2025-09-25T00:22:52+00:00","index":"","fulltext":""}],"status":"published","journal":{"display":true,"email":"
[email protected]","identity":"bmc-biomedical-engineering","isNatureJournal":false,"hasQc":true,"allowDirectSubmit":false,"externalIdentity":"bbme","sideBox":"Learn more about [BMC Biomedical Engineering](http://bmcbiomedeng.biomedcentral.com)","snPcode":"","submissionUrl":"https://www.editorialmanager.com/bbme/default.aspx","title":"BMC Biomedical Engineering","twitterHandle":"BMC_series","acdcEnabled":true,"dfaEnabled":false,"editorialSystem":"em","reportingPortfolio":"BMC Series","inReviewEnabled":true,"inReviewRevisionsEnabled":true}}],"origin":"","ownerIdentity":"215cd19c-7144-4bae-903a-d0b9fbb581f8","owner":[],"postedDate":"October 15th, 2025","published":true,"recentEditorialEvents":[],"rejectedJournal":[],"revision":"","amendment":"","status":"in-revision","subjectAreas":[],"tags":[],"updatedAt":"2026-05-04T07:40:32+00:00","versionOfRecord":[],"versionCreatedAt":"2025-10-15 02:36:43","video":"","vorDoi":"","vorDoiUrl":"","workflowStages":[]},"version":"v1","identity":"rs-7631009","journalConfig":"researchsquare"},"__N_SSP":true},"page":"/article/[identity]/[[...version]]","query":{"redirect":"/article/rs-7631009","identity":"rs-7631009","version":["v1"]},"buildId":"8U1c8b4HqxoKbykW_rLl7","isFallback":false,"isExperimentalCompile":false,"dynamicIds":[84888],"gssp":true,"scriptLoader":[]}
Text is read by the "Ask this paper" AI Q&A widget below.
Extraction quality varies by source — PMC NXML preserves structure
cleanly, OA-HTML may include some navigation residue, and OA-PDF can
have broken hyphenation. The publisher copy
(via DOI)
is the canonical version.