[Paper Review] Simple and Principled Uncertainty Estimation with Deterministic Deep Learning via Distance Awareness
The paper introduces SNGP, a single-model method that achieves distance-aware uncertainty estimation by combining a Laplace-approximated Gaussian Process output layer with spectral-normalized, distance-preserving hidden mappings, competitive with deep ensembles in calibration and OOD detection while retaining fast inference.
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.
Motivation & Objective
- Motivate distance awareness as a key criterion for high-quality uncertainty estimation in deep neural networks.
- Formalize uncertainty estimation as a minimax problem to justify a uniform out-of-domain prediction for inputs far from training data.
- Propose SNGP to make the output layer distance-aware and the hidden mapping distance-preserving while maintaining scalability.
- Demonstrate that SNGP is competitive with deep ensembles on vision and language tasks with real-time inference.
Proposed method
- Introduce Spectral-normalized Neural Gaussian Process (SNGP) as a single-model uncertainty method.
- Replace the dense output layer with a Gaussian Process using a Laplace approximation to the random Fourier feature expansion for scalable posterior estimation.
- Impose distance-preserving constraints on hidden mappings by spectral-normalizing residual blocks to enforce a bi-Lipschitz condition.
- Train with SGD and update GP posterior precision in a final epoch to enable closed-form predictive uncertainty computation.
- Provide predictions by integrating the GP with the learned hidden representations, avoiding Monte Carlo sampling at inference.
Experimental results
Research questions
- RQ1How can we achieve high-quality predictive uncertainty with a single deterministic DNN without resorting to ensembles?
- RQ2What role does input distance awareness play in calibration and OOD detection for neural networks?
- RQ3Can a GP output layer combined with distance-preserving hidden mappings match ensemble performance in uncertainty metrics and OOD detection?
- RQ4Is it possible to do scalable GP-based uncertainty estimation within standard training pipelines?
- RQ5How does SNGP perform on vision and language tasks relative to single-model baselines and deep ensembles?
Key findings
- SNGP delivers uncertainty that is competitive with deep ensembles in calibration and out-of-domain detection while preserving single-model inference speed.
- Distance awareness achieved by the GP output layer and a bi-Lipschitz hidden mapping leads to an uncertainty surface similar to Gaussian Processes, even in deep networks.
- Spectral normalization ensures distortion-free hidden representations, improving distance preservation and uncertainty quality across tasks.
- Laplace-approximation of the GP posterior with random Fourier features enables scalable training and inference without Monte Carlo sampling.
- On CIFAR-10/100 with Wide ResNet and CLINC OOS with BERT, SNGP matches or surpasses other single-model approaches in calibration and OOD metrics, often outperforming non-distance-aware methods.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.