Uncertainty-Aware Image Classification in Biomedical Imaging Using SNGP
The critical importance of Out-of-Distribution detection in medical imaging. Medical AI systems occupy the high-risk region where both domain sensitivity and impact on patient outcomes are significant. A model trained to classify cats vs. dogs can afford mistakes, but a cancer prediction system must reliably detect when input data deviates from its training distribution. Without robust OOD detection, models risk making confidently incorrect predictions on unfamiliar data, potentially leading to misdiagnosis and patient harm.
Abstract
Accurate histopathologic interpretation is key for clinical decision-making; however, current deep learning models for digital pathology are often overconfident and poorly calibrated in out-of-distribution (OOD) settings, which limit trust and clinical adoption. Safety-critical medical imaging workflows benefit from intrinsic uncertainty-aware properties that can accurately reject OOD input. We implement the Spectral-normalized Neural Gaussian Process (SNGP), a set of lightweight modifications that apply spectral normalization and replace the final dense layer with a Gaussian process layer to improve single-model uncertainty estimation and OOD detection. We evaluate SNGP vs. deterministic and Monte Carlo dropout on six datasets across three biomedical classification tasks: white blood cells, amyloid plaques, and colorectal histopathology. SNGP has comparable in-distribution performance while significantly improving uncertainty estimation and OOD detection. Thus, SNGP or related models offer a useful framework for uncertainty-aware classification in digital pathology, supporting safe deployment and building trust with pathologists.
Class-logit entropy distributions reveal the uncertainty awareness of different models. Deterministic DNNs and MC Dropout assign low entropy to OOD samples, leading to overconfident predictions. SNGP, in contrast, assigns significantly higher entropy to OOD inputs, demonstrating superior uncertainty quantification and clear separation between in-distribution and out-of-distribution data.
ROC curves demonstrating OOD detection performance of Baseline, MC Dropout, and SNGP methods. SNGP achieves the highest AUC scores across all OOD datasets, showing superior uncertainty quantification and more reliable out-of-distribution detection compared to deterministic and MC Dropout baselines.
Datasets
Fréchet Inception Distance (FID) quantifies dataset similarity: lower values indicate greater semantic similarity, while higher values represent substantial domain shifts, ideal for evaluating OOD detection. We evaluate SNGP across three biomedical imaging tasks using six publicly available datasets: White blood cells (Acevedo 2020, Jung 2022), amyloid plaques (Tang 2019, Wong 2022), and colorectal histopathology (Kather 2016, 2018).
Representative sample images from the Acevedo dataset showing white blood cell morphology variations used for in-distribution model training and evaluation.
Representative sample images from the Jung dataset showing white blood cell variations and morphological features.
Representative sample images from the Kather 2016 dataset showing colorectal histopathology tissue patterns and classifications.
Representative sample images from the Kather 2018 dataset showing colorectal histopathology tissue types and structures.
Representative sample images from the Tang dataset showing amyloid plaque morphology and tissue characteristics.
Representative sample images from the Wong dataset showing amyloid plaque variations and pathological features.
Paper Citation
@misc{meleti2026uncertaintyawareimageclassificationbiomedical,
title={Uncertainty-Aware Image Classification In Biomedical Imaging Using Spectral-normalized Neural Gaussian Processes},
author={Uma Meleti and Jeffrey J. Nirschl},
year={2026},
eprint={2602.02370},
archivePrefix={arXiv},
primaryClass={cs.CV},
url={https://arxiv.org/abs/2602.02370},
}
Model Citation
@misc{nirschl_lab_2026,
author = {Nirschl Lab and Uma Meleti and Jeffrey Nirschl},
title = {sngp-models (Revision c24f132)},
year = 2026,
url = {https://huggingface.co/nirschl-lab/sngp-models},
doi = {10.57967/hf/8420},
publisher = {Hugging Face}
}
Acknowledgements
This work was supported by the University of Wisconsin–Madison ADRC (NIH P30-AG53425), Department of Pathology, and the Madison VA GRECC.
We acknowledge the foundational work on Spectral-Normalized Neural Gaussian Processes (SNGP) by Spectral-normalized Neural Networks with Attention (NeurIPS 2020) and How Good is the Bayes Posterior in Deep Neural Networks Really? (JMLR 2022). We also thank the Uncertainty Baselines repository for providing the reference TensorFlow implementation that guided our development.
The authors acknowledge UW-Madison SMPH Research Computing team for providing computational resources and technical support that contributed to this publication.