No history yet

Energy-Based Models

Energy, Probability, and Belief

Instead of predicting a specific label, some models learn the underlying structure of data by assigning an 'energy' value to every possible configuration. This is the core idea behind Energy-Based Models (EBMs). Think of the energy landscape as a terrain of hills and valleys. Correct, plausible data configurations live in the low-energy valleys, while incorrect or unlikely configurations are pushed up to the high-energy hills.

The key idea in EBMs is to train a model that assigns low energy to observed (correct) data points and high energy to incorrect, synthetic configurations.

This energy value is then converted into a probability. We don't want a model that just says one configuration is 'lower energy' than another; we want to know how much more probable it is. The connection between the energy of a state and its probability is defined by the Boltzmann distribution (also known as the Gibbs distribution).

P(x)=eE(x)ZP(x) = \frac{e^{-E(x)}}{Z}

The partition function, ZZ, is both a blessing and a curse. It provides a mathematically sound way to define a probability distribution. However, calculating it directly is often impossible. The set of all possible configurations, known as the configuration space, is usually astronomically large. For an image with just 100 binary pixels, there are 21002^{100} possible states—more than the number of atoms in the observable universe. This computational challenge is a central theme in training EBMs and has led to clever approximation techniques.

Visible and Hidden Units

Within the context of networks like Deep Belief Networks, EBMs are structured with two types of units: visible and hidden. Visible units correspond to the data we observe, like the pixels of an image or the words in a sentence. Hidden units are latent variables that the model uses to capture underlying features, patterns, and dependencies within the data. They are not directly observed but are inferred by the model.

Lesson image

The energy of a system is not just based on the states of the individual units, but on their interactions. These interactions are defined by the weights connecting the units. The joint energy of a specific configuration of visible units (vv) and hidden units (hh) in a common EBM, the Restricted Boltzmann Machine (RBM), is calculated as follows:

E(v,h)=iaivijbjhji,jvihjwijE(v, h) = - \sum_{i} a_i v_i - \sum_{j} b_j h_j - \sum_{i,j} v_i h_j w_{ij}

Training an EBM involves adjusting the weights (wijw_{ij}) and biases (aia_i, bjb_j) so that the energy function assigns low energies to configurations that resemble the training data and high energies to everything else. This process effectively teaches the model the underlying probability distribution of the data it has seen. The model learns to 'believe' that data points similar to its training examples are highly probable.

Now, let's test your understanding of these foundational concepts.

Quiz Questions 1/5

What is the core principle of an Energy-Based Model (EBM)?

Quiz Questions 2/5

In the context of EBMs, what is the primary role of the Boltzmann distribution?