Skip to main content
QUICK REVIEW

[Paper Review] Smoothed Gradients for Stochastic Variational Inference

Stephan Mandt, David M. Blei|arXiv (Cornell University)|Jun 13, 2014
Gaussian Processes and Bayesian InferenceComputer Science18 references10 citations
TL;DR

This paper proposes smoothed gradients for stochastic variational inference (SVI) by replacing unbiased natural gradients with a fixed-window moving average of past sufficient statistics, reducing variance with only a constant increase in storage. The method achieves faster convergence and better predictive likelihood than standard SVI, especially with intermediate window sizes (L=10–100), due to an optimal trade-off between bias and variance.

ABSTRACT

Stochastic variational inference (SVI) lets us scale up Bayesian computation to massive data. It uses stochastic optimization to fit a variational distribution, following easy-to-compute noisy natural gradients. As with most traditional stochastic optimization methods, SVI takes precautions to use unbiased stochastic gradients whose expectations are equal to the true gradients. In this paper, we explore the idea of following biased stochastic gradients in SVI. Our method replaces the natural gradient with a similarly constructed vector that uses a fixed-window moving average of some of its previous terms. We will demonstrate the many advantages of this technique. First, its computational cost is the same as for SVI and storage requirements only multiply by a constant factor. Second, it enjoys significant variance reduction over the unbiased estimates, smaller bias than averaged gradients, and leads to smaller mean-squared error against the full gradient. We test our method on latent Dirichlet allocation with three large corpora.

Motivation & Objective

  • Address the high variance of stochastic gradients in SVI, which hinders convergence and model quality.
  • Explore the use of biased stochastic gradients in SVI, challenging the conventional reliance on unbiased estimates.
  • Develop a method that maintains the computational and constraint-preserving properties of SVI while reducing gradient variance.
  • Achieve better mean-squared error relative to the full gradient by balancing bias and variance through a smoothed gradient estimator.
  • Demonstrate improved performance on large-scale topic modeling tasks using real-world corpora.

Proposed method

  • Replace the standard unbiased stochastic natural gradient in SVI with a smoothed gradient that uses a fixed-window moving average of previous sufficient statistics.
  • The smoothed gradient is computed as a weighted average of the last L sufficient statistics: $\sum_{j=0}^{L-1} \hat{S}_{i-j} $, replacing the current $\hat{S}_i$ in the gradient update.
  • The update rule remains a convex combination: $\lambda_{i+1} = (1 - \rho_i)\lambda_i + \rho_i(\eta + N \cdot \text{smoothed } \hat{S}_i)$, preserving feasibility of parameters.
  • The method maintains the same computational cost as standard SVI, with storage increasing only by a constant factor (the window size L).
  • The approach avoids the constraint violations seen in averaged gradients (AG), as it does not average the parameters themselves.
  • The bias introduced is smaller than in AG, while achieving the same variance reduction, leading to lower mean-squared error.

Experimental results

Research questions

  • RQ1Can biased stochastic gradients improve the performance of stochastic variational inference in terms of convergence speed and model quality?
  • RQ2Does using a fixed-window moving average of past sufficient statistics reduce gradient variance more effectively than unbiased estimates, while remaining computationally efficient?
  • RQ3How does the trade-off between bias and variance in the smoothed gradient affect the final model likelihood on large-scale data?
  • RQ4Can the method maintain parameter feasibility (e.g., positivity or simplex constraints) better than existing biased gradient methods like averaged gradients?
  • RQ5What is the optimal window size L for smoothed gradients in terms of predictive performance and computational cost?

Key findings

  • The smoothed gradient method achieves significantly lower variance than standard SVI’s unbiased gradients, with only a constant increase in storage requirements.
  • For latent Dirichlet allocation on three large corpora (Arxiv, NYT, Wikipedia), intermediate window sizes (L=10 to L=100) yielded the highest held-out predictive likelihood.
  • The method converged faster than standard SVI and achieved better local optima, with the best performance observed at L=10–100, while L=∞ (full averaging) suffered from excessive bias.
  • The smoothed gradient outperformed averaged gradients (AG) in both bias and variance, as AG introduced a larger bias that violated parameter constraints.
  • With a constant learning rate of 10⁻³ and a 24-hour time budget, the method achieved up to 30 effective passes through the Arxiv corpus, 5 through NYT, and 6 through Wikipedia, with higher likelihoods than baseline SVI.
  • The method’s performance was robust across different corpora, with consistent improvements in predictive probability across all three datasets.

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.