Posterior Sampling by Combining Diffusion Models with Annealed Langevin Dynamics
Zhiyang Xun, Shivam Gupta, Eric Price
Introduction
Diffusion models are currently the leading approach to generative modeling of images. Diffusion models are based on learning the “smoothed scores” of the modeled distribution . Such scores can be approximated from samples of by optimizing the score matching objective ; and given good -approximations to the scores, can be efficiently sampled using an SDE or an ODE .
Much of the promise of generative modeling lies in the prospect of applying the modeled as a prior: combining it with some other information to perform a search over the manifold of plausible images. Many applications, including MRI reconstruction, deblurring, and inpainting, can be formulated as linear measurements
Researchers have developed a number of heuristics to approximate posterior sampling using the smoothed scores, including DPS , particle filtering methods , DiffPIR , and second-order approximations . Unfortunately, unlike for unconditional sampling, these methods do not converge efficiently and robustly to the posterior distribution. In fact, a lower bound shows that no algorithm exists for efficient and robust posterior sampling in general . But the lower bound uses an adversarial, bizarre distribution based on one-way functions; actual image manifolds are likely much better behaved. Can we find an algorithm for provably efficient, robust posterior sampling for relatively nice distributions ? That is the goal of this paper: we describe conditions on under which efficient, robust posterior sampling is possible.
A close relative to diffusion model sampling is Langevin dynamics, which is a different method for sampling that uses an SDE involving the unsmoothed score . Unlike diffusion, Langevin dynamics is in general slow and not robust to errors in approximating the score. To be efficient, Langevin dynamics needs stronger conditions, like that is log-concave and that the score estimation error satisfies an MGF bound (meaning that large errors are exponentially unlikely).
However, Langevin dynamics adapts very well to posterior sampling: it works for posterior sampling under exactly the same conditions as it does for unconditional sampling. The difference from diffusion models is that the unsmoothed conditional score can be computed from the unconditional score and the explicit measurement model , while the smoothed conditional score (which diffusion needs) cannot be easily computed.
So the current state is: diffusion models are efficient and robust for unconditional sampling, but essentially always inaccurate or inefficient for posterior sampling. No algorithm for posterior sampling is efficient and robust in general. Langevin dynamics is efficient for log-concave distributions, but still not robust. Can we make a robust algorithm for this case?
Can we do posterior sampling with log-concave and -accurate scores?
Our first result answers this in the affirmative. Algorithm˜1 uses a diffusion model for initialization, followed by an annealed version of Langevin dynamics, to do posterior sampling for log-concave with just -accurate scores. Annealing is necessary here; see Appendix˜F for why standard Langevin dynamics would not suffice in this setting.
The score estimates of the smoothed distributions have finite error, i.e.,
For precise bounds on the polynomials, see Theorem˜E.6. To understand the parameters, should be viewed as the signal-to-noise ratio of the measurement.
Global log-concavity, as required by Theorem 1.1, is simple to state but a fairly strong condition. In fact, Algorithm 1 only needs a local log-concavity condition.
As motivation, consider MRI reconstruction. Given the MRI measurement of , we would like to get as accurate an estimate of as possible. We expect the image distribution to concentrate around a low-dimensional manifold. We also know that existing compressed sensing methods (e.g., the LASSO ) can give a fairly accurate reconstruction ; not as accurate as we are hoping to achieve with the full power of our diffusion model for , but still pretty good. Then conditioned on , we know basically where lies on the manifold; if the manifold is well behaved, we only really need to do posterior sampling on a single branch of the manifold. The posterior distribution on this branch can be log-concave even when the overall is not.
In the theorem below, we suppose we are given a Gaussian measurement for some , and that the distribution is nearly log-concave in a ball polynomially larger than . We can then converge to .
Then, there exist and such that: Given a Gaussian measurement of with . If , then there exists an algorithm that takes iterations to sample from a distribution such that
If is globally log-concave, we can set so is independent of and recover Theorem 1.1; but if we have local information then this just needs local log-concavity. For precise bounds and a detailed discussion of the algorithm, see Section˜E.2.
The largest eigenvalue of quantifies the extent to which the distribution departs from log-concavity at a given point. In Figure 1, we show an instance of a locally nearly log-concave distribution: is uniformly on the unit circle plus . This distribution is very far from globally log-concave, but it is nearly log-concave within a -width band of the unit circle. See Section˜E.4 for details.
Compressed Sensing.
In compressed sensing, one would like to estimate as accurately as possible from . There are many algorithms under many different structural assumptions on , most notably the LASSO if is known to be approximately sparse . The LASSO does not use much information about the structure of , and one can hope for significant improvements when is known. Posterior sampling is known to be near-optimal for compressed sensing: if any algorithm achieves error with probability , then posterior sampling achieves at most error with probability . But, as we discuss above, posterior sampling cannot be efficiently computed in general.
We can use Theorem 1.2 to construct a competitive compressed sensing algorithm under a “local” log-concavity condition on . Suppose we have a naive compressed sensing algorithm (e.g., the LASSO) that recovers the true to within error; and is usually log-concave within an ball; then if any exponential time algorithm can get error from , our algorithm gets error in polynomial time.
Consider attempting to accurately reconstruct from . Suppose that:
Information theoretically (but possibly requiring exponential time or using exact knowledge of ), it is possible to recover from satisfying with probability over and .
We have access to a “naive” algorithm that recovers from satisfying with probability over and .
For ,
Then we give an algorithm that recovers satisfying with probability , in time, under Assumption 1 with .
That is, we can go from a decent warm start to a near-optimal reconstruction, so long as the distribution is locally log-concave, with radius of locality depending on how accurate our warm start is. To our knowledge this is the first known guarantee of this kind. Per the lower bound , such a guarantee would be impossible without any warm start or other assumption.
Figure 2 illustrates the sampling process of Corollary˜1.3. The initial estimate may lie well outside the bulk of ; with just an error bound, the unsmoothed score at could be extremely bad. We add a bit of spherical Gaussian noise to , then treat this as a spherical Gaussian measurement of , i.e., ; for spherical Gaussian measurements, the posterior can be sampled robustly and efficiently using the diffusion SDE. We take such a sample , which now won’t be too far outside the distribution of , then use as initialization for annealed Langevin dynamics to sample from . The key part of our paper is that this process will never evaluate a score with respect to a distribution far from the distribution it was trained on, so the process is robust to error in the score estimates.
Notation and Background
There are several ways to sample from using the scores. Langevin dynamics is a classical MCMC method that considers the following overdamped Langevin Stochastic Differential Equation (SDE):
where is standard Brownian motion. The stationary distribution of this SDE is , and discretized versions of it, such as the Unadjusted Langevin Algorithm (ULA), are known to converge rapidly to when is strongly log-concave . One can replace the true score with an approximation , as long as it satisfies a (fairly strong) MGF condition
In particular, showed that Langevin dynamics needs an MGF bound for convergence, and an -accurate score estimator for any is insufficient.
An alternative approach, used by diffusion models, is to involve the smoothed scores. Starting from , one can follow a different SDE :
for a particular smoothing schedule ; the result is exponentially close (in ) to being drawn from . This also has efficient discretizations , does not require log-concavity, and only requires an guarantee such as
to accurately sample from . One can also run a similar ODE with similar guarantees but faster .
Posterior sampling.
and want to sample from . The unsmoothed score is easily computed by Bayes’ rule:
Thus we can run the Langevin SDE (3) with the same properties: if is strongly log-concave and the score estimate satisfies the MGF error bound (4), it will converge quickly and accurately.
Naturally, researchers have looked to diffusion processes for more general and robust posterior sampling methods. The main difficulty is that the smoothed score of the posterior involves rather than the tractable unsmoothed term . Because the smoothed score is hard to evaluate exactly, a range of approximation techniques has been proposed . One prominent example is the DPS algorithm . Other methods include Monte Carlo/MCMC-inspired approximations , singular value decomposition and transport tilting , and schemes that combine corrector steps with standard diffusion updates . These approaches have shown strong empirical performance, and several provide guarantees under additional structure of the linear measurement; however, general guarantees for fast and robust posterior sampling remain limited beyond these restricted regimes.
Several recent studies use various annealed versions of the Langevin SDE as a key component in their diffusion-based posterior sampling method and achieve strong empirical results. Still, these methods provide no theoretical guidance on two key aspects: how to design the annealing schedule and why annealing improves robustness. None of these approaches come with correctness guarantees for the overall sampling procedure.
Comparison with Computational Lower Bounds.
One can efficiently obtain an -accurate estimate of the smoothed score of , so diffusion models can sample from .
Any sub-exponential time algorithm that takes as input and outputs a sample from the posterior fails on most with high probability.
To illustrate why the extra observation helps, consider the following simplified version of the hardness instance:
Here, is a one‑way permutation — it takes exponential time to compute for most . is the Dirac delta function, and we choose . Thus, is a mixture of well‑separated Gaussians centered at the points .
and let denote the vertex of closest to . Then the posterior is approximately a Gaussian centered at with covariance . Generating a single sample would therefore reveal , which requires time.
However, suppose we have a coarse estimate satisfying (e.g., obtained by compressed sensing). Then, uniquely identifies the correct with , and the remaining task is just sampling from a Gaussian. Therefore, this hard instance becomes easy once we have localized the task and does not contradict our Theorem˜1.2.
We are able to handle the hard instance above well because it is exactly the type of distribution our approach is designed for: despite its complex global structure, it exhibits well-behaved local properties. This gives an important conceptual takeaway from our work: the hardness of posterior sampling may only lie in localizing within the exponentially large high-dimensional space.
Therefore, although posterior sampling is an intractable task in general, it is still possible to design a robust, provably correct posterior sampling algorithm — once we have localized the distribution. We view our work as a first step towards this goal.
Techniques
The algorithm we propose is clean and simple, but the proof is quite involved. Before we dive into the details, we provide a high-level overview of the intuitions behind the algorithm, concentrating on the illustrative case where the prior density is -strongly log-concave. Under this assumption, every posterior density is also -strongly log-concave. Therefore, posterior sampling could, in principle, be performed using classical Langevin dynamics.
The challenge arises because we lack access to the exact posterior score . We only possess an estimator derived from an estimate of the prior score :
˜1 implies an accuracy of on average, but how do we use this to support Langevin dynamics, which demands exponentially decaying error tails?
Why can diffusion models succeed with merely -accurate scores, whereas Langevin dynamics require MGF accuracy?
Both diffusion models and Langevin dynamics utilize SDEs. The error in the score-dependent drift term relates directly to the KL divergence between the true process (using ) and the estimated process (using ). Consequently, bounding the score error with respect to the current distribution controls the KL divergence.
Diffusion models leverage this property effectively. The forward process transforms data into a Gaussian, and the reverse generative process starts exactly from this Gaussian. At any time , suppose is close to , then
by the accuracy assumption. This keeps the process close to the ideal process, ensuring overall small error.
Langevin dynamics, by contrast, often starts from an arbitrary, not predefined initial distribution . An score accuracy guarantee with respect to alone does not ensure accuracy for points that are not on the distributional manifold of (consider running Langevin starting from in Figure˜2). Therefore, a stronger MGF error bound is needed to prevent this from happening.
2 Adapting Langevin Dynamics for Posterior Sampling
While we can only use Langevin-type dynamics for posterior sampling, we possess a source of effective starting points: we can sample efficiently using the unconditional diffusion model. Intuitively, already lies on the data manifold. The score estimator initially satisfies:
As the dynamics evolves, the distribution transitions from towards . If converges to , we again expect reasonable accuracy on average:
Hence the estimator is accurate at the start and at convergence. The open question concerns the intermediate segment of the trajectory: does wander into regions where the prior score is unreliable? Ideally, the time-marginal of , averaged over , remains close to throughout.
3 Annealing via Mixing Steps
In fact, even though and both have marginal , so the score estimate is accurate on average at those times, this is not true at intermediate times. In Figure˜3, we illustrate this with a simple Gaussian example: and have distribution while has marginal for a constant . An error bound under does not give an error bound under , which means Langevin dynamics may not converge to the right distribution. A very strong accuracy guarantee like the MGF bound is needed here.
However, consider the case where the target posterior is very close to the initial prior , such as when the measurement noise is very large (low signal-to-noise ratio). Langevin dynamics between close distributions typically converges rapidly. This suggests a key insight: if the required convergence time is short, the process might not deviate substantially from its initial distribution . In such short-time regimes, an score error bound relative to could potentially suffice to control the dynamics. While itself is already a good approximation for when is very large, this motivates a general strategy.
Instead of a single, potentially long Langevin run from to , we introduce an annealing scheme using multiple mixing steps. Given the measurement parameters , we construct a decreasing noise schedule . Correspondingly, we generate a sequence of auxiliary measurements such that each is distributed as and is appropriately coupled to (specifically, conditional on ). This creates a sequence of intermediate posterior distributions .
An admissible schedule (formally defined in Definition˜D.1) ensures that:
is sufficiently large, making close to the prior .
Consecutive and are sufficiently close, making close to .
Start with a sample . Since is large, is close to , so serves as an approximate sample .
For to : Run Langevin dynamics for a short time , starting from the previous sample , targeting the next posterior using the score . Let the result be .
The final sample approximates a draw from the target posterior .
The core idea behind this annealing scheme is to actively control the process distribution , ensuring it remains on the manifold of the prior . By design, each mixing step connects two statistically close intermediate posteriors, and . This closeness guarantees that a short Langevin run can mix them, and this short duration prevents from drifting significantly away from the step’s starting distribution , and we can then argue that
This contrasts fundamentally with a single long Langevin run, where could venture far "off-manifold" into regions of poor score accuracy. By inserting frequent checkpoints that re-anchor the process, our annealing method substitutes such strong assumptions with structural control: the frequent “checkpoints” ensure the process is repeatedly localized to regions where the accuracy suffices. While error is incurred in each step, maintaining proximity to the manifold keeps this error small. The overall approach hinges on demonstrating that these small, per-step errors accumulate controllably across all steps.
This strategy, however, requires rigorous analysis of three key technical challenges:
How to bound the required convergence time for the transition from to ? In particular, what happens when only has local strong log-concavity?
How to bound the error incurred during a single mixing step of duration , given the score error assumption on the prior score estimate?
How to ensure the total error accumulated across all mixing steps remains small?
Addressing these questions forms the core of our proof.
In Appendix˜A, we show that for globally strongly log-concave distributions , Langevin dynamics converges rapidly from to . We extend this convergence analysis to locally strongly log-concave distributions in Appendix˜B. In Appendix˜C, we provide bounds on the errors incurred by score errors and discretization in Langevin dynamics. In Appendix˜D, we show how to design the noise schedule to control the accumulated error of the full process. In Appendix˜E, we conclude the analysis for Algorithm˜1, and apply it to establish the main theorems.
Experiments
To validate our theoretical analysis and assess real-world performance, we study three inverse problems on FFHQ– : inpainting, super-resolution, and Gaussian deblurring. Experiments use 1k validation images and the pre-trained diffusion model from . Forward operators are specified as in : inpainting masks of pixels uniformly at random; super-resolution downsamples by a factor of ; deblurring convolves the ground-truth with a Gaussian kernel of size (std. ). We first obtain initial reconstructions via Diffusion Posterior Sampling (DPS) , then refine them with our annealed Langevin sampler to draw samples close to . To control runtime, we sweep the step size while keeping the annealing schedule fixed.
For each step size, we report the per-image distance to the ground truth and the FID of the resulting sample distribution (Figure 4). Across all three tasks, increasing the time devoted to annealed Langevin decreases but increases FID; in the inpainting setting, when the step size is sufficiently small, our method surpasses DPS on both metrics. Qualitatively, our reconstructions better preserve ground-truth attributes compared to DPS (Figures 5 and 6). All experiments were run on a cluster with four NVIDIA A100 GPUs and required roughly two hours per task.
Acknowledgments
This work is supported by the NSF AI Institute for Foundations of Machine Learning (IFML). ZX is supported by NSF Grant CCF-2312573 and a Simons Investigator Award (#409864, David Zuckerman).
References
Appendix A Langevin Convergence Between Strongly Log-concave Distributions
consider two random variables and defined as follows. First, draw . Then, generate
This is the ideal (no discretization, no score estimation error) version of the process (2) that we actually run. Our goal is to establish the following lemma.
Suppose the prior distribution is -strongly log-concave. Then, running the process (6) for time
In this section, our goal is to bound . Since the posterior distributions can be expressed as
Let , and let . Then we have
where is the density function for . Therefore,
Applying Markov’s inequality gives the result. ∎
Now we bound . To make the lemma more self-contained, we abstract this a little bit.
where and are the densities of and , respectively.
Write , and note that . Then define
This gives that for any , , and ,
To bound , we expand as the -dimensional Gaussian probability density function:
Using the quadratic expansion , we rewrite:
Since and , we bound
Therefore, for any , and , we have
Bounding expectation over Z2Z_{2}.
We can apply results on the Gaussian moment generating functions to bound this. Using Lemma˜A.10 by setting , , and , we have
where and are the densities of and , respectively.
Let . By applying Laurent-Massart bounds (Lemma˜A.11), we have
By applying Markov’s inequality, for a large enough constant , we have
Cleaning up the bound a little bit, this implies that for a large enough constant ,
Combining this with the probability that , a union bound gives that
Now we can bound the -diversity.
There exists a constant such that for any ,
By Lemma˜A.5, there exists a constant such that
A union bound over these two implies that with probability of ,
where is a positive constant. This concludes the lemma. ∎
A.2 Convergence time of Langevin dynamics
We present the following result on the convergence of Langevin dynamics:
Let and be probability distributions such that is an -strong log-concave distribution. Consider the Langevin dynamics initialized with as the starting distribution. Then, for any , we have
Let and be probability distributions such that is an -strong log-concave distribution. Consider the Langevin dynamics initialized with as the starting distribution. By running the diffusion for time
Now we show that the posterior distribution is even more strongly log-concave than prior distribution.
Suppose that is -strongly log-concave. Then, the posterior density
By Bayes’ rule, the posterior density can be written (up to normalization) as
Since is -strongly log‑concave, its negative log–density satisfies
Moreover, the Gaussian likelihood term has
Hence is -strongly convex, and the posterior density is -strongly log‑concave. ∎
By Lemma˜A.9, is -strongly log-concave. This allows us to apply Lemma˜A.8. Therefore, to achieve TV error in convergence, we only need to run the process for
Taking in the result in Lemma˜A.6, we have with probability over and , we only need
A.3 Utility Lemmas.
For all and any , it is easy to check that by AM-GM inequality,
Taking and exponentiating both sides, we obtain
Multiplying both sides by yields
For , when we have
Let . For any ,
Appendix B Convergence Between Locally Well-Conditioned Distributions
In the last section, we considered the convergence time between two posterior distributions of a globally strongly log-concave distribution. In this section, we will relax the assumption of global strong log-concavity and consider the convergence time between two distributions that are locally “well-behaved”. We give the following formal definition:
For and , we say that a distribution is mode-centered locally well-conditioned if there exists such that
.
For , we have that .
For , we have that .
Again, we consider the following process , which is identical to process (6) we considered in the last section:
Our goal is to prove the following lemma:
Suppose is a mode-centered locally well-conditioned distribution. Let be a large enough constant. We consider the process running for time
In this section, we will assume that is mode-centered locally well-conditioned. Without loss of generality, we assume that the mode of is at 0, i.e., .
We consider the process defined as the process conditioned on for .
Our goal is to prove the following lemma:
We start by decomposing the total variation distance between and as follows:
Recall that the process is defined as the law of conditioned on the event
where .
Let denote the event that the initial condition is “good.” Then, by the law of total probability,
Taking the expectation with respect to and , we obtain
and by the law of total probability, we have
with . Then, for any time horizon and ,
Define . Although the Euclidean norm is not smooth at the origin, an application of Itô’s formula yields that, for , one has
where . Using the bound and the hypothesis , it follows by the Cauchy–Schwarz inequality that
Discarding the nonnegative Itô correction term (which can only increase the process), we deduce that
Since for all , the process is a standard one-dimensional Brownian motion with quadratic variation . By a standard comparison theorem for one-dimensional stochastic differential equations, it follows that almost surely for all ; hence,
A classical application of the reflection principle for one-dimensional Brownian motion shows that, for any ,
To incorporate the -dimensional nature of the noise, one may use a union bound over the coordinate processes of , which yields that
Combining the foregoing estimates, we deduce that
For any and , it holds that
Since with probability . Thus, with probability at least , it follows that
Since the probability satisfying the condition is at least , we have
Putting Lemma˜B.4 and Lemma˜B.8 together, we directly obtain Lemma˜B.3.
B.2 Concentration of Strongly Log-Concave Distributions
Before moving futher, we first prove that a strongly log-concave distribution is highly concentrated.
is 1-Lipschitz (by the triangle inequality), it follows that
A standard calculation using the fact that the covariance matrix of satisfies gives
Let and denote the mean and the mode of distribution , respectively, where is -strongly log-concave and univariate. Then, .
This immediately gives us the following corollary.
This also implies that every -strongly log-concave distribution is mode-centered locally well-conditioned.
Let be an -strongly log-concave distribution. Suppose the score function of is -Lipschitz. Then, for any , we have that is mode-centered locally well-conditioned.
B.3 Convergence to Target Distribution
Since is not globally strongly log-concave, we need to extend the distribution to a globally strongly log-concave distribution. We will use the following lemma to extend the distribution.
For each fixed the mapping has Hessian , hence is –strongly concave on the whole space. Because of (7) we have
Let be a -dimensional mode-centered locally well-conditioned probability distribution with and . Assume
Since on , we have
Therefore, .
Now, we can consider process defined as
Because for every , the drift coefficients of and coincide on the event , and hence conditioning on gives .
Taking expectation over gives
We start by considering another process defined as
Combining this with Lemma˜B.15, we have that
Furthermore, by Lemma˜A.1 and our constraint on , we have that
Appendix C Control of Score Approximation and Discretization Errors
In this section, we consider these processes running for time :
Process : Let be the discretization steps with step size . For ,
Note that is exactly the process (2) we run in Algorithm˜1, except that we start from .
We have shown that the process will converge to the target distribution . We will show that the process will also converge to with a small error
Let be a mode-centered locally well-conditioned. Suppose the followings hold for a large enough constant :
.
.
.
Then running for time guarantees that with probability at least over and , we have:
In this section, we assume is mode-centered locally well-conditioned. Without loss of generality, we assume that the mode of is at 0, i.e., . Let , i.e., the Lipschitz constant inside the ball .
We will also consider the following stochastic processes:
Process is the process conditioned on for .
Process is the process conditioned on for .
Suppose for a large enough constant .
By Girsanov’s theorem, for any trajectory ,
where the Girsanov exponent is given by
Since is supported in ,
Now, for , we have that
Note that has mean and is subgamma with variance and scale . Thus, for we have
The first term can be bounded using Lemma˜C.4. Now we focus on the second term. Note that
Since is -Lipschitz in , and using Lemma˜C.3, we have
where the last line follows from Markov’s inequality. The gives the result. ∎
We note that by our definition of ,
Then, combining Corollary C.6 with Lemmas B.3 and C.2, we have
The conditions in Lemmas B.3 and C.2 are satisfied by our assumptions, noting that implies the bound on holds for both processes.
Applying Markov’s inequality and combining Lemma˜B.2 with the above, we conclude the proof. ∎
Appendix D Admissible Noise Schedule
Recall that we can define process that converges from to : Let be the discretization steps with step size . For ,
We have already proven that we can converge the process from to with good probability, as long as some conditions are satisfied. Those conditions actually depend on the choice of the schedule of and . In this section, we will specify the schedule of and .
Now we specify the schedule of and .
We say a noise schedule together with running times is admissible (for a set of parameters ) if:
;
For all , we have and
The reason we need to satisfy the last inequality is to satisfy the conditions in Lemma˜C.1. We formalize this in the following lemma.
Let be a sufficiently large constant and be a mode-centered locally well-conditioned distribution. For any and , suppose
For any admissible schedule and , running the process for time guarantees that with probability at least over and :
It is straightforward to verify that an admissible schedule satisfies the first two conditions of Lemma˜C.1.
For the third condition regarding , our assumption states:
Given that , this choice of is sufficient to satisfy the third condition in Lemma C.1.
Therefore, applying Lemma C.1 at each step , we obtain that with probability at least over and :
We also want to prove the following two lemmas:
Let be a -dimensional mode-centered locally well-conditioned distribution. For any , suppose
Then, suppose , with probability at least over ,
There exists an admissible noise such that
where .
In this part, we prove Lemma˜D.3, showing that any admissible schedule has a large enough , enabling us to use to approximate .
We have the following standard information-theoretic result.
Let be a -dimensional mode-centered locally well–conditioned probability distribution. Assume
Lemma B.14 provides an -strongly log–concave density satisfying
Applying Lemma˜D.6 to gives
Integrating in and using the elementary fact
together with the above calculaion, yields
Since all admissible noise schedules satisfy . This implies
By Markov’s inequality, with probability at least over ,
D.2 Bound for NN Mixing Steps
Let , and let . Consider the number sequence
For every , let be the minimum integer such that . Then
We show in two steps that the time to go from to , then to . Define
We first show that . Consider the quantities
and let be the smallest such that . If instead already, then and there is nothing to prove.
Assume . For each define
By monotonicity of the sequence , it follows that . Summing over up to gives
By definition, is the first index such that , so .
Bound to achieve BB.
If , the bound already holds. Now we analyze how many steps Note that for every ,
Given parameters , consider sequence inductively defined by , where
Given , let be the minimum integer such that . Then,
Case 1: x0≥b2/ax_{0}\geq b^{2}/a.
We always choose . We can verify that
and this satisfies the requirement for . By applying Lemma˜D.8, we have that
Case 2: x0≤B≤b2/ax_{0}\leq B\leq b^{2}/a.
We always choose . We can verify that
and this satisfies the requirement for . By applying Lemma˜D.8, we have that
Case 3: x0≤b2/a≤Bx_{0}\leq b^{2}/a\leq B.
We combine the bound for the first two cases, where we first go from to , then go from to . Then we have
Now we describe how we construct an admissible noise schedule. Consider we start from , and for each , we iteratively choose to be the maximum such that
and then set . We continue this process until we reach . It is easy to verify that is an admissible noise schedule. Now we bound the number of iterations .
Since for all , we have , a sufficient condition for is that
Therefore, fixing , we have that is at least
Now we look at the inductive sequence starting from , and , where
By Lemma˜D.9, we know that for any , we can achieve within
Taking in , we conclude the lemma. ∎
Appendix E Theoretical Analysis of Algorithm˜1
In this section, we analyze the algorithm presented in Algorithm˜1. In ˜7, the algorithm initializes by drawing a sample from the prior distribution via the diffusion SDE, which introduces sampling error. demonstrated that this diffusion sampling error is polynomially small, with the exact magnitude depending on the discretization scheme chosen for the diffusion SDE. Since the focus of this paper is on enabling an unconditional diffusion sampling model to perform posterior sampling, the choice of diffusion discretization and its associated error are not not the focus of our analysis. Consequently, we omit the diffusion sampling error in the error analysis presented in this section. This omission does not impact the rigor of the theorems in the main paper, as the error is polynomially small.
Let be a large enough constant. Let be a mode-centered locally well-conditioned distribution. For every and , suppose
Then running Algorithm˜1 will guarantee that
Let , where is a constant large enough to absorb the implicit constants in Lemma˜D.3 and Lemma˜D.2.
We prove by induction that for each :
By the triangle inequality and data processing inequality:
Thus, the induction holds for , and the lemma follows for . ∎
Let and be two random variables such that
Since , we apply Markov’s inequality, and have
Hence, we have with probability over ,
Applying Lemma˜E.2 on Lemma˜E.1 gives the following corollary.
Let be a large enough constant. Let be a mode-centered locally well-conditioned distribution. For every and , suppose
Define Then running Algorithm˜1 will guarantee that
Let . For all , there exists
such that: suppose distribution is a mode-centered locally well-conditioned distribution with , and ; then Algorithm˜1 samples from a distribution such that
Furthermore, the total iteration complexity can be bounded by
To distinguish the and in the lemma and the one in Corollary˜E.3, we will use and to denote the and in our lemma statement. We need to set parameters in Corollary˜E.3. For any given , we set
and we set to be the minimum that satisfies
Now we verify the correctness. Taking in the bound for in Lemma˜D.4, we have
By the setting of our parameters, we have , , and . This guarantees that
It is easy to verify our bound on satisfies the condition in Corollary˜E.3. Note that if a distribution is mode-centered locally well-conditioned, then it is also mode-centered locally well-conditioned for any . Therefore, we can set to be the minimum that satisfies the condition.
Therefore, we only need . This can be satisfied when
Note that the bound for the sum of mixing times can be bounded by
Therefore, the total iteration complexity is bounded by ,
By Lemma˜B.12, any -strongly log-concave distribution that has -Lipschitz score is locally well-conditioned distribution is mode-centered locally well-conditioned. Therefore, take this into Lemma˜E.4, we have the following result.
such that: suppose , then Algorithm˜1 samples from a distribution such that
Furthermore, the total iteration complexity can be bounded by
To enhance clarity, we state our result in terms of expectation and established the following theorem:
such that: suppose , then Algorithm˜1 samples from a distribution such that
Furthermore, the total iteration complexity can be bounded by
The analysis above is restricted to strongly log-concave distributions, where . However, this directly implies that we can use our algorithm to perform posterior sampling on log-concave distributions, for which .
E.2 Gaussian Measurement
In this section, we prove Theorem˜1.2. In Algorithm˜2, we describe how to make Algorithm˜1 work on the Gaussian case.
We first verify that suppose ˜1 holds, we can also have -accurate estimates for the smoothed scores of , so this satisfies the requirement of running Algorithm˜1. We need to use the following lemma, with proof deferred to Section˜E.5.
Then, the gradient of the log-likelihood with respect to is given by
Using this, we can calculate the smoothed conditional score given :
For any smoothing level , suppose we have score estimate of the smoothed distributions that satisfies
Then we can calculate a score estimate of the distribution such that
Let . Then, for any value of , we have
Note that the second term is exactly in the form of Lemma˜E.8, so we can calculate this exaclty. For the first term, we use our score estimate for it. In this way, we have that for any ,
Suppose ˜1 holds for our prior distribution . Then with probability over : we have smoothed score estimates for with error bounded by ; in other words, ˜1 holds for , where is substituted with .
To capture the behavior of a Gaussian measurement more accurately, we first define a relaxed version of mode-centered locally well-conditioned distribution.
For and , we say that a distribution is locally well-conditioned if there exists such that
.
For , we have that .
For , we have that .
Note that this definition can still imply that the distribution is mode-centered local well-conditioned, due to the following fact:
If , then there exists with .
We defer its proof to Section˜E.5. This implies the following lemma:
Let be a locally well conditioned distribution with and . Then is mode-centered locally well conditioned.
This gives a version of Lemma˜E.4 for locally well-conditioned distributions as a corollary:
Let . For all , there exists
such that: suppose distribution is a mode-centered locally well-conditioned distribution with , and . Then Algorithm˜1 samples from a distribution such that
Furthermore, the total iteration complexity can be bounded by
The reason we want this relaxed notion of locally well-conditioned is that, this captures the behavior of a Gaussian measurement. First note that:
for .
Again, we defer its proof to Section˜E.5. This implies the following lemma.
Given a Gaussian measurement of with
Let , where . Then, suppose . with probability at least probability over , is locally well-conditioned.
Let us check the locally well-conditioned conditions with one by one. The concentration follows directly from Lemma˜E.15, incurring an error probability of .
By our choice of , we have that whenever ,
This satisfies the Lipschitzness and the strong log-concavity condition by giving an additional error probability of . ∎
This gives us the main lemma for our local log-concavity case:
Let . There exists
such that: suppose and , then Algorithm˜2 samples from a distribution such that
Furthermore, the total iteration complexity can be bounded by
Combining Corollary˜E.10 with Lemma˜E.16 enables us to apply Lemma˜E.14 and proves the lemma. ∎
Expressing this in expectation, we have the following theorem.
Let . There exists
such that: given a Gaussian measurement of with , and ; then Algorithm˜2 samples from a distribution such that
Furthermore, the total iteration complexity can be bounded by
E.3 Compressed Sensing
In this section, we prove Corollary˜1.3. We first describe the sampling procedure in Algorithm˜3. Now we verify its correctness.
Let . There exists
such that: suppose and , then conditioned on , ˜4 of Algorithm˜3 samples from a distribution (depending on and ) such that
Furthermore, the total iteration complexity can be bounded by
This is a direct application of Lemma˜E.17. The sole difference is that follows instead of . Because , remains sufficiently close to for the local Hessian condition to hold, so the proof of Lemma E.17 carries over verbatim. ∎
Now we explain why we want to sample from . Essentially, the extra Gaussian measurement won’t hurt the concentration of itself. We abstract it as the following lemma:
Define where is independent of . If
then for one has
Fix and draw an auxiliary point . Let with independent of everything else. On the event
and are Gaussians with the same covariance and means and . Pinsker’s inequality combined with the KL divergence between the two Gaussians gives
because by the hypothesis on .
For the set the total-variation bound gives
Consider the random variables in Algorithm˜3. Suppose that
Information theoretically, it is possible to recover from satisfying with probability over and .
.
Then drawing sample would give that
Then by Lemma˜E.20, suppose we have , then
Note that whenever , we have
Consider attempting to accurately reconstruct from . Suppose that:
Information theoretically, it is possible to recover from satisfying with probability over and .
We have access to a “naive” algorithm that recovers from satisfying with probability over and .
Let . There exists
such that: suppose for ,
Then we give an algorithm that recovers satisfying with probability , in time, under Assumption 1 with .
By our assumption and Lemma˜E.19, we have that we are sampling from with TV error with probability. By Lemma˜E.21, this would recover within distance with probaility. Combining the two gives the result. ∎
Setting would give Corollary˜1.3 as a corollary.
E.4 Ring example
Rotational invariance gives with
Write and set . Using , we get the first and second derivatives:
For , the eigenvalues of are
The Turán inequality implies ; thus, the largest eigenvalue is .
Since for all and for ,
A standard score–covariance identity shows
The rest follows by combining Lemma˜E.23 and Lemma˜E.24. ∎
Hence, we can apply Theorem˜1.2 on our ring distribution and get the following corollary:
Suppose . Then, if and for sufficiently small constant , Algorithm˜2 takes a constant number of iterations to sample from a distribution such that
E.5 Deferred Proof
Since , the log-likelihood function is
To compute the gradient with respect to , we focus on the term involving :
Differentiating with respect to gives:
Since , we have
Substituting the inverse of the covariance matrix , we get
and the final expression for the gradient is
Let ; strong concavity gives and uniqueness of . Assume for contradiction that . Set and define
Then and with . Along any ray starting at the function is strictly decreasing for ; hence for every .
Because , . Multiplying by and using on gives
The two balls and are disjoint, so , a contradiction. Thus .
Because we have and here ; consequently . Putting completes the proof. ∎
Let . We want to show that with probability at least over , . This is equivalent to showing that .
We use Markov’s inequality. For any :
Using , we can change the order of integration:
We need to show . We use the standard Gaussian concentration inequality: for and ,
We want . So we set . This implies , so . This choice of is real and non-negative since implies , so . We set . Thus, for , we have .
This means that , which is the desired statement:
Appendix F Why Standard Langevin Dynamics Fails
As discussed in Section˜3, after we get an initial sample on the manifold, a natural attempt to get a sample from is to simply run vanilla Langevin SDE starting from :
where is an approximation to the true score . We now show that under any score accuracy assumption, the score error could get exponentially large as the dynamics evolves.
We first consider the simplest one–dimensional Gaussian case of (13). Suppose , , and noise ; so . Then with the perfect score estimator , (13) reduces to
Recall that the hope of guaranteeing the robustness using only an guarantee is that at any time , averaging over will preserve the original law . We now show that this hope is unfounded even in this simplest case.
Let follow (14). Averaging over , is Gaussian with mean and variance
where . In particular, at time .
Because are independent of , conditional moments are
Applying the law of total variance with gives the stated formula.
Since and are independent of , conditioning on gives
Using and simple algebra, this simplifies to
which is at most and attains when , that is at . ∎
Thus first shrinks below (by a constant factor bounded away from when is small) before relaxing back to equilibrium. The phenomenon is harmless in one dimension but is catastrophic in high dimension.
High-dimensional amplification.
Let , take , and set . Then with the perfect score estimator, (13) reduces to
By Lemma F.1 applied coordinatewise, at time , averaging over yields
Hence is exponentially more concentrated in high dimension. We next show that this concentration amplifies score-estimation errors exponentially with the dimension.
for some constant depending only on .
Fix and . Let and choose . Define the shell
Write and . Since under , the chi-square concentration inequality Lemma˜A.11 gives
Since , the Chernoff left-tail bound for yields
Moreover on , hence
Using we have . Setting
which depends only on and , gives