Uncertainty-aware ensemble of foundation models differentiates glioblastoma from its mimics

Junhan Zhao, Shih‐Yen Lin, Raphaël Attias, Liza Mathews, Christian Engel, G Larghero, Dmytro Vremenko, Ting‐Wan Kao, Tsung-Hua Lee, Yutian Wang, Cheng Che Tsai, Eliana Marostica, Ying‐Chun Lo, David M. Meredith, Keith L. Ligon, Omar Arnaout, Thomas Roetzer-Pejrimovsky, Shih-Chieh Lin, Natalie Shih, Nipon Chaisuriya, David Cook, Jung-Hsien Chiang, Chia‐Jen Liu, Adelheid Wöehrer, Jeffrey A. Golden, MacLean P. Nasrallah, Kun‐Hsing YuNature Communications 2025 · DOI

Abstract

Accurate pathological diagnosis is crucial in guiding personalized treatments for patients with central nervous system cancers. Distinguishing glioblastoma and primary central nervous system lymphoma is particularly challenging due to their overlapping pathology features, despite the distinct treatments required. To address this challenge, we establish the Pathology Image Characterization Tool with Uncertainty-aware Rapid Evaluations (PICTURE) system using 2141 pathology slides collected worldwide. PICTURE employs Bayesian inference, deep ensemble, and normalizing flow to account for the uncertainties in its predictions and training set labels. PICTURE accurately diagnoses glioblastoma and primary central nervous system lymphoma with an area under the receiver operating characteristic curve (AUROC) of 0.989, with the results validated in five independent cohorts (AUROC = 0.924-0.996). In addition, PICTURE identifies samples belonging to 67 types of rare central nervous system cancers that are neither gliomas nor lymphomas. Our approaches provide a generalizable framework for differentiating pathological mimics and enable rapid diagnoses for central nervous system cancer patients.

Introduction

Pathologists frequently encounter a high-stakes "identity crisis" when examining central nervous system (CNS) tumors. Glioblastoma (GBM) and Primary Central Nervous System Lymphoma (PCNSL) are histological "mimics" that often appear remarkably similar under a microscope. However, their clinical management is diametrically opposed: GBM necessitates aggressive surgical resection, whereas PCNSL is primarily treated with radiotherapy and chemotherapy, and surgery can be detrimental.

Existing AI models in pathology often struggle with two primary issues: domain shift and the "pigeonhole effect." Domain shift occurs when models trained at one institution fail at another due to variations in slide preparation. The pigeonhole effect refers to the tendency of standard classifiers to force a diagnosis into one of the categories they were trained on, even when presented with a rare, unseen cancer type.

Overview of the PICTURE system workflow

Methodology

To overcome these challenges, we developed the Pathology Image Characterization Tool with Uncertainty-aware Rapid Evaluations (PICTURE). The architecture is built upon three innovative pillars:

  1. Foundation Model Ensemble: PICTURE extracts features using an ensemble of nine state-of-the-art foundation models (e.g., UNI, Virchow2, CTransPath). Pre-trained on millions of histology images, these models provide a robust and diverse feature set.
  2. Uncertainty-Aware Training: The system utilizes Bayesian inference and Deep Ensembles to quantify prediction confidence. By using prototypical images as anchors, it learns to prioritize high-confidence pathological signals over noisy or ambiguous tissue regions.
  3. Normalizing Flow for OOD Detection: An Out-of-Distribution Detection (OoDD) module learns the data distribution for GBM and PCNSL. If a sample falls outside this known space, the model flags it as "unknown," preventing misclassification of rare tumors.
Detailed architecture of the PICTURE system for uncertainty quantification

Datasets and Experimental Setup

The study utilized a large-scale dataset of 2,141 pathology slides collected globally. Primary training was conducted on formalin-fixed paraffin-embedded (FFPE) slides from the Mayo Clinic. Validation was performed across five independent cohorts: the University of Pennsylvania (UPenn), Brigham and Women’s Hospital (BWH), Medical University of Vienna, Taipei Veterans General Hospital (TVGH), and the TCGA consortium. Additionally, 874 slides representing 67 rare CNS tumor types were used to test OOD detection. The data included both permanent sections and intraoperative frozen sections, which are notoriously difficult to interpret.

Key Results and Insights

PICTURE achieved an AUROC of 0.989 for differentiating GBM from PCNSL, with performance remaining high (AUROC 0.924–0.996) across all validation sites. The OoDD module identified non-GBM/non-PCNSL samples with an AUROC of 0.919, significantly outperforming standard methods like Monte Carlo dropout.

Notably, in timed diagnostic tests, PICTURE maintained high accuracy where board-certified neuropathologists misclassified PCNSL as GBM in 38% of cases. This suggests that PICTURE could serve as a vital "safety net" during time-pressured surgeries. Furthermore, the entire computational pipeline processes a gigapixel whole-slide image in under one minute, making it viable for real-time intraoperative support.

Discussion and Conclusion

By explicitly modeling uncertainty, PICTURE mimics the expertise of a senior pathologist who recognizes when to seek a second opinion. It identifies artifacts or bleeding as low-confidence areas, preventing them from skewing the final diagnosis. While the current study is retrospective and primarily based on Caucasian cohorts, it demonstrates the potential of foundation model ensembles and OOD detection in creating safe, generalizable AI for clinical medicine. Future work will focus on prospective clinical trials and the integration of multi-omic data to further refine diagnoses for the wide variety of CNS tumor subtypes.

Summary updated

Abstract

Accurate pathological diagnosis is crucial in guiding personalized treatments for patients with central nervous system cancers. Distinguishing glioblastoma and primary central nervous system lymphoma is particularly challenging due to their overlapping pathology features, despite the distinct treatments required. To address this challenge, we establish the Pathology Image Characterization Tool with Uncertainty-aware Rapid Evaluations (PICTURE) system using 2141 pathology slides collected worldwide. PICTURE employs Bayesian inference, deep ensemble, and normalizing flow to account for the uncertainties in its predictions and training set labels. PICTURE accurately diagnoses glioblastoma and primary central nervous system lymphoma with an area under the receiver operating characteristic curve (AUROC) of 0.989, with the results validated in five independent cohorts (AUROC = 0.924-0.996). In addition, PICTURE identifies samples belonging to 67 types of rare central nervous system cancers that are neither gliomas nor lymphomas. Our approaches provide a generalizable framework for differentiating pathological mimics and enable rapid diagnoses for central nervous system cancer patients.
BibTeX
@inproceedings{zhao2025uncertainty,
  author = {Junhan Zhao and Shih‐Yen Lin and Raphaël Attias and Liza Mathews and Christian Engel and G Larghero and Dmytro Vremenko and Ting‐Wan Kao and Tsung-Hua Lee and Yutian Wang and Cheng Che Tsai and Eliana Marostica and Ying‐Chun Lo and David M. Meredith and Keith L. Ligon and Omar Arnaout and Thomas Roetzer-Pejrimovsky and Shih-Chieh Lin and Natalie Shih and Nipon Chaisuriya and David Cook and Jung-Hsien Chiang and Chia‐Jen Liu and Adelheid Wöehrer and Jeffrey A. Golden and MacLean P. Nasrallah and Kun‐Hsing Yu},
  title = {{Uncertainty-aware ensemble of foundation models differentiates glioblastoma from its mimics}},
  booktitle = {Nature Communications},
  year = {2025},
  doi = {10.1038/s41467-025-64249-6},
}
Figure