U7.2 High Reward and Plausible Data: Which Distribution Should We Sample?
Builds on3 notes
One high-scoring sample, or a distribution of good samples?
Suppose a new aesthetic-scoring program evaluates completed images, but offers neither a noisy classifier nor a matching conditional generator prediction.
Its output is a reward: larger values mean better agreement with this task. It need not be a probability or differentiable.
First determine how the score should change the desired sampling distribution.
Reward alone can favor implausible inputs that exploit the evaluator. We also want data fidelity, meaning that outputs retain plausible features and structure from the base data. We therefore consider
- The task score .
- Base log density , describing how densely data occurs nearby.
SupplementWhy log density rather than density?
For independent observations, likelihood multiplies model densities:
The logarithm converts this product into a sum without changing its maximizer. Summing log densities also avoids underflow from multiplying many small values.
Dividing by sample count gives average log-likelihood:
The expectation fixes the real-data law and evaluates model log density. Under integrability, its sample average converges. Expanding KL gives
The first term is independent of model parameters, so expected log-likelihood maximization minimizes this KL.
However, monotonicity of log does not make expectation of log equivalent to expectation of density. For two outcomes with true proportions 0.9 and 0.1,
| Objective | Optimal model probability of the first outcome |
|---|---|
| Mean probability: | |
| Mean log probability: |
The first concentrates everything on the common outcome. The logarithmic objective recovers the true proportions and strongly penalizes assigning negligible probability to real outcomes.
MLE varies a model while fixing the data law. Here we fix the base law and choose a new sampling distribution. The log-density score is shared, but the optimization variable differs.
For one point, we could maximize . We instead want varied plausible answers, so choose a new density .
Which distribution-level objective favors reward while retaining the base distribution’s influence?
Combine fidelity, reward, and diversity
A first attempt compares average sample scores across candidate distributions.
Choose the distribution with the best expected combined score:
Reward, base density, and are fixed. Only the sampling law changes. Does this alone preserve alternatives?
Take two equally probable plausible images , with rewards zero and one. If the new law chooses with probability , the objective is
For positive strength it chooses every time. Plausibility alone did not require preserving .
Add entropy to discourage excessive concentration, assuming the terms exist:
Expand entropy and combine logarithms:
The numerator suggests multiplying base density by the exponential reward. Normalize it:
Substitute this definition back into the objective:
If , the normalizer is fixed and KL is minimized at equality. The optimal distribution is
This is exponential tilting or reward tilting. Relative weight depends on both base density and reward, rather than reward alone.
The two-image weights become . The higher-reward image is more common, but the other retains positive probability at finite strength.
The ideal base is . In practice, steering a pretrained model targets its learned base law; existing model error does not disappear.
DiscussionQ1
Why not remove entropy and simply maximize expected reward plus expected base log density?
Show the reasoning
Without entropy the objective is linear in the sampling law. Writing its pointwise score as gives
In a discrete space it places all mass on maximizers. In continuous spaces a density may only approach the concentrated limit. This optimizes a location rather than preserving other answers.
Entropy is what changes this problem into the finite-strength tilted law derived above.
SupplementOther common formulations of the same target
Expand the objective into three terms:
Assume finite relevant expectations and entropy, and a finite positive normalizer. We can compare the following forms.
KL-regularized reward maximization:
Combine base log density and entropy using KL:
Divide the objective by positive :
Thus log density plus entropy is a KL penalty against departing from the base. Increasing reduces the relative penalty.
Constrained formulation:
A related problem maximizes reward under a permitted KL budget:
Use a positive Lagrange multiplier to penalize violation:
The final term is constant in the sampling law. But the constraint budget and penalty strength must match; arbitrary choices are not automatically equivalent.
Choose . Optimality of the penalized solution implies, for any feasible competitor,
The first inequality rearranges penalized optimality; the second uses feasibility. This establishes the particular matched constrained solution.
Bayesian posterior:
For an observation and a measurement likelihood, choose
Substitute into the tilt:
The exponential becomes the likelihood, and Bayes’ rule identifies the posterior. Its normalizer is
For finite positive evidence, the target is posterior sampling. The observation is tied to a measurement model; general classes and prompts remain .
RLHF:
For a language model, fix a prompt and treat responses as . A response law is also called a policy. Let be the reference policy.
The reward/KL component of RLHF [4] takes the form
Expand KL and divide by positive :
This has the same entropy term, base law , and strength . The ideal policy is its exponential tilt.
This compares objective structure only. The cited PPO-ptx objective includes another pretraining term, and practical RLHF updates parameters. Our test-time procedure keeps them fixed.
If reward is differentiable, can we directly add its gradient?
At the clean endpoint, the tilted score is
Here the reward gradient modifies clean data. Classifier conditioning is a special case with log class probability as reward.
Intermediate diffusion states are noisy, while reward is defined on clean outcomes. One ambiguous sketch can lead to several differently scored completions. We must consider their possibilities rather than pretend the sketch is finished.
Corrupt clean tilted samples using the original forward kernel:
Substitute the tilted density:
We want to express the resulting density using the base marginal and an additional factor.
Multiply and divide inside the integral by . Bayes’ rule gives
This posterior describes possible clean origins and their relative probabilities given the current noisy observation.
A natural estimate of eventual reward would average over this posterior:
But tilting reweights by , so its required average is instead
Return to the target integral:
Use the posterior identity and factor out the base marginal:
Take logs and differentiate, eliminating the constant normalizer:
Exact guidance is the log-gradient of this posterior-averaged weight. Combined with a matching initial law and exact reverse dynamics, it gives the tilted marginal path.

Figure: branches represent posterior possibilities, not generated trajectories.
SupplementExact tilted sampling needs the matching terminal noisy law
At the starting noise level, the same identity gives
If corruption completely forgets the clean image, the terminal kernel no longer depends on .
The terminal posterior then reduces to the base data law:
Its averaged reward weight is consequently
Substitution cancels the normalizer:
Only under such independence can we reuse the original terminal law exactly. Looking nearly Gaussian does not itself prove independence from clean data.
Finite-noise initialization can therefore introduce a prior mismatch separate from guidance-estimation error.
What does practical guidance approximate?
The exact factor requires an integral over all compatible clean origins:
A pretrained score or noise predictor does not directly provide the complete posterior density needed for this integral.
Can we approximate it?
At nonzero retained signal, Tweedie’s formula gives the clean posterior mean from the ideal score:
Replace that score with the model estimate:
Subtract predicted noise, then undo signal scaling.
Approximate the posterior by this single denoised estimate:
This is a plug-in approximation, common in test-time guidance [1,5].
Its log-gradient becomes
Bansal and colleagues [1] call this forward universal guidance.
The chain rule connects changes to the noisy state, its denoised prediction, and reward:
The denoiser Jacobian maps the clean reward gradient into input coordinates. Differentiating through a fixed network does not update its parameters.
This does not guarantee the exact tilt, because generally
Nor does its derivative necessarily match the exact log-gradient. The following results address different parts of this gap.
SupplementHow do later methods address the exact-target gap?
Practical procedures can approximate the posterior, its averaged weights, and the sampling dynamics separately.
The following reading follows the source note’s conference and preprint distinctions. For inverse problems, exponential reward can be a measurement likelihood, but guarantees for a particular likelihood do not automatically cover arbitrary rewards.
First: average weights of several possible outcomes rather than score only a mean image.
LGD-MC [6] draws multiple candidates from an approximate posterior and averages their exponential weights:
Its Gaussian candidate law is centered on a denoised prediction with a specified variance. More candidates improve integration under that approximate law, without making the law itself exact. Its weight-error bound is not automatically a log-gradient bound.
Calibrated Bayesian Guidance [2] instead analyzes candidates from the actual clean posterior. Differentiable sampling supports weight-gradient estimates; otherwise weighted candidates estimate the tilted score:
Subtract the base score to obtain guidance. With correct posterior draws and suitable integrability, increasing candidate count yields consistency. Finite self-normalized ratios can remain biased, and approximate inner sampling introduces another error and computation cost.
Second: represent posterior uncertainty more carefully.
Free Hunch [7] estimates denoising covariance. For a linear Gaussian measurement model, integrating a Gaussian posterior approximation gives
Measurement noise and uncertainty about the clean origin contribute separate covariance terms. Covariance updates improve linear inverse-problem guidance, but do not reconstruct arbitrary multimodal posteriors or guarantee exact sampling for every reward.
Midpoint Guidance [8] introduces a less noisy intermediate state and a Gaussian bridge. A variational approximation balances a simpler measurement approximation against a harder intermediate conditional. It samples a surrogate posterior, rather than eliminating all approximation.
Third: correct approximate proposals during sampling.
Sequential Monte Carlo maintains multiple trajectories, called particles, updates their importance weights, and resamples according to those weights. Resampling does not mean retaining only the highest reward.
Twisted Diffusion Samplers [9] use approximate guidance to propose transitions, then retain model/proposal corrections in importance weights. Their consistency result requires assumptions including a matching terminal likelihood, controlled positive weights, bounded twisting gradients, and suitable proposal variance. It concerns the pretrained model’s conditional law as particle count grows, rather than exact finite-particle sampling or elimination of model error.
Feynman–Kac steering [10] extends this idea to general rewards and discrete diffusion. Its incremental potentials must satisfy
The product over the whole path gives the intended terminal reward weight. Changed proposals require the appropriate ratio corrections. Approximate intermediate rewards can be used, but total target weights cannot be chosen arbitrarily. Finite particles can still miss rare modes or lose path diversity.
Feynman–Kac Correctors [11] address consistency between designed intermediate densities and sampling dynamics. Mixing exact scores can still omit terms in the density-evolution equation. Weighted dynamics and SMC supply corrections under their assumptions; finite steps, particles, and score errors remain separate.
Reverse Diffusion SMC [13] also corrects proposal error, but assumes an evaluable unnormalized target density. A pretrained score plus reward alone does not generally satisfy that assumption.
Fourth: separate likelihood and prior sampling instead of estimating the guidance factor.
PnP-DM [12] introduces auxiliary variables and alternates likelihood-related sampling with a Gaussian denoising-posterior sampling step. Exact conditional updates and assumptions are needed. A fixed positive splitting parameter defines an extended target, approaching the original posterior only in an appropriate limit. Finite iterations, approximate scores, and numerical integration remain distinct errors.
Further reading: choosing the right mode need not give the exact tilt.
Are We Really Tilting? [3] is identified here as a 2026 preprint. It analyzes finite conditional-particle guidance, distinguishing mode selection from displacement and narrowing within a mode. Corrections for special Gaussian examples are not general-purpose guarantees.
For each result, ask which approximation it corrects, what limit or assumptions support its guarantee, and whether the target uses the true data law or a learned model law. Higher reward and correct distributional sampling are different claims.
Check your understanding
References
- Bansal, A. et al. Universal Guidance for Diffusion Models. 2023, §3.1, Eq. (6).
- Geyfman, D. et al. Calibrated Test-Time Guidance for Bayesian Inference. ICML 2026, §5, Eqs. (16), (20).
- Dandapanthula, S., Boffi, N. M. Are We Really Tilting? The Mechanics of Reward Guidance in Flow and Diffusion Models. 2026, preprint.
- Ouyang, L. et al. Training Language Models to Follow Instructions with Human Feedback. NeurIPS 2022, §3.5, Eq. (2).
- Chung, H. et al. Diffusion Posterior Sampling for General Noisy Inverse Problems. ICLR 2023, §3.1.
- Song, J. et al. Loss-Guided Diffusion Models for Plug-and-Play Controllable Generation. ICML 2023, §4.3, Eq. (9), Proposition 4.1.
- Rissanen, S., Heinonen, M., Solin, A. Free Hunch: Denoiser Covariance Estimation for Diffusion Models Without Extra Costs. ICLR 2025, §§3.1–3.7.
- Moufad, B. et al. Variational Diffusion Posterior Sampling with Midpoint Guidance. ICLR 2025, §3, Lemma 3.1.
- Wu, L. et al. Practical and Asymptotically Exact Conditional Sampling in Diffusion Models. NeurIPS 2023, §3, Appendix A.5, Theorem 2.
- Singhal, R. et al. A General Framework for Inference-time Scaling and Steering of Diffusion Models. ICML 2025, §3.3, Eq. (5), Algorithm 1.
- Skreta, M. et al. Feynman-Kac Correctors in Diffusion: Annealing, Guidance, and Product of Experts. ICML 2025, §§2.2–3.2.
- Wu, Z. et al. Principled Probabilistic Imaging using Diffusion Models as Plug-and-Play Priors. NeurIPS 2024, §§2–3, Theorem 3.1.
- Wu, L. et al. Reverse Diffusion Sequential Monte Carlo Samplers. NeurIPS 2025, §§2–3.