Interactive Visualization

Energy-Based
Reasoning Models

Explore the fundamentals of EBMs through interactive visualizations. Learn how energy functions power modern AI reasoning.

01

Energy Landscape

Energy-Based Models define a scalar energy function E(x) over configurations. Lower energy = more likely. The surface shows valleys (low energy) representing "good" configurations.

p(x) ∝ exp(-E(x))
Low Energy (Likely)
High Energy (Unlikely)
02

Langevin Dynamics Sampling

To sample from an EBM, particles follow the energy gradient downhill while random noise enables exploration. Watch particles converge to low-energy regions.

xt+1 = xt − ε∇E(xt) + √(2ε) · noise
Step Size (ε) 0.10
Noise Scale 0.10
0.00
Avg Energy
0
Steps
20
Particles
03

Contrastive Learning

Training shapes the energy landscape: push positive examples to lower energy, negative examples to higher energy.

L = max(0, E(x+) − E(x) + margin)
Positive (correct)
Negative (flawed)
0.50
E(positive)
0.50
E(negative)
0
Step
1.00
Loss
04

Best-of-N Selection

Generate N candidate reasoning chains, select the one with lowest energy. More candidates → better results.

Inference-time scaling: Improve accuracy without retraining by generating more candidates and selecting the best one according to the energy function.
N (candidates) 4
Selected Energy
Correct?
Accuracy
05

Reasoning Chain Verification

EBMs verify multi-step reasoning by assigning energy to each step. High energy steps indicate potential errors in the reasoning chain.

0.00
Total Energy
Verdict