arXiv(opens in a new tab)stat.MLOct 2026Cited by 1 paper on PaperVantage

Manuscript Offprint

arXiv:2610.29086

Internal Guidance as a Sampling Method for Tilted Diffusion Models

Curtis McDonald, Peter Bartlett

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Reward guidance methods sample an exponential tilt of a base density using a diffusion model trained with only samples from the base distribution. Existing methods use what we call external guidance: additive terms in the drift or multiplicative terms on the transition probabilities. We propose internal guidance which leaves the output of the base denoiser unmodified and instead changes the point at which it is evaluated. For discrete distributions embedded in the hypercube {−1,1}d\{-1,1\}^d, the denoiser of any linearly tilted density is exactly the base denoiser evaluated at a shifted and rescaled input. In practice the base denoiser is a neural network trained on noised samples of the base distribution. The required evaluation points for sampling the tilted density would be out-of-distribution for basic noising of the base distribution. We modify the training algorithm with random diagonal rescalings of the data, so that the denoiser network learns both in- and out-of-distribution evaluations of the denoiser relative to the base distribution. A single denoiser network samples binary reward tilts, class labels, and infilling with no fine-tuning and no external guidance term. 1^{1}

1 Introduction

Diffusion models designed via Gaussian noising have become the dominant generative algorithm for continuous distributions [29, 13, 32], and continue to show promise for discrete targets as well [7, 16, 35]. The original theory of diffusion models was established for unconditional generation [31, 32]: given access to an initial pool of samples from a distribution π\pi, we train a model to sample from π\pi. As the field has matured, interest has turned towards conditional generation and tilting. Given access to only a pool of samples from π\pi, and a reward function rr, we want to train a sampling algorithm to sample from an exponential tilt by the reward function for some strength τ\tau with density π~(x)∝π(x)eτr(x)\tilde{\pi}(x) \propto \pi(x)e^{\tau r(x)}.

Existing methods utilize what the authors refer to as external guidance, implementing an additive vector field called a guidance term to modify SDE paths at sampling time [10, 28, 11], or a density ratio to reweight Markov chain conditional probabilities [33, 24, 17, 12]. Methods such as classier-fee guidance [14] implement ad hoc and closed-form guidance terms, but are known to structurally sample the wrong invariant measure and introduce sampling artifacts such as corrupted samples and mode collapse [8, 4]. Exact guidance schemes derive the analytically correct guidance terms, but result in an intractable object that must either be learned in an expensive neural network

1^{1}Code available at https://github.com/CMcDonald-1/internal_guidance_diffusion_models training run, or approximated by a tractable analog such as an empirical average that introduces compounding errors at sample time.

A recent line of work [15, 21, 20, 22] has opened up a new method for reward-tilted sampling we call internal guidance. Rather than modify the output of the denoiser of the base distribution with additive or multiplicative terms outside of the object, we realize we can instead shift our evaluation point inside the existing base denoiser. Recent work of Moitra et al. [21, Lemma 3.3] has shown for an internal mapping function H we call a symmetry map, the evaluation of the denoiser of a linear tilted density is an evaluation of the base denoiser at a modified input

Gtilt(u,a)=Gbase(u~=H1(u,a),a~=H2(u,a)).G_{\mathrm{t i l t}}(u,a)=G_{\mathrm{b a s e}}(\tilde{u}=H_{1}(u,a),\tilde{a}=H_{2}(u,a)).

These symmetry mappings are closed-form objects involving shifting and rescaling inputs, derived from the interactions of linear tilts with the quadratic log-density terms introduced via Gaussian convolution.

Internal guidance has clear benefits. There is no intractable external term to approximate, and the symmetry maps H are all explicit. A single denoising diffusion model, trained on unconditional sampling of its input distribution, is able to sample an entire family of tilted densities at inference time with no additional reinforcement learning, fine tuning, or external guidance required.

The catch with this method is one of coverage. If we had access to the oracle denoiser G we could implement such a method with no additional error over base sampling. However, we instead have a network gθg_{\theta} trained to approximate G. This network is only accurate in an L2L^{2} sense along the sequence of marginal densities produced by noising the base distribution, which we call the training manifold. The equivalent points (u~,a~)(\tilde{u}, \tilde{a}) induced by the symmetry map represent an out-of-distribution query from the perspective of the base model denoiser, and we have no control on the accuracy of our trained network at this point.

The relationship of the symmetry map can be captured by an equivalence class: for a tilted density π~\tilde{\pi} and an evaluation point (u,a)(u, a), the equivalence class is all points (u~,a~)(\tilde{u}, \tilde{a}) where the base denoiser evaluated at (u~,a~)(\tilde{u}, \tilde{a}) is equal to the tilted denoiser at (u,a)(u, a). The work of Moitra et al. [21] can be interpreted as showing this equivalence class exists and is non-empty, and established one symmetry map which creates the class. However, this symmetry alone is not enough to force overlap between the equivalence class of points produced by tilted sampling and the high probability region of the base distribution training manifold the denoiser network was trained on.

To have equivalent points that live near the training manifold, we need to introduce additional symmetry relationships that expand the equivalence class. We restrict our study to discrete distributions embedded in the hypercube {−1,1}d\{-1, 1\}^d, noised under continuous Gaussian convolution, and a stochastic localization algorithm to implement the reverse sampling and produce discrete outputs. The benefit of embedding in the hypercube is all discrete points are constant norm ∥x∥2=d\|x\|^2 = d. The conditional densities which define the denoiser are quadratic tilts to the base density which introduce linear and quadratic terms to the log-density. By the constant norm property, all quadratic terms normalize out and the denoiser is a pure linear tilt to the base density. This opens up additional symmetries that expand the equivalence class and allow modification to the training manifold. With these additional symmetries, we train a denoiser network that can be evaluated at points which are out-of-distribution from the pure noising of the base distribution, but lie in the equivalence class of points seen at sampling time. We visualize a sketch of this idea in Figure 1. Our contributions are threefold:

  1. Conditional generation tasks such as infilling and reward tilting by binary rewards can be cast as linear tilts in an extended state space by promoting the reward coordinate to an additional random variable noised and denoised when sampling.

Figure

Figure 1: Sketch of denoiser symmetry. The training manifold is where the denoiser network has learned the base denoiser. The sampling manifold is the typical vectors that will be encountered when sampling a tilted density. The equivalence relationships can find a point with equal evaluation of the base denoiser near the training manifold, not all equivalence relationships map back to the region of the training manifold.

  1. We establish the theory of denoiser symmetry, the evaluation of the denoiser of a linear tilt to a base density can be recast as an evaluation of the base denoiser at a shifted evaluation point. We establish additional symmetries specific to hypercube embedded discrete distributions, by the removal of quadratic terms in the conditional log-density.

  2. We introduce diagonal matrix rescalings to our hypercube embedding during training called Λ\Lambda focusing, turning an out-of-distribution learning problem into an in-distribution learning problem, and allowing the base denoiser to be evaluated at locations off the typical noising path.

We demonstrate performance on small discrete sampling targets such as a non-linear reward tilt to a small 12 dimension Ising model with ground truth comparison denoiser; generating and solving 4x4, 6x6, and 9x9 Sudoku puzzles; and conditional class generation of MNIST digit images. These problems are small enough to act as a test bed where the quality of our sampling can be compared against exact ground truth values as a diagnostic of effective sampling, with future work to focus on scaling and more complex target distributions for internal guidance.

References (34)