From Monte Carlo to Las Vegas: Improving Restricted Boltzmann Machine Training Through Stopping Sets

Pedro H. P. Savarese, Mayank Kakodkar, Bruno Ribeiro

Introduction

Restricted Boltzmann Machines (RBMs) are fundamental generative models, yet their training remains computationally challenging. The primary difficulty lies in the "negative phase" of gradient descent, which requires sampling from the model's current distribution. Since exact sampling is intractable, practitioners rely on Markov Chain Monte Carlo (MCMC) approximations. The industry standard, Contrastive Divergence (CD-K), runs a Markov chain for a fixed $K$ steps starting from training data. However, this fixed-step approach introduces a mathematical bias known as the inspection paradox: the algorithm is more likely to sample states from longer "tours" (sequences of steps) than shorter ones, leading to poor generative performance in high-dimensional spaces.

The Markov Chain Las Vegas Framework

To address this bias, this research introduces Markov Chain Las Vegas (MCLV). Unlike Monte Carlo algorithms that have fixed runtimes but potentially biased results, Las Vegas algorithms utilize random runtimes to produce statistically superior samples.

The core of the MCLV approach is the definition of stopping sets ($S$), which are constructed using hidden states sampled from the training data. Instead of running for exactly $K$ steps, the Markov chain stops if it either reaches the $K$-step limit or hits a state within the stopping set $S$.

Comparison of MCMC steps in LVS-K vs CD-K. LVS-K utilizes 'tours' that terminate upon hitting a stopping set, whereas CD-K relies on fixed-step states, potentially missing the underlying distribution's structure.

From this framework, the authors derive the Las Vegas Slope (LVS-K) estimator. This estimator leverages information about whether a tour was "completed" (hitting the stopping set) or "truncated" (reaching the $K$ limit). If $K$ is allowed to grow until a stop occurs, the estimator becomes entirely unbiased. Even with a fixed $K$, LVS-K provides a more principled gradient direction than CD-K.

Experimental Results on MNIST

The proposed method was evaluated using the MNIST dataset of handwritten digits. The LVS-K estimator consistently outperformed both CD-K and Persistent Contrastive Divergence (PCD-K) in terms of log-likelihood. For an RBM with 32 hidden units, LVS-1 achieved a testing log-likelihood of -133.3, significantly outperforming CD-1 (-166.6) and even PCD-10 (-138.5).

Furthermore, LVS-K demonstrated superior stability at higher learning rates (e.g., 0.1), where traditional methods often failed to converge.

Insights from Tour Lengths

A key contribution of this work is using tour length as a diagnostic tool for model behavior. In low-dimensional settings, chains return to the stopping set almost immediately, indicating simple memorization. In higher dimensions, tour lengths exhibit a "heavy tail," explaining the mixing difficulties faced by standard MCMC.

Tour length diagnostics. Panels (a) and (b) show the tail distribution of tour lengths, highlighting the 'heavy tail' phenomenon. Panel (c) illustrates how tour lengths vary by digit class; for instance, the digit '1' typically results in much shorter tours than '8'.

As seen in the figure above, the distribution of tour lengths varies significantly across different classes of data. For example, the digit "1" tends to produce much shorter tours, suggesting it is easier for the model to "return" to known high-probability regions for this class compared to more complex digits like "8".

Conclusion and Future Work

By transforming MCMC into a Las Vegas algorithm, the LVS-K estimator provides a robust and statistically grounded alternative for training RBMs. While it introduces some memory overhead to store the stopping sets, the gains in log-likelihood and training stability are substantial. Future research will explore integrating this approach with Persistent Contrastive Divergence to further improve scaling in very high-dimensional models.

Summary updated

Abstract

We propose a Las Vegas transformation of Markov Chain Monte Carlo (MCMC) estimators of Restricted Boltzmann Machines (RBMs). We denote our approach Markov Chain Las Vegas (MCLV). MCLV gives statistical guarantees in exchange for random running times. MCLV uses a stopping set built from the training data and has maximum number of Markov chain steps K (referred as MCLV-K). We present a MCLV-K gradient estimator (LVS-K) for RBMs and explore the correspondence and differences between LVS-K and Contrastive Divergence (CD-K), with LVS-K significantly outperforming CD-K training RBMs over the MNIST dataset, indicating MCLV to be a promising direction in learning generative models.
BibTeX
@inproceedings{savarese2018from,
  author = {Pedro H. P. Savarese and Mayank Kakodkar and Bruno Ribeiro},
  title = {{From Monte Carlo to Las Vegas: Improving Restricted Boltzmann Machine Training Through Stopping Sets}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2018},
  doi = {10.1609/aaai.v32i1.11821},
}
Figure