Adaptive Parallel Tempering for Stochastic Maximum Likelihood Learning of RBMs

Guillaume Desjardins, Aaron C. Courville, Yoshua BengioarXiv 2010

TL;DR

Training Restricted Boltzmann Machines (RBMs) often fails because the sampling process gets "stuck" in probability modes as the model learns. This paper introduces SML-APT, an adaptive version of Parallel Tempering that automatically tunes temperatures and dynamically adds sampling chains to minimize particle "return time," leading to better model convergence and higher likelihood scores without manual hyperparameter tuning.

What Problem Does This Paper Address?

Restricted Boltzmann Machines are powerful unsupervised learning models, but they are notoriously difficult to train. The core issue lies in the negative phase of the gradient calculation, which requires sampling from the model's current distribution.

As an RBM learns, its probability landscape becomes increasingly "rugged," with high-probability modes separated by deep valleys. Standard Gibbs sampling (used in Stochastic Maximum Likelihood, or SML) often loses ergodicity—it gets trapped in one mode and fails to explore the full distribution. While Parallel Tempering (PT) helps by running multiple chains at different "temperatures" (smoothed versions of the distribution), it introduces a new headache: researchers must manually choose the number of chains and their specific temperatures. If temperatures are too far apart, chains won't swap; if they are too close, you waste computational power.

Methods

The authors propose Adaptive Parallel Tempering (SML-APT) to turn this "black art" into an automated process. Their approach builds on three key components:

  1. Minimizing Return Time: Instead of just trying to keep swap rates constant, the algorithm minimizes the average "return time"—the time it takes a particle to travel from the "cold" target distribution to the "hottest" distribution and back.
  2. Online Beta Adaptation: Because the RBM's parameters change during training, the optimal temperatures also change. SML-APT uses an exponential moving average to track particle flow and updates the inverse temperatures ($\beta$) online. It specifically tries to make the fraction of "up-moving" particles linear across the chain indices.
  3. Dynamic Chain Spawning: The algorithm starts with a small number of chains. If the average swap rate between chains falls below a threshold (indicating a bottleneck), it automatically "spawns" a new chain at the most congested point in temperature space.

Datasets

The authors evaluated SML-APT on a complex synthetic dataset specifically designed to break standard samplers.

  • Structure: 28x28 binary images generated from a mixture of 5 components.
  • Challenge: The mixture weights and pixel flip probabilities were chosen to create a mix of modes—some very narrow and hard to find, others broad but difficult to escape. This "torture test" highlights the ergodicity limits of standard SML.

Key Insights and Ideas

  • Bottleneck Pooling: One of the most striking findings is that optimal temperatures are not uniformly or even geometrically spaced. Instead, they "pool" around phase transitions or bottlenecks in the energy landscape.
  • Ergodicity as Flow: By treating sampling as a flow problem (particles moving up and down a temperature ladder), the authors provide a principled way to measure if a sampler is actually working.
  • Automation vs. Performance: The paper demonstrates that you don't have to trade off computational complexity for ergodicity. By spawning chains only where needed, the sampler remains efficient while outperforming much larger, fixed-temperature setups.

Key Results

The experiments showed that standard SML completely failed to learn the synthetic dataset, with the model eventually diverging.

Figure 1: (a) Comparison of training likelihood as a function of time for standard SML, SML-PT with 10/20/50 chains and the proposed SML-APT (initialized with 10 chains). SML-APT adapts the temperature set T = {T1, ..., TM; T1 < Ti < TM} to minimize round trip time between chains T1 and TM, and modifies the number of chains M to maintain a minimal average swap rate. The resulting sampler exhibits greater ergodicity and yields better likelihood scores than standard SML and SML-PT, without requiring a careful hand-tuning of T . (b) Average return time of each algo- rithm. SML-APT successfully minimizes this metric resulting in a return time similar to SML-PT 10, while still outperforming SML-PT 50 in terms of likelihood. Errors bars represent standard error on the mean.

As seen in Figure 1(a), SML-APT achieved significantly higher log-likelihood scores than standard SML and even outperformed fixed SML-PT runs with 50 chains. Notably, SML-APT achieved these results using only about 20 chains on average. Figure 1(b) shows that SML-APT successfully kept the return time low and stable, whereas fixed-chain versions saw their return times skyrocket as the model became harder to sample during learning.

Limitations and Future Work

  • Computational Overhead: While SML-APT uses fewer chains than a large fixed PT setup, the current implementation's total computational cost was similar to a 50-chain fixed run. The authors suggest this could be optimized further.
  • Scaling to Real Data: The results are demonstrated on a synthetic dataset. The authors note that future work should validate this approach on larger, high-dimensional real-world datasets like MNIST or Caltech Silhouettes.
  • Hyper-hyperparameters: While it removes the need to tune temperatures, it introduces new parameters like the learning rate for $\beta$ and the minimum swap rate threshold for spawning. However, these appear to be more robust and easier to set than specific temperature values.

Summary updated

BibTeX
@misc{desjardins2010adaptive,
  author = {Guillaume Desjardins and Aaron C. Courville and Yoshua Bengio},
  title = {{Adaptive Parallel Tempering for Stochastic Maximum Likelihood Learning of RBMs}},
  year = {2010},
  eprint = {1012.3476},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1012.3476},
}
Figure