Simple Intuition (ELI5): Marble Settling into Energy Valleys
Think of a Boltzmann Machine like a sculpted landscape of hills and valleys. Valid training data (like real digit images) sit in deep low-energy valleys with high probability, while nonsense patterns sit on high peaks (low probability). Learning pushes training states' valleys deeper and raises false hallucinated states!
1. General Boltzmann Machine Structure & Energy Equations
- Stochastic, symmetric, undirected energy-based generative network (Hinton & Sejnowski) using binary states
{0, 1} across Visible units (v) and Hidden units (h).
- Every unit connects symmetrically to every other unit (
wij = wji, no self-loops), including intra-layer visible–visible (L), hidden–hidden (J), and inter-layer visible–hidden (W) links.
Energy Function: E(v, h, θ) = −12 vTLv − 12 hTJh − vTWh (− biases bTv − cTh)
Boltzmann Joint Probability: P(v, h) = e−E(v,h,θ)Zθ, where Partition Function Zθ = ∑v,h e−E(v,h,θ)
Learning Rule: Δwij = η (⟨sisj⟩data − ⟨sisj⟩model) (Positive Data phase − Negative Model/Dream phase)
Crucial Limitation of General BM: Computing the partition function Zθ sums over all 2(V+H) configurations and full intra-layer couplings block fast sampling — intractable for large networks! That directly motivates RBMs.
2. Boltzmann Machine vs. Ordinary Feedforward DNN (M 4.2.pdf Slide 3)
| Ordinary Feedforward Neural Network | Boltzmann Machine (Generative) |
Learns a deterministic mapping x → y | Learns a probability distribution P(v, h) over data |
| Discriminative: Classification & regression | Generative: Can sample & generate new configurations |
| Information flows strictly forward in directed layers | Uses undirected symmetric connections + Energy function |
Worked Numerical (M 4.2.pdf pp. 4–11): 2-Unit Boltzmann Machine Update
Given: Two binary visible units x = [x₁, x₂]T ∈ {0, 1}², zero biases, symmetric weight matrix U = [[0, w], [w, 0]] so energy is E(x) = −xT U x = −2 w x₁ x₂. Training sample x = [1, 1]T, initial w = 0, learning rate η = 0.1.
- Initial State (w = 0): All 4 binary states
(0,0), (0,1), (1,0), (1,1) have E = 0 ⇒ e⁰ = 1 each ⇒ Partition Z = 4 ⇒ P(x) = 1/4 = 0.25 for every state.
- Iteration 1 Weight Update (for training target [1,1]):
• Data correlation: ⟨x₁x₂⟩data = 1×1 = 1; Model expectation: ⟨x₁x₂⟩model = 1·P(1,1) = 0.25.
• Gradient factor (from −∂E/∂w = 2 x₁x₂): Δw = 0.1 × 2(1 − 0.25) = 0.15 ⇒ wnew = 0 + 0.15 = 0.15.
- Updated Probabilities (w = 0.15):
• Energy of (1,1) drops to E(1,1) = −2(0.15)(1)(1) = −0.3; other 3 states stay E = 0.
• New Partition: Z = e⁰ + e⁰ + e⁰ + e0.3 = 3 + 1.350 = 4.350.
• New Probability of training sample: P(1,1) = 1.350 / 4.350 = 0.310 (jumped from 25% → 31%!).
- Iteration 2:
Δw = 0.1 × 2(1 − 0.310) = 0.138 ⇒ w2 = 0.15 + 0.138 = 0.288.