Learn Before
Concept

Mathematical Formulation of Restricted Boltzmann Machines

The canonical Restricted Boltzmann Machine (RBM) is an energy-based model with binary visible and hidden units. Its energy function is:

E(v,h)=bTvcThvTWhE(v,h) = -b^Tv - c^Th - v^TWh

where bb, cc, and WW are unconstrained, real-valued, learnable parameters. It is easy to take its derivatives:

Wi,jE(v,h)=vihj\frac{\partial}{\partial W_{i,j}}E(v,h) = -v_ih_j

There are no direct interactions between any two visible units or any two hidden units (restrictions). The restrictions on the RBM structure yield the properties:

p(hv)=ip(hiv)p(h|v)=\prod_ip(h_i|v) p(vh)=ip(vih)p(v|h) = \prod_ip(v_i|h)

The individual conditionals are simple to compute. For the binary RBM we obtain:

P(hi=1v)=ρ(vTW:,i+bi)P(h_i=1|v) = \rho(v^TW_{:,i} + b_i) P(hi=0v)=1ρ(vTW:,i+bi)P(h_i=0|v) = 1 - \rho(v^TW_{:,i} + b_i)

Together, these properties allow for efficient block Gibbs sampling and efficient derivatives, making training convenient. Samples generated by Gibbs sampling from an RBM model are shown below:

Image 0

0

1

Updated 2026-05-09

Tags

Data Science