TL;DR
Bayesian neural networks promise principled uncertainty, reduced overfitting, and resistance to catastrophic forgetting, but have historically failed to scale to large architectures and datasets like ImageNet. This paper demonstrates that Variational Online Gauss-Newton (VOGN)—a natural-gradient variational inference method—shares structural similarities with Adam, allowing standard deep learning techniques (momentum, batch normalization, data augmentation, and distributed training) to be seamlessly applied. VOGN matches standard optimizers in accuracy and epoch convergence while preserving well-calibrated probabilities, robust out-of-distribution detection, and superior continual learning performance.
What Problem Does This Paper Address?
Standard deep neural networks trained with stochastic gradient descent (SGD) or Adam suffer from chronic overconfidence, catastrophic forgetting during sequential learning, and poor behavior on out-of-distribution (OOD) inputs.
Bayesian methods theoretically resolve these problems by learning a posterior distribution over network weights rather than point estimates. However, exact inference is intractable, and traditional approximation methods have failed in modern deep learning:
- Markov Chain Monte Carlo (MCMC) is prohibitively slow for deep networks.
- Standard Variational Inference (VI) (e.g., Bayes by Backprop) converges slowly, requires extensive tuning, and collapses when paired with modern training staples like batch normalization.
- Common practical heuristics like Monte Carlo (MC) Dropout produce rigid posterior approximations that lack full weight-space support, making them ill-suited for continual learning.
Methods
The authors build on natural-gradient variational inference under a Gaussian posterior $q(w) = \mathcal{N}(\mu, \Sigma)$ with diagonal covariance $\Sigma = \text{diag}(1 / (N(s + \tilde{\delta})))$. They adapt the Variational Online Gauss-Newton (VOGN) algorithm to leverage common deep learning machinery:
-
Adam-like Update Dynamics: VOGN updates mean $\mu$ and precision-scale vector $s$ similarly to Adam: $$\mu_{t+1} \leftarrow \mu_t - \alpha_t \frac{\hat{g}(w_t) + \tilde{\delta}\mu_t}{s_{t+1} + \tilde{\delta}}, \quad s_{t+1} \leftarrow (1 - \tau\beta_t)s_t + \beta_t \frac{1}{M}\sum_{i \in \mathcal{M}_t} (g_i(w_t))^2$$ Crucial distinction: Adam computes the square of the batch-averaged gradient $(\frac{1}{M}\sum g_i)^2$, whereas VOGN computes the average of individual squared gradients $\frac{1}{M}\sum (g_i)^2$ (Gauss-Newton approximation).
-
Deep Learning Enhancements:
- Batch Normalization (BN): Applied using standard defaults without placing prior distributions or L2 regularization over BN scale/shift parameters.
- Data Augmentation Scaling: Naive data augmentation distorts Bayesian priors. The authors scale the effective dataset size from $N$ to $\rho N$ (e.g., $\rho=10$ for CIFAR-10, $\rho=5$ for ImageNet) to account for synthetic sample diversity.
- Distributed Training: Implements hybrid data parallelism (splitting minibatches) and Monte Carlo (MC) sample parallelism across GPUs.
- Initialization & Tempering: Initializes $s_0$ using an initial forward pass and warms up the tempering parameter $\tau$ toward 1 to stabilize early optimization trajectories.
Datasets
The authors evaluate their approach on standard computer vision and sequential benchmarks:
- In-distribution classification: CIFAR-10 (50k training, 10k test) and ImageNet (ILSVRC; 1.28 million training, 50k validation across 1,000 classes).
- Out-of-distribution (OOD) detection: SVHN, LSUN (crop), and LSUN (resize) tested against models trained on CIFAR-10.
- Continual learning: 10-task Permuted MNIST (each task permutes the 784 pixels of MNIST digits differently).
- No new datasets or benchmarks were introduced.
Key Insights and Ideas
- Natural gradients align optimization with inference: Because natural-gradient VI structurally mirrors adaptive gradient methods (like Adam or RMSprop), techniques that speed up deep learning (momentum, learning rate schedules) directly accelerate Bayesian inference.
- Data augmentation shifts the prior-data balance: In standard loss minimization, scaling dataset size $N$ and weight decay $\delta$ is largely interchangeable. In Bayesian inference, prior precision $\delta$ and empirical data log-likelihood are fundamentally decoupled in the evidence lower bound (ELBO). Augmenting data artificially inflates data diversity, requiring an explicit sample-size multiplier ($\rho$).
- Principled variance estimates preserve Bayesian benefits: Unlike Adam (which is consistently overconfident) or MC-dropout (which can underfit or add excessive noise), VOGN yields high entropy on OOD samples, well-calibrated confidence curves, and strong prior-carrying capacity for sequential tasks.
Key Results
- ImageNet Scaling (ResNet-18):
- VOGN reaches 67.38% validation accuracy in 90 epochs, outperforming Adam (66.39%) and closely matching SGD (67.79%).
- VOGN runs at 76 seconds per epoch across 128 GPUs, compared to 44 seconds for Adam/SGD.
- Uncertainty Calibration & Quality:
- Across 15 evaluation metrics (Negative Log-Likelihood, Expected Calibration Error, and AUROC) across 5 model/dataset configurations, VOGN scored best or tied for best on 10 metrics and second-best on the remaining 5.
- Out-of-Distribution Behavior:
- On ResNet-18 trained on CIFAR-10 and tested on SVHN/LSUN, VOGN clearly separated in-distribution entropy from OOD entropy, avoiding the severe overconfidence seen in Adam.
- Continual Learning (Permuted MNIST):
- VOGN matched or surpassed Variational Continual Learning (VCL) across 10 tasks while requiring only 100 epochs per task compared to 800 epochs needed by VCL/Bayes by Backprop.
Limitations and Future Work
- Per-Sample Gradient Overhead: VOGN requires per-example gradient vectors to compute the Gauss-Newton approximation. Because standard auto-differentiation frameworks aggregate gradients over the batch by default, VOGN is currently 2–5× slower per epoch than Adam or SGD.
- Mean-Field Approximation: VOGN assumes a factorized, diagonal Gaussian posterior covariance, which ignores correlations between weights across layers.
- Hyperparameter Tuning: While easier to tune than previous VI methods, VOGN introduces additional hyperparameters: damping factor $\gamma$, tempering parameter $\tau$, training MC samples $K$, and sample expansion factor $\rho$.
- Future Directions: Developing optimized library-level per-sample gradient backpropagation and extending natural-gradient updates to structured (e.g., matrix-variate or block-diagonal) covariance approximations.
Summary updated