Command Palette
Search for a command to run...
Hochpräzises Sampling für Diffusionsmodelle und log-konkave Verteilungen
Hochpräzises Sampling für Diffusionsmodelle und log-konkave Verteilungen
Fan Chen Sinho Chewi Constantinos Daskalakis Alexander Rakhlin
Zusammenfassung
Wir präsentieren Algorithmen für das Sampling bei Diffusionsmodellen, die einen δ-Fehler in polylog(1/δ) Schritten erzielen, vorausgesetzt, es liegen O(δ)-genaue Score-Schätzungen in L2 vor. Dies stellt eine exponentielle Verbesserung gegenüber allen bisherigen Ergebnissen dar. Unter minimalen Datenannahmen beträgt die Komplexität O(dpolylog(1/δ)), wobei d die Dimension der Daten ist; unter einer nicht-uniformen L-Lipschitz-Bedingung beträgt die Komplexität O(dLpolylog(1/δ)); und wenn die Datenverteilung eine intrinsische Dimension d⋆ besitzt, reduziert sich die Komplexität auf O(d⋆polylog(1/δ)). Unser Ansatz liefert zudem den ersten Sampler mit polylog(1/δ)-Komplexität für allgemeine log-konkave Verteilungen, der ausschließlich Gradientenauswertungen verwendet.
One-sentence Summary
Diffusion model sampling algorithms are proposed that achieve δ-error in polylog(1/δ) steps given O(δ)-accurate score estimates in L2, yielding an exponential improvement over prior work with complexity O(d⋆polylog(1/δ)) under intrinsic dimension d⋆ and providing the first polylog(1/δ) complexity sampler for general log-concave distributions using only gradient evaluations.
Key Contributions
-
The work gives diffusion sampling algorithms that reach δ error in polylog(1/δ) steps when provided with O(δ)-accurate score estimates in L2, yielding O(dpolylog(1/δ)) complexity under minimal data assumptions and an exponential improvement in dependence on target accuracy over previous results.
-
The approach samples from the Bayes-rule diffusion transition rather than relying only on Gaussian DDPM updates, and the resulting guarantees remain robust to score estimation error while giving O(dLpolylog(1/δ)) complexity under a non-uniform L-Lipschitz condition and O(d⋆polylog(1/δ)) complexity when the data have intrinsic dimension d⋆.
-
The framework also produces the first polylog(1/δ)-complexity sampler for general log-concave distributions using only gradient evaluations.
Introduction
The authors study the complexity of sampling from continuous distributions when only evaluations of the gradient of the log-density are available, a setting central to diffusion-based generative models because these models learn score functions rather than unnormalized densities. This matters because fast convergence, ideally with iteration counts scaling polylog(1/delta) in the target accuracy, would allow high-accuracy generation without excessive score queries. Prior work faces a key limitation: score-only diffusion samplers typically rely on stochastic differential equation discretizations, whose discretization error prevents high-accuracy guarantees and leads to polynomial or only modestly subpolynomial dependence on 1/delta, while existing polylog-type results require density evaluations or stronger assumptions. The authors address this by introducing first-order rejection sampling, a meta-algorithm that simulates rejection sampling using only first-order queries, and show that it yields high-accuracy polylogarithmic guarantees for diffusion sampling under minimal data assumptions, with additional refinements for Lipschitz scores, low intrinsic dimension, and log-concave sampling.
Method
The method is organized around a reusable sampling primitive designed to sample from a tilted Gaussian target without direct access to the density value. The core target has the form
ν(x)∝exp(−f(x)−2η∥x−x0∥2),where the algorithm is allowed to query only first order information about f. In the diffusion sampling setting, one chooses f=−logpt and replaces −∇f by a score estimate. The main challenge is to perform rejection sampling against a Gaussian proposal while avoiding expensive integration or evaluation of f itself.
The authors introduce a first order rejection sampling module. The abstract task is to sample from a target
p(x)∝q(x)exp(w(x)),where q is a proposal distribution and w(x) is not directly evaluable. Instead, for each x, the sampler can draw random variables W1,W2,… such that
E[Wi∣x]=w(x).The key observation is that an unbiased estimator of w(x) is enough to simulate the required Bernoulli acceptance probability. This is a Bernoulli factory construction. If the random variables are bounded after clipping, say in [−B,B], the acceptance step can be performed using a Poissonized product of scaled unbiased estimates. The resulting sampler outputs a point with law approximately proportional to
q(x)exp(E[Wi∣x]),and the expected number of drawn estimators grows on the order of
O(Be2B(T+log(1/δ)))over T calls, up to constant factors, with probability at least 1−δ.
For a Gaussian tilt, the first order rejection sampling module is instantiated by constructing a Gaussian proposal from a local linear approximation of f. Choose a point x+ and form
q(x)∝exp(−⟨x−x+,∇f(x+)⟩−2η1∥x−x0∥2).Equivalently, if
x=x0−η∇f(x+),then the proposal can be taken as
q=N(x,ηI).The residual log tilt between ν and q can be written as a path integral of gradient differences. In the simplest form,
logν(x)−logq(x)−const=∫01⟨x−x+,∇f(x+)−∇f(rx+(1−r)x+)⟩dr.This suggests the unbiased estimator
Wr,x=⟨x−x+,∇f(x+)−∇f(rx+(1−r)x+)⟩,where r∼Unif(0,1). In practice the estimator is clipped to a fixed interval:
Wr,x=ClipB(Wr,x),with B=Θ(1). If ∇f is β Lipschitz, then
∣Wr,x∣≤β∥x−x+∥2.Therefore, when the Gaussian proposal is well centered near the anchor and the step size is sufficiently small, the clipped estimator is bounded with high probability.
A more refined construction uses a general path integral. Fix a random shift distribution for z and a path γz,r(x) satisfying γz,1(x)=x and γz,0(x) independent of x. Then for a smooth function h,
h(x)−Ez∼P[h(γz,0)]=Ez∼P,r∼Unif⟨γ˙z,r(x),∇h(γz,r(x))⟩,where γ˙z,r(x)=drdγz,r(x). This leads to the path estimator
Wr,z,x=⟨γ˙z,r(x),∇f(x+)−∇f(γz,r(x))⟩.A useful choice is
γz,r(x)=arx+(1−ar)x+brz,with
ar=sin(πr/2),br=cos(πr/2),and z sampled from a Gaussian noise distribution. This path interpolates smoothly between the proposal mean and the current candidate while adding randomness from z. Under gradient Lipschitz or Hölder continuity assumptions on ∇f, this path estimator yields a Gaussian tilt sampler whose sample distribution is close in chi squared divergence to the target. In the smooth case, the step size must satisfy a condition of the form
η−1≫β1d1/2log(1/δ),while in the merely Lipschitz case the condition becomes
η−1≫β02log(1/δ).The same subroutine is then used as the engine for diffusion sampling. The key structural insight is that one reverse diffusion step can be viewed as sampling from a Gaussian tilted target, where the tilt is determined by the score function. At step t, let the forward process have variance σt2 and signal scaling αt. Given a state Xt+1, define the deterministic anchor
xˉt=αt−1Xt+1.A learned or estimated score function st is then queried to construct an estimator for the reverse transition target. The sampler repeatedly runs the Gaussian tilt rejection subroutine at each diffusion time, accumulating sample quality as it progresses from t=T toward t=1.
The first variant is a simple Gaussian proposal method. It uses
qt=N(xˉt,ηtI)and the clipped path estimator
Wr,xt=ClipB(⟨x−xˉt,st(rx+(1−r)xˉt)⟩),where r∼Unif(0,1). The step size is chosen so that
ηtσt2≫dlog(1/δ)+log2(1/δ).The resulting sampler tracks the reverse transition kernels from the prior distribution toward the early stopped distribution p1. Its error decomposition has the form
DKL(p1∥p1)≲DKL(pT∥pT)+Tδ+t=1∑T−1ηtεt,score2,where εt,score2 measures the local score approximation error. The method does not require strong shape assumptions on the data distribution beyond a second moment bound. With an appropriate schedule, the number of steps needed to reach small discrepancy in the bounded Lipschitz metric is on the order of
max{d,log(1/δ)}log2(δ2d+M22),where
M22=EX0∼pdata∥X0∥2.A second instantiation is a DDPM like method. Here the proposal includes a first order score correction:
qt=N(xˉt+ηtst(xˉt),ηtI).This proposal is closer to standard ancestral diffusion sampling, but the target correction is still implemented using the rejection estimator. The path used in the estimator is
γz,r,xˉt(x)=arx+(1−ar)xˉt+brz,with
ar=sin(πr/2),br=cos(πr/2),and
z∼N(0,ηtI).The estimator is
Wr,z,xt=ClipB(⟨γ˙z,r,xˉt(x),st(γz,r,xˉt(x))−st(xˉt)⟩).This version benefits from a nonuniform smoothness condition on the true score. Under this condition, the step size can be chosen to satisfy
ηtσt2≫dLδlog(d/δ)+Lδlog(d/δ),where Lδ is a high probability smoothness parameter. For Gaussian data one may take Lδ constant, while for mixtures of Gaussians it grows logarithmically in the ambient dimension and the number of mixture components. The resulting total query complexity is on the order of
max{dLδlog(d/δ),Lδlog(d/δ)}log(δ2d+M22).The method can also be adapted when the data distribution has low dimensional structure. The motivation is that the Hessian of a Gaussian smoothed log density contains an isotropic term that can dominate the smoothness parameter. If
p=pdata∗N(0,σ2I),then
∇2logp(x)=−σ2I+σ4Cov(X0∣X=x).The shifted score function
st(x)=st(x)+λtx,λt=σt21,removes the isotropic part of the curvature and often yields better behavior when the support of pdata is intrinsically low dimensional.
The intrinsic dimension is defined using covering numbers. If Ndata(r) is the covering number of the data support at radius r, then
d⋆=1+logNdata(σ0/d).The low dimensional adaptation modifies the Gaussian proposal variance through
ηˉt1=ηt1+λt,and uses the shifted score difference in the rejection estimator:
Wr,z,xt=ClipB(⟨γ˙z,r,xˉt(x),st(γz,r,xˉt(x))−st(xˉt)+λt(γz,r,xˉt(x)−xˉt)⟩).The corresponding step size condition becomes
ηtσt2≫d⋆log(d/δ)+log2(d/δ),and the resulting complexity depends on d⋆ rather than the ambient dimension d:
max{d⋆,log(d/δ)}log2(δ2d+M22).The same Gaussian tilt sampler also gives a gradient only implementation of the restricted Gaussian oracle used in the proximal sampler for log concave distributions. For a target μ∝e−f, the proximal sampler uses an augmented density of the form
μ(x,y)∝exp(−f(x)−2η1∥y−x∥2).A Gibbs step requires sampling from the restricted Gaussian oracle
RGOf,η,y(x)∝exp(−f(x)−2η1∥y−x∥2).This oracle is exactly a Gaussian tilt with center y. By implementing the oracle with the first order rejection sampling module, the proximal sampler avoids direct evaluations of f and relies on gradient information instead. Under smoothness, log Sobolev, Poincaré, or log concavity assumptions, this yields high accuracy proximal sampling with first order query complexity, including improved dimension dependence compared with standard rejection based Gibbs schemes.
Experiment
The study applies the proposed method to proximal sampling from log-concave and isoperimetric densities by using a Gaussian tilt representation for the restricted Gaussian oracle. The findings show that this approach yields high-accuracy sampling guarantees for both smooth and Lipschitz objectives under log-Sobolev, Poincare, and log-concavity assumptions, while relying only on first-order and proximal queries. These results indicate that the method can achieve strong convergence without zeroth-order information or the accuracy degradation typical of diffusion-based discretization methods.