Energy-Based Model

An energy-based model defines a probability distribution through an energy function. Low energy means high probability.

The unnormalized density is:

where the partition function is:

For discrete data, the integral becomes a sum over states.

Conditional Energy

Energy functions can also score a candidate output under a condition:

where:

or an integral for continuous . This form appears in structured prediction, compatibility scoring, docking-like scoring, and reranking.

Energy, Score, and Force

The score of an energy-based distribution is:

because does not depend on . This connects energy-based models to Score-based model and Score matching.

In molecular modeling, a force field often uses the sign convention:

so the learned score, negative energy gradient, and physical force are closely related mathematically, even when their training data and interpretation differ.

Training Difficulty

Maximum likelihood requires:

The partition term is:

This expectation over model samples is often expensive. Practical methods use contrastive divergence, negative sampling, score matching, noise-contrastive estimation, or diffusion-style denoising objectives.

Positive and Negative Samples

Many practical EBMs learn by contrasting observed examples with negatives:

The model should assign lower energy to positives:

Negative sampling defines the task. Easy negatives may make the model look good without learning useful structure; false negatives can corrupt the signal.

Negative sourceRisk
random samplestoo easy
corrupted examplescorruption may be unrealistic
model samplesexpensive or unstable
in-batch negativesunmarked positives may appear
hard negativesimproves discrimination but can introduce bias

Sampling

Sampling can be done by Langevin dynamics:

This moves samples toward lower energy while retaining stochastic exploration.

Energy Calibration

Low energy is not automatically a calibrated probability, physical energy, or valid score.

ClaimNeed
ranks candidatespairwise or ranking evaluation
defines likelihoodtractable or estimated partition behavior
generates samplessampling procedure and validity checks
approximates physical energyunits, reference state, force/energy benchmark
supports decisionscalibration or threshold validation

For molecular modeling, a learned pseudo-energy should not be presented as a physical potential unless trained and validated for that claim.

When It Appears

ContextEnergy meansMain caveat
classical molecular modelingphysical potential energyforce-field assumptions
learned molecular modelslearned compatibility or pseudo-energycalibration and OOD validity
contrastive representation learningcompatibility between paired objectsnegative sampling defines the objective
score-based generationgradient of log densityscore may not integrate to a valid global energy
structured predictioncost of an output structureinference may require optimization

Paper Reading Checks

  • Is a physical energy, learned score, compatibility function, or cost?
  • Is the partition function tractable, approximated, or avoided?
  • How are negative samples generated?
  • Does sampling use Langevin, MCMC, ODE/SDE sampling, or deterministic optimization?
  • Are low-energy samples valid under task constraints?
  • In molecular settings, is energy evaluated before or after Energy minimization?
  • Are negatives realistic and free of hidden positives?
  • Is energy used as ranking score, probability model, generator, or physical quantity?