ArticleslgStudy

mathematics

Boltzmann machine

Boltzmann machine is a mathematics topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Boltzmann machine rather than just read about it. In short: A Boltzmann machine is a simple kind of artificial neural network. It consists of a set of vertices, analogous to the neurons of a brain, which are connected to each other by edges, analogous to the connections between neurons.

Boltzmann machine — main illustration
Boltzmann machine — illustration

Key takeaways

  • Boltzmann machine belongs to mathematics; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Boltzmann machine to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Boltzmann machine from memory before moving on to harder problems.

Reference excerpt

A Boltzmann machine is a simple kind of artificial neural network. It consists of a set of vertices, analogous to the neurons of a brain, which are connected to each other by edges, analogous to the connections between neurons. Each vertex has a "bias" associated with it, and each edge has a "weight" associated with it. A vertex is either "on" or "off". Its state is either "clamped", meaning fixed from outside, or left free, in which case the vertex chooses its own state at random, with a probability of being on that depends on its bias plus the weights of its edges to the other vertices that are currently on. A positive weight means two vertices tend to be on together, a negative weight means they tend to disagree, and a bias sets how readily a vertex turns on by itself. The machine can be used in two modes. In "learning" mode, it takes a dataset of on/off patterns (binary vectors) and gradually adjusts its weights and biases until the patterns it produces when left to run freely occur about as often as they do in the data. In "query" mode, some vertices are clamped to known values and the rest are left free; how often each free vertex turns on tells you how likely it is, given what is known. For example, a machine trained on weather records, with "cloudy" clamped on, will be able to report how likely rain is. A Boltzmann machine (also called Sherrington–Kirkpatrick model with external field or stochastic Ising model), named after Ludwig Boltzmann, is a spin-glass model with an external field, i.e., a Sherrington–Kirkpatrick model, that is a stochastic Ising model. It is a statistical physics technique applied in the context of cognitive science. It is also classified as a Markov random field. Boltzmann machines are theoretically intriguing because of the locality and Hebbian nature of their training algorithm (being trained by Hebb's rule), and because of their parallelism and the resemblance of their dynamics to simple physical processes. Boltzmann machines with unconstrained connectivity have not been 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. They were developed by Geoffrey Hinton, Terry Sejnowski and coworkers in 1983–1985 and popularized in the cognitive science and machine learning communities, as part of "energy-based models" (EBM), because Hamiltonians of spin glasses as energy are used as a starting point to define the learning task.

Structure

A Boltzmann machine, like a Sherrington–Kirkpatrick model, is a network of units with a total "energy" (Hamiltonian) defined for the overall network. Its units produce binary results. Its units are stochastic: each unit decides at random whether to be on or off. The global energy E in a Boltzmann machine is identical in form to that of Hopfield networks and Ising models:

E=−(∑i<jwijsisj+∑iθisi) Where:

wij is the connection strength between unit j and unit i. si is the state, si∈{0,1}, of unit i. θi is the bias of unit i in the global energy function. (−θi is the activation threshold for the unit.) Often the weights wij are represented as a symmetric matrix W=[wij] with zeros along the diagonal.

Unit state probability The difference in the global energy that results from a single unit i equaling 0 (off) versus 1 (on), written ΔEi, assuming a symmetric matrix of weights, is given by:

ΔEi=∑j>iwijsj+∑j<iwjisj+θi This can be expressed as the difference of energies of two states:

ΔEi=Ei=off−Ei=on Substituting the energy of each state with its relative probability according to the Boltzmann factor (the property of a Boltzmann distribution that the energy of a state is proportional to the negative log probability of that state) yields:

ΔEi=−kBTln⁡(pi=off)−(−kBTln⁡(pi=on)), where kB is the Boltzmann constant and is absorbed into the artificial notion of temperature T. Noting that the probabilities of the unit being on or off sum to 1 allows for the simplification:

−ΔEikBT=−ln⁡(pi=on)+ln⁡(pi=off)=ln⁡(1−pi=onpi=on)=ln⁡(pi=on−1−1), whence the probability that the i-th unit is on is given by

pi=on=11+exp⁡(−ΔEikBT), where the scalar T 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 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 P+(V). 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 P−(V). Our goal is to approximate the "real" distribution P+(V) using the P−(V) produced by the machine. The similarity of the two distributions is measured by the Kullback–Leibler divergence, G:

… excerpt ends here. Continue reading the full article.

Illustrations

Boltzmann machine: A graphical representation of an example Boltzmann machine. Each undirected edge represents dependency. In this example there are 3 hidden units and 4 visible units. This is not a restricted Boltzmann machine.
A graphical representation of an example Boltzmann machine. Each undirected edge represents dependency. In this example there are 3 hidden units and 4 visible units. This is not a restricted Boltzmann machine.
Boltzmann machine: A graphical representation of a Boltzmann machine with a few weights labeled. Each undirected edge represents dependency and is weighted with weight wij. In this example there are 3 hidden units (blue) and 4 visible units (white). This is not a restricted Boltzmann machine.
A graphical representation of a Boltzmann machine with a few weights labeled. Each undirected edge represents dependency and is weighted with weight wij. In this example there are 3 hidden units (blue) and 4 visible units (white). This is not a restricted Boltzmann machine.
Boltzmann machine: Graphical representation of a restricted Boltzmann machine. The four blue units represent hidden units, and the three red units represent visible states. In restricted Boltzmann machines there are only connections (dependencies) between hidden and visible units, and none between units of the same type (no hidden-hidden, nor visible-visible connections).
Graphical representation of a restricted Boltzmann machine. The four blue units represent hidden units, and the three red units represent visible states. In restricted Boltzmann machines there are only connections (dependencies) between hidden and visible units, and none between units of the same type (no hidden-hidden, nor visible-visible connections).

Worked examples

Example 1 — a first encounter with Boltzmann machine

Start with the simplest possible case. Write down what Boltzmann machine claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In mathematics, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Boltzmann machine before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Boltzmann machine ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Boltzmann machine

In research
Boltzmann machine appears in mathematics research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Boltzmann machine in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Boltzmann machine is common in secondary-school and first-year university syllabi. It links to neighbouring topics Ludwig Boltzmann, Mathematical physics, Neural network architectures, so understanding it makes those chapters shorter.
In everyday life
Look for Boltzmann machine outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Boltzmann machine” →

How to study Boltzmann machine in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Boltzmann machine means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Boltzmann machine out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Boltzmann machine in simple terms?

A Boltzmann machine is a simple kind of artificial neural network. It consists of a set of vertices, analogous to the neurons of a brain, which are connected to each other by edges, analogous to the connections between neurons.

Why does Boltzmann machine matter?

Because it connects several mathematics ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Boltzmann machine?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Boltzmann machine.

Tags

  • Ludwig Boltzmann
  • Mathematical physics
  • Neural network architectures

Keep exploring