RNE: plug-and-play diffusion inference-time control and energy-based training

Jiajun He, José Miguel Hernández-Lobato, Yuanqi Du, Francisco Vargas

Diffusion models have proven to be exceptionally powerful at generating data by gradually removing noise. However, they often operate as "black boxes" when it comes to the specific probability densities of the samples they produce at intermediate steps. For many advanced applications—such as steering a model to generate stable molecules or combining concepts from multiple models—simply sampling is not enough.

To achieve this level of control, we need access to the marginal density ($p_t$) at each step of the generation trajectory. Calculating this exactly is computationally prohibitive, and existing workarounds are often task-specific, mathematically complex, or introduce significant bias. To address this gap, researchers have introduced the Radon-Nikodym Estimator (RNE), a unified, "plug-and-play" framework that allows diffusion models to estimate their own intermediate probability densities.

The Radon-Nikodym Estimator (RNE)

The core logic of RNE rests on an elegant mathematical property: the ratio (Radon-Nikodym derivative) between a forward noising process and its perfect time-reversal is identically 1. By discretizing this identity, the authors demonstrate that one can estimate the ratio of marginal densities using only the transition kernels (the "noise" and "denoise" steps) that are already available in any pre-trained diffusion model.

Visualizing the Radon-Nikodym derivative between a stochastic path and its time-reversal.

This insight provides a flexible framework built on three key components:

  1. Radon-Nikodym Corrector (RNC): A recipe for calculating weights in Sequential Monte Carlo (SMC) sampling. It allows users to plug in different control targets (like rewards or model products) without re-deriving complex formulas.
  2. Analytical Reference: To solve the instability problem where discretization errors compound in high dimensions, the authors compare the real process to a simple, analytically solvable Gaussian process. This cancels out much of the variance and makes the estimator highly reliable.
  3. Energy Regularization: A new loss term for training energy-based models that ensures the learned energy function remains consistent with the diffusion trajectory. This solves the common "blindness" issue where standard score-matching fails to capture global density scales.

Key Insights

RNE acts as a unifying theory for diffusion control. The authors prove that several previous state-of-the-art methods (like the Twisted Diffusion Sampler or Feynman-Kac steering) are actually specific, restricted cases of the broader RNE framework.

Furthermore, RNE provides a principled way to achieve inference-time scaling. By increasing the number of "particles" (samples) and using RNC weights, the model's performance scales predictably, allowing users to trade compute for quality. Because the method relies on path measures, it is also modality-agnostic, working just as well for discrete tokens (like text or masked images) as it does for continuous pixels or coordinates.

Empirical Results

The paper evaluates RNE across several diverse domains, including molecular dynamics, robotics, computer vision, and synthetic benchmarks, yielding strong results:

  • Superior Steering: In molecular annealing tasks (Alanine Dipeptide), RNC achieved significantly lower Total Variation (TV) distance to the ground truth compared to standard baselines and specialized prior methods.
  • Perfect Navigation: In maze-stitching tasks (pointmaze-medium-stitch-v0), RNC achieved a 100% success rate across all tested scenarios, whereas standard guidance methods hovered between 50% and 70%.
  • Discrete Success: The authors successfully applied reward-tilting to a discrete MaskGIT model on ImageNet, reliably steering it to generate specific objects and colors (e.g., "a yellow ambulance").
  • Better Energy Models: When training energy-based models, RNE regularization allowed the model to recover the true density of a complex Gaussian Mixture Model.
Comparison of MCMC samples on learned energy functions.

As shown above, standard Denoising Score Matching (DSM) completely fails to capture the global density scales of the ground truth distribution. In contrast, applying RNE regularization successfully recovers the true density.

Limitations and Future Directions

While powerful, RNE relies on Sequential Monte Carlo, which can suffer from "weight collapse" if the target distribution is extremely far from the model's original training data. Additionally, because it assumes a "perfect diffusion model," any biases or poor training in the underlying score network will be inherited by the RNE estimates.

Future work will likely explore more complex "reference processes" beyond simple Gaussians to further stabilize the estimator for high-resolution video or complex protein folding tasks, as well as deeper investigations into the inference-time scaling laws unlocked by the RNE framework.

Summary updated

BibTeX
@inproceedings{he2026rne,
  author = {Jiajun He and José Miguel Hernández-Lobato and Yuanqi Du and Francisco Vargas},
  title = {{RNE: plug-and-play diffusion inference-time control and energy-based training}},
  booktitle = {International Conference on Learning Representations},
  year = {2026},
  url = {https://openreview.net/forum?id=fkf7tlkN8q},
}
Figure