                                                   Do BNNs Actually Behave Like Bayesian Models?







                                                 1.4









                                 KL Divergence

                                                 1.2





                                                 1.0



                                                                   KL of posterior predictive from true distribution

                                                 0.8               Asymptotic posterior KL



                                                       0   2   4      6     8       10    12     14       16     18

                                                                   Number of training datapoints







Figure 24: Divergence of misspecified Bayesian posterior predictive from true generating distribution versus number

of observations. Performance of Bayesian inference degrades as more data is observed under a misspecified model.

As the Bayes posterior collapses to a single model, the posterior predictive gets further and further away from the true

data-generating distribution as measured by KL divergence.





To demonstrate the inconsistency of Bayesian inference on a misspecified model, we take the following task. The true data

generating distribution is a coin flip between −1 and 1, and we model it as Y | µ ∼ N (µ, σ 2 ) with σ fixed and µ ∼ N (0, 1).

In this case, the distribution µ ∼ Bern({−1, 1}) minimizes the KL divergence between the true data generating distribution

and the posterior predictive distribution. However, simple calculation shows that the Bayes posterior collapses to µ = 0,

supported by the simulation in Figure 24 too.

This simple experiment demonstrates that Bayesian inference does not find the optimal distribution over parameters that

captures the true distribution the best. In the case of misspecification, we might become overconfident in a badly fitting

model. This is worth keeping in mind for BNNs too, especially for regression, where inference is sensitive to the choice of

observation model.



References

activatedgeek. Optax SWAG, 2023. URL https://github.com/activatedgeek/optax-swag.



Betancourt, M. A conceptual introduction to Hamiltonian Monte Carlo. arXiv preprint arXiv:1701.02434, 2017.



Bingham, E., Chen, J. P., Jankowiak, M., Obermeyer, F., Pradhan, N., Karaletsos, T., Singh, R., Szerlip, P. A., Horsfall, P.,

  and Goodman, N. D. Pyro: Deep universal probabilistic programming. J. Mach. Learn. Res., 20:28:1–28:6, 2019.



Bissiri, P. G., Holmes, C. C., and Walker, S. G. A general framework for updating belief distributions. Journal of the Royal

  Statistical Society. Series B (Statistical Methodology), 78(5):1103–1130, 2016.



Blei, D. M., Kucukelbir, A., and McAuliffe, J. D. Variational inference: A review for statisticians. Journal of the American

  statistical Association, 112(518):859–877, 2017.



Blundell, C., Cornebise, J., Kavukcuoglu, K., and Wierstra, D. Weight uncertainty in neural network. In Proceedings of

  the 32nd International Conference on Machine Learning, volume 37 of Proceedings of Machine Learning Research, pp.

  1613–1622, Lille, France, 07–09 Jul 2015. PMLR.



Bochkina, N. Bernstein–von Mises theorem and misspecified models: A review. Foundations of Modern Statistics, pp.

  355–380, 2019.



Box, G. E. Science and statistics. Journal of the American Statistical Association, 71(356):791–799, 1976.



Bradbury, J., Frostig, R., Hawkins, P., Johnson, M. J., Leary, C., Maclaurin, D., Necula, G., Paszke, A., VanderPlas, J.,

  Wanderman-Milne, S., and Zhang, Q. JAX: composable transformations of Python+NumPy programs, 2018. URL

  http://github.com/google/jax.



                                                                           36

