A Deterministic and Generalized Framework for Unsupervised Learning with Restricted Boltzmann Machines

Eric W. Tramel, Marylou Gabrié, Andre Manoel, Francesco Caltagirone, Florent KrzakalaarXiv 2017 · DOI

Abstract

Restricted Boltzmann machines (RBMs) are energy-based neural-networks which are commonly used as the building blocks for deep architectures neural architectures. In this work, we derive a deterministic framework for the training, evaluation, and use of RBMs based upon the Thouless-Anderson-Palmer (TAP) mean-field approximation of widely-connected systems with weak interactions coming from spin-glass theory. While the TAP approach has been extensively studied for fully-visible binary spin systems, our construction is generalized to latent-variable models, as well as to arbitrarily distributed real-valued spin systems with bounded support. In our numerical experiments, we demonstrate the effective deterministic training of our proposed models and are able to show interesting features of unsupervised learning which could not be directly observed with sampling. Additionally, we demonstrate how to utilize our TAP-based framework for leveraging trained RBMs as joint priors in denoising problems.

Introduction

This research, a collaboration between OWKIN and École Normale Supérieure, bridges the gap between statistical physics and deep learning. It introduces a deterministic methodology for training and analyzing Restricted Boltzmann Machines (RBMs), moving away from the stochastic "black box" of traditional Markov Chain Monte Carlo (MCMC) sampling. By leveraging the Thouless-Anderson-Palmer (TAP) approximation from spin-glass theory, the authors provide a transparent way to visualize and evaluate model learning.

The Deterministic TAP Framework

Restricted Boltzmann Machines are fundamental energy-based models that are traditionally difficult to train due to the intractability of the partition function. Standard methods like Contrastive Divergence (CD) rely on MCMC, which introduces stochastic noise, makes likelihood calculation nearly impossible, and obscures the model's internal representational states.

The architecture of a Generalized Restricted Boltzmann Machine (GRBM), showing visible units, hidden units, and their associated potential functions.

The core contribution of this work is the derivation of the TAP free energy for a Generalized RBM (GRBM). Unlike a "naive" mean-field approach that assumes neurons act independently based on an average field, the TAP approximation adds a "reaction term." This term accounts for feedback loops in widely connected systems with weak interactions, allowing for a more accurate deterministic representation. This framework supports any distribution with bounded support, such as truncated Gaussians, enabling the model to process real-valued data like grayscale pixels naturally.

The Geometry of Learning

By utilizing the TAP framework, unsupervised learning can be viewed as the process of shaping a free energy landscape. Finding the internal state of the model for a given input becomes a matter of iterating deterministic fixed-point equations until they converge to a "magnetization" state.

An illustration of the TAP free energy landscape, where learning involves arranging minima to correlate with training data.

This perspective allows researchers to "watch" the model learn by tracking the number of unique TAP solutions (minima). Early in training, the landscape typically has a single solution. As the model learns features, the landscape becomes more complex. However, if the number of solutions explodes, the model may enter a "spin-glass phase," indicating it is memorizing data rather than learning generalizable features.

Experimental Results

The framework was evaluated on Binary-MNIST, Real-MNIST (grayscale), and the CBCL Face Database. Key findings include:

  • Competitive Training: The TAP-based deterministic training produced receptive fields qualitatively similar to state-of-the-art stochastic methods like CD-k.
  • Denoising Performance: In bit-flip noise experiments, the TAP-RBM outperformed Bayes-optimal pointwise estimators. By finding the nearest stable magnetization state, the model effectively cleaned noisy images while maintaining structural integrity.
  • Analytic Scoring: The framework provides a "per-unit" TAP log-likelihood, offering a concrete metric to monitor training progress—a feature usually unavailable for standard RBMs.

Limitations and Future Work

While effective, the TAP approximation assumes weak interactions (weights scaling as $1/\sqrt{N}$). Very large weights can lead to inaccuracies or divergence. Additionally, in models with many hidden units, the system can occasionally get trapped in spurious local minima during denoising tasks. Future research aims to extend this deterministic framework to Deep Boltzmann Machines (DBMs) to explore the dynamics of "Deep TAP Machines."

Summary updated

BibTeX
@misc{tramel2017deterministic,
  author = {Eric W. Tramel and Marylou Gabrié and Andre Manoel and Francesco Caltagirone and Florent Krzakala},
  title = {{A Deterministic and Generalized Framework for Unsupervised Learning with Restricted Boltzmann Machines}},
  year = {2017},
  eprint = {1702.03260},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1702.03260},
}
Figure