Skip to main content
QUICK REVIEW

[Paper Review] Deterministic Variational Inference for Robust Bayesian Neural Networks

Anqi Wu, Sebastian Nowozin|arXiv (Cornell University)|Oct 9, 2018
Adversarial Robustness in Machine LearningComputer Science66 citations
TL;DR

This paper introduces Deterministic Variational Inference (DVI), a robust and efficient method for Bayesian neural networks that eliminates gradient variance through deterministic moment approximations and automates prior selection via Empirical Bayes. DVI achieves superior predictive performance over stochastic variational inference, especially in heteroscedastic regression, with consistent improvements in test log-likelihood across UCI datasets.

ABSTRACT

Bayesian neural networks (BNNs) hold great promise as a flexible and principled solution to deal with uncertainty when learning from finite data. Among approaches to realize probabilistic inference in deep neural networks, variational Bayes (VB) is theoretically grounded, generally applicable, and computationally efficient. With wide recognition of potential advantages, why is it that variational Bayes has seen very limited practical use for BNNs in real applications? We argue that variational inference in neural networks is fragile: successful implementations require careful initialization and tuning of prior variances, as well as controlling the variance of Monte Carlo gradient estimates. We provide two innovations that aim to turn VB into a robust inference tool for Bayesian neural networks: first, we introduce a novel deterministic method to approximate moments in neural networks, eliminating gradient variance; second, we introduce a hierarchical prior for parameters and a novel Empirical Bayes procedure for automatically selecting prior variances. Combining these two innovations, the resulting method is highly efficient and robust. On the application of heteroscedastic regression we demonstrate good predictive performance over alternative approaches.

Motivation & Objective

  • To address the fragility of variational inference in Bayesian neural networks due to high gradient variance and sensitivity to prior choices.
  • To develop a deterministic method for propagating uncertain activations through ReLU and Heaviside networks, eliminating Monte Carlo sampling variance.
  • To introduce an Empirical Bayes procedure for automatic, data-adaptive selection of weight prior variances using hierarchical priors.
  • To demonstrate that the combined method achieves better predictive performance and robustness than existing stochastic variational inference approaches.
  • To enable practical deployment of Bayesian neural networks without expert tuning by automating prior selection and stabilizing training.

Proposed method

  • Proposes a deterministic approximation to compute expected activations in neural networks with uncertain weights, replacing stochastic Monte Carlo sampling with closed-form expectations.
  • Derives exact analytical expressions for the first and second moments of ReLU and Heaviside activations under Gaussian-weighted inputs, enabling variance-free backpropagation.
  • Introduces a hierarchical prior structure with inverse-Gamma hyperpriors on weight variances, allowing data-driven estimation of prior scales via Empirical Bayes.
  • Uses conjugate priors to derive closed-form posterior updates for prior variances, enabling automatic tuning during training.
  • Applies the method to both homoscedastic and heteroscedastic regression models, with separate variance parameters for each linear layer.
  • Employs a factorized Gaussian variational family for weights, reducing computational complexity while maintaining expressivity.

Experimental results

Research questions

  • RQ1Can we eliminate gradient variance in variational inference for Bayesian neural networks without relying on Monte Carlo sampling?
  • RQ2Can we automatically learn optimal prior variances for neural network weights without manual tuning?
  • RQ3Does a deterministic approximation to activation moments lead to more stable and accurate training of Bayesian neural networks?
  • RQ4How does the proposed method compare to stochastic variational inference in terms of predictive performance and convergence?
  • RQ5Can the Empirical Bayes approach for prior selection consistently outperform manual prior tuning across diverse regression tasks?

Key findings

  • DVI consistently outperforms stochastic variational inference (MCVI) with S=10 samples, achieving up to 0.35 nats per data point higher test log-likelihood on several UCI datasets.
  • The diagonal-DVI variant (dDVI) retains most of the performance gain, demonstrating computational efficiency without sacrificing accuracy.
  • Heteroscedastic models trained with DVI uniformly outperform homoscedastic models, even though they are more complex, with no observed overfitting.
  • The Empirical Bayes method for prior selection consistently finds better or comparable performance than manual tuning, with improvements observed across all datasets tested.
  • The method is robust: it converges reliably across multiple random train-test splits without requiring expert intervention or hyperparameter tuning.
  • The deterministic moment approximation stabilizes training by eliminating stochasticity in gradient estimates, enabling faster and more reliable convergence.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.