Skip to main content
QUICK REVIEW

[Paper Review] Stochastic Gradient Estimate Variance in Contrastive Divergence and Persistent Contrastive Divergence

Mathias Berglund, Tapani Raiko|arXiv (Cornell University)|Dec 20, 2013
Stochastic Gradient Optimization TechniquesComputer Science14 references3 citations
TL;DR

This paper empirically investigates the variance of stochastic gradient estimates in Contrastive Divergence (CD) and Persistent Contrastive Divergence (PCD) for training Restricted Boltzmann Machines. It finds that CD-1 has significantly lower gradient estimate variance than exact sampling, while PCD exhibits substantially higher variance in the mean of subsequent estimates due to correlated sampling, explaining why PCD typically requires smaller learning rates or larger minibatches than CD.

ABSTRACT

Contrastive Divergence (CD) and Persistent Contrastive Divergence (PCD) are popular methods for training the weights of Restricted Boltzmann Machines. However, both methods use an approximate method for sampling from the model distribution. As a side effect, these approximations yield significantly different biases and variances for stochastic gradient estimates of individual data points. It is well known that CD yields a biased gradient estimate. In this paper we however show empirically that CD has a lower stochastic gradient estimate variance than exact sampling, while the mean of subsequent PCD estimates has a higher variance than exact sampling. The results give one explanation to the finding that CD can be used with smaller minibatches or higher learning rates than PCD.

Motivation & Objective

  • To investigate the variance of stochastic gradient estimates in CD and PCD, as a factor influencing training speed and hyperparameter choice.
  • To determine whether the low variance claimed for CD is due to approximate sampling or proximity to the data distribution.
  • To analyze the impact of correlated updates in PCD on gradient estimate variance, particularly in later training stages.
  • To compare CD, PCD, and exact sampling in terms of gradient variance across multiple datasets and training phases.
  • To provide empirical justification for the observed differences in learning rate requirements between CD and PCD.

Proposed method

  • Trained RBMs on three datasets: binarized MNIST, CIFAR-10 center patches, and Caltech 101 Silhouettes.
  • Evaluated gradient estimate variance using CD-k (k=1 to 10), PCD, CD-1000 (approximate exact sampling), and independent CD (I-CD).
  • Measured variance per weight matrix element across 10 random weight initializations and 10 gradient samples per data point.
  • Used a fixed number of visible and hidden units, with biases initialized to zero and weights to small random values.
  • Computed the variance of gradient estimates at 10 and 500 epochs to assess changes during training.
  • Compared PCD to CD-1000 by calculating the ratio of variances for the mean of k subsequent estimates.

Experimental results

Research questions

  • RQ1Does CD yield lower stochastic gradient estimate variance than exact sampling, and if so, why?
  • RQ2How does the variance of PCD gradient estimates compare to independent sampling, and does it increase over training?
  • RQ3Is the variance advantage of CD due to sampling from the positive particle or due to limited sampling steps?
  • RQ4To what extent does the correlation between PCD updates increase the variance of the mean gradient estimate?
  • RQ5Can the observed difference in learning rate requirements between CD and PCD be explained by gradient estimate variance?

Key findings

  • CD-1 gradient estimates have significantly lower variance than exact sampling, with the variance increasing only slightly with more CD steps.
  • The variance advantage of CD over exact sampling is primarily due to sampling the negative particle from the positive particle, not due to limited steps.
  • Independent CD (I-CD) loses the variance advantage, showing that proximity to the positive particle is key to CD's low variance.
  • The mean of subsequent PCD gradient estimates has substantially higher variance than independent sampling, especially in later training stages.
  • For CD-1, the mean of 10 subsequent estimates has multiple times lower variance than PCD, indicating PCD requires smaller learning rates or larger minibatches.
  • The results empirically confirm that CD's faster convergence is partly due to lower gradient variance, while PCD's high variance explains its need for smaller learning rates.

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.