Source-linked AI summary
Quality of Uncertainty Quantification for Bayesian Neural Network Inference
Jiayu Yao, Weiwei Pan, Soumya Ghosh, Finale Doshi-Velez
TL;DR
Bayesian neural-network inference is difficult, and predictive metrics such as test log-likelihood do not reliably establish whether approximate posteriors match the true posterior. The paper compares 10 inference methods across regression and classification, finding that commonly used metrics can conflate model selection with inference quality and that more structured approximations do not necessarily improve posterior fidelity.
Problem
Method
Results
Takeaways & Limitations
The authors call for more exhaustive, standardized evaluation of complex inference methods and careful metrics that formalize uncertainty-estimation desiderata.
Source: §7 · p. 5The experiments suggest that structured families and richer divergences can bring additional optimization challenges on real data.
Source: §6 · p. 4
Abstract
from arXiv · showhide
Bayesian Neural Networks (BNNs) place priors over the parameters in a neural network. Inference in BNNs, however, is difficult; all inference methods for BNNs are approximate. In this work, we empirically compare the quality of predictive uncertainty estimates for 10 common inference methods on both regression and classification tasks. Our experiments demonstrate that commonly used metrics (e.g. test log-likelihood) can be misleading. Our experiments also indicate that inference innovations designed to capture structure in the posterior do not necessarily produce high quality posterior approximations.
1. Introduction
BNNs provide predictive uncertainty through priors on network weights, but their high-dimensional, dependent weight spaces make inference challenging. This work compares common Bayesian and non-Bayesian approaches, emphasizing the quality of their uncertainty estimates.
1. Introduction
- BNNs model uncertainty through priors over network weights and posterior predictive distributions, while frequentist ensembles can estimate predictive uncertainty without Bayesian inference.This work focuses on the commonly used weight-prior approach rather than placing priors directly on functions.Source: §1 · p. 1
- High-dimensional neural-network weights and complex dependencies make BNN uncertainty difficult to characterize; MCMC can mix slowly and mean-field variational inference may struggle with local optima and miss dependencies.The mean-field limitation is stated in the following passage.Source: §1 · p. 1
- The study empirically compares 8 approximate BNN inference methods and 2 non-Bayesian frameworks, finding performance depends heavily on training data.It also identifies cases where log-likelihood and RMSE fail to distinguish good from poor posterior approximations, and engineers synthetic datasets for comparing predictive uncertainty.Source: §1 · p. 1
2. Related Works
Prior work develops both scalable inference procedures and richer posterior approximations, while ensemble approaches bypass Bayesian inference. Earlier comparisons were limited in scope and did not establish when predictive accuracy or calibration reflects posterior fidelity.
2. Related Works
- Mini-batched SGLD and SGHMC address HMC's scalability problem, but can mix less well and lack convergence guarantees when gradient-noise assumptions fail.HMC is frequently used as a ground-truth posterior reference, despite scaling poorly with high-dimensional parameters and large datasets.Source: §2 · p. 1
- BBB uses a fully factorized Gaussian family that cannot capture posterior parameter correlations, unlike structured families such as MVG, MNF, and BBH.Black Box α-Divergence and PBP instead use richer divergence measures to encourage approximation of important posterior properties.Source: §2 · p. 2
- Dropout and ensemble methods obtain predictive uncertainty by training multiple models on the same data, implicitly or explicitly, without Bayesian inference.Gal & Ghahramani (2016) and Lakshminarayanan et al. (2017), Pearce et al. (2018), and Tagasovska & Lopez-Paz (2018) are cited examples.Source: §2 · p. 2
- Earlier comparisons covered selected methods on regression or classification, but neither established when predictive accuracy and calibration reflect posterior-approximation fidelity.Myshkov & Julier (2016) compared BBB, PBP, and Dropout with mini-batched HMC; Zhao & Ji (2018) compared BBB and Dropout with HMC and SGHMC.Source: §2 · p. 2
- This work compares a wider range of inference methods on regression and classification and tests when predictive generalization and calibration are poor proxies for posterior fidelity.The study specifically identifies situations where those metrics do not track divergence from true posteriors.Source: §2 · p. 2
3. Background
The background defines the dataset and network notation, then describes BNN predictions as posterior predictive distributions formed from a neural-network likelihood and uncertainty over weights.
3. Background
- The dataset D contains N observations, with D-dimensional inputs x_n and K-dimensional outputs y_n.For classification, each y_n is a vector of probabilities over K classes.Source: §3 · p. 2
- A BNN uses a neural-network likelihood y = f(x; W) + ϵ with normally distributed noise, places a prior on weights W, and predicts through the posterior predictive distribution p(y|x, D).The posterior over weights is denoted p(W|D).Source: §3 · p. 2
4. Challenges in Evaluating Uncertainty
Predictive fit and calibration can diverge from posterior fidelity: a model can score well on observed data while underestimating uncertainty. The paper proposes synthetic data with known, calibrated ground-truth predictions to assess inference separately from model selection.
4. Challenges in Evaluating Uncertainty
- Test log-likelihood may support model selection but is not a reliable measure of how closely an approximate posterior matches the true posterior.In the example, the score tracks data alignment rather than posterior-predictive fidelity.Source: §4 · p. 2
- -0.25 for PBP versus -0.42 for HMC on average test log-likelihood, although their predictive means match and PBP's uncertainty is much smaller.With training data absent from [−1, 1], the better PBP score reflects alignment with the test data, not a more faithful posterior predictive.Source: §4 · p. 2
- RMSE and predictive-calibration metrics are likewise unreliable for posterior fidelity; synthetic datasets with calibrated ground-truth predictions make generalization and calibration useful proxies.The proposed evaluation separates model-selection questions from inference-approximation gaps.Source: §4 · p. 2
5. Experimental Set Up
The experiments use synthetic regression and binary-classification tasks with both mismatched and matched a priori uncertainty. Ten inference methods are compared with HMC ground-truth baselines using predictive and conventional evaluation measures.
5. Experimental Set Up
- Experiments cover univariate regression and two-dimensional binary classification, each with synthetic datasets where a priori uncertainty is either mismatched to or matched with data variation.Data-generation details are deferred to Appendix A.Source: §5 · p. 2
- HMC supplies the ground-truth posterior and posterior predictives, using 50,000 iterations and 100 leapfrog steps with mixing checks.The full HMC description is in Appendix E.Source: §5 · p. 3
- The study evaluates ten inference methods, omitting PBP and BB-ALPHA on classification because they assume exponential-family likelihoods.The methods are BBB, PBP, BB-ALPHA, MNF, MVG, BBH, Dropout, Ensemble, SGLD, and SGHMC.Source: §5 · p. 3
- Networks use ReLU activations, 50 hidden nodes for regression or two 10-node layers for classification, and 20 random restarts per method.The experiments fix the weight prior and true output noise; the selected solution maximizes validation log-likelihood, and predictions use 500 posterior samples.Source: §5 · p. 3
- The evaluation considers accuracy, average marginal log-likelihood, PICP, and MPIW, while examining when these measures do or do not indicate posterior-approximation quality.PICP is coverage of ground-truth outcomes by a 95% predictive interval; MPIW is its average width.Source: §5 · p. 3
6. Results
The results show that predictive generalization and calibration metrics do not reliably establish posterior quality, and that richer inference methods do not consistently improve approximations. Uncertainty estimates also vary across methods and data regions.
6. Results
- Methods designed to capture posterior structure do not necessarily approximate the true posterior better in these experiments.The authors suggest the true posteriors may lack the dependency patterns targeted by these methods, while added flexibility can invite optimization challenges on real data.Source: §6 · pp. 3–4
- Generalization and calibration can misrepresent posterior quality when model capacity is mismatched; with matched capacity, they help but still do not fully capture fit.In the matched regression task, HMC scores highest on the combined metrics, while BB-ALPHA has higher test log-likelihood than Ensemble.Source: §6 · p. 3, Figure 2 · p. 4, Table 1 · p. 4
- In matched-uncertainty regression, all methods model data-rich regions well, but all except Ensemble and SGHMC underestimate uncertainty in sparse regions.The HMC ground truth indicates that the model is calibrated.Source: Figure 3 · p. 4
- Ensemble uncertainty is unreliable when training yields highly similar models, whereas many dissimilar plausible models can produce good uncertainty estimates.The authors identify the absence of structured diversity objectives as a condition for unreliability.Source: §6 · p. 4
- SGHMC produces posterior predictives most similar to HMC, while SGLD drastically underestimates uncertainty and SGHMC tends to overestimate it.Despite the tendency to overestimate uncertainty, SGHMC’s predictive distributions are qualitatively similar to HMC’s.Source: §6 · p. 4
7. Conclusion
The paper compares ten approximate BNN inference procedures and finds that common generalization and calibration measures can conflate model selection with inference quality. It calls for more standardized evaluation and careful metrics for uncertainty estimation.
7. Conclusion
- The comparison finds that generalization and calibration measurements can conflate model-selection issues with inference quality.The experiments also report that approximate Bayesian methods struggle to capture true posteriors and non-Bayesian methods often miss desired predictive uncertainty.Source: §7 · p. 4
- The reported experiments compare ten commonly used approximate inference procedures for Bayesian neural networks.Source: §7 · p. 4
- The paper argues for more exhaustive, standardized evaluation of new complex approximate inference methods.It also calls for careful metrics that formalize desiderata for uncertainty estimation.Source: §7 · p. 5
A. Data
The data appendix specifies synthetic regression and binary-classification tasks, with datasets constructed for mismatched and matched a priori uncertainty.
A. Data
- The regression datasets use targets y = 0.1x^3 + noise for mismatched uncertainty and y = −(1 + x)sin(1.2x) + noise for matched uncertainty.The stated noise variances are 0.25 and 0.04, respectively; both tasks include training, validation, and test inputs.Source: A. Data · pp. 5–6
- The mismatched-uncertainty classification dataset uses two balanced classes generated from multivariate Gaussian distributions, with training, validation, and test inputs sampled from the class distributions.The passage gives 100 test inputs.Source: A. Data · p. 6
- For matched-uncertainty classification, the two Gaussian classes are truncated on opposite sides of x(2) = 0, and 100 test inputs are sampled from the class distributions.The passage specifies 80 training inputs and 20 validation inputs sampled from the class distributions.Source: A. Data · p. 6
B. Evaluation Metrics
The evaluation uses average marginal log-likelihood, predictive RMSE, PICP, and MPIW. Its uncertainty desideratum is coverage near 95% while minimizing interval width.
B. Evaluation Metrics
- The section computes average marginal log-likelihood, predictive RMSE, PICP, and MPIW as its evaluation metrics.Source: B. Evaluation Metrics · p. 6
- The prediction interval bounds are the 97.5th and 2.5th percentiles of predicted outputs for each x_n.Source: B. Evaluation Metrics · p. 6
- Models should have PICP close to 95% while minimizing MPIW, expressing the goal of calibrated uncertainty that is sufficient but not excessive.The passage describes this as capturing data variation with uncertainty that is both necessary and sufficient.Source: B. Evaluation Metrics · p. 6
C. Additional Results
Additional regression experiments tested alternate model selection and initialization choices. KL-based selection still yielded unsatisfactory posterior approximations, while initialization from HMC samples produced results similar to earlier figures.
C. Additional Results
- The section presents posterior predictive distributions and metric summaries for two regression tasks and two classification tasks.Source: C. Additional Results · p. 6
- KL-based selection still left BBB, MNF, MVG, and BBH with unsatisfying posterior approximations; BB-ALPHA fit poorly and significantly overestimated uncertainty.For BB-ALPHA, α was fixed at 0.3, selected by cross-validation on test log-likelihood.Source: C. Additional Results · p. 6
- Initializing BBB, BB-ALPHA, and MVG variational parameters with empirical HMC-sample means produced regression results similar to earlier figures.Source: C. Additional Results · p. 6
D. Exploration of Structure in the HMC Posterior
This section compares approximate predictives with HMC across regression and classification settings, then tests whether a Gaussian posterior captures HMC structure. The comparisons reveal differences in uncertainty estimates, while the Gaussian approximation fails to match HMC posterior moments.
D. Exploration of Structure in the HMC Posterior
- For mismatched-prior regression, HMC indicates an over-dispersed prior; all methods except SGHMC yield lower-variance predictives despite comparable-or-higher test log-likelihood.Source: Figure 4 · p. 7
- For mismatched-prior regression, test log-likelihood was comparable or higher except SGHMC; RMSE except BBB and BB-ALPHA; calibration except BBB, BB-ALPHA, and SGHMC.Source: Table 2 · p. 7
- With matched prior uncertainty, all but BB-Alpha fit well in data-rich regions, while all but Ensemble and SGHMC underestimate uncertainty in sparse regions.Source: Figure 5 · p. 7
- Although HMC marginals look nearly normal, a multivariate Gaussian misses posterior mean and variance; findings suggest higher-moment weight correlations, still under investigation.Source: D. Exploration of Structure in the HMC… · pp. 6–8
- In model-mismatch classification, predictive uncertainty was underestimated by every method except SGHMC; accuracy and AUC were identical across models.Source: Figure 6 · p. 8, Table 3 · p. 8
- Without classification model mismatch, accuracy remained comparable, but only SGHMC matched HMC on log-likelihood and AUC; uncertainty underestimation was less severe.Source: Table 4 · p. 9, Figure 7 · p. 9