Contribution of whole slide imaging‐based deep learning in the assessment of intraoperative and postoperative sections in neuropathology
INTRODUCTION There were over 308,102 new cases of central nervous system (CNS) tumors diagnosed and approximately 251,329 cancer‐related deaths in 2020 worldwide . Oligodendroglioma and low‐grade astrocytoma are the most common pathological types of CNS tumors known as the low‐grade gliomas . CNS germ cell tumor is the third most common CNS tumor diagnosed primarily during childhood and adolescence  with intracranial germinoma (IG) as its most common histological subtype . Although IG, oligodendroglioma, and low‐grade astrocytoma all belong to the CNS tumor category and have similar cellular morphology, their therapeutic schemes and prognoses vary greatly. IG is highly radiosensitive, and whole‐brain radiotherapy with a boost to the tumor gross targeted volume (GTV) is regarded as the standard treatment . In contrast, the maximum scope of surgical resection is recommended for oligodendroglioma and astrocytoma, with postoperative radiotherapy or/and chemotherapy prescribed based on the type and grade of the tumor . Patients with IG show good prognoses, with a 5‐year overall survival (OS) rate of more than 90% , while 5‐year OS rates of astrocytoma and oligodendroglioma range from 48% to 66% . Misdiagnosis leads to unnecessary resection of IG that may break the balance between different neurological functions and the extent of craniocerebral resection, as well as insufficient removal of astrocytoma or oligodendroglioma that may increase the risk of recurrence . The accurate diagnosis of IG, oligodendroglioma, and astrocytoma is of great importance and has been mainly based on three types of examinations: intraoperative frozen section (IFS) examination, hematoxylin–eosin (HE) staining‐based tumor section examination, and molecular testing. Molecular testing identifies the immunohistochemical (IHC) expression of specific proteins and gene mutation status  for diagnosis, such as the positive expression of CD117 and placental alkaline phosphatase (PLAP) representing IG , the presence of both the isocitrate dehydrogenase (IDH) mutation and the 1p/19q codeletion indicating highly potential diagnosed oligodendroglioma , and the IDH1/2 gene and the expressions of glial fibrillary acidic protein (GFAP)  and Olig2  being closely correlated with astrocytoma. A biopsy specimen with pathological molecular testing is considered the gold‐standard diagnosis method for IG, oligodendroglioma, and astrocytoma. However, molecular testing is complex and time‐consuming (taking more than 1 week), thus unavailable for diagnosis during operations or soon after biopsies. Clinically, pathological examinations based on IFS and HE‐staining sections are preferable diagnosis methods. IFS is available for diagnosis within a few minutes during operations, which directly influences neurosurgeons' decision‐making. HE‐staining sections, which show better diagnostic value than IFS with clearer cellular structures, can be prepared within approximately 24 h after the biopsy, thus determining postoperative treatment regimens. Therefore, the intraoperative and postoperative treatments of IG, oligodendroglioma, and astrocytoma mainly depend on the pathological diagnosis of the IFS and HE‐staining section. However, even experienced pathologists cannot accurately distinguish the morphological features of IG, oligodendroglioma, and low‐grade astrocytoma based on microscopic examinations of the IFS and HE‐staining sections due to their cellular similarity. Emerging whole‐slide imaging (WSI) technology largely promotes the development of digital pathology, making the pathological diagnosis more accurate, speedy, flexible, and convenient . Deep learning (DL) is a computational analysis technique that can identify the features of WSI for tumor diagnosis and prognosis prediction, such as classifying non‐small cell lung cancer subtypes , grading the Gleason score in prostate cancer , predicting the microsatellite and treatment outcome of colorectal cancer , evaluating the survival rate of soft tissue sarcoma , and exploring the origin of unknown cancer . In terms of brain tumors, Jin et al. built an automatic analysis platform for the diagnosis of five types of CNS diffuse gliomas, achieving patient level accuracy of 87.5% . Zadeh et al. developed a DL model for the segmentation of WSIs and identified novel tumor cell‐perivascular niche interactions that are associated with poor survival in glioblastoma . Barker et al. used representative tiles in WSIs to automatically classify glioblastoma multiforme and lower‐grade gliomas with an accuracy of 93.1% . Other research also utilized DL to grade gliomas, classify glioma subtypes, and predict prognosis and IDH mutation status for patients with lower‐grade gliomas based on WSIs . These studies demonstrate that WSI‐based DL models are able to identify digital histopathological features that are difficult for pathologists to pinpoint. In the present study, we propose an automatic DL‐based pipeline for the pathological diagnosis of IG, oligodendroglioma, and low‐grade astrocytoma based on IFS WSI and HE‐staining section WSI. We also investigated the correlation between the DL models' output probability of diagnosis and the IHC expression of proteins. Furthermore, the diagnostic ability of DL models was compared with pathologists', and the impact of artificial intelligence (AI) assistance on the pathologists' diagnoses was evaluated.   MATERIALS AND METHODS 2.1 Patient cohort This study retrospectively collected patients with CNS tumors from Xiangya Hospital of Central South University (Center 1) between 2010 and 2019, the Second Xiangya Hospital of Central South University (Center 2) between 2007 and 2021, the Third Xiangya Hospital of Central South University (Center 3) between 2010 and 2022, and the public the cancer genome atlas‐lower grade glioma (TCGA‐LGG) cohort . The data were approved by the institutional review boards of the three centers with waived signed informed consent. Inclusions were as follows: (1) Patients were confirmed as having CNS IG, oligodendroglioma, or low‐grade astrocytoma by the histological and molecular testing according to the WHO 2016 classification of CNS tumors for molecular pathological diagnosis  (details are in Supplementary Text and Table ); (2) had available IFS or HE slides that could be scanned to produce WSIs. Exclusions were as follows: (1) Patients were diagnosed as having a mixture of more than one tumor type. (2) The images of IFSs and HE‐staining sections were faded, damaged, or presented unclear tissue structure. All eligible IG patients were included in our study, and oligodendroglioma and astrocytoma patients within the same age range as IG patients (ranged: 6–35 years) were enrolled in analyses in order to avoid possible age‐related discrepancies. The representative slides of IFSs and HE‐staining sections were multilayer scanned at a high‐resolution of 0.25 μm/pixel (40× magnification) on a Pannoramic MIDI slide scanner (3DHISTECH Ltd, Budapest, Hungary), which produced WSI data for our analyses (Figure .I). In addition, we collected pathological tiles from the public data set NCT‐CRC‐HE‐100 K‐NONORM , which contains eight types of tissue tiles and background tiles at 0.5 μm/pixel, for training the subsequent DL‐based tissue tile selection model. 2.2 Image preprocessing As shown in Figure .II, a three‐step image preprocessing method was used to convert the original WSIs into small tiles. First, the original WSIs were converted from red, green, and blue (RGB) to gray, and a threshold of 220 was used to segment tissue regions on the gray WSIs . Secondl the tissue regions were subdivided into non‐overlapping 224 × 224 tiles at a resolution of 0.5 μm/pixel (20× magnification). The tiles with less than 50% tissue were removed from analysis . After these two steps, approximately 10,000,000 tiles were generated at all centers, among which there still existed many background tiles, that is, tiles that did not show clear cellular structure, such as blotchy tiles, dark tiles, and fuzzy tiles (Figure ). Lastly, we established a DL‐based tissue tile selection model to further select the qualified tissue tiles, that is, the tissue tiles with a clear cellular structure, and remove background tiles. The model was established using 27,144 tiles, including 11,578 tiles from Center 1 (10,350 qualified tissue tiles and 1228 background tiles) that were picked manually by pathologists and 15,566 public tiles (5000 qualified tissue tiles and 10,566 background tiles) . All tiles were randomly allocated into the training set (19,931 tiles, 73%) and the validation set (7213 tiles, 27%) to train a pretrained ResNet152 network and evaluate the tissue tile selection performance. The trained model was used to determine which tiles of our dataset were qualified for subsequent model development. 2.3 Model development and validation To develop DL‐based diagnosis models, all patients at Center 1 were allocated into the training, testing, and internal validation sets at a ratio of 3:1:1 (HE: n = 130:43:43; IFS: n = 98:33:33), while patients at the other centers and TCGA‐LGG were set as the external validation set. The training set was used to optimize the hyperparameters with data augmentation applied to the samples. The testing set without applying data augmentation was used to select the models showing the best performance. The internal and external validation sets were used to validate the models' diagnostic ability. The tumor type of one patient was propagated to all his/her tiles as the training label, and tiles in the training set were sent to a pretrained ResNet152 network to execute the tile‐level classification task (Figure .III). We trained two independent models: one for the IFS‐based diagnosis task (IFS model), another for the HE‐based diagnosis task (HE model). After model development, the majority voting method was used to transfer the tile‐level classification results into the patient‐level diagnosis results . For each patient, the tumor type that was predicted by the majority of the tiles was the final diagnosis result. The performance of DL models was evaluated using the accuracy of each tumor type and the total accuracy. To intuitively illustrate the tile‐level classification results and the patient‐level diagnosis results, we generated diagnostic probability maps by fusing the output probabilities of the DL models with the original WSIs (Figure .IV). The output probabilities of IG, oligodendroglioma, and astrocytoma of each tile were set as the values of the green (G), blue (B), red (R) channels, respectively. The more the color of one tile approaches a primary color, the higher the probability it is to be one of the pathological types according to this key: green = IG; blue = oligodendroglioma; red = astrocytoma. The WSI at 4 μm/pixel (2.5× magnification) was converted to grayscale images, and the RGB value of each tile was added to the corresponding region of the grayscale image to generate a diagnostic probability map, with the fusion weights of RGB value and grayscale value of 0.55 and 0.45, respectively. 2.4 AI ‐assisted diagnosis We compared the diagnostic ability of DL models with pathologists and evaluated whether our models can assist pathologists with diagnosis (Figure .V). The HE (43 patients) and IFS (33 patients) WSIs in the internal validation set were reviewed by three board‐certified pathologists with 6, 15, and 25 years of experience (junior, deputy senior, and senior) with and without AI assistance. All WSIs were anonymized to ensure that pathologists were blinded to patients' clinical information. The pathologists reviewed WSIs on CaseViewer Version 2.4.0 (3DHISTECH Ltd, Budapest, Hungary) at any magnification they preferred. Pathologists were instructed to choose one of the three tumors as the diagnostic result, in order to ensure that DL models and pathologists faced the same diagnostic challenges. With AI assistance, pathologists were additionally provided the diagnostic results of the DL models and the corresponding diagnostic probability maps showing the distributions of the output probabilities on the original WSIs with a manual to explain their meanings. 2.5 Prediction of the expression of Ki‐67 protein The IHC expression of Ki‐67 protein is highly correlated with tumor cell proliferation and has been considered a potential prognostic factor for patients with CNS tumors . We investigated whether the pathologists' diagnoses (without AI assistance) and the diagnostic probabilities of the DL models had an association with the expression of Ki‐67 protein. We employed a multivariate linear model, as shown in Equation , to predict the Ki‐67 positive cell areas of patients in the internal validation sets. (1) Y = β 0 + β 1 X 1 + β 2 X 2 + β 3 X 3 The response variable ( Y ) is the patient‐level Ki‐67 positive cell area. The ground truth of the Ki‐67 positive cell area was counted by a pathologist with 30 years of experience. For DL models, the predictor variables ( X 1 , X 2 , X 3 ) are the patient‐level diagnostic probabilities for IG, oligodendroglioma, and astrocytoma, respectively, which are the average of the output probabilities of all the tiles with the correct diagnosis for each patient. The regression coefficients ( β 0 , β 1 , β 2 , β 3 ) are fitted by the linear model. For pathologists, the predictor variable ( X 1 ) is the tumor type they classified for each patient; β 0 and β 1 are regression coefficients while β 2 and β 3 in Equation  are equal to zero. The ordinary least‐squares method was used to minimize the sum of the residuals of points from the fitted curve, with the coefficient of determination ( R 2 ) as a metric to evaluate the goodness of fit. The analyses were performed using the Python package “statsmodels”. 2.6 Model implementation The DL models were trained using Pytorch 1.9.0 on an Intel(R) Xeon(R) Silver 4210 CPU @ 2.20 GHz CPU and two NVIDIA GeForce RTX 2080 Ti GPUs (CUDA version: 10.2). To enrich the diversity of tiles and avoid overfitting, data augmentation was applied to all DL models, including (1) random rotation within a range of −15 degrees to 15 degrees; (2) random horizontal flip; and (3) color jitter: brightness factor, contrast factor, and saturation factor varied uniformly from 0.5 to 1.5. Color jitter can enlarge the variations of the tile color so that the models can adapt to the differences of pathological staining. For the tissue tile selection model, the training hyperparameters were as follows: (1) batch size: 64; (2) learning rate: 1 × 10 −3 ; (3) optimizer: stochastic gradient descent (SGD) with a momentum of 0.9; (4) epoch: 100. The loss function used was cross entropy. For the IFS and HE diagnosis models, the training hyperparameters were as follows: (1) batch size: 128; (2) learning rate: 1 × 10 −4 ; (3) optimizer: Adaptive Moment Estimation (Adam) with betas of [0.9, 0.999] and the weight decay of 10 −3 ; (4) epoch: 10. The loss function used was cross entropy. In addition, we have investigated the influence of the selection of different parameters, such as pixel sizes, loss functions, color jitter, and color normalization, on the classification performance of our models. Details are in Supplementary Text and Table .   Patient cohort This study retrospectively collected patients with CNS tumors from Xiangya Hospital of Central South University (Center 1) between 2010 and 2019, the Second Xiangya Hospital of Central South University (Center 2) between 2007 and 2021, the Third Xiangya Hospital of Central South University (Center 3) between 2010 and 2022, and the public the cancer genome atlas‐lower grade glioma (TCGA‐LGG) cohort . The data were approved by the institutional review boards of the three centers with waived signed informed consent. Inclusions were as follows: (1) Patients were confirmed as having CNS IG, oligodendroglioma, or low‐grade astrocytoma by the histological and molecular testing according to the WHO 2016 classification of CNS tumors for molecular pathological diagnosis  (details are in Supplementary Text and Table ); (2) had available IFS or HE slides that could be scanned to produce WSIs. Exclusions were as follows: (1) Patients were diagnosed as having a mixture of more than one tumor type. (2) The images of IFSs and HE‐staining sections were faded, damaged, or presented unclear tissue structure. All eligible IG patients were included in our study, and oligodendroglioma and astrocytoma patients within the same age range as IG patients (ranged: 6–35 years) were enrolled in analyses in order to avoid possible age‐related discrepancies. The representative slides of IFSs and HE‐staining sections were multilayer scanned at a high‐resolution of 0.25 μm/pixel (40× magnification) on a Pannoramic MIDI slide scanner (3DHISTECH Ltd, Budapest, Hungary), which produced WSI data for our analyses (Figure .I). In addition, we collected pathological tiles from the public data set NCT‐CRC‐HE‐100 K‐NONORM , which contains eight types of tissue tiles and background tiles at 0.5 μm/pixel, for training the subsequent DL‐based tissue tile selection model.   Image preprocessing As shown in Figure .II, a three‐step image preprocessing method was used to convert the original WSIs into small tiles. First, the original WSIs were converted from red, green, and blue (RGB) to gray, and a threshold of 220 was used to segment tissue regions on the gray WSIs . Secondl the tissue regions were subdivided into non‐overlapping 224 × 224 tiles at a resolution of 0.5 μm/pixel (20× magnification). The tiles with less than 50% tissue were removed from analysis . After these two steps, approximately 10,000,000 tiles were generated at all centers, among which there still existed many background tiles, that is, tiles that did not show clear cellular structure, such as blotchy tiles, dark tiles, and fuzzy tiles (Figure ). Lastly, we established a DL‐based tissue tile selection model to further select the qualified tissue tiles, that is, the tissue tiles with a clear cellular structure, and remove background tiles. The model was established using 27,144 tiles, including 11,578 tiles from Center 1 (10,350 qualified tissue tiles and 1228 background tiles) that were picked manually by pathologists and 15,566 public tiles (5000 qualified tissue tiles and 10,566 background tiles) . All tiles were randomly allocated into the training set (19,931 tiles, 73%) and the validation set (7213 tiles, 27%) to train a pretrained ResNet152 network and evaluate the tissue tile selection performance. The trained model was used to determine which tiles of our dataset were qualified for subsequent model development.   Model development and validation To develop DL‐based diagnosis models, all patients at Center 1 were allocated into the training, testing, and internal validation sets at a ratio of 3:1:1 (HE: n = 130:43:43; IFS: n = 98:33:33), while patients at the other centers and TCGA‐LGG were set as the external validation set. The training set was used to optimize the hyperparameters with data augmentation applied to the samples. The testing set without applying data augmentation was used to select the models showing the best performance. The internal and external validation sets were used to validate the models' diagnostic ability. The tumor type of one patient was propagated to all his/her tiles as the training label, and tiles in the training set were sent to a pretrained ResNet152 network to execute the tile‐level classification task (Figure .III). We trained two independent models: one for the IFS‐based diagnosis task (IFS model), another for the HE‐based diagnosis task (HE model). After model development, the majority voting method was used to transfer the tile‐level classification results into the patient‐level diagnosis results . For each patient, the tumor type that was predicted by the majority of the tiles was the final diagnosis result. The performance of DL models was evaluated using the accuracy of each tumor type and the total accuracy. To intuitively illustrate the tile‐level classification results and the patient‐level diagnosis results, we generated diagnostic probability maps by fusing the output probabilities of the DL models with the original WSIs (Figure .IV). The output probabilities of IG, oligodendroglioma, and astrocytoma of each tile were set as the values of the green (G), blue (B), red (R) channels, respectively. The more the color of one tile approaches a primary color, the higher the probability it is to be one of the pathological types according to this key: green = IG; blue = oligodendroglioma; red = astrocytoma. The WSI at 4 μm/pixel (2.5× magnification) was converted to grayscale images, and the RGB value of each tile was added to the corresponding region of the grayscale image to generate a diagnostic probability map, with the fusion weights of RGB value and grayscale value of 0.55 and 0.45, respectively.   AI ‐assisted diagnosis We compared the diagnostic ability of DL models with pathologists and evaluated whether our models can assist pathologists with diagnosis (Figure .V). The HE (43 patients) and IFS (33 patients) WSIs in the internal validation set were reviewed by three board‐certified pathologists with 6, 15, and 25 years of experience (junior, deputy senior, and senior) with and without AI assistance. All WSIs were anonymized to ensure that pathologists were blinded to patients' clinical information. The pathologists reviewed WSIs on CaseViewer Version 2.4.0 (3DHISTECH Ltd, Budapest, Hungary) at any magnification they preferred. Pathologists were instructed to choose one of the three tumors as the diagnostic result, in order to ensure that DL models and pathologists faced the same diagnostic challenges. With AI assistance, pathologists were additionally provided the diagnostic results of the DL models and the corresponding diagnostic probability maps showing the distributions of the output probabilities on the original WSIs with a manual to explain their meanings.   Prediction of the expression of Ki‐67 protein The IHC expression of Ki‐67 protein is highly correlated with tumor cell proliferation and has been considered a potential prognostic factor for patients with CNS tumors . We investigated whether the pathologists' diagnoses (without AI assistance) and the diagnostic probabilities of the DL models had an association with the expression of Ki‐67 protein. We employed a multivariate linear model, as shown in Equation , to predict the Ki‐67 positive cell areas of patients in the internal validation sets. (1) Y = β 0 + β 1 X 1 + β 2 X 2 + β 3 X 3 The response variable ( Y ) is the patient‐level Ki‐67 positive cell area. The ground truth of the Ki‐67 positive cell area was counted by a pathologist with 30 years of experience. For DL models, the predictor variables ( X 1 , X 2 , X 3 ) are the patient‐level diagnostic probabilities for IG, oligodendroglioma, and astrocytoma, respectively, which are the average of the output probabilities of all the tiles with the correct diagnosis for each patient. The regression coefficients ( β 0 , β 1 , β 2 , β 3 ) are fitted by the linear model. For pathologists, the predictor variable ( X 1 ) is the tumor type they classified for each patient; β 0 and β 1 are regression coefficients while β 2 and β 3 in Equation  are equal to zero. The ordinary least‐squares method was used to minimize the sum of the residuals of points from the fitted curve, with the coefficient of determination ( R 2 ) as a metric to evaluate the goodness of fit. The analyses were performed using the Python package “statsmodels”.   Model implementation The DL models were trained using Pytorch 1.9.0 on an Intel(R) Xeon(R) Silver 4210 CPU @ 2.20 GHz CPU and two NVIDIA GeForce RTX 2080 Ti GPUs (CUDA version: 10.2). To enrich the diversity of tiles and avoid overfitting, data augmentation was applied to all DL models, including (1) random rotation within a range of −15 degrees to 15 degrees; (2) random horizontal flip; and (3) color jitter: brightness factor, contrast factor, and saturation factor varied uniformly from 0.5 to 1.5. Color jitter can enlarge the variations of the tile color so that the models can adapt to the differences of pathological staining. For the tissue tile selection model, the training hyperparameters were as follows: (1) batch size: 64; (2) learning rate: 1 × 10 −3 ; (3) optimizer: stochastic gradient descent (SGD) with a momentum of 0.9; (4) epoch: 100. The loss function used was cross entropy. For the IFS and HE diagnosis models, the training hyperparameters were as follows: (1) batch size: 128; (2) learning rate: 1 × 10 −4 ; (3) optimizer: Adaptive Moment Estimation (Adam) with betas of [0.9, 0.999] and the weight decay of 10 −3 ; (4) epoch: 10. The loss function used was cross entropy. In addition, we have investigated the influence of the selection of different parameters, such as pixel sizes, loss functions, color jitter, and color normalization, on the classification performance of our models. Details are in Supplementary Text and Table .   RESULTS 3.1 Patient cohort and selected tiles A total of 216 patients with three tumor types were enrolled at Center 1 (571 HE WSIs of 216 patients and 322 IFS WSIs of 164 patients). A total of 41 patients with three tumor types were enrolled at Center 2 (146 HE WSIs of 41 patients). A total of 12 patients with IG were collected from Center 3 (20 IFS WSIs of 12 patients). A total of 110 patients with oligodendroglioma and astrocytoma were collected from TCGA, providing 115 HE WSIs of 89 patients and 158 IFS WSIs of 110 patients. The external validation set for HE models was composed of 146 HE WSIs from Center 2 and 115 HE WSIs from TCGA, while that of the IFS model was composed of 20 IFS WSIs from Center 3 and 158 IFS WSIs from TCGA (Table ). Table shows the characteristics and molecular testing results of all enrolled data. The validation accuracy of the tile selection model was 99.51%, and the number of tiles in the internal validation set selected by this model are illustrated in Table . 3.2 Model performance The internal accuracies of the IFS model and HE model were 93.9% and 95.3%, respectively. The external validation accuracy of the IFS model and the HE model were 82.0% and 76.9%, respectively (Table ). Figure illustrates the confusion matrices showing the diagnostic performance of the IFS and HE models. The IFS models distinguished IG cases from glioma cases (oligodendroglioma and astrocytoma) with accuracies of 100.0% and 99.2% in the internal and external validation sets, respectively. The HE model correctly identified 100.0% and 95.8% of IG and astrocytoma cases in the internal validation set, respectively, but its performance decreased in the external validation set (accuracy: 80.0% and 78.6%). Both IFS and HE diagnosis accuracies for oligodendroglioma in the internal validation set (100.0% and 83.3%) largely decreased in the external validation set (56.5% and 72.2%). 3.3 AI ‐assisted diagnosis Table shows the improvement of the IFS‐based and HE‐based diagnosis accuracy of three pathologists with and without AI assistance. For the IFS‐based diagnosis, our IFS‐based models significantly improved the total diagnostic performance of the pathologists from 54.6%–69.7% to 87.9%–93.9%. With AI assistance, all pathologists accurately diagnosed all IG cases with an accuracy of 100.0%, while the accuracy without AI assistance ranged from 9.1% to 90.9%. The pathologists were not able to diagnose any oligodendroglioma cases without AI assistance but could correctly diagnose 20.0%–60.0% oligodendroglioma cases with AI assistance. For the HE‐based diagnosis, the HE‐based total diagnostic accuracies of the junior, deputy senior, and senior pathologists were 53.5%, 83.7%, and 83.7%, respectively, without AI assistance. These were improved to 88.4%, 86.0%, and 90.7%, respectively, with AI assistance. The junior pathologist's diagnostic capability for all three tumors showed significant improvements. The deputy senior and senior pathologists' diagnosis accuracy for oligodendroglioma improved from 16.7% to 66.7% and 33.3% to 83.3%, respectively. The senior pathologist achieved 100.0% accuracy for IG with and without AI assistance, but he expressed much more confidence in his diagnostic result with AI assistance. Figure shows the chord diagrams showing the corrective effect of AI assistance for the three pathologists. The gray band indicates the pathologists' true diagnoses both without and with AI‐assistance (e.g., 22 cases in Figure .III); the purple band indicates that the pathologists corrected their diagnoses from the false group to the true group with AI assistance (e.g., eight cases in Figure .III); the orange band indicates the pathologists' misdiagnosed both without and with AI assistance (e.g., two cases in Figure .III); the red band indicates that the pathologists were misled by AI‐assistance, changing the diagnoses from true to false (e.g., one case in Figure .III). The wider purple band indicates the better efficacy of AI assistance; the narrower red band indicates a lower likelihood to be misguided by DL models. Our models corrected most of the misdiagnosed cases for the three pathologists (57.1%–80.0%), with only a few cases' diagnoses being misled by AI assistance (2.8%–8.3%). All pathologists stated they are willing to use our models to assist with both IFS‐based and HE‐based diagnosis in the future. 3.4 Prediction of the expression of Ki‐67 protein The output probabilities of the IFS and HE models were predictive of Ki‐67 positive cell areas with R 2 of 0.81 and 0.86 ( p < 0.01), respectively. Three pathologists only showed limited predictive power of Ki‐67 positive cell areas, with R 2 of 0.12–0.49 and 0.09–0.68 for IFS‐ and HE‐based diagnosis, respectively. Figure shows the prediction of Ki‐67 positive cell areas based on the IFS and HE‐staining sections.   Patient cohort and selected tiles A total of 216 patients with three tumor types were enrolled at Center 1 (571 HE WSIs of 216 patients and 322 IFS WSIs of 164 patients). A total of 41 patients with three tumor types were enrolled at Center 2 (146 HE WSIs of 41 patients). A total of 12 patients with IG were collected from Center 3 (20 IFS WSIs of 12 patients). A total of 110 patients with oligodendroglioma and astrocytoma were collected from TCGA, providing 115 HE WSIs of 89 patients and 158 IFS WSIs of 110 patients. The external validation set for HE models was composed of 146 HE WSIs from Center 2 and 115 HE WSIs from TCGA, while that of the IFS model was composed of 20 IFS WSIs from Center 3 and 158 IFS WSIs from TCGA (Table ). Table shows the characteristics and molecular testing results of all enrolled data. The validation accuracy of the tile selection model was 99.51%, and the number of tiles in the internal validation set selected by this model are illustrated in Table .   Model performance The internal accuracies of the IFS model and HE model were 93.9% and 95.3%, respectively. The external validation accuracy of the IFS model and the HE model were 82.0% and 76.9%, respectively (Table ). Figure illustrates the confusion matrices showing the diagnostic performance of the IFS and HE models. The IFS models distinguished IG cases from glioma cases (oligodendroglioma and astrocytoma) with accuracies of 100.0% and 99.2% in the internal and external validation sets, respectively. The HE model correctly identified 100.0% and 95.8% of IG and astrocytoma cases in the internal validation set, respectively, but its performance decreased in the external validation set (accuracy: 80.0% and 78.6%). Both IFS and HE diagnosis accuracies for oligodendroglioma in the internal validation set (100.0% and 83.3%) largely decreased in the external validation set (56.5% and 72.2%).   AI ‐assisted diagnosis Table shows the improvement of the IFS‐based and HE‐based diagnosis accuracy of three pathologists with and without AI assistance. For the IFS‐based diagnosis, our IFS‐based models significantly improved the total diagnostic performance of the pathologists from 54.6%–69.7% to 87.9%–93.9%. With AI assistance, all pathologists accurately diagnosed all IG cases with an accuracy of 100.0%, while the accuracy without AI assistance ranged from 9.1% to 90.9%. The pathologists were not able to diagnose any oligodendroglioma cases without AI assistance but could correctly diagnose 20.0%–60.0% oligodendroglioma cases with AI assistance. For the HE‐based diagnosis, the HE‐based total diagnostic accuracies of the junior, deputy senior, and senior pathologists were 53.5%, 83.7%, and 83.7%, respectively, without AI assistance. These were improved to 88.4%, 86.0%, and 90.7%, respectively, with AI assistance. The junior pathologist's diagnostic capability for all three tumors showed significant improvements. The deputy senior and senior pathologists' diagnosis accuracy for oligodendroglioma improved from 16.7% to 66.7% and 33.3% to 83.3%, respectively. The senior pathologist achieved 100.0% accuracy for IG with and without AI assistance, but he expressed much more confidence in his diagnostic result with AI assistance. Figure shows the chord diagrams showing the corrective effect of AI assistance for the three pathologists. The gray band indicates the pathologists' true diagnoses both without and with AI‐assistance (e.g., 22 cases in Figure .III); the purple band indicates that the pathologists corrected their diagnoses from the false group to the true group with AI assistance (e.g., eight cases in Figure .III); the orange band indicates the pathologists' misdiagnosed both without and with AI assistance (e.g., two cases in Figure .III); the red band indicates that the pathologists were misled by AI‐assistance, changing the diagnoses from true to false (e.g., one case in Figure .III). The wider purple band indicates the better efficacy of AI assistance; the narrower red band indicates a lower likelihood to be misguided by DL models. Our models corrected most of the misdiagnosed cases for the three pathologists (57.1%–80.0%), with only a few cases' diagnoses being misled by AI assistance (2.8%–8.3%). All pathologists stated they are willing to use our models to assist with both IFS‐based and HE‐based diagnosis in the future.   Prediction of the expression of Ki‐67 protein The output probabilities of the IFS and HE models were predictive of Ki‐67 positive cell areas with R 2 of 0.81 and 0.86 ( p < 0.01), respectively. Three pathologists only showed limited predictive power of Ki‐67 positive cell areas, with R 2 of 0.12–0.49 and 0.09–0.68 for IFS‐ and HE‐based diagnosis, respectively. Figure shows the prediction of Ki‐67 positive cell areas based on the IFS and HE‐staining sections.   DISCUSSION The pathological diagnosis of IG, oligodendroglioma, and astrocytoma directly determines patients' treatment options, but even experienced pathologists cannot give accurate diagnoses based on microscopic examinations of IFS and HE‐staining section (the pathologists in our study had an accuracy of 54.6%–69.7% and 53.5%–83.7%) due to the similarity of their cellular morphology. This greatly limits the planning of the optimal treatment regimens in clinical practice. Therefore, this study proposed a DL‐based automatic pipeline for the pathological diagnosis of IG, oligodendroglioma, and astrocytoma based on the IFS and HE WSIs. Both the IFS model and the HE model can accurately differentiate the three types of intracranial tumors. In addition, our models can further predict the expression of the Ki‐67 protein. We demonstrated that our models not only could diagnose the three tumors but also could reveal insights into the tumor cell proliferation and prognosis. Furthermore, we investigated the effectiveness of AI assistance for pathologists. Results showed that our models can correct many misdiagnosed cases and improve the diagnostic accuracy of pathologists, especially for IFS‐based diagnosis, by providing detailed diagnosis results on diagnostic probability maps. The diagnostic probability map generated by our model can visually and intuitively provide the diagnostic result of each small region on WSI and effectively locate the regions with high confidence for assisting pathologists in their diagnosis. Therefore, the DL models proposed in our study have the potential to be a useful tool for the pathological diagnosis of IG, oligodendroglioma, and astrocytoma. During operations, pathologists can only differentiate normal brain tissues from malignant areas on IFS and cannot immediately discriminate tumor types, which may lead to inappropriate treatment options. Our research revealed that pathologists' IFS‐based diagnosis accuracies of IG, oligodendroglioma, and astrocytoma was only 54.6%–69.7%. In terms of identifying IG cases, the accuracies of three pathologists were 9.1%, 54.6%, and 90.9%, the result of which may lead to the misdiagnosis and unnecessary resection of IG. Whole‐brain radiotherapy with a boost to the GTV is regarded as the standard treatment for IG . The radical resection of IG cannot offer more benefit than radio‐chemotherapy , and even increases the risk of intracranial tumor dissemination . Therefore, once IG was histologically confirmed intraoperatively on IFS, it's not recommended to continue the resection . Our IFS model can discriminate between IG and the glioma (oligodendroglioma and astrocytoma) with internal and external validation accuracies of 100.0% and 99.2%, and has improved the accuracy of IG from 9.1%–90.9% without AI assistance to 100.0% with AI assistance for all pathologists. The two misdiagnosed cases based on IFS WSIs occurred in the classification of astrocytoma and oligodendroglioma, which may be caused by atypical astrocytes. Although the same maximum of resection is recommended for the two tumors in the current guideline, it is meaningful to further intraoperatively differentiate these two tumors because of their different invasive abilities to the surrounding normal areas. Therefore, our IFS model can effectively assist neurosurgeons in selecting appropriate treatment options during operation for all three tumors. Early postoperative treatment regimens (chemotherapy and/or radiotherapy) are determined by the pathological diagnosis of the HE‐staining section, which can be prepared within approximately 24 h after the biopsy. However, we found that the accuracy of pathologists for the diagnosis of IG, oligodendroglioma, and astrocytoma based on HE WSIs ranged from 53.5% to 83.7%. Our HE model can automatically diagnose the three tumors with internal and external accuracies of 95.3% and 76.9%, respectively, and can assist pathologists with the diagnosis. The early and accurate pathological diagnosis allows clinicians to plan optimal postoperative treatments in time and thus may improve positive outcomes. We noticed that a big difference existed between the internal and external performance of the model. This may be caused by the different ways of resection and staining at different centers. Although color jitter was applied so that our models could adapt to the variations in the staining, the big differences existing in different centers may still influence the performance of our model. Besides, as automatic analyses were performed in our study and the WSIs were not manually segmented by pathologists, many causes may affect the prediction accuracy, such as angiogenesis, atypical astrocytes, tissue necrosis and deformation, and interstitial tissue. Detailed analyses of some typical errors in the representative WSIs of Center 2 are provided in Figure . Future studies will reduce or eliminate these error‐producing factors and further strengthen the differentiation of the three tumors in the external validation set. The generalization of the HE model should also be improved in the future, and a more advanced DL framework may be able to improve the generalization of DL models. The output probabilities of both the IFS and the HE models were predictive of Ki‐67 positive cell areas with R 2 > 0.8, which outperformed pathologists. Furthermore, we found that the output probabilities of the HE model showed similar distribution with the expression of some proteins. Figure shows the diagnostic probability map of the HE model for a representative HE WSI (astrocytoma) and its corresponding IHC WSIs of Ki‐67, P53, and GFAP proteins. The regions with a higher probability of being the true diagnoses (red) exhibit higher Ki‐67 and P53 expression and lower GFAP expression compared to other regions, which indicate higher cellular proliferating speed, a higher malignant degree, and a worse prognosis . This demonstrates that our model may be able to identify the morphological features of the tumor cells that are correlated with the expression of proteins. If tumor cells can be categorized into different subgroups with different expression of specific proteins on HE WSIs, it may contribute to the study of pathology‐based intra‐tumor heterogeneity and the design of an individualized treatment regimen in the future. This study has several limitations. First, our models showed limited power for distinguishing oligodendroglioma from astrocytoma (Figure ). Developing a specified binary model for classifying the two tumors may improve the classification performance. Second, our model did not further discriminate the WHO grades of oligodendroglioma and astrocytoma that are correlated with clinical treatment and prognosis. In future studies, we should enroll more tissue samples and further discriminate the WHO grades of oligodendroglioma and astrocytoma. Finally, among many relative proteins and genes, only the expression of the Ki‐67 protein was predicted using the output probabilities of the DL models due to the limitations of retrospective analysis. To increase the accuracy of the model, more molecular characteristics should be involved in future analyses. In summary, we proposed an DL‐based automatic pipeline for the pathological diagnosis of IG, oligodendroglioma, and astrocytoma using the IFS WSIs and HE WSIs. Results show that both the IFS and HE models performed well in differentiating the three tumors, and the output probabilities of the models were predictive of the expression of Ki‐67 protein. Besides, we evaluated the effectiveness of AI assistance on the pathologists and found that our models can improve both the IFS and HE‐based diagnostic performance of pathologists at various levels of experience. Our DL models have the potential to benefit the perioperative pathological diagnosis of IG, oligodendroglioma, and astrocytoma, by which clinicians could provide patients with more optimal and timely treatment options than they could without using computer assistance.   Di Jing and Xin Gao conceived of the presented idea and supervised the project. Di Jing, Lin Shen, Bowen Yuan, Liangfang Shen, and Zhenzhen Liu prepared the sample and collected the data. Junming Jian organized the data. Liting Shi designed the computational model and analyzed the data. Wei Xia, Jiayi Zhang, Rui Zhang, and Keqing Wu checked and validated the results. Ke‐Da Yang, Yifu Tian, and Jianghai Huang performed the pathological diagnosis with and without AI‐assistance. Liting Shi and Di Jing wrote the manuscript. All authors read and approved the final manuscript.   This study is supported by the National Nature Science Foundation of China (No. 81803582), Key Research and Development Program of Shandong Province (No. 2021SFGC0104), Key Research and Development Program of Jiangsu Province (No. BE2021663), Hunan Provincial Natural Science Foundation of China (No. 2020JJ4896), Jiangsu Province Engineering Research Center of Diagnosis and Treatment of Children's Malignant Tumor, and Suzhou Science and Technology Plan Project (No. SJC2021014).   The authors declare no potential conflicts of interest.   Data S1 Supporting Information Click here for additional data file. Figure S1. The representative background tiles, including blotchy tiles (i), dark tiles (ii), fuzzy tiles (iii), that need to be removed from analysis. Click here for additional data file. Figure S2. The typical correctly diagnosed regions (T) and the typical misdiagnosed regions (F) of the HE WSIs (A) and the diagnostic probability maps (B) of astrocytoma (1) and intracranial germinoma (2 and 3). The region (1‐F) is mainly composed of neovascularization (1‐C); the region (2‐T) is mainly composed of IG cells (2‐C); the region (2‐F) is mainly composed of fibrous tissues and cells of which are deformed (2‐D); the region (3‐F1) contains many interstitial tissues and only a small number of tumor cells (3‐C); most of the region (3‐F2) is the hemorrhagic area (3‐D). Click here for additional data file. Figure S3. The immunohistochemical (IHC) whole slide images (WSIs) and hematoxylin–eosin (HE) WSI‐based prediction of one representative patient diagnosed as astrocytoma. Click here for additional data file.   