Skip to main content
QUICK REVIEW

[Paper Review] Variational Learning is Effective for Large Deep Networks

Yuesong Shen, Nico Daheim|arXiv (Cornell University)|Feb 27, 2024
Generative Adversarial Networks and Image SynthesisComputer Science3 citations
TL;DR

This paper introduces Improved Variational Online Newton (IVON), a scalable second-order optimizer that directly optimizes the variational inference objective for large deep networks. IVON matches or exceeds Adam's accuracy on GPT-2 and ResNet-50 while providing better predictive uncertainty and nearly identical computational cost, demonstrating that variational learning is both effective and practical at scale.

ABSTRACT

We give extensive empirical evidence against the common belief that variational learning is ineffective for large neural networks. We show that an optimizer called Improved Variational Online Newton (IVON) consistently matches or outperforms Adam for training large networks such as GPT-2 and ResNets from scratch. IVON's computational costs are nearly identical to Adam but its predictive uncertainty is better. We show several new use cases of IVON where we improve finetuning and model merging in Large Language Models, accurately predict generalization error, and faithfully estimate sensitivity to data. We find overwhelming evidence that variational learning is effective.

Motivation & Objective

  • To challenge the prevailing belief that variational learning is ineffective for large deep networks.
  • To develop a scalable, efficient optimizer that directly optimizes the variational objective without sacrificing accuracy.
  • To enable accurate predictive uncertainty estimation, model averaging, and generalization diagnostics in large-scale models.
  • To demonstrate that variational methods can match or surpass standard optimization methods like Adam in performance and cost.
  • To provide a practical, Adam-like implementation of second-order variational inference for real-world deep learning applications.

Proposed method

  • IVON adapts the Online Newton method to large-scale deep networks using a simplified Hessian-estimation scheme for both learning rate adaptation and uncertainty estimation.
  • It uses a diagonal-covariance Gaussian variational posterior q(θ) = N(θ | m, diag(σ)²), parameterized by mean m and standard deviation σ vectors.
  • The method incorporates momentum and a proper Hessian initialization h₀ to stabilize training and eliminate the need for heuristic damping.
  • It employs a simplified Hessian approximation that maintains computational efficiency while enabling accurate uncertainty quantification.
  • The algorithm is designed to be easily tunable and compatible with flexible posterior forms, supporting broader Bayesian deep learning applications.
  • It uses leave-one-out (LOO) estimation during training to predict generalization performance and sensitivity to data perturbations.
(a) Training loss on OpenWebText
(a) Training loss on OpenWebText

Experimental results

Research questions

  • RQ1Can variational learning achieve performance comparable to Adam in training large deep networks like GPT-2 and ResNet-50?
  • RQ2Does direct optimization of the variational objective yield better predictive uncertainty than standard methods like MC-dropout and SWAG?
  • RQ3Can IVON faithfully predict generalization error and model sensitivity during training, enabling diagnostics and early stopping?
  • RQ4Is variational learning scalable and efficient enough for large language models and image classification tasks at near-Adam computational cost?
  • RQ5Can IVON improve fine-tuning and model merging in large language models compared to standard optimization strategies?

Key findings

  • IVON reduces validation perplexity by 0.4 on GPT-2 (773M parameters) compared to AdamW, achieving 12.6 vs. 13.0 perplexity.
  • On ImageNet, IVON achieves 77.5% top-1 accuracy with 0.022 ECE (expected calibration error), outperforming AdamW’s 75.2% accuracy and 0.066 ECE.
  • IVON shows no severe overfitting during training, unlike AdamW, and consistently matches or exceeds SGD performance on ImageNet.
  • In the NeurIPS 2021 Bayesian deep learning competition, an earlier version of IVON won first place in both tracks, outperforming SWAG and SAE baselines in predictive agreement and distributional distance metrics.
  • LOO-based generalization prediction with IVON is more faithful than with AdamW or SGD, as shown in CIFAR-10 experiments.
  • IVON enables accurate sensitivity estimation to data perturbations and distributional shifts, even under high severity distortions in CIFAR-10-C.
(b) Low precision training
(b) Low precision training

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.