SVRG and Beyond via Posterior Correction

Nico Daheim, Thomas Moellenhoff, James Ming Liang Ang, Mohammad Emtiyaz Khan

International Conference on Machine Learning 2026 · Oral

Overview

Stochastic optimization in machine learning—particularly when relying on standard algorithms like SGD (Stochastic Gradient Descent)—suffers from high gradient variance, especially when training on small mini-batches or single data examples. This variance leads to unstable updates, slower convergence rates, and suboptimal final solutions. While computing full-batch gradients eliminates this variance, it is computationally prohibitive for modern scale-dependent workloads like training LLMs (Large Language Models) over trillions of tokens. Variance-reduction techniques such as SVRG (Stochastic Variance Reduced Gradient) offer a middle ground by periodically computing full-batch gradients at a specific checkpoint and reusing them alongside gradient corrections derived from smaller batches.

Watch on SlidesLive

Visual summary for SVRG and Beyond via Posterior Correction by Nico Daheim, Thomas Moellenhoff, James Ming Liang Ang, Mohammad Emtiyaz Khan
Visual summary for SVRG and Beyond via Posterior Correction by Nico Daheim, Thomas Moellenhoff, James Ming Liang Ang, Mohammad Emtiyaz Khan

Key moments

  1. 0:00 Motivation behind stochastic optimization and variance reduction
  2. 2:05 Connecting SVRG to Bayesian techniques via posterior correction
  3. 4:00 Comparing SVRG implementation with posterior correction
  4. 6:00 Generalizing SVRG using natural gradients and distributions
  5. 8:00 Introducing Ivon-Poco and large batch Hessian computations
  6. 9:41 Experimental results on MNIST classification
  7. 10:59 Training GPT-2 and analyzing validation perplexity
  8. 12:56 Audience Q&A on computational costs and future directions

SVRG and Beyond via Posterior Correction

Speakers: Nico Daheim; Thomas Moellenhoff; James Ming Liang Ang; Mohammad Emtiyaz Khan

Conference: ICML

YouTube: https://slideslive.com/39083595

Overview

Stochastic optimization in machine learning—particularly when relying on standard algorithms like SGD (Stochastic Gradient Descent)—suffers from high gradient variance, especially when training on small mini-batches or single data examples. This variance leads to unstable updates, slower convergence rates, and suboptimal final solutions. While computing full-batch gradients eliminates this variance, it is computationally prohibitive for modern scale-dependent workloads like training LLMs (Large Language Models) over trillions of tokens. Variance-reduction techniques such as SVRG (Stochastic Variance Reduced Gradient) offer a middle ground by periodically computing full-batch gradients at a specific checkpoint and reusing them alongside gradient corrections derived from smaller batches.

Despite their popularity in classical optimization, these variance-reduction methods have historically lacked a theoretical connection to Bayesian inference frameworks, which optimize over parameter distributions rather than point estimates. This talk presents a novel bridge between SVRG-like variance reduction and posterior correction, a technique originally introduced for knowledge transfer. By generalizing SVRG through natural gradients and expressive distributions like diagonal Gaussians, the authors unify these two distinct fields and derive new optimization algorithms suited for deep learning.

Background

▶ Watch: Motivation behind stochastic optimization and variance reduction (0:00)

The foundational tension in machine learning systems optimization is the trade-off between gradient estimation accuracy and computational cost. Standard stochastic optimizers update parameters using localized mini-batch estimates. In ultra-scale settings—such as pretraining large transformer models on massive corpora—calculating full-batch gradients to control variance is impossible due to memory and compute bottlenecks.

To mitigate this, variance-reduction algorithms like SVRG establish an outer loop where a full-batch reference gradient is evaluated at an outer checkpoint ($\theta_{out}$). In an inner loop, this baseline is dynamically adjusted using new mini-batch information ($\theta_{in}$) via gradient correction terms. Although highly effective in convex and simple non-convex settings, scaling these methods to deep neural networks requires handling complex geometries and higher-order parameter interactions. Furthermore, Bayesian deep learning methods optimize expected losses over distributions, yet they operate largely disjointly from classical variance-reduction literature. Bridging these paradigms allows researchers to leverage probabilistic tools—such as covariance and Hessian estimation—to reformulate and extend variance reduction.

Key Findings

▶ Watch: Comparing SVRG implementation with posterior correction (4:00)

The primary contribution of this work is a mathematical and algorithmic generalization of SVRG through the lens of posterior correction, showing that variance reduction can be viewed as an operation on parameter distributions rather than strictly point estimates.

  • Unification of SVRG and Posterior Correction: By formulating SVRG updates using natural gradients over probability distributions, the authors demonstrate that standard SVRG is recovered as a special case when employing isotropic Gaussians with zero optimization noise.
  • Introduction of Ivon-Poco: Shifting from isotropic to diagonal Gaussian distributions yields a novel optimizer called Ivon-Poco (Posterior Correction Momentum), an Adam-like optimizer that incorporates SVRG-style gradient and Hessian corrections using computationally cheap stochastic estimators.
  • Sharp Validation Loss Drops: When applied to deep learning tasks—including training GPT-2 (125 million parameters) on OpenWebText—introducing posterior correction mid-training triggers immediate, sharp drops in validation loss and perplexity.
  • The Computational Overhead Bottleneck: Despite improving convergence behavior per step, wall-clock or compute-efficiency speedups are currently hindered by the extra gradient evaluations required in both the outer and inner loops, performing similarly to simply scaling up the batch size by a factor of three.

Technical Deep Dive

▶ Watch: Introducing Ivon-Poco and large batch Hessian computations (8:00)

The core mathematical innovation rests on casting the SVRG update steps into a distributional framework via posterior correction. In classical SVRG, an outer loop computes a large batch gradient at checkpoint $\theta_{out}$, which is subsequently corrected in an inner loop $m$ times using new incoming data examples $i$.

The authors rewrite this update mechanism by moving to natural gradients ($\tilde{\nabla}$), which account for the local geometry of the parameter space:

$$\tilde{\nabla}_{\theta} \mathbb{E}[L(\theta)]$$

By replacing point estimates with distributions $q_{out}$ and $q_{in}$, the algorithm updates natural parameters through surrogate losses. When instantiating this framework with isotropic Gaussians under zero optimization noise, the exact SVRG update equations are recovered.

However, expanding the distribution family to diagonal Gaussians unlocks new algorithmic capabilities:

  1. Stochastic Natural Gradients: Optimization noise is leveraged to calculate natural gradients efficiently via parameter perturbations without inflating computational overhead.
  2. Diagonal Hessian Estimation: Utilizing a reparameterization trick, the algorithm estimates expected diagonal Hessians efficiently.
  3. Hessian Correction: The estimated Hessians are corrected dynamically using the same swap-out mechanism applied to gradients: old information from the outer distribution is subtracted, and new information from the inner distribution is added.

The resulting optimizer, Ivon-Poco, executes a large-batch outer loop computing both gradients and Hessians over a batch size $m$ with momentum, which are then reused across inner-loop correction steps.

Experimental Setup & Results

▶ Watch: Experimental results on MNIST classification (9:41)

The empirical evaluation spans two distinct regimes, moving from foundational validation to large-scale generative models:

  • MNIST Image Classification: Evaluated in a simpler setting comparing standard SVRG against Ivon-Poco. Results show that Ivon-Poco achieves faster initial convergence. Crucially, inserting gradient correction phases (highlighted by gray-shaded outer-loop computation blocks) yields sharp upward jumps in classification accuracy upon resumption.
  • GPT-2 Pretraining: Scaled up to a 125-million parameter GPT-2 model trained on roughly 50 billion tokens from the OpenWebText dataset.
  • Baselines: Compared against AdamW and standard Ivon (which optimizes a diagonal Gaussian without correction).
  • Intervention: Gradient and Hessian corrections were injected at step 50,000 of training.
  • Headline Observations: Introducing the correction mechanism at step 50,000 causes an immediate, dramatic drop in validation perplexity. However, because the algorithm necessitates evaluating extra gradients in both outer and inner loops, the total compute cost offsets the per-step convergence gains, yielding no net wall-clock speedup compared to standard baselines or equivalent 3x batch-size scaling.

Practical Implications

▶ Watch: Audience Q&A on computational costs and future directions (12:56)

For infrastructure teams and model builders, this work offers a powerful conceptual framework while sounding a realistic note on systems overhead.

  • Trade-offs in Compute vs. Convergence: While posterior correction successfully alters the optimization trajectory and drops validation loss sharply, the requirement of computing additional gradients per iteration introduces a heavy computational tax. Practitioners cannot currently claim wall-clock speedups without mitigating this overhead.
  • Future Directions for System Design: To make posterior correction practical for LLM pretraining, systems must eliminate redundant gradient computations. The authors suggest that leveraging existing momentum-based mechanisms—similar to techniques used in optimizers like MARS—to implicitly build up outer gradients and Hessians could remove one of the major cost drivers.
  • Distributional Optimizers: The successful translation of variance reduction into distributional optimization via diagonal Gaussians opens doors for advanced Bayesian deep learning algorithms that scale to millions of parameters without prohibitive memory footprints.

Key Takeaways

  • Generalizing SVRG: SVRG can be strictly generalized and understood through the framework of posterior correction by substituting point estimates with probability distributions and utilizing natural gradients.
  • The Ivon-Poco Optimizer: Extending the framework to diagonal Gaussians yields an Adam-like optimizer capable of cheap stochastic Hessian estimation and correction.
  • Empirical Validation: Injecting posterior corrections mid-training triggers sharp drops in validation loss across both MNIST classification and 125M-parameter GPT-2 pretraining.
  • Current Performance Bottleneck: Extra gradient evaluations in the inner and outer loops introduce computational overhead that prevents net wall-clock speedups in its current form.
  • Path Forward: Future algorithmic improvements—such as using momentum to construct outer loop updates (akin to MARS)—are necessary to bypass redundant gradient calculations and unlock practical speedups.

About the Speaker(s)

Authors: Nico Daheim, Thomas Moellenhoff, James Ming Liang Ang, Mohammad Emtiyaz Khan.

Reviews

→ Top-rated talks at International Conference on Machine Learning 2026

All talks from International Conference on Machine Learning 2026