[Paper Review] Noise Contrastive Priors for Functional Uncertainty
This paper introduces Noise Contrastive Priors (NCPs), a data-space prior that encourages neural networks to output high uncertainty for out-of-distribution (OOD) inputs by contrasting clean inputs with noisy perturbations. NCPs improve uncertainty estimation in Bayesian neural networks and out-of-distribution classifiers, significantly enhancing active learning performance and scaling to large regression tasks like flight delay prediction, where they achieve state-of-the-art results with lower NLPD and RMSE.
Obtaining reliable uncertainty estimates of neural network predictions is a long standing challenge. Bayesian neural networks have been proposed as a solution, but it remains open how to specify their prior. In particular, the common practice of an independent normal prior in weight space imposes relatively weak constraints on the function posterior, allowing it to generalize in unforeseen ways on inputs outside of the training distribution. We propose noise contrastive priors (NCPs) to obtain reliable uncertainty estimates. The key idea is to train the model to output high uncertainty for data points outside of the training distribution. NCPs do so using an input prior, which adds noise to the inputs of the current mini batch, and an output prior, which is a wide distribution given these inputs. NCPs are compatible with any model that can output uncertainty estimates, are easy to scale, and yield reliable uncertainty estimates throughout training. Empirically, we show that NCPs prevent overfitting outside of the training distribution and result in uncertainty estimates that are useful for active learning. We demonstrate the scalability of our method on the flight delays data set, where we significantly improve upon previously published results.
Motivation & Objective
- Address the challenge of unreliable uncertainty estimates in neural networks, especially for out-of-distribution (OOD) inputs.
- Overcome the limitations of standard independent normal priors in weight space, which fail to constrain function space uncertainty effectively.
- Develop a scalable, data-space prior that encourages high uncertainty on OOD inputs without requiring complex model reparameterization.
- Improve active learning performance by enabling models to identify and prioritize informative, uncertain data points.
- Demonstrate scalability and robustness of the method on large-scale regression benchmarks such as flight delay prediction.
Proposed method
- Introduce a data-space prior using input noise injection: for each mini-batch, inputs are perturbed with noise drawn from a symmetric distribution (e.g., normal or uniform).
- Train the model to distinguish between clean inputs and noisy inputs using a contrastive objective, where the model learns to assign higher uncertainty to noisy (OOD-like) inputs.
- Combine this contrastive objective with a wide output prior (e.g., a broad Gaussian) for noisy inputs, ensuring high predictive variance in OOD regions.
- Use the resulting uncertainty estimates as a proxy for epistemic uncertainty, enabling better active learning and OOD detection.
- Integrate NCPs with existing uncertainty-aware models such as Bayesian neural networks (BBB) and out-of-distribution classifiers (ODC), requiring no architectural changes.
- Train using a noise contrastive estimation (NCE)-style loss that maximizes the log-likelihood of clean inputs while minimizing the likelihood of noisy inputs, effectively learning a functional prior in data space.
Experimental results
Research questions
- RQ1Can a data-space prior improve uncertainty estimation in neural networks, particularly for out-of-distribution inputs?
- RQ2How does the proposed NCP method compare to standard weight-space priors in terms of OOD generalization and active learning performance?
- RQ3Is the NCP method robust to different input noise distributions and variances in the perturbation process?
- RQ4Can NCPs be effectively scaled to large-scale regression tasks with hundreds of thousands of training examples?
- RQ5Does the inclusion of NCPs lead to better separation between epistemic uncertainty and aleatoric noise in predictive distributions?
Key findings
- NCPs significantly improve uncertainty estimation in Bayesian neural networks and out-of-distribution classifiers, reducing overconfidence on OOD inputs.
- On the flight delays dataset, BBB+NCP and ODC+NCP achieve state-of-the-art performance with NLPD of 4.38 and RMSE of 24.71 and 24.68, respectively, outperforming previous methods.
- The NCP method improves active learning performance by enabling models to select more informative, uncertain samples, leading to faster convergence and better generalization.
- NCPs are robust to variations in input noise variance and distribution, maintaining consistent performance across different noise patterns (e.g., uniform or normal noise with σ² ∈ [0.1, 1.0]).
- In large-scale regression, NCPs scale effectively to 700K training examples, demonstrating feasibility for real-world industrial applications.
- The method successfully separates epistemic uncertainty from aleatoric noise, as shown by visualizations of predictive distributions with distinct uncertainty and noise components.
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.