Cambridge's BNEM Beats Top AI Samplers With 10x Fewer Energy Evaluations
BNEM replaces score matching with energy matching and adds a bootstrapping trick to produce cleaner Boltzmann samples with far fewer compute steps than prior art
ProTakeaways
- Core idea: BNEM learns energy functions (scalars) instead of score functions (gradients), giving provably lower-variance training targets for diffusion-based Boltzmann samplers.
- Bootstrapping: A novel technique uses the partially-trained energy network at lower noise levels as stepping stones, reducing bias by a factor of K^i with i bootstrapping steps.
- Benchmarks: BNEM achieves state-of-the-art on all four tasks (GMM-40, DW-4, LJ-13, LJ-55), beating iDEM by an order of magnitude on energy-W2 for LJ-55.
- Efficiency: NEM needs 5-10x fewer energy evaluations than iDEM on simple tasks; BNEM-100 (100 steps) matches iDEM-1000 (1000 steps) on harder tasks.
- Limitation: Differentiating through the energy network at sampling time uses ~3x more GPU memory than iDEM at scale.
- Code available: Open-source at github.com/tonyauyeung/BNEM with full benchmark configs.
Sampling from a Boltzmann distribution -- the probability distribution that governs how physical systems settle into equilibrium -- is one of the most computationally demanding problems in scientific computing. Efficient Boltzmann sampling is central to a broad range of applications, from characterizing biomolecular function and accelerating drug discovery to materials design and the study of complex statistical-physics models. The catch: you almost never have data samples to train on. You only have the energy function that defines the distribution, and generating samples from scratch is brutally expensive with classical methods like Markov Chain Monte Carlo.
Amortized methods using machine learning have been developed in recent years, but most existing methods for sampling from Boltzmann densities have problems scaling to high dimensions and are very time-consuming. The current state-of-the-art, Iterated Denoising Energy Matching (iDEM), is an iterative algorithm that uses a stochastic score matching objective leveraging solely the energy function and its gradient -- and no data samples -- to train a diffusion-based sampler. But iDEM has a fragility problem: it requires a large number of samples for its Monte Carlo score estimate to have low variance, and its effectiveness highly depends on the choice of noise schedule and score clipping.
A new paper from the University of Cambridge and the University of Washington introduces BNEM (Bootstrapped Noised Energy Matching), a diffusion-based neural sampler that sidesteps iDEM's instability by learning energy functions directly rather than score functions, then applying a bootstrapping technique to further sharpen those estimates. The result is a sampler that is more robust, converges faster, and sets new state-of-the-art results across four benchmark tasks.
Why score matching is the wrong target
To understand BNEM, you need to understand what iDEM actually does. A diffusion-based sampler works by learning to reverse a noising process -- starting from pure Gaussian noise and denoising back to samples from the target distribution. To do this, you need to learn the score function: the gradient of the log-probability at each noise level. iDEM estimates this score using a Monte Carlo (MC) average over many random samples drawn around each point.
The problem is that score functions are derivatives -- and derivatives amplify noise. The paper proves this formally: the variance of the MC score estimator is at least 4(1 + ||∇E_t(x_t)||)^2 times larger than the variance of the MC energy estimator. In regions with steep energy gradients (exactly the interesting regions near mode boundaries), the score estimator becomes wildly noisy. NEM instead learns the energy directly -- a scalar value -- and computes the score at sampling time by differentiating the learned energy network. The training target is much cleaner, making the learning problem fundamentally easier.

The bootstrapping trick that makes it work
NEM alone is already an improvement over iDEM, but it still suffers from high variance at large noise levels. At high noise, the MC energy estimator has to integrate over a very wide Gaussian, which means the samples used for the estimate are spread far from the point of interest -- making the estimate noisy. BNEM fixes this with a clever bootstrapping scheme.
The core idea: instead of always estimating the energy at noise level t by sampling from the original energy function at t=0, BNEM uses the already-learned energy network at a slightly lower noise level s < t as an intermediate stepping stone. Concretely, the bootstrap estimator draws samples from a narrower Gaussian (from t to s rather than from t to 0), evaluates the learned energy at those points, and uses that to estimate the energy at t. This trades a small amount of bias for a large reduction in variance.
The paper proves that with K MC samples and i bootstrapping steps, the bias of the estimator scales as 1/K^(i+1) rather than 1/K -- meaning bootstrapping once with K=100 samples gives you the same bias as using K=10,000 samples in the plain NEM estimator. The training procedure uses a rejection scheme to decide when to use the bootstrapped estimator versus the plain MC estimator, based on normalized losses at each noise level.
How the full system works, step by step
The training loop has two nested levels:
- Outer loop: Run the current diffusion sampler forward to generate candidate samples, and store them in a replay buffer.
- Inner loop: For each sample in the buffer, add Gaussian noise to get a noisy version
x_t, then compute the MC energy estimator (or bootstrap estimator) as the training target, and update the energy networkE_θ(x_t, t)to match it.
At sampling time, the score needed to run the reverse SDE is computed by differentiating the learned energy network with respect to its input: score = -∇_x E_θ(x_t, t). This differentiation step doubles the compute cost of a forward pass, but the paper shows this is more than compensated by needing far fewer integration steps to converge.
For physical systems with symmetry (like molecular systems), the energy network is built to be SE(3)-invariant by using an Equivariant Graph Neural Network (EGNN) backbone -- the same architecture used in iDEM -- ensuring that rotations and translations of the particle system don't change the predicted energy.
Benchmarks: cleaner samples, fewer steps
The team evaluated NEM and BNEM on four tasks of increasing difficulty, all measured without access to training data -- only the energy function:
- GMM-40: A 2D Gaussian Mixture Model with 40 modes (d=2). Tests mode coverage.
- DW-4: A 4-particle double-well potential (d=8). A classic molecular benchmark.
- LJ-13: A 13-particle Lennard-Jones system (d=39). Realistic inter-atomic forces.
- LJ-55: A 55-particle Lennard-Jones system (d=165). The hardest benchmark in the field.
Results are measured using Wasserstein-2 distance on both sample coordinates (x-W2) and energy values (E-W2), plus Total Variation (TV). On the simple GMM task, NEM reaches the same optimality as iDEM but requires 5-10 times fewer energy evaluations. BNEM achieves similar results an order of magnitude faster and delivers better performance. On the harder LJ-55 task, NEM and BNEM yield an order of magnitude improvement over iDEM in energy-W2.
Robustness is where the gap is most striking. When the compute budget is cut -- reducing integration steps and MC samples from 1000 to 100 -- iDEM performance significantly deteriorates in GMM and DW-4 potentials, whereas NEM remains more robust. BNEM-100 maintains strong performance, matching iDEM-1000 in GMM and DW-4, and notably outperforming iDEM-1000 in the LJ-13 benchmark.
What it's good at -- and where it struggles
BNEM is the right tool when you have an energy function but no data samples, and you need independent (not correlated) samples from the equilibrium distribution. The key use cases are:
- Molecular dynamics and protein conformation sampling
- Drug discovery pipelines that need equilibrium structural ensembles
- Material design simulations (e.g., Lennard-Jones particle systems)
- Any Bayesian inference problem where the unnormalized posterior is known but sampling is hard
The main limitation is memory. Because sampling requires differentiating through the energy network, NEM/BNEM require approximately 3x more GPU memory than iDEM at LJ-55 (4.30 GiB vs 1.30 GiB). The paper proposes a Memory-Efficient NEM variant using Tweedie's formula that avoids storing the computational graph, at a small cost in sample quality. A second limitation: to stabilize training with extreme energy values, the authors had to use a cubic-spline interpolation technique for the Lennard-Jones potentials, which can introduce small biases in the generated samples.
The real breakthrough
The deeper contribution here is a theoretical reframing of what diffusion-based samplers should learn. The community has largely assumed that score matching is the natural objective for diffusion models -- after all, scores are what you need to run the reverse SDE. BNEM demonstrates that learning energies (scalars) and differentiating them at inference time is a strictly better-conditioned problem, with provably lower-variance training targets. The bootstrapping then compounds this advantage by letting the model use its own partially-trained outputs as stepping stones, similar in spirit to how target networks work in reinforcement learning.
The code is available at github.com/tonyauyeung/BNEM under an open license, with configs for all four benchmark tasks.