Functional Variational Bayesian Neural Networks
Shengyang Sun, Guodong Zhang, Jiaxin Shi, Roger Grosse
TL;DR
This work reframes Bayesian neural networks as function-space models by placing priors directly over functions and optimizing a functional ELBO (fELBO). A key theoretical result shows the KL divergence between stochastic processes equals the supremum of marginal KLs over finite input sets, enabling practical training via finite measurement sets and the Spectral Stein Gradient Estimator (SSGE) for implicit priors. The authors develop adversarial and sampling-based fVI approaches and demonstrate that fBNNs with structured priors (including Gaussian processes and implicit processes) extrapolate well, provide reliable uncertainty estimates, and scale to large datasets. Empirically, fBNNs outperform weight-space VI baselines on regression benchmarks and excel in contextual bandits and Bayesian optimization, highlighting the benefits of function-space variational inference for uncertainty-aware learning. Overall, this work offers a principled and scalable framework for incorporating rich functional priors into neural models for improved extrapolation and decision-making under uncertainty.
Abstract
Variational Bayesian neural networks (BNNs) perform variational inference over weights, but it is difficult to specify meaningful priors and approximate posteriors in a high-dimensional weight space. We introduce functional variational Bayesian neural networks (fBNNs), which maximize an Evidence Lower BOund (ELBO) defined directly on stochastic processes, i.e. distributions over functions. We prove that the KL divergence between stochastic processes equals the supremum of marginal KL divergences over all finite sets of inputs. Based on this, we introduce a practical training objective which approximates the functional ELBO using finite measurement sets and the spectral Stein gradient estimator. With fBNNs, we can specify priors entailing rich structures, including Gaussian processes and implicit stochastic processes. Empirically, we find fBNNs extrapolate well using various structured priors, provide reliable uncertainty estimates, and scale to large datasets.
