Deep belief network

Also known as: DBN

On this page 7

A deep belief network (DBN) is a probabilistic generative model composed of several layers of stochastic hidden units, usually built by stacking restricted Boltzmann machines and training them one layer at a time. In the history of neural networks, the DBN introduced by Geoffrey Hinton, Simon Osindero and Yee-Whye Teh in 2006 showed that deep architectures could be trained effectively, which helped launch the deep learning era.

A DBN learns a hierarchy of features without labels: each layer models the statistical structure of the layer below. The trained network can generate new samples, or it can initialize a discriminative network that is then fine-tuned with backpropagation for classification.

How a deep belief network is structured

A deep belief network is a hybrid graphical model with undirected connections at the top and directed connections below. The top two layers form an undirected restricted Boltzmann machine that acts as an associative memory. The lower layers form a directed sigmoid belief network whose connections point downward, from hidden causes toward the visible data.

There are no connections within a layer, only between adjacent layers. This restriction makes the hidden units of each layer conditionally independent given the layer below, so inference about one layer can be computed in a single parallel step.

The table below summarizes the parts of a typical DBN.

PartConnection typeFunction
Visible layerDirected from layer aboveHolds the observed data, such as pixels
Lower hidden layersDirected, top-down generative weightsRepresent increasingly abstract features
Top two layersUndirected, symmetric weightsForm an associative memory as an RBM
Recognition weightsBottom-up copies of generative weightsProvide fast approximate inference
Layers and connections in a deep belief network

Greedy layer-wise training

A DBN is trained by greedy layer-wise pretraining, which treats each pair of adjacent layers as a separate restricted Boltzmann machine. The first RBM learns to model the raw data. Its hidden activations then become the training data for the next RBM, and the process repeats until the desired depth is reached.

Each RBM is usually trained with contrastive divergence, an approximate gradient method that runs only a short Gibbs sampling chain, often a single step (CD-1). Hinton and colleagues proved that adding a layer this way improves a variational lower bound on the log-likelihood of the data, under certain conditions on how the new layer is initialized.

PhaseMethodUses labelsResult
PretrainingContrastive divergence per RBMNoLayer-by-layer feature hierarchy
Generative fine-tuningUp-down (wake-sleep variant) algorithmOptionalBetter generative model
Discriminative fine-tuningBackpropagation with an output layerYesAccurate classifier
Training phases of a deep belief network

The key insight was that unsupervised pretraining places the weights in a good region of parameter space. Subsequent backpropagation then needs only modest adjustments, which reduced the effect of the vanishing gradient problem that made deep networks hard to train from random initialization at the time.

Key hyperparameters and their effects

Training a DBN involves several hyperparameters inherited from RBMs, and their values strongly affect stability and quality. The ranges below are typical starting points rather than fixed rules.

HyperparameterCommon rangeEffect when poorly set
Number of hidden layers2 to 5Too many adds cost with little gain
Units per layerHundreds to a few thousandToo few lose detail, too many overfit
Gibbs steps in contrastive divergence1 to 10More steps cost time but reduce bias
Learning rateAbout 0.001 to 0.1High values cause divergence
Weight decayAbout 0.0001 to 0.001Too little leads to large, unstable weights
Mini-batch size10 to 100 examplesVery small batches add gradient noise
Typical deep belief network settings

Real-valued inputs such as audio features need a Gaussian-Bernoulli RBM in the first layer instead of the standard binary version. That variant is more sensitive to the learning rate and usually requires normalized inputs.

A DBN is often confused with similar architectures, but it differs in structure, training and inference. The comparison below places it among its closest neighbors.

ModelConnectionsTraining approachMain use
Deep belief networkUndirected top, directed belowGreedy RBM stacking, then fine-tuningGeneration and pretraining
Deep Boltzmann machineUndirected in all layersJoint training with mean-field inferenceGenerative modeling
Stacked autoencoderDeterministic encoder and decoderLayer-wise reconstruction, then fine-tuningFeature learning
Feedforward neural networkDirected, deterministicBackpropagation from random weightsSupervised prediction
DBN versus related architectures

The term is sometimes used loosely for any stack of RBMs fine-tuned as a classifier. Strictly, once the network is converted into a deterministic feedforward model and trained with backpropagation, it is a DBN-initialized neural network, not a generative DBN.

Impact, decline and remaining uses

Deep belief networks had an outsized historical impact between 2006 and about 2012. A DBN reached roughly 1.25 percent error on MNIST handwritten digits without convolution, and DBN-pretrained acoustic models improved phone recognition on the TIMIT benchmark, which encouraged industry adoption of deep learning in speech.

Their use then declined sharply. ReLU activations, careful weight initialization, dropout, batch normalization and large labeled datasets made pretraining unnecessary for most supervised tasks. Generative modeling moved to variational autoencoders, GANs and diffusion models, which scale better and are easier to train.

  • Likelihood is intractable, so model comparison relies on approximations such as annealed importance sampling.
  • Sampling is slow, because Gibbs chains mix poorly in the top-level RBM.
  • Training is fiddly, with many interacting hyperparameters.
  • DBNs remain useful in teaching, small tabular datasets and research on energy-based models.

In everyday language

Picture learning to read in stages. First you notice strokes. Then you see letters. Then you recognize whole words. Each stage builds on the one before it.

A deep belief network learns the same way. Each layer learns patterns from the layer below it, one layer at a time. It needs no answers or labels to do this. Afterward, the network can create new examples that look like its training data. It can also be adjusted with labeled examples to sort things into categories.

Seen in the real world

Around 2009, speech researchers wanted better acoustic models for recognizing spoken sounds. They trained a deep belief network on short windows of audio features, using a Gaussian-Bernoulli first layer and several binary hidden layers with about 2,000 units each. Pretraining ran without labels on hours of recorded speech.

The team then added an output layer for phone classes and fine-tuned the whole network with backpropagation. On the TIMIT benchmark, the pretrained network achieved a lower phone error rate than the Gaussian mixture models that had dominated the field. That result persuaded major speech groups to test deep networks on large vocabulary tasks, which led to production speech recognizers based on deep learning within a few years.