Boltzmann machine
A Boltzmann machine is a type of stochastic recurrent neural network. It is a Markov random field. It was translated from statistical physics for use in cognitive science. The Boltzmann machine is based on stochastic spin-glass model with an external field, i.e., a Sherrington–Kirkpatrick model that is a stochastic Ising Model and applied to machine learning.
Boltzmann machines can be seen as the stochastic, generative counterpart of Hopfield networks. They were one of the first neural networks capable of learning internal representations, and are able to represent and solve combinatoric problems.
They are theoretically intriguing because of the locality and Hebbian nature of their training algorithm, and because of their parallelism and the resemblance of their dynamics to simple physical processes. Boltzmann machines with unconstrained connectivity have not proven useful for practical problems in machine learning or inference, but if the connectivity is properly constrained, the learning can be made efficient enough to be useful for practical problems.
They are named after the Boltzmann distribution in statistical mechanics, which is used in their sampling function. That's why they are called "energy based models". They were invented in 1985 by Geoffrey Hinton, then a Professor at Carnegie Mellon University, and Terry Sejnowski, then a Professor at Johns Hopkins University.
Structure
A Boltzmann machine, like a Hopfield network, is a network of units with an "energy" defined for the overall network. Its units produce binary results. Unlike Hopfield nets, Boltzmann machine units are stochastic. The global energy in a Boltzmann machine is identical in form to that of Hopfield networks and Ising models:Where:
- is the connection strength between unit and unit.
- is the state,, of unit.
- is the bias of unit in the global energy function.
Unit state probability
The difference in the global energy that results from a single unit equaling 0 versus 1, written, assuming a symmetric matrix of weights, is given by:This can be expressed as the difference of energies of two states:
Substituting the energy of each state with its relative probability according to the Boltzmann factor gives:
where is Boltzmann's constant and is absorbed into the artificial notion of temperature. We then rearrange terms and consider that the probabilities of the unit being on and off must sum to one:
Solving for, the probability that the -th unit is on gives:
where the scalar is referred to as the temperature of the system. This relation is the source of the logistic function found in probability expressions in variants of the Boltzmann machine.
Equilibrium state
The network runs by repeatedly choosing a unit and resetting its state. After running for long enough at a certain temperature, the probability of a global state of the network depends only upon that global state's energy, according to a Boltzmann distribution, and not on the initial state from which the process was started. This means that log-probabilities of global states become linear in their energies. This relationship is true when the machine is "at thermal equilibrium", meaning that the probability distribution of global states has converged. Running the network beginning from a high temperature, its temperature gradually decreases until reaching a thermal equilibrium at a lower temperature. It then may converge to a distribution where the energy level fluctuates around the global minimum. This process is called simulated annealing.To train the network so that the chance it will converge to a global state according to an external distribution over these states, the weights must be set so that the global states with the highest probabilities get the lowest energies. This is done by training.
Training
The units in the Boltzmann machine are divided into 'visible' units, V, and 'hidden' units, H. The visible units are those that receive information from the 'environment', i.e. the training set is a set of binary vectors over the set V. The distribution over the training set is denoted.The distribution over global states converges as the Boltzmann machine reaches thermal equilibrium. We denote this distribution, after we marginalize it over the hidden units, as.
Our goal is to approximate the "real" distribution using the produced by the machine. The similarity of the two distributions is measured by the Kullback–Leibler divergence, :
where the sum is over all the possible states of. is a function of the weights, since they determine the energy of a state, and the energy determines, as promised by the Boltzmann distribution. A gradient descent algorithm over, changes a given weight, by subtracting the partial derivative of with respect to the weight.
Boltzmann machine training involves two alternating phases. One is the "positive" phase where the visible units' states are clamped to a particular binary state vector sampled from the training set. The other is the "negative" phase where the network is allowed to run freely, i.e. no units have their state determined by external data. The gradient with respect to a given weight,, is given by the equation:
where:
- is the probability that units i and j are both on when the machine is at equilibrium on the positive phase.
- is the probability that units i and j are both on when the machine is at equilibrium on the negative phase.
- denotes the learning rate
This learning rule is biologically plausible because the only information needed to change the weights is provided by "local" information. That is, the connection does not need information about anything other than the two neurons it connects. This is more biologically realistic than the information needed by a connection in many other neural network training algorithms, such as backpropagation.
The training of a Boltzmann machine does not use the EM algorithm, which is heavily used in machine learning. By minimizing the KL-divergence, it is equivalent to maximizing the log-likelihood of the data. Therefore, the training procedure performs gradient ascent on the log-likelihood of the observed data. This is in contrast to the EM algorithm, where the posterior distribution of the hidden nodes must be calculated before the maximization of the expected value of the complete data likelihood during the M-step.
Training the biases is similar, but uses only single node activity:
Problems
Theoretically the Boltzmann machine is a rather general computational medium. For instance, if trained on photographs, the machine would theoretically model the distribution of photographs, and could use that model to, for example, complete a partial photograph.Unfortunately, Boltzmann machines experience a serious practical problem, namely that it seems to stop learning correctly when the machine is scaled up to anything larger than a trivial size. This is due to important effects, specifically:
- the required time order to collect equilibrium statistics grows exponentially with the machine's size, and with the magnitude of the connection strengths
- connection strengths are more plastic when the connected units have activation probabilities intermediate between zero and one, leading to a so-called variance trap. The net effect is that noise causes the connection strengths to follow a random walk until the activities saturate.
Types
Restricted Boltzmann machine
Although learning is impractical in general Boltzmann machines, it can be made quite efficient in a restricted Boltzmann machine which does not allow intralayer connections between hidden units and visible units, i.e. there is no connection between visible to visible and hidden to hidden units. After training one RBM, the activities of its hidden units can be treated as data for training a higher-level RBM. This method of stacking RBMs makes it possible to train many layers of hidden units efficiently and is one of the most common deep learning strategies. As each new layer is added the generative model improves.An extension to the restricted Boltzmann machine allows using real valued data rather than binary data.
One example of a practical RBM application is in speech recognition.
Deep Boltzmann machine
A deep Boltzmann machine is a type of binary pairwise Markov random field with multiple layers of hidden random variables. It is a network of symmetrically coupled stochastic binary units. It comprises a set of visible units and layers of hidden units. No connection links units of the same layer. For the, the probability assigned to vector iswhere are the set of hidden units, and are the model parameters, representing visible-hidden and hidden-hidden interactions. In a DBN only the top two layers form a restricted Boltzmann machine, while lower layers form a directed generative model. In a DBM all layers are symmetric and undirected.
Like DBNs, DBMs can learn complex and abstract internal representations of the input in tasks such as object or speech recognition, using limited, labeled data to fine-tune the representations built using a large set of unlabeled sensory input data. However, unlike DBNs and deep convolutional neural networks, they pursue the inference and training procedure in both directions, bottom-up and top-down, which allow the DBM to better unveil the representations of the input structures.
However, the slow speed of DBMs limits their performance and functionality. Because exact maximum likelihood learning is intractable for DBMs, only approximate maximum likelihood learning is possible. Another option is to use mean-field inference to estimate data-dependent expectations and approximate the expected sufficient statistics by using Markov chain Monte Carlo. This approximate inference, which must be done for each test input, is about 25 to 50 times slower than a single bottom-up pass in DBMs. This makes joint optimization impractical for large data sets, and restricts the use of DBMs for tasks such as feature representation.
Spike-and-slab RBMs
The need for deep learning with real-valued inputs, as in Gaussian RBMs, led to the spike-and-slab RBM, which models continuous-valued inputs with binary latent variables. Similar to basic RBMs and its variants, a spike-and-slab RBM is a bipartite graph, while like GRBMs, the visible units are real-valued. The difference is in the hidden layer, where each hidden unit has a binary spike variable and a real-valued slab variable. A spike is a discrete probability mass at zero, while a slab is a density over continuous domain; their mixture forms a prior.An extension of ssRBM called µ-ssRBM provides extra modeling capacity using additional terms in the energy function. One of these terms enables the model to form a conditional distribution of the spike variables by marginalizing out the slab variables given an observation.
History
The Boltzmann machine is based on a spin-glass model of Sherrington-Kirkpatrick's stochastic Ising Model.The original contribution in applying such energy based models in cognitive science appeared in papers by Hinton and Sejnowski.
The seminal publication by John Hopfield connected physics and statistical mechanics, mentioning spin glasses.
The idea of applying the Ising model with annealed Gibbs sampling is present in Douglas Hofstadter's Copycat project.
Similar ideas are found in Paul Smolensky's "Harmony Theory".
The explicit analogy drawn with statistical mechanics in the Boltzmann Machine formulation led to the use of terminology borrowed from physics, which became standard in the field. The widespread adoption of this terminology may have been encouraged by the fact that its use led to the adoption of a variety of concepts and methods from statistical mechanics. The various proposals to use simulated annealing for inference were apparently independent. Helmholtz made a similar analogy during the dawn of psychophysics.
Ising models became considered to be a special case of Markov random fields, which find widespread application in linguistics, robotics, computer vision and artificial intelligence.