Professional Documents
Culture Documents
Module - 4 - Boltzmann Machines, Energy Based Models, RBM
Module - 4 - Boltzmann Machines, Energy Based Models, RBM
https://www.geeksforgeeks.org/types-of-boltzmann-machines/
unsupervised models.
Supervised DL models:
Unsupervised DL models:
• Boltzmann Machines
• Autoencoders
Boltzmann Machines:
• That is, unlike the ANNs, CNNs, RNNs and SOMs, the Boltzmann
nodes — those nodes which we can and do measure, and the Hidden
system.
• The training data is fed into the Boltzmann Machine and the weights
Boltzmann Machine
Energy-Based Models:
Boltzmann Distribution is used in the sampling distribution of the
equation –
(- i/kT)/ ∑e(-∈j/kT)
Pi = e ∈
of the system
• Boltzmann Distribution describes different states of the system
• Thus, the system is the most stable in its lowest energy state (a
• Once the system is trained and the weights are set, the system
always tries to find the lowest energy state for itself by adjusting
the weights.
Climbing a Hill
Imagine you are on a hiking trip, and you come across a range of hills. Each
hill represents a different state, and the height of the hill represents the
energy of that state. The higher the hill, the more energy a state has.
hill. This probability is like the chance that you find yourself on a
particular hill.
the hill. Higher hills have more energy, while lower hills have less
energy.
your hiking trip. On a hot day, you are more likely to find yourself on
higher hills (higher energy states), while on a cold day, you'd prefer to
5. Σ (Summation): Just like before, this symbol (∑) means adding up the
• The probability (Pi) that you are on a specific hill is determined by how
high that hill is (its energy) relative to the heights of other hills, all
• If a hill is very high (high energy), you are less likely to be there on a
cold day (low temperature). You prefer to stay on lower hills, where it's
more stable. But on a hot day (high temperature), you might be more
likely to climb higher because you have more energy to reach the
summit.
• Your goal is to find the most stable hill (the lowest energy state). You
adjust your hiking path based on the temperature and the heights of
In this way, just as you would choose your hill to climb based on the weather
and the energy of different hills, Boltzmann Machines help a system find its
and hence the connections grow exponentially. This is the reason we use
that works on six (6) movies. RBM learns how to allocate the hidden nodes
RBM close to our set of movies that is our case or scenario. RBM identifies
which features are important by the training process. The training data is
either 0 or 1 or missing data based on whether a user liked that movie (1),
disliked that movie (0) or did not watch the movie (missing data). RBM
Contrastive Divergence:
hidden nodes, which in turn use the same weights to reconstruct the
input nodes.
• Each hidden node is constructed from all the visible nodes and each
visible node is reconstructed from all the hidden node and hence, the
input is different from the reconstructed input, though the weights are
the same.
The Gradient Formula gives the gradient of the log probability of the
certain state of the system with respect to the weights of the system. It is
given as follows –
change the log probability of the system to be a particular state. The system
tries to end up in the lowest possible energy state (most stable). Instead of
continuing the adjusting of weights process until the current input matches
the previous one, we can also consider the first few pauses only. It is
energy state. Therefore, we adjust the weights, redesign the system and
energy curve such that we get the lowest energy for the current position.
• The RBM's job is to find which features (hidden nodes) are most
2. Contrastive Divergence:
• This is how RBM learns. It starts with some random guesses for
its recommendations.
• RBM calculates how likely users would like these movies based
recommendations.
3. Gibbs Sampling:
refine them.
• It does this by going back and forth between visible and hidden
nodes, each time adjusting its guesses to get closer to the real
preferences.
4. Gradient Formula:
accurate.
what users actually like, which is done by tweaking its guesses for
For instance, suppose RBM initially thought that "action" is not important,
but users love action movies. Through Contrastive Divergence and Gibbs
Sampling, it would learn to adjust its guesses and find that "action" is
guesses what features are important in movies, and through learning and
Consider – Mary watches four movies out of the six available movies and
rates four of them. Say, she watched m 1, m3, m4 and m5 and likes m3,
m5 (rated 1) and dislikes the other two, that is m 1, m4 (rated 0) whereas the
other two movies – m2, m6 are unrated. Now, using our RBM, we will
• Mary likes m3, m5 and they are of genre ‘Drama,’ she probably likes
‘Drama’ movies.
Therefore, based on the observations and the details of m2, m6; our
Mary’s interests and m6). This is how an RBM works and hence is used in
recommender systems.
Working of RBM