Stochastic Variational Optimization

Thomas Bird, Julius Kunze, David BarberarXiv 2018

Abstract

Variational Optimization forms a differentiable upper bound on an objective. We show that approaches such as Natural Evolution Strategies and Gaussian Perturbation, are special cases of Variational Optimization in which the expectations are approximated by Gaussian sampling. These approaches are of particular interest because they are parallelizable. We calculate the approximate bias and variance of the corresponding gradient estimators and demonstrate that using antithetic sampling or a baseline is crucial to mitigate their problems. We contrast these methods with an alternative parallelizable method, namely Directional Derivatives. We conclude that, for differentiable objectives, using Directional Derivatives is preferable to using Variational Optimization to perform parallel Stochastic Gradient Descent.

Introduction

In the era of massive deep learning models, parallelizing optimization is essential. One popular approach is "Gaussian Perturbation" (GP), where multiple workers sample the function at random points around the current parameters to estimate the gradient. This is attractive because it is "embarrassingly parallel" and requires minimal communication between machines—often just a few scalar values. However, these estimators frequently suffer from high variance, leading to unstable training or failure to converge. This paper explores the mathematical roots of this instability and proposes a more robust alternative for differentiable environments.

The Variational Optimization Framework

The authors frame the problem through Stochastic Variational Optimization (SVO). Instead of minimizing a function $f(x)$ directly, SVO minimizes a differentiable upper bound: the expectation of the function under a distribution, typically a Gaussian. This process effectively "smooths" the objective function, making it more amenable to optimization.

Variational smoothing of an objective function for various noise levels σ.

Gradient Estimation and the Variance Explosion

The paper evaluates three main approaches to estimating the gradient of the variational objective:

  1. Gaussian Perturbation (GP): Estimating the gradient by perturbing parameters with Gaussian noise.
  2. Antithetic Sampling (AS): A variance reduction technique where for every noise sample $+\epsilon$, the worker also evaluates $-\epsilon$.
  3. Directional Derivatives (DD): The authors' preferred alternative, which uses Forward Mode Automatic Differentiation to calculate the exact derivative along a random direction.

A critical finding is the "Variance Explosion." The authors prove that the variance of the standard GP estimator contains a term proportional to $1/\sigma^2$ (where $\sigma$ is the noise level). As one attempts to make the estimator more accurate by reducing noise, the variance explodes, rendering the gradient estimate useless. Antithetic sampling mathematically cancels out this problematic term, explaining its necessity in modern "Evolution Strategies."

Comparison of gradient estimation error for GP, Antithetic Sampling (AS), and Directional Derivatives (DD) as a function of noise level σ.

Empirical Evaluation

The methods were tested on two primary benchmarks:

  • Quartic Objective: A synthetic 100-dimensional polynomial used to measure bias and variance against a known ground truth. The DD estimator remained unbiased with errors orders of magnitude lower than standard GP.
  • MNIST: Training a fully connected neural network showed that the DD method was far superior to GP without antithetic sampling. While GP with antithetic sampling could eventually match DD's performance, it required careful tuning of $\sigma$, whereas DD performed optimally without such parameter tuning.

Conclusion

For differentiable objectives, such as those found in most neural network training, Directional Derivatives offer a superior, parameter-free alternative to standard Variational Optimization. DD provides unbiased estimates with variance independent of the noise level $\sigma$, avoiding the catastrophic instability seen in black-box Gaussian perturbation methods. While GP with antithetic sampling remains necessary for non-differentiable "black-box" environments, DD is the preferred choice for distributed Stochastic Gradient Descent when derivatives are available.

Summary updated

BibTeX
@misc{bird2018stochastic,
  author = {Thomas Bird and Julius Kunze and David Barber},
  title = {{Stochastic Variational Optimization}},
  year = {2018},
  eprint = {1809.04855},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1809.04855},
}
Figure