Simple and Principled Uncertainty Estimation with Deterministic Deep Learning via Distance Awareness

Jeremiah Zhe Liu, Zi Lin, Shreyas Padhy, Dustin Tran, Tania Bedrax-Weiss +1 more
6/17/2020
cs.LGstat.ML

Official code: google/uncertainty-baselines (1,602 stars, Apache-2.0, TensorFlow, last commit 2026-03-24).

Abstract

Bayesian neural networks (BNN) and deep ensembles are principled approaches to estimate the predictive uncertainty of a deep learning model. However their practicality in real-time, industrial-scale applications are limited due to their heavy memory and inference cost. This motivates us to study principled approaches to high-quality uncertainty estimation that require only a single deep neural network (DNN). By formalizing the uncertainty quantification as a minimax learning problem, we first identify input distance awareness, i.e., the model's ability to quantify the distance of a testing example from the training data in the input space, as a necessary condition for a DNN to achieve high-quality (i.e., minimax optimal) uncertainty estimation. We then propose Spectral-normalized Neural Gaussian Process (SNGP), a simple method that improves the distance-awareness ability of modern DNNs, by adding a weight normalization step during training and replacing the output layer with a Gaussian process. On a suite of vision and language understanding tasks and on modern architectures (Wide-ResNet and BERT), SNGP is competitive with deep ensembles in prediction, calibration and out-of-domain detection, and outperforms the other single-model approaches.

View on arXivView PDF

Code Implementations(1)

TensorFlowApache-2.0

High-quality implementations of standard and SOTA methods on a variety of tasks.

1,602225Python, Jupyter NotebookJul 16, 20207 months agoApache-2.0
bayesian-methodsdata-sciencedeep-learningmachine-learningneural-networks+3 more

Similar Papers

Cite this paper

@article{liu2020simple,
  title  = {Simple and Principled Uncertainty Estimation with Deterministic Deep Learning via Distance Awareness},
  author = {Jeremiah Zhe Liu and Zi Lin and Shreyas Padhy and Dustin Tran and Tania Bedrax-Weiss and Balaji Lakshminarayanan},
  year   = {2020},
  eprint = {2006.10108},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2006.10108}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2006.10108.svg)](https://codeofpaper.com/paper/2006.10108)

Discussion