Deep Belief Network (DBN)

Machine Learning
Introduced by
Geoffrey Hinton, Simon Osindero & Yee-Whye Teh
Year
2006
Type
Generative probabilistic model
Family
Generative / pretraining

What does it do?

A Deep Belief Network (DBN) is a generative probabilistic model made of several layers of stochastic latent variables.

Hinton, Osindero, and Teh introduced the greedy, layer-by-layer training procedure in 2006, showing that a deep directed belief network could be learned one layer at a time, provided the top two layers form an undirected associative memory. In this formulation the top two layers form a Restricted Boltzmann Machine (RBM), and the lower layers are directed connections. The network is built by stacking RBMs during pretraining and can then be fine-tuned.

The intuition behind the method

Think of learning to recognise handwritten digits by first learning simple stroke-like patterns, then combining them into larger parts, and then into whole digit shapes, with each level built on the one below. A DBN follows this idea: each RBM layer learns a probabilistic representation of the layer beneath it. Because the layers are trained one at a time before being stacked, the learning problem is split into smaller steps. The 2006 paper shows that this greedy procedure yields a good starting point for the full network, which a slower joint fine-tuning step can then refine.

History

Hinton, Osindero, and Teh published the DBN paper in Neural Computation in 2006. It showed that a deep directed network could be learned layer by layer using complementary priors and a fast greedy algorithm, and that a three-hidden-layer model fine-tuned in this way was a good generative model of handwritten digit images and their labels. The paper reported that this generative model classified digits better than the discriminative algorithms it was compared with. The work is often cited as an early step in the renewed interest in deep learning.

When to use it

Choose a DBN when unlabelled data are plentiful, labelled data are scarce, and a generative model is useful, for example for data synthesis or density estimation. It is also an option for feature learning on data such as digit images or speech features. Do not choose a DBN when labelled data are abundant and a task-specific architecture is available, since convolutional networks for images and recurrent or transformer networks for sequences are generally preferred. It is also a poor fit when compute is tight, because pretraining each layer adds a separate training stage. Input assumptions: standard Bernoulli RBMs expect binary or [0, 1]-valued visible units, so inputs such as pixel intensities should be scaled to that range. For real-valued data, a Gaussian visible layer is the usual alternative. Because the exact likelihood of a DBN is intractable, judge results by reconstruction error, by the quality of generated samples, or by downstream classification accuracy on held-out data, and compare against an end-to-end baseline on your own data.

Limitations and considerations

  • Pretraining each RBM layer is an additional training stage, so the overall pipeline is more involved than training a feed-forward network end-to-end
  • CD is a biased approximation to the likelihood gradient, so training does not optimise the exact likelihood and convergence is not guaranteed to reach the true maximum
  • For image and sequence tasks with large labelled datasets, convolutional, recurrent and transformer models have largely replaced DBNs
  • The number of layers, hidden units per layer and learning rates all interact, and suitable settings depend on the problem

Source conditions do not replace independent scientific review or validation by an analysis engine.

Strengths

  • Unsupervised greedy pretraining allows the model to learn useful weights from mostly unlabelled data before any labels are used
  • Training one RBM layer at a time gives each stage a smaller, well-defined learning problem, which the 2006 paper uses as the core of its method
  • The same model can be used generatively, to model the joint distribution of images and labels, and discriminatively, after fine-tuning for classification
  • Stacking hidden layers produces a hierarchy of representations, from low-level features in the lower layers to more abstract ones near the top

Applications

  • Handwritten digit recognition, the image setting used in the 2006 paper
  • Speech feature learning and acoustic modelling in audio processing
  • Generative modelling, such as synthesising data samples and estimating densities
  • Unsupervised learning of low-dimensional, non-linear representations of high-dimensional data

How it works

How it works

1

Each RBM is trained on its own, using Contrastive Divergence (CD) to approximate the log-likelihood gradient. The first RBM is trained on the data; its hidden activations then serve as the visible input for the next RBM. The procedure is greedy: each layer is fixed once trained, and the next is learned on top of it. The formula shown is a schematic of the likelihood objective that each RBM aims to increase; it is not the CD update rule itself.

Formula
\text{Train RBM}^{(l)} \text{ by maximizing } \log P(\mathbf{v}) \approx \sum_{\mathbf{v}} \tilde{P}(\mathbf{v}) \log P(\mathbf{v})
2

After pretraining, the RBMs are combined into one deep model. The joint distribution over the visible units and the hidden layers is a sum over hidden states of a joint term for the top two layers multiplied by conditional distributions for each lower layer. In the 2006 formulation the top two layers form an undirected associative memory (an RBM), while the lower layers are directed connections. This structure gives the model its deep, multi-level character.

Formula
P(\mathbf{v}) = \sum_{\mathbf{h}^{(1)}, \ldots, \mathbf{h}^{(L)}} P(\mathbf{h}^{(L-1)}, \mathbf{h}^{(L)}) \prod_{l=0}^{L-2} P(\mathbf{h}^{(l)} \mid \mathbf{h}^{(l+1)})
3

In the 2006 paper, the stacked network is fine-tuned with a contrastive version of the wake-sleep algorithm. In the wake phase, data are propagated upward through the recognition weights and the generative weights are adjusted; in the sleep phase, samples are generated top-down and the recognition weights are adjusted. The formula shown is the contrastive term (data-driven minus model-driven statistics) of the kind used to train the top-level associative memory, not the full wake-sleep procedure. This stage refines the generative model without requiring labels.

Formula
\Delta W_{ij} \propto \langle v_i h_j \rangle_{\text{data}} - \langle v_i h_j \rangle_{\text{model}}
4

For classification, a common later practice is to place a softmax output on the top hidden layer and fine-tune the whole network on labelled data by back-propagation. This differs from the 2006 paper, which fine-tuned the generative model with the contrastive wake-sleep procedure and modelled the joint distribution of images and labels. In both cases, generative pretraining supplies the initial weights.

Formula
\hat{y} = \operatorname*{arg\,max}_{c}\, P(y = c \mid \mathbf{h}^{(L)};\, W_{\text{top}})

Common pitfalls

  • Skipping the unsupervised pretraining and training the network end-to-end from random initialisation removes the main benefit of the DBN design and can give weaker results
  • Running too few CD or Gibbs sampling steps produces a biased gradient estimate, which can leave the generative model poorly fitted
  • Training a large DBN on a small dataset without regularisation risks overfitting, because the parameters are spread across many layers
  • DBNs and Deep Boltzmann Machines (DBMs) are different models: a DBN uses directed connections in all layers except the top pair, whereas a DBM uses undirected connections throughout, so their inference and training procedures differ

Frequently asked questions

How does a DBN differ from a standard multilayer perceptron?

A multilayer perceptron is a discriminative, feed-forward model usually trained end-to-end with back-propagation on labelled data. A DBN is a generative probabilistic model that is first pretrained one layer at a time, without labels, using RBMs, and can then be fine-tuned for a supervised task. Unsupervised pretraining can help when labelled data are scarce, but its benefit depends on the dataset and task, so compare against end-to-end training on your own data before choosing a DBN.

Is a DBN the same as a stack of Restricted Boltzmann Machines?

A DBN is built by stacking RBMs and uses their learned weights as initialisation, but the resulting model is not simply a set of independent RBMs. In the 2006 formulation, the top two layers keep an undirected RBM structure, while the lower layers are directed connections. The joint distribution of the full network therefore differs from the product of the individual RBM distributions.

Are DBNs still used in practice today?

DBNs are rarely the first choice for new deep learning tasks with large labelled datasets, where convolutional, recurrent and transformer architectures trained end-to-end are usually preferred. They remain relevant when labelled data are scarce, for generative modelling, and as an example of how hierarchical representations can be learned within a probabilistic framework.

Related methods

Sources

  1. Hinton, G. E., Osindero, S., & Teh, Y.-W. (2006). A fast learning algorithm for deep belief nets. Neural Computation, 18(7), 1527–1554.

    Open DOI reference