MuProp: Unbiased Backpropagation for Stochastic Neural Networks.

Shixiang Gu, Sergey Levine, Ilya Sutskever, Andriy Mnih

TL;DR

MuProp is a novel, unbiased gradient estimator for stochastic neural networks that bridges the gap between high-variance unbiased methods and low-variance biased heuristics. By using a first-order Taylor expansion of a deterministic "mean-field" network as a control variate, MuProp leverages the efficiency of backpropagation to train models with discrete latent variables effectively and reliably.

What Problem Does This Paper Address?

Training deep neural networks typically relies on backpropagation, which requires every operation in the computational graph to be differentiable. However, many powerful models—such as those used in reinforcement learning, attention mechanisms, and structured prediction—incorporate stochastic nodes (e.g., discrete sampling from a Bernoulli or multinomial distribution). These operations are non-differentiable, breaking the standard backprop chain.

Researchers usually turn to one of two options:

  1. Likelihood-Ratio (LR) Estimators (e.g., REINFORCE): These are mathematically "correct" (unbiased) but suffer from extremely high variance, making training painfully slow or prone to failure in deep networks.
  2. Biased Heuristics (e.g., Straight-Through estimator): These "fake" the gradient through discrete steps. While they often work well in practice due to low variance, they lack convergence guarantees and can be highly inconsistent across different model architectures.

The authors seek a "best of both worlds" approach: an estimator that is unbiased but uses analytic gradient information to keep variance low.

Methods

The core contribution is MuProp (Mean-field Unbiased Propagation). The idea is to use a control variate—a baseline subtracted from the learning signal to reduce noise—based on a first-order Taylor expansion of the network's cost function.

To make this work for discrete variables, the authors introduce a mean-field network. This is a deterministic version of the stochastic network where sampling operations are replaced by their expected values (means).

The MuProp gradient estimator consists of two parts:

  • A Deterministic Term ($g_{MF}$): Computed by standard backpropagation through the mean-field network. This captures the "trend" of how parameters affect the output.
  • A Residual Likelihood-Ratio Term ($g_R$): This term accounts for the difference between the actual stochastic samples and the mean-field approximation. Because it only deals with the "residuals," its variance is much lower than a standard LR estimator.
Figure 1: Standard MuProp (left) and MuProp with rollout (right). Circles indicate stochastic nodes. Blue, black, and red arrows indicate stochastic forward pass, deterministic mean-field forward pass, and gradient flow in backward pass respectively. ¯f indicates mean-field evaluation of f.

The authors also propose a "rollout" version (shown in Figure 1 above) for deeper networks, where the mean-field approximation is re-centered at each layer based on actual samples from previous layers to prevent the approximation from drifting too far from reality.

Datasets

The authors evaluated MuProp on two main types of tasks:

  • Structured Output Prediction: Predicting the bottom half of an image given the top half using the MNIST (handwritten digits) and Toronto Face Dataset (TFD).
  • Generative Modeling: Training Sigmoid Belief Networks (SBN) and Deep AutoRegressive Networks (fDARN) on binarized MNIST.

Key Insights and Ideas

  • Harnessing the Gradient: Standard unbiased estimators like REINFORCE ignore the derivative of the cost function. MuProp's "aha moment" is realizing that even if you can't backprop through a sample, you can backprop through the mean of that sample's distribution to create a powerful, low-variance baseline.
  • Principled vs. Heuristic: Unlike the Straight-Through (ST) estimator, which is a "hack," MuProp is derived from first principles. This makes it more robust; the paper shows that while ST might perform well on one task, it can fail significantly on others (like categorical models), whereas MuProp remains consistent.
  • Variance Reduction is King: The success of MuProp demonstrates that the primary hurdle in training stochastic networks isn't just "getting the gradient right," but getting a gradient that isn't drowned out by noise.

Key Results

  • Convergence Speed: In generative modeling tasks, MuProp converged 3 to 4 times faster than standard variance-reduced LR methods (like NVIL).
  • Performance: MuProp was the only unbiased estimator able to match or exceed the performance of popular biased heuristics like the Straight-Through and "1/2" estimators.
  • Consistency: On categorical (multinomial) models, biased estimators showed high instability and worse final accuracy, while MuProp remained stable and achieved the best results.
Figure 2: Results for MNIST imputation dataset. MuProp is the only unbiased estimator that can compete with the biased estimators such as ST and 1/2.

Limitations and Future Work

  • Deep Network Divergence: In very deep networks, a single mean-field pass might diverge from the actual stochastic path. While the "rollout" method fixes this, it increases computational complexity from $O(n)$ to $O(n^2)$ regarding network depth.
  • Learned Baselines: The authors suggest that instead of a simple Taylor expansion, one could use learned functions (similar to Q-learning in RL) to further reduce variance.
  • Broadening Scope: Future work includes applying MuProp to recurrent neural networks (RNNs) and more complex reinforcement learning environments where discrete actions are common.

Summary updated

BibTeX
@inproceedings{gu2016muprop,
  author = {Shixiang Gu and Sergey Levine and Ilya Sutskever and Andriy Mnih},
  title = {{MuProp: Unbiased Backpropagation for Stochastic Neural Networks.}},
  booktitle = {International Conference on Learning Representations},
  year = {2016},
  url = {http://arxiv.org/abs/1511.05176},
}
Figure