A Simple Approach to Improve Single-Model Deep Uncertainty via Distance-Awareness
Preprint
Abstract
Accurate uncertainty quantification is a major challenge in deep learning, as neural networks can make overconfident errors and assign high confidence predictions to out-of-distribution (OOD) inputs. The most popular approaches to estimate predictive uncertainty in deep learning are methods that combine predictions from multiple neural networks, such as Bayesian neural networks (BNNs) and deep ensembles. However their practicality in real-time, industrial-scale applications are limited due to the high memory and computational cost. Furthermore, ensembles and BNNs do not necessarily fix all the issues with the underlying member networks. In this work, we study principled approaches to improve uncertainty property of a single network, based on a single, deterministic representation. By formalizing the uncertainty quantification as a minimax learning problem, we first identify distance awareness, i.e., the model's ability to quantify the distance of a testing example from the training data, 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 with two simple changes: (1) applying spectral normalization to hidden weights to enforce bi-Lipschitz smoothness in representations and (2) replacing the last output layer with a Gaussian process layer. On a suite of vision and language understanding benchmarks, SNGP outperforms other single-model approaches in prediction, calibration and out-of-domain detection. Furthermore, SNGP provides complementary benefits to popular techniques such as deep ensembles and data augmentation, making it a simple and scalable building block for probabilistic deep learning. Code is open-sourced at https://github.com/google/uncertainty-baselinesKeywords
All Related Versions
This publication has 28 references indexed in Scilit:
- Does your dermatology classifier know what it doesn’t know? Detecting the long-tail of unseen conditionsMedical Image Analysis, 2022
- Highly accurate protein structure prediction with AlphaFoldNature, 2021
- Deep learning for object detection and scene perception in self-driving cars: Survey, challenges, and open issuesArray, 2021
- Regularisation of neural networks by enforcing Lipschitz continuityMachine Learning, 2020
- Residual Networks as Flows of DiffeomorphismsJournal of Mathematical Imaging and Vision, 2019
- Manifold Gaussian Processes for regression2016
- Probabilism, entropies and strictly proper scoring rulesInternational Journal of Approximate Reasoning, 2015
- ImageNet Large Scale Visual Recognition ChallengeInternational Journal of Computer Vision, 2015
- Advances in metric embedding theoryAdvances in Mathematics, 2011
- Reliability, sufficiency, and the decomposition of proper scoresQuarterly Journal of the Royal Meteorological Society, 2009