Restricted Boltzmann machine explained

A restricted Boltzmann machine (RBM) (also called a restricted Sherrington–Kirkpatrick model with external field or restricted stochastic Ising–Lenz–Little model) is a generative stochastic artificial neural network that can learn a probability distribution over its set of inputs.

RBMs were initially proposed under the name Harmonium by Paul Smolensky in 1986,[1] and rose to prominence after Geoffrey Hinton and collaborators used fast learning algorithms for them in the mid-2000s. RBMs have found applications in dimensionality reduction,[2] classification,[3] collaborative filtering,[4] feature learning,[5] topic modelling,[6] immunology,[7] and even manybody quantum mechanics.[8] [9] They can be trained in either supervised or unsupervised ways, depending on the task.

As their name implies, RBMs are a variant of Boltzmann machines, with the restriction that their neurons must form a bipartite graph:

By contrast, "unrestricted" Boltzmann machines may have connections between hidden units. This restriction allows for more efficient training algorithms than are available for the general class of Boltzmann machines, in particular the gradient-based contrastive divergence algorithm.[10]

Restricted Boltzmann machines can also be used in deep learning networks. In particular, deep belief networks can be formed by "stacking" RBMs and optionally fine-tuning the resulting deep network with gradient descent and backpropagation.[11]

Structure

The standard type of RBM has binary-valued (Boolean) hidden and visible units, and consists of a matrix of weights

W

of size

m x n

. Each weight element

(wi,j)

of the matrix is associated with the connection between the visible (input) unit

vi

and the hidden unit

hj

. In addition, there are bias weights (offsets)

ai

for

vi

and

bj

for

hj

. Given the weights and biases, the energy of a configuration (pair of boolean vectors) is defined as

E(v,h)=-\sumiaivi-\sumjbjhj-\sumi\sumjviwi,jhj

or, in matrix notation,

E(v,h)=-aTv-bTh-vTWh.

This energy function is analogous to that of a Hopfield network. As with general Boltzmann machines, the joint probability distribution for the visible and hidden vectors is defined in terms of the energy function as follows,[12]

P(v,h)=

1
Z

e-E(v,h)

where

Z

is a partition function defined as the sum of

e-E(v,h)

over all possible configurations, which can be interpreted as a normalizing constant to ensure that the probabilities sum to 1. The marginal probability of a visible vector is the sum of

P(v,h)

over all possible hidden layer configurations,[12]

P(v)=

1
Z

\sum\{h\

} e^,

and vice versa. Since the underlying graph structure of the RBM is bipartite (meaning there are no intra-layer connections), the hidden unit activations are mutually independent given the visible unit activations. Conversely, the visible unit activations are mutually independent given the hidden unit activations.[10] That is, for m visible units and n hidden units, the conditional probability of a configuration of the visible units, given a configuration of the hidden units, is

P(v|h)=

m
\prod
i=1

P(vi|h)

.

Conversely, the conditional probability of given is

P(h|v)=

n
\prod
j=1

P(hj|v)

.

The individual activation probabilities are given by

P(hj=1|v)=\sigma\left(bj+

m
\sum
i=1

wi,jvi\right)

and

P(vi=1|h)=\sigma\left(ai+

n
\sum
j=1

wi,jhj\right)

where

\sigma

denotes the logistic sigmoid.

The visible units of Restricted Boltzmann Machine can be multinomial, although the hidden units are Bernoulli. In this case, the logistic function for visible units is replaced by the softmax function

k
P(v
i

=1|h)=

k
\exp(a+\Sigmaj
k
W
ij
hj)
i
K
\Sigma
k'
\exp(a
i
+\Sigmaj
k'
W
ij
hj)
k'=1

where K is the number of discrete values that the visible values have. They are applied in topic modeling,[6] and recommender systems.[4]

Relation to other models

Restricted Boltzmann machines are a special case of Boltzmann machines and Markov random fields.[13] [14]

The graphical model of RBMs corresponds to that of factor analysis.[15]

Training algorithm

Restricted Boltzmann machines are trained to maximize the product of probabilities assigned to some training set

V

(a matrix, each row of which is treated as a visible vector

v

),

\argmaxW\prodvP(v)

or equivalently, to maximize the expected log probability of a training sample

v

selected randomly from

V

:[13] [14]

\argmaxWE\left[logP(v)\right]

The algorithm most often used to train RBMs, that is, to optimize the weight matrix

W

, is the contrastive divergence (CD) algorithm due to Hinton, originally developed to train PoE (product of experts) models.[16] [17] The algorithm performs Gibbs sampling and is used inside a gradient descent procedure (similar to the way backpropagation is used inside such a procedure when training feedforward neural nets) to compute weight update.

The basic, single-step contrastive divergence (CD-1) procedure for a single sample can be summarized as follows:

  1. Take a training sample, compute the probabilities of the hidden units and sample a hidden activation vector from this probability distribution.
  2. Compute the outer product of and and call this the positive gradient.
  3. From, sample a reconstruction of the visible units, then resample the hidden activations from this. (Gibbs sampling step)
  4. Compute the outer product of and and call this the negative gradient.
  5. Let the update to the weight matrix

W

be the positive gradient minus the negative gradient, times some learning rate:

\DeltaW=\epsilon(vhT-v'h'T)

.
  1. Update the biases and analogously:

\Deltaa=\epsilon(v-v')

,

\Deltab=\epsilon(h-h')

.

A Practical Guide to Training RBMs written by Hinton can be found on his homepage.[12]

Stacked Restricted Boltzmann Machine

See also: Deep belief network.

E=-

12\sum
i,j

{wij{si}{sj}}+\sumi{\thetai}{si}

. The training process of Restricted Boltzmann is similar to RBM. Restricted Boltzmann train one layer at a time and approximate equilibrium state with a 3-segment pass, not performing back propagation. Restricted Boltzmann uses both supervised and unsupervised on different RBM for pre-training for classification and recognition. The training uses contrastive divergence with Gibbs sampling: Δwij = e*(pij - p'ij)

See also

Bibliography

External links

Notes and References

  1. Book: Smolensky , Paul . David E.. Rumelhart. James L.. McLelland. Parallel Distributed Processing: Explorations in the Microstructure of Cognition, Volume 1: Foundations. MIT Press. 1986. 194–281. Chapter 6: Information Processing in Dynamical Systems: Foundations of Harmony Theory. https://stanford.edu/~jlmcc/papers/PDP/Volume%201/Chap6_PDP86.pdf. 0-262-68053-X. Connectionism.
  2. Hinton . G. E. . Salakhutdinov . R. R. . Reducing the Dimensionality of Data with Neural Networks . 10.1126/science.1127647 . Science . 313 . 5786 . 504–507 . 2006 . 16873662 . 2006Sci...313..504H . 1658773 . 2015-12-02 . 2015-12-23 . https://web.archive.org/web/20151223152006/http://www.cs.toronto.edu/~hinton/science.pdf . dead .
  3. Larochelle . H. . Bengio . Y. . 10.1145/1390156.1390224 . Classification using discriminative restricted Boltzmann machines . Proceedings of the 25th international conference on Machine learning - ICML '08 . 536 . 2008 . 978-1-60558-205-4 .
  4. 10.1145/1273496.1273596. Restricted Boltzmann machines for collaborative filtering. Proceedings of the 24th international conference on Machine learning - ICML '07. 791. 2007. Salakhutdinov . R. . Mnih . A. . Hinton . G. . 978-1-59593-793-3.
  5. Coates. Adam. Lee. Honglak. Ng. Andrew Y.. An analysis of single-layer networks in unsupervised feature learning. International Conference on Artificial Intelligence and Statistics (AISTATS). 2011. 2014-12-19. 2014-12-20. https://web.archive.org/web/20141220030058/http://cs.stanford.edu/~acoates/papers/coatesleeng_aistats_2011.pdf. dead.
  6. Ruslan Salakhutdinov and Geoffrey Hinton (2010). Replicated softmax: an undirected topic model . Neural Information Processing Systems 23.
  7. Bravi . Barbara . Di Gioacchino . Andrea . Fernandez-de-Cossio-Diaz . Jorge . Walczak . Aleksandra M . Mora . Thierry . Cocco . Simona . Monasson . Rémi . 2023-09-08 . Bitbol . Anne-Florence . Eisen . Michael B . A transfer-learning approach to predict antigen immunogenicity and T-cell receptor specificity . eLife . 12 . e85126 . 10.7554/eLife.85126 . free . 2050-084X . 10522340 . 37681658.
  8. Carleo. Giuseppe. Troyer. Matthias. 2017-02-10. Solving the quantum many-body problem with artificial neural networks. Science. en. 355. 6325. 602–606. 10.1126/science.aag2302. 28183973. 0036-8075. 1606.02318. 2017Sci...355..602C. 206651104.
  9. Melko. Roger G.. Carleo. Giuseppe. Carrasquilla. Juan. Cirac. J. Ignacio. September 2019. Restricted Boltzmann machines in quantum physics. Nature Physics. en. 15. 9. 887–892. 10.1038/s41567-019-0545-1. 2019NatPh..15..887M. 1745-2481. 256704838 .
  10. Miguel Á. Carreira-Perpiñán and Geoffrey Hinton (2005). On contrastive divergence learning. Artificial Intelligence and Statistics.
  11. Hinton . G. . Deep belief networks . 10.4249/scholarpedia.5947 . free. Scholarpedia . 4 . 5 . 5947 . 2009 . 2009SchpJ...4.5947H.
  12. Geoffrey Hinton (2010). A Practical Guide to Training Restricted Boltzmann Machines. UTML TR 2010–003, University of Toronto.
  13. Ilya . Sutskever . Tijmen . Tieleman . 2010 . On the convergence properties of contrastive divergence . Proc. 13th Int'l Conf. On AI and Statistics (AISTATS) . dead . https://web.archive.org/web/20150610230811/http://machinelearning.wustl.edu/mlpapers/paper_files/AISTATS2010_SutskeverT10.pdf . 2015-06-10 .
  14. Asja Fischer and Christian Igel. Training Restricted Boltzmann Machines: An Introduction . Pattern Recognition 47, pp. 25-39, 2014
  15. María Angélica Cueto . Jason Morton . Bernd Sturmfels . 2010 . Geometry of the restricted Boltzmann machine . Algebraic Methods in Statistics and Probability . 516 . American Mathematical Society . 0908.4425 . 2009arXiv0908.4425A .
  16. Geoffrey Hinton (1999). Products of Experts. ICANN 1999.
  17. Hinton . G. E. . Training Products of Experts by Minimizing Contrastive Divergence . 10.1162/089976602760128018 . Neural Computation . 14 . 8 . 1771–1800 . 2002 . 12180402. 207596505 .