Boltzmann machines and energy-based models

2017·Arxiv

Abstract

Abstract

We review Boltzmann machines and energy-based models. A Boltzmann machine defines a probability distribution over binary-valued patterns. One can learn parameters of a Boltzmann machine via gradient based approaches in a way that log likelihood of data is increased. The gradient and Hessian of a Boltzmann machine admit beautiful mathematical representations, although computing them is in general intractable. This intractability motivates approximate methods, including Gibbs sampler and contrastive divergence, and tractable alternatives, namely energy-based models.

1 Introduction

The Boltzmann machine has received considerable attention particularly after the publication of the seminal paper by Hinton and Salakhutdinov on autoencoder with stacked restricted Boltzmann machines [21], which leads to today’s success of and expectation to deep learning [54, 13] as well as a wide range of applications of Boltzmann machines such as collaborative filtering [1], classification of images and documents [33], and human choice [45, 47]. The Boltzmann machine is a stochastic (generative) model that can represent a probability distribution over binary patterns and others (see Section 2). The stochastic or generative capability of the Boltzmann machine has not been fully exploited in today’s deep learning. For further advancement of the field, it is important to understand basics of the Boltzmann machine particularly from probabilistic perspectives. In this paper, we review fundamental properties of the Boltzmann machines with particular emphasis on probabilistic representations that allow intuitive interpretations in terms of probabilities.

A core of this paper is in the learning rules based on gradients or stochastic gradients for Boltzmann machines (Section 3-Section 4). These learning rules maximize the log likelihood of given dataset or minimize the Kullback-Leibler (KL) divergence to a target distribution. In particular, Boltzmann machines admit concise mathematical representations for its gradients and Hessians. For example, Hessians can be represented with covariance matrices.

The exact learning rules, however, turn out to be computationally intractable for general Boltzmann machines. We then review approximate learning methods such as Gibbs sampler and contrastive divergence in Section 5.

We also review other models that are related to the Boltzmann machine in Section 6. For example, the Markov random field is a generalization of the Boltzmann machine. We also discuss how to deal with real valued distributions by modifying the Boltzmann machine.

The intractability of exact learning of the Boltzmann machine motivates tractable energy-based learning. Some of the approximate learning methods for the Boltzmann machine may be considered as a form of energy-based learning. As a practical example, we review an energy-based model for face detection in Section 7.

This survey paper is based on a personal note prepared for the first of the four parts of a tutorial given at the 26th International Joint Conference on Artificial Intelligence (IJCAI-17) held in

Figure 1: A Boltzmann machine.

Melbourne, Australia on August 21, 2017. See a tutorial webpagefor information about the tutorial. A survey corresponding to the third part of the tutorial (Boltzmann machines for time-series) can be found in [43].

2 The Boltzmann machine

A Boltzmann machine is a network of units that are connected to each other (see Figure 1). Let N be the number of units. Each unit takes a binary value (0 or 1). Let be the random variable representing the value of the i-th unit for [1, N]. We use a column vector X to denote the random values of the N units. The Boltzmann machine has two types of parameters: bias and weight. Let be the bias for the i-th unit for [1, N], and let be the weight between unit i and unit j for ([11] + 1, N]. We use a column vector b to denote the bias for all units and a matrix W to denote the weight for all pairs of units. Namely, the (i, j)-the element of W is . We let = 0 for and for the pair of units (i, j) that are disconnected each other. The parameters are collectively denoted by

From the energy, the Boltzmann machine defines the probability distribution over binary patterns as follows:

where the summation with respect to is over all of the possible N bit binary values. Namely, the higher the energy of a pattern x, the less likely that the x is generated. For a moment, we do not

Figure 2: Boltzmann machines with hidden units, input, and output

address the computational aspect of the denominator, which involves a summation of 2terms. This denominator is also known as a partition function:

A Boltzmann machine can be used to model the probability distribution, ), of target patterns. Namely, by optimally setting the values of , we approximate ) with ). Here, some of the units of the Boltzmann machine are allowed to be hidden, which means that those units do not directly correspond to the target patterns (see Figure 2b). The units that directly correspond to the target patterns are called visible. The primary purpose of the hidden units is to allow particular dependency between visible units, which cannot be represented solely with visible units. The visible units may be divided into input and output (see Figure 2c). Then the Boltzmann machine can be used to model the conditional distribution of the output patterns given an input pattern.

3 Learning a generative model

Now we consider the problem of optimally setting the values of in a way that ) best approximates a given ). Specifically, we seek to minimize the Kullback-Leibler (KL) divergence from to [2]:

The first term of (7) is independent of . It thus suffices to maximize the negation of the second term:

A special case of is the empirical distribution of the patterns in a given training dataset:

where D is the number of the patterns in D, Then the objective function (8) becomes

which is the log-likelihood of D with respect to when multiplied by D. By defining

we can represent ) as follows:

To find the optimal values of , we take the gradient of ) with respect to :

3.1 All of the units are visible

We start with the simplest case where all of the units are visible (see Figure 2a). Then the energy of the Boltzmann machine is simply given by (3), and the probability distribution is given by (4).

3.1.1 Gradient

We will derive a specific representation of log ) to examine the form of ) in this case:

where the summation with respect to is over all of the possible binary patterns, similar to the summation with respect to . Here, (18) follows from (4) and (17). Plugging the last expression into (14), we obtain

The last expression allows intuitive interpretation of a gradient-based method for increasing the value of ):

where is the learning rate (or the step size). Namely, for each pattern , we compare ) against ). If ) is greater than ), we update in a way that it increases the energy )

so that the becomes less likely to be generated with . If ) is smaller than ), we update in a way that ) decreases. We will also write (20) as follows:

where ] is the expectation with respect to ] is the expectation with respect to , and X is the vector of random variables denoting the values of the N units. Note that the expression of the gradient in (23) holds for any form of energy, as long as the energy is used to define the probability as in (4).

Now we take into account the specific form of the energy given by (3). Taking the derivative with respect to each parameter, we obtain

for [1, N] and ([11] + 1, N]. From (23), we then find

where is the random variable denoting the value of the i-th unit for each [1, N]. Notice that the expected value of is the same as the probability of = 1, because is binary. In general, exact evaluation of ] or ] is computationally intractable, but we will not be concerned with this computational aspect until Section 5.

A gradient ascent method is thus to iteratively update the parameters as follows:

for [1, N] and ([11] + 1, N]. Intuitively, controls how likely that the i-th unit takes the value 1, and controls how likely that the i-th unit and the j-th unit simultaneously take the value 1. For example, when ] is smaller than ], we increase to increase ]. This form of learning rule appears frequently in the context of Boltzmann machines. Namely, we compare our prediction ] against the target ] and update in a way that ] gets closer to ].

3.1.2 Stochastic gradient

We now rewrite (20) as follows:

Namely, ) is given by the expected value of ) + )], where the first X is distributed with respect to . Recall that the second term is an expectation with respect to . This suggests stochastic gradient methods [3, 28, 9, 61, 50]. At each step, we sample a pattern ) according to and update according to the stochastic gradient:

Figure 3: How the energy is updated

where

When the target distribution is the empirical distribution given by the training data D, we only need to take a sample ) from D uniformly at random.

The stochastic gradient method based on (31)-(32) allows intuitive interpretation. At each step, we sample a pattern according to the target distribution (or from the training data) and update in a way that the energy of the sampled pattern is reduced. At the same time, the energy of every pattern is increased, where the amount of the increase is proportional to the probability for the Boltzmann machine with the latest parameter to generate that pattern (see Figure 3).

Taking into account the specific form of the energy given by (3), we can derive the specific form of the stochastic gradient:

which suggests a stochastic gradient method of iteratively sampling a pattern ) according to the target probability distribution and updating the parameters as follows:

for [1, N] and ([11] + 1, N].

3.1.3 Giving theoretical foundation for Hebb’s rule

The learning rule of (36) has a paramount importance of providing a theoretical foundation for Hebb’s rule of learning in biological neural networks [16]:

When an axon of cell A is near enough to excite a cell B and repeatedly or persistently takes part in firing it, some growth process or metabolic change takes place in one or both cells such that A’s efficiency, as one of the cells firing B, is increased.

In short, “neurons wire together if they fire together” [37]. A unit of a Boltzmann machine corresponds to a neuron, and = 1 means that the i-th neuron fires. When two neurons, i and j, fire () = 1), the wiring weight between the two

neurons gets stronger according to (36). Here, notice that we have 0 1 as long as the values of are finite.

The learning rule of the Boltzmann machine also involves a mechanism beyond what is suggested by Hebb’s rule. Namely, the amount of the change in when the two neurons (i and j) fire depends on how likely those two neurons fire according to at that time. More specifically, it the two neurons are already expected to fire together (1), we increase only by a small amount ((1 ])) even if the two neurons fire together () = 1).

Without this additional term (] or ]) in (36), all of the parameters monotonically increases. If = 1 with nonzero probability in , then diverges to almost surely. Otherwise, stays unchanged from the initial value. Likewise, if = 1 with nonzero probability in , then diverges to almost surely. Otherwise, stays unchanged.

What is important is that this additional term is formally derived instead of being introduced in an ad hoc manner. Specifically, the learning rule is derived from a stochastic model (i.e., a Boltzmann machine) and an objective function (i.e., minimizing the KL divergence to the target distribution or maximizing the log-likelihood of training data) by taking the gradient with respect to the parameters.

3.1.4 Hessian

We now derive the Hessian of ) to examine its landscape. Starting from the expression in (27), we obtain

where the last expression is obtained from (18) and (25). The last expression consists of expectations with respect to and can be represented conveniently as follows:

where ] denotes the covariance between random variables A and B with respect to . Likewise, we have

Therefore, the Hessian of ) is a covariance matrix:

where we use to denote a covariance matrix with respect to . When is finite, this covariance matrix is positive semidefinite, and ) is concave. This justifies (stochastic) gradient based approaches to optimizing . This concavity has been known [19], but I am not aware of the literature that explicitly represent the Hessian with a covariance matrix.

3.1.5 Summary

Consider a Boltzmann machine with parameters = (b, W). When all of the N units of the Boltzmann machine are visible, the Boltzmann machine defines a probability distribution of N-bit binary patterns by

where the energy is

The KL divergence from to can be minimized (or the log-likelihood of the target data having the empirical distribution can be maximized) by maximizing

The gradient and the Hessian of ) is given by

where S denotes the vector of the random variables representing the value of a unit or the product of the values of a pair of units:

3.2 Some of the units are hidden

In this section, we consider Boltzmann machines that have both visible units and hidden units. Let N be the number of visible units and M be the number of hidden units.

3.2.1 Necessity of hidden units

We first study the necessity of hidden units [2]. The Boltzmann machine with N units have

parameters. This Boltzmann machine is used to model N-bit binary patterns. There are 2possible N-bit binary patterns, and the general distribution of N-bit patterns assigns probabilities to those 2

patterns. We need

parameters to characterize this general distribution.

The number of parameters of the Boltzmann machine is smaller than the number of parameters needed to characterize the general distribution as long as N > 2. This suggests that the probability distribution that can be represented by the Boltzmann machine is limited. One way to extend the flexibility of the Boltzmann machine is the use of hidden units.

3.2.2 Free energy

Let x denote the visible values (i.e., the values of visible units), h denote the hidden values, and (x, h) denote the values of all units. We write the marginal probability distribution of the visible values as follows:

where the summation is over all of the possible binary patterns of the hidden values, and

Here, we write energy as follows:

Now, we define free energy as follows:

We can then represent ) in a way similar to the case where all of the units are visible, replacing energy with free energy:

3.2.3 Gradient

In (20), we simply replace energy with free energy to obtain the gradient of our objective function when some of the units are hidden:

What we then need is the gradient of free energy:

where ) is the conditional probability that the hidden values are h given that the visible values are x:

Observe in (66) that the gradient of free energy is expected gradient of energy, where the expectation is with respect to the conditional distribution of hidden values given the visible values. We thus obtain

The first term in the last expression (except the minus sign) is the expected value of the gradient of energy, where the expectation is with respect to the distribution defined with and . Specifically, the visible values follow , and given the visible values, x, the hidden values follow ). We will write this expectation with ]]. The second term is expectation with respect to , which we denote with ]. Because the energy (56) has the form equivalent to (47), ) can then be represented analogously to (49):

where X is the vector of random values of the visible units, H is the vector of for [1, N], and S is defined analogously to (51) for all of the (visible or hidden) units:

where for [1, N], and for [1, M], where is the random variable denoting the i-th hidden value.

3.2.4 Stochastic gradient

The expression with (72) suggests stochastic gradient analogous to (31)-(32). Observe that ) can be represented as

where )] is the expected value of the gradient of the energy when both visible values and hidden values follow , and ] is the corresponding conditional expectation when the hidden values follow ) given the visible values .

A stochastic gradient method is then to sample visible values, ), according to and update according to the stochastic gradient:

By taking into account the specific form of the energy, we find the following specific update rule:

where each unit (i or j) may be either visible or hidden. Specifically, let M be the number of hidden units and N be the number of visible units. Then ([11] + 1, N + M]. Here, denotes the value of the i-th unit, which may be visible or hidden. When the i-th unit is visible, its expected value is simply )] = ), and )] = )]. When both i and j are visible, we have )] = ).

Namely, we have

for a visible unit [1, N],

for a hidden unit + 1, N + M],

for a pair of visible units ([11] + 1, N],

for a pair of a visible unit and a hidden unit ([1+ 1, N + M], and

for a pair of hidden units (+ 11] + 1, N + M].

3.2.5 Hessian

We now derive the Hessian of ) when some of the units are hidden. From the gradient of ) in (72), we can write the partial derivatives as follows:

where recall that for [1, N] and for [1, M]. When all of the units are visible, the first term in (27) is the expectation with respect to the target distribution and is independent of . Now that some of the units are hidden, the corresponding first term in (85) depends on . Here, the first term is expectation, where the visible units follow the target distribution, and the hidden units follow the conditional distribution with respect to the Boltzmann machine with parameters given the visible values. Notice that the second term in the right-hand side of (86) has the form equivalent to (38). Hence, we have

The first term in the right-hand side of (86) has a from similar to (38) with two differences. The first difference is that it is an expectation with respect to . The second difference is that the probability is conditional probability given the visible values. We now show that there exists a Boltzmann distribution that has ) as its probability distribution (see also Figure 4).

Lemma 1. Consider a Boltzmann machine having visible units and hidden units whose energy is given by (57). The conditional probability distribution of the hidden units given the visible values x is given by the probability distribution of a Boltzmann machine with bias b(x) and weight W(x) that are defined as follows:

Proof. Recall the expression of the conditional probability distribution in (67):

where we rewrite the energy in (57) as follows:

The first term in the right-hand side of the last expression is independent of h and canceled out between the numerator and the denominator in (90). We thus consider the Boltzmann machine with parameters )) as defined in (88)-(89). Then we have

which completes the proof of the lemma.

By (86) and Lemma 1, we can represent the second partial derivative as follows:

where ] denotes the conditional covariance with respect to ) given the visible values X.

Figure 4: The conditional distribution of h given x in (a) is equal to the distribution of h in (b), illustrating Lemma 1.

Therefore, the Hessian of ) is

where we define S as in (75), and ] denotes the conditional covariance matrix with respect to given the visible values X. In general, the Hessian is not positive semidefinite, and ) is not concave. Hence, (stochastic) gradient based approaches do not necessarily find globally optimal parameters.

3.2.6 Summary

Consider a Boltzmann machine with parameters ), where at least one of the units are hidden. The Boltzmann machine defines a probability distribution of the visible values x and the hidden values h by

where energy is given by

The marginal probability distribution of the visible values is

where free energy is defined as follows:

The KL divergence from to can be minimized (or the log-likelihood of the target data having the empirical distribution can be maximized) by maximizing

The gradient and the Hessian of ) are given by

where S denotes the vector of the random variables representing the value of a unit (for [1, N] and for [1, M]) or the product of the values of a pair of units:

4 Learning a discriminative model

In this section, we study the Boltzmann machine whose visible units are divided into input units and output units (see Figure 2c). Such a Boltzmann machine is sometimes called a conditional Boltzmann machine [20]. Let be the number of input units, be the number of output units, be the number of visible units, and M be the number of hidden units.

Such a Boltzmann machine can be used to model a conditional probability distribution of the output values y given the input values x. Let ) denote the conditional probability of y given x. When the Boltzmann machine has hidden units, we also write

4.1 Objective function

A training dataset for a discriminative model is a set of the pairs of input and output:

When this training dataset is given, a natural objective function corresponding to the log-likelihood (10) for the generative model is

This objective function may also be related to a KL divergence. Let ) be the target conditional distribution, which we seek to model with ). Consider the following expected KL divergence from ) to ), where X is the random variable denoting the input values that are distributed according to :

The first term of the last expression is independent of . To minimize the expected KL divergence, it thus suffices to maximize the negation of the second term:

When is the empirical distribution of the pairs of input and output in the training dataset, (112) is reduced to (108).

4.2 Gradient, stochastic gradient, Hessian

Observe that the first term of (115) is equivalent to the objective function of the generative model where both of input and output are visible (i.e., input and output in (115) should be regarded as visible in (102)). The second term is analogous to the first term, but now only the input should be regarded as visible (i.e., output and hidden in (115) should be regarded as hidden in (102)).

The gradient thus follows from (102):

where S denotes the vector of random variables representing the value of a unit or the product of the values of a pair of units:

where for [1for [1], and for [1, M]. Because (117) is expressed as an expectation with respect to , it directly gives the following stochastic gradient:

where ()) is sampled according to . Specifically, we have the following learning rule of a stochastic gradient method:

for an output unit + 1, N],

for a hidden unit + 1, N + M],

for a pair of an input unit and an output unit ([1+ 1, N],

for a pair of an input unit and a hidden unit ([1+ 1, N + M],

for a pair of output units (+ 11] + 1, N],

for a pair of an output unit and a hidden unit (+ 1+ 1, N + M], and

for an input unit [1] and

for a pair of input units ([11] + 1]. One can easily see that these parameters are redundant and do not play any role in ). The Hessian of the objective of discriminative learning follows from (103) and (115):

where ] denotes the conditional covariance matrix with respect to the conditional distribution of the hidden values ) given (X, Y), and ] denotes the conditional covariance matrix with respect to the conditional distribution of the output and hidden values ) given X.

4.2.1 Summary

Consider a Boltzmann machine with parameters = (b, W), where the units can be classified into input, output, and hidden. The Boltzmann machine defines a conditional probability distribution of the output values y given the input values x:

where ) is the probability distribution of the Boltzmann machine where (x, y) is visible, and h is hidden.

The expected KL divergence from ) to ), where the expectation is with respect to the target distribution of the input values X, can be minimized (or the sum of the conditional log-likelihood of the output values given the input values, where the input and output follow the empirical distribution , can be maximized) by maximizing

Figure 5: A discriminative model with a Boltzmann machine with no hidden units and no weight between output units.

The gradient and the Hessian of ) are given by

where S denotes the vector of the random variables representing the value of a unit (for [1for [1], and for [1, M]) or the product of the values of a pair of units:

4.3 Simplest case with relation to logistic regression

Here, we study the simplest but non-trivial case of a discriminative model of a Boltzmann machine. Specifically, we assume that the Boltzmann machine has no hidden units, and there are no weight between output units. As we have discussed in Section 4, the bias associated with the input unit and the weight between input units are redundant and do not play any role. Therefore, it suffices to consider the bias for output units and the weight between input units and output units (see Figure 5). Let be the bias associated with output units and be the weight matrix where the (i, j) element denotes the weight between the i-th input unit and the j-th output unit.

4.3.1 Conditional probability

We first apply Lemma 1, where the input units correspond to the visible units in the lemma, and the output units correspond to the hidden units in the lemma. Then we can see that the probability distribution of output values given input values x is given by a Boltzmann machine with the following bias and no weight:

The conditional probability of output values y given input values x is thus given by

In this case, the partition function, which consists of 2terms, can be computed in ) time:

Lemma 2. The partition function (the denominator) in the right-hand side of (137) can be written as follows:

where the summation with respect to is over all of the possible binary patterns of length .

Proof.

Now, it can be easily shown that the output values are conditionally independent of each other given the input values:

Corollary 1. The conditional probability of output values (137) can be written as the product of the conditional probabilities of each output value:

where

Proof. By Lemma 2, we have

4.3.2 Relation to logistic regression

By (143), the probability that the i-th output unit takes the value 1 is

where is the i-th column of . The last expression has the form of logistic regression, where the explanatory variables x are binary.

Due to the conditional independence shown in Corollary 1, we can say that the Boltzmann machine shown in Figure 5 consists of N independent models of logistic regression that have common explanatory variables.

5 Evaluating expectation with respect to a model distribution

When we train a Boltzmann machine with a stochastic gradient method, we need to evaluate expected values with respect to the distribution defined by the Boltzmann machine. Such expected values appear for example as ] in (49) and (102) or as ] in (133). In general, exact expressions for these expectations are unavailable in closed forms.

5.1 Gibbs sampler

A practical approach that can be used to estimate those expectations is Markov Chain Monte Carlo in general and Glauber dynamics [36] or Gibbs samplers [5] in particular. For example, we can sample K patterns according to the distribution given by a Boltzmann machine via a Gibbs sampler shown in Algorithm 1. The expected values can then be estimated using the K samples. In practice, we often ignore initial samples and consider only every nth sample for a sufficiently large n.

In Step 5 of Algorithm 1, the conditional distribution of given for is defined by

for , where

5.2 Contrastive divergence

Another approach to deal with the computational intractability of evaluation the expectations is to avoid it. Namely, we modify our objective function.

Recall, from (7) and (10), that our objective function has been the KL divergence from to (or equivalently the log likelihood of data with respect to ). The gradient of the KL divergence with respect to involves the computationally intractable term of expectation with respect to .

Here, we study an alternative objective function of Contrastive divergence [18, 4]. Consider a Gibbs sampler (Algorithm 1) that initializes the values by sampling from (or uniformly at random from the dataset D). Because this is the distribution at the beginning of the Gibbs sampler, we write . The distribution of the patterns sampled by the Gibbs sampler at step k is referred to as . Because as , we also write .The KL divergence in (7) can now be written as

where

and its gradient (recall (18)) as

The first term of the right-hand side of (152) is the expectation with respect to the target distribution , which is readily computable. The second term is the expectation with respect to the model (with parameter ), which is in general computationally intractable for a Boltzmann machine.

To cancel out this computationally intractable second term, consider the following contrastive divergence:

Here, we quote an intuitive motivation of the contrastive divergence from [18], using our notations (shown within []):

The intuitive motivation for using this “contrastive divergence” is that we would like the Markov chain that is implemented by Gibbs sampling to leave the initial distribution [ ] over the visible variables unaltered. Instead of running the chain to equilibrium and comparing the initial and final derivatives we can simply run the chain for one full step and then update the parameters to reduce the tendency of the chain to wander away from the initial distribution on the first step. Because [ ] is one step closer to the equilibrium dis- tribution than [ ], we are guaranteed that [ KL() ] exceeds [ KL() ] unless [ ] equals [ ], so the contrastive divergence can never be negative. Also, for Markov chains in which all transitions have non-zero probability, [ ] implies [ = ] so the contrastive divergence can only be zero if the model is perfect.

The gradient of the second term of (153) can be derived as follows:

where

Hinton has empirically shown that ) is small and recommended the approximation of 0 in [18]. The first term of the right-hand side of (158) is an expectation with respect to and can be readily evaluated. The second term is an expectation with respect to and can be estimated with the samples from the Gibbs sampler in one step.

In [18], ) is represented in the following equivalent form:

5.2.1 Score matching (Fisher divergence)

A particularly interesting objective function for energy-based models is score matching [22], which has been subsequently used for example in [66, 29, 24, 30, 60, 62]. Similar to contrastive divergence, score matching is an objective function, which we can avoid computationally intractable evaluation of expectation with.

Specifically, Hyv¨arinen [22] defines score matching as

which is also referred to as Fisher divergence [38]. Note that the gradient is with respect to x and not . Hyv¨arinen shows that

is a consistent estimator [22]. A key property of score matching is that there is no need for calculating the partition function. In particular,

Also, although log ) might appear to be intractable, it has been shown in [22] that

is asymptotically equivalent to FD() as , where D is the set of data (samples from is the dimension of , and const is the term independent of .

A limitation of the estimator in (165) is that it assumes among others that the variables x are continuous and and ) is differentiable. There has been prior work for relaxing these assumptions. For example, Hyv¨arinen studies an extension for binary or non-negative data [23], and Kingma and LaCun study an approach of adding Gaussian noise to data samples for smoothness condition [29].

5.3 A separate generator

The learning rule that follows from maximization of loglikelihood (minimization of KL divergence) via a gradient ascent method may be considered as decreasing the energy of “positive” or “real” samples that are generated according to a target distribution and increasing the energy of “negative” or “fake” samples that are generated according to the current model (recall (18)):

With this learning rule, one can let the model to be able to better “discriminate between the positive examples from the original data and the negative examples generated by sampling from the current density estimate” [65].

Then an energy-based model may be considered as taking both the role of a generator and the role of a discriminator in a generative adversarial network (GAN) [53, 14]. There is a line of work [15, 8, 67, 26] that prepares a separate generator with an energy-based model. If the separate generator allows more efficient sampling than the energy-based model, the expectation with respect to the distribution of the current generator (i.e., ) in (166)) can be more efficiently evaluated [26, 15].

5.4 Mean-field Boltzmann machines

There are also approaches that avoid computationally expensive evaluation of expectation. An example is a mean-field Boltzmann machine [49], which can be used to approximate a Boltzmann machine. A mean-field Boltzmann machine ignores connections between units and chooses the real value for each unit i in a way that the distribution defined through

well approximates the distribution ) of a Boltzmann machine in the sense of the KL divergence [63].

6 Other energy-based models

Here we review stochastic models that are related to the Boltzmann machine.

6.1 Markov random fields

A Boltzmann machine is a Markov random field [27] having a particular structure. A Markov random field consists of a finite set of units similar to a Boltzmann machine. Each unit of a Markov random field takes a value in a finite set. The probability distribution of the values (configurations) of the Markov random field can be represented as

where the summation with respect to is over all of the possible configurations of the values in the finite set, for which the Markov random field is defined. The energy of a configuration is defined as follows:

where ) is a feature vector of x. A Markov random field is also called an undirected graphical model.

6.1.1 Boltzmann machine and Ising model

A Markov random field is reduced to a Boltzmann machine when it has the following two properties. First, ) is a vector of monomials of degrees up to 2. Second, each unit takes a binary value.

An Ising model [25] is essentially equivalent to a Boltzmann machine but the binary variable takes values in +1}.

6.1.2 Higher-order Boltzmann machine

A higher-order Boltzmann machine extends a Boltzmann machine by allowing ) to include monomials of degree greater than 2 [55]. Each unit of a higher-order Boltzmann machine takes a binary value.

6.2 Determinantal point process

A determinantal point process (DPP) defines a probability distribution over the subsets of a given ground set [39, 32, 56, 57]. In our context, the ground set Y can be considered as the set of all units:

A subset X can be considered as a set of units that take the value 1:

A DPP can be characterized by a kernel L, which is an positive semi-definite matrix. The probability that the subset X is selected (i.e., the units in X take the value 1) is then given by

where denotes the principal submatrix of L indexed by X, and I is the identity matrix. A DPP can be seen as an energy-based model, whose energy is given by E(X) = log det(). In general, the kernel L can be represented as

by the use of a matrix B, where K is the rank of L. For [1, N], let be the i-th column of B, which may be understood as a feature vector of the i-th item (unit). One can further decompose into , where = 1 and 0. Then we can write the (i, j)-th element of L as follows:

In particular,

so that can be understood as the ”quality” of the i-th item. Specifically, given that exactly one item is selected, the conditional probability that the i-th item is selected is proportional to . Likewise,

where

may be understood as the similarity between item i and item j. Equation (176) implies that the similar items are unlikely to be selected together. In general, a DPP tends to give high probability to diverse subsets of items having high quality.

Finally, we discuss a computational aspect of a DPP. Let’s compare the denominator of the right-hand side of (172) against the corresponding denominator (partition function) of the Boltzmann machine in (4). The partition function of the Boltzmann machine is a summation over 2terms, which suggest that we need ) time to evaluate it. On the other hand, the determinant of an matrix can be computed in ) time.

When L has a low rank (K < N), one can further reduce the computational complexity. Let

be the positive semi-definite matrix, defined from (173). Because the eigenvalues of L are eigenvalues of C and vice versa, we have

where the first identity matrix I is , and the second is . Therefore, (172) can be represented as follows:

The denominator of this dual representation of a DPP can be evaluated in ) time. The DPP has been receiving increasing attention in machine learning, and various learning algorithms have been proposed in the literature [12, 11, 40, 46].

6.3 Gaussian Boltzmann machines

Here we review energy based models that deal with real values with a particular focus on those models that are extended from Boltzmann machines. A standard approach to extend the Boltzmann machine to deal with real values is the use of a Gaussian unit [41, 64, 31].

6.3.1 Gaussian Bernoulli restricted Boltzmann machines

For real values and binary values , Krizhevsky studies the following energy [31]:

where ) is the set of parameters.

Krizhevsky shows that the conditional probability of x given h has a normal distribution, and the conditional probability of h given x has a Bernoulli distribution [31]. Here, we re-derive them with our notations and in a simpler manner.

Theorem 1. Consider the energy given by (181). Then the elements of x are conditionally independent of each other given h, and the elements of h are conditionally independent of each other given x. Also, the conditional probability density of given h is given by

for , and the conditional mass probability of for given x is given by

Proof. First observe that

where

This means that the elements of x are conditionally independent of each other given h. The conditional independence of the elements of h given x can be shown analogously. Then we have

where

for and . By taking into account the normalization for the total probability to become 1, we obtain (182) and (183).

One might wonder why the product appears in (182), and the quotient appears in (183). We can shed light on these expressions by studying natural parameters as in [64]. The natural parameters of the normal distribution with mean and standard deviation are and ). Hence, the natural parameters in (182) are

Likewise, the natural parameter in (183) is