Source-linked AI summary
Denoising as Projection: Constrained Optimization with Gradient-Guided Diffusion
Runyu Zhang, Jiawei Zhang, Gioele Zardini, Saurabh Amin, Asuman Ozdaglar
TL;DR
The paper addresses the risk that gradient-guided diffusion leaves structured feasible geometries. It proposes DCG, which places an objective-gradient step before pretrained denoising and analyzes the result as inexact projected-gradient optimization, proving finite-time guarantees across three geometry classes and supporting them experimentally.
Problem
Gradient guidance can reduce an objective while moving samples away from manifold or constraint-set geometry, motivating simpler feasibility-preserving optimization methods.
Method
DCG applies an objective-gradient step followed by one call to a pretrained Stein denoiser at each reverse diffusion step, treating denoising as approximate projection.
Results
The theory proves descent and finite-time convergence guarantees for linear manifolds, compact convex sets, and compact smooth submanifolds, with experiments showing improved objective–feasibility balance.
Takeaways & Limitations
A pretrained denoiser and objective-gradient evaluations can support constrained optimization over learned geometries without model fine-tuning or denoiser differentiation.
Takeaways & Limitations
The analysis assumes an exact denoiser and faithful learned support, focuses on deterministic DDIM dynamics with a specific noise schedule, and leaves model misspecification and broader samplers for future work.
Abstract
from arXiv · showhide
Diffusion models are increasingly used not only for sampling from learned data distributions, but also for generating samples that optimize task-specific objectives. A common approach is to guide the reverse diffusion process using gradients of an external objective. However, when the data distribution is supported on a structured feasible set, such as a manifold or a constraint set, gradient guidance can move samples away from the learned data geometry. In this paper, we study a simple projected-gradient-guided diffusion update based on the observation that the Stein denoising operator can act as an approximate projection onto the data geometry. The proposed update incorporates the objective gradient inside the denoising step, yielding an inference-time method that uses only a pretrained denoiser and gradient evaluations. We analyze this update as an inexact projected-gradient method for constrained optimization over learned feasible geometries. Our theory covers three settings: linear manifolds, compact convex feasible sets, and compact Riemannian submanifolds. In all these settings, we prove descent and finite-time convergence guarantees. Numerical experiments support the theoretical interpretation and illustrate how the proposed update balances objective descent with preservation of the learned geometry.
1 Introduction
The paper addresses how objective-guided diffusion can preserve structured feasibility, proposing DCG as a simple denoising-based projected-gradient update with guarantees across several geometries.
- Objective gradients can improve task-specific outcomes while moving diffusion samples off manifolds or constraint sets, degrading feasibility and sample quality.
- DCG applies one objective-gradient step followed by one pretrained-denoiser call along a single reverse trajectory.It avoids repeated batch generation, score-model adaptation, and denoiser differentiation.
- The Stein posterior-mean denoiser provides an approximate geometric correction, allowing the reverse dynamics to be interpreted as an inexact projected-gradient method.The analysis covers linear Gaussian, compact convex, and compact smooth-submanifold settings.
- The theory establishes finite-time convergence guarantees spanning geometric contraction for strongly convex cases and O(1/T) best-iterate bounds for nonconvex or local settings.These guarantees cover linear subspaces, compact convex feasible sets, and smooth manifolds.
- Experiments on constrained optimization, motion planning, and D4RL show a favorable tradeoff between objective value and constraint satisfaction.DCG outperforms standard gradient guidance and matches or improves related optimization-oriented diffusion baselines.
- The analysis assumes an exact Stein posterior-mean denoiser and faithful learned support, while model misspecification and broader sampler settings remain incompletely treated.The theory focuses on deterministic DDIM dynamics, variance-exploding diffusion, and an exponentially decaying noise schedule.
2 Preliminaries
The preliminaries formulate guided diffusion as constrained optimization over an implicitly represented feasible geometry and motivate denoising as a learned projection substitute.
- The objective is formulated as minimizing a differentiable function f over a feasible set X represented by the diffusion data distribution.X may be a linear subspace, compact convex set, or smooth embedded submanifold.
- Projected gradient descent is natural when the Euclidean projector onto X is available, but X is often implicit and difficult to project onto directly.
- The Stein posterior-mean denoiser estimates the clean sample from a noisy observation using the score of the noisy-data distribution.It is written through the Tweedie–Miyasawa identity and requires no model beyond the denoising operation.
- When data are supported on or near X, denoising maps noisy inputs toward the learned geometry and can be compared with Euclidean or nearest-point projection.
- Post-denoising gradient guidance is computationally attractive because it evaluates the objective gradient without retraining the diffusion model.However, applying the gradient outside denoising can cause off-manifold drift or loss of feasibility.
3 Our Algorithm
DCG reverses the usual guidance order: it takes a gradient step before denoising, using the pretrained denoiser as an approximate projection within each reverse-diffusion step.
- The key algorithmic choice is to update xt by gradient descent before applying the Stein denoiser, rather than shifting an already denoised estimate.This ordering yields a relaxed projected-gradient interpretation when denoising approximates projection.
- Each backward step requires one objective-gradient evaluation and one pretrained-denoiser application, without denoiser differentiation, auxiliary constrained optimization, or model retraining.
- The simplified analysis assumes a geometric noise schedule and constant guidance scale; extensions to general schedules and time-varying scales are left for future work.
- DCG operates on the current reverse-diffusion state and avoids the batch averaging and outer guidance-update loop used by a related population-based method.
- Unlike Jacobian-based geometric guidance, DCG evaluates the denoiser without its Jacobian and follows the time-varying reverse diffusion schedule.
- The gradient–denoiser composition is algebraically related to plug-and-play proximal-gradient methods, while its contribution is the time-varying Stein projection interpretation and guarantees.
4 Convergence Analysis: Linear Gaussian Setting
In the linear-Gaussian setting, the Stein denoiser is a noise-dependent regularized projection onto the data subspace that approaches Euclidean projection as noise vanishes. Under strong convexity and smoothness, the guided dynamics support convergence while contracting the normal component.
- The analysis assumes Gaussian data supported on a d-dimensional linear subspace and a differentiable objective that is µ-strongly convex and L-smooth.
- At finite noise, the Stein denoiser performs a noise-dependent Tikhonov-regularized projection rather than exact Euclidean projection.As σ_t → 0, it approaches the Euclidean projection onto the data subspace.
- The guided update is analyzed using a time-dependent Lyapunov function combining subspace objective error, normal displacement, and finite-noise error.
- The projected component converges toward the constrained minimizer x⋆ within range(A⊤), under the theorem’s step-size and noise conditions.
- The normal component contracts geometrically, with ∥A⊥x0∥ = (1 − ϵ)^t0∥A⊥x_t0∥ over the analyzed reverse trajectory.
- Compared with prior linear-Gaussian theory, the method uses one reverse trajectory and one objective-gradient evaluation per step instead of repeated batch generation and objective linearization.
5 Convergence Analysis: Convex Constraint Setting
For compact convex feasible regions, the Stein denoiser uniformly approximates Euclidean projection with noise-proportional error. This supports projected-gradient-style descent, geometric convergence for strongly convex objectives, and O(1/T) stationarity guarantees for smooth nonconvex objectives.
- The convex analysis assumes a compact convex set with nonempty relative interior and a data density bounded above and below on its affine subspace.
- The Stein denoiser is uniformly close to Euclidean projection onto the feasible set, with approximation error proportional to the noise level.This controlled error enables transfer of projected-gradient arguments to guided diffusion.
- 5.1 Convergence for Strongly Convex Objectives: For strongly convex objectives, the Lyapunov function tracks projected optimization error and distance from feasibility, while the normal component contracts geometrically.
- 5.1 Convergence for Strongly Convex Objectives: Theorem 2 provides a finite-time convergence bound for the strongly convex case over an arbitrary number of reverse steps.
- 5.2 Convergence for Nonconvex Objectives: For smooth nonconvex objectives, the projected-gradient mapping measures constrained stationarity and vanishes exactly at first-order stationary points.
- 5.2 Convergence for Nonconvex Objectives: Theorem 3 guarantees an O(1/T) best-iterate bound on the squared projected-gradient mapping, with explicit denoising-error terms.
- Unlike prior convex-support analysis specialized to quadratic linear inverse recovery, this method retains the DDIM reverse-update structure for general constrained objectives.
6 Convergence Analysis - Riemannian Manifold setting
The manifold analysis treats denoising as a local approximate nearest-point projection and establishes finite-time convergence under smoothness, bounded-gradient, and trajectory-neighborhood assumptions.
- Manifold geometry: The nearest-point projection is locally well-defined in a tubular neighborhood, so manifold descent is measured using the Riemannian gradient.The manifold is assumed compact, smooth, and embedded, with a uniform tubular radius.
- Guarantee and limitation: The guarantee is a best-iterate convergence result and does not directly establish stationarity of the final output x0.This is identified as a standard limitation for nonconvex optimization without additional structural assumptions.
- Projection approximation: The Stein denoiser approximates nearest-point projection onto the manifold when iterates remain in the valid neighborhood and the noise level is sufficiently small.The approximation is controlled by value-level projection error rather than denoiser-Jacobian accuracy.
- Assumptions: The analysis imposes local trajectory conditions and bounds on the objective gradient to keep gradient-updated and denoised iterates inside the projection-valid region.The objective is assumed L-smooth with gradient norm bounded by G on the neighborhood.
- Descent analysis: A Lyapunov function combines the objective at the projected iterate with a quadratic penalty for normal displacement from the manifold.This couples optimization progress on the manifold with control of ambient-space feasibility.
- Descent analysis: The descent inequality simultaneously controls Riemannian stationarity and distance to the manifold, up to denoising error.The result extends to imperfectly learned denoisers through their pointwise projection error.
7 Conclusion
The paper introduces Denoising-Corrected Gradient Guidance as an inference-time projected-gradient method using a pretrained denoiser. Theory covers three feasible geometries, while experiments show improved objective–feasibility balance over direct guidance.
- Method: Denoising-Corrected Gradient Guidance alternates an objective-gradient step with ordinary denoising from a pretrained diffusion model.The method interprets the Stein posterior-mean denoiser as an approximate projection onto the data support.
- Theory and evaluation: The analysis establishes projection-approximation bounds and finite-time optimization guarantees for linear subspaces, compact convex sets, and compact smooth submanifolds.Experiments cover synthetic constrained problems, trajectory tracking, and D4RL benchmarks.
- Conclusion: Experiments show that DCG improves the balance between objective value and feasibility compared with direct gradient guidance while remaining competitive with geometry-intensive baselines.
A Related Works
Related work spans explicit constraint enforcement, outer-loop optimization, score-Jacobian manifold methods, reward alignment, and denoising-as-projection analyses. DCG differs by using a single reverse trajectory with one gradient evaluation and one denoising call per step.
- Gradient guidance from an optimization perspective: Optimization-oriented guidance methods use outer loops, batch generation, objective linearization, and differentiation through clean-sample predictions.DCG avoids these operations and requires no target reward value or denoiser differentiation.
- Score-based and denoising-based manifold optimization: Landing with the Score uses score and score-Jacobian information to build standalone manifold optimizers with approximate nearest-point and tangent-space projections.DCG instead follows a single reverse-diffusion trajectory and relies on denoiser value-level projection approximation.
- Reward alignment: Reward-alignment approaches modify generative models using reward backpropagation, regression, tilted fields, Monte Carlo estimation, or auxiliary maps.The cited methods require additional training, particles, repeated reward evaluations, or auxiliary constructions absent from DCG.
- Inverse problems and denoising as projection: Inverse-problem guidance commonly differentiates through Tweedie estimates or measurement corrections, without generally guaranteeing manifold preservation.The related denoising-as-projection analysis focuses on restoration dynamics rather than adding a task objective.
- Constrained and projected diffusion: Constrained diffusion methods enforce explicitly specified feasibility through projection, mirror maps, or constraint-aware training.These approaches generally assume access to known feasible geometry or problem-specific constraint functions.
- Double-integrator trajectory tracking: In trajectory tracking, PDG follows references but produces large dynamic inconsistency, whereas DCG keeps planned trajectories nearly aligned with rollouts and achieves near-zero constraint violation.DCG accepts slightly higher tracking error in exchange for dynamically feasible recovered solutions.
B.2 Convex constrained
The convex constrained experiments compare DCG with guidance and denoising-based baselines on two synthetic feasible regions. DCG delivers the strongest balance between objective improvement and constraint satisfaction, while GGDM and DRGD exhibit distinct limitations.
- Experimental setup: The experiments solve quadratic optimization problems over two convex-region data distributions in R10.Test A uses a square-subspace distribution, while Test B uses a five-dimensional subspace inside an ellipsoid.
- Visualization: Figure 2 displays backward-diffusion trajectories and convergence curves for Test A and Test B.GGDM is omitted from trajectory plots because its paths are highly noisy and visually cluttered, but it appears in the convergence curves.
- Baseline behavior: PDG exposes an optimality–feasibility trade-off that depends on its guidance scale.The smaller scale in Test A favors feasibility, whereas the larger scale in Test B favors objective improvement.
- Baseline behavior: GGDM fails to converge toward the constrained optimum in either test, with objective stagnation despite decreasing constraint violation.The authors conjecture that nonlinear constraints, repeated linearization, and sensitive hyperparameters contribute to this behavior.
- Baseline behavior: DRGD reaches near feasibility within a few refinement steps but stabilizes at a suboptimal objective value.The authors conjecture that repeated use of the smallest-noise denoiser creates finite-noise projection bias.
- Results: DCG achieves the best overall optimality–feasibility balance in both synthetic tests.It attains better objective values than DRGD and smaller constraint violation than PDG, with comparatively robust performance across guidance scales.
B.4 Diffuser Benchmarks
The paper extends its analysis to diffusion-based reinforcement-learning benchmarks and relates the dynamics to time-varying gradient descent. The supplied passages emphasize the theoretical interpretation rather than benchmark results.
- Diffuser benchmarks: DCG is evaluated on standard MuJoCo offline-control benchmarks using a Diffuser-style planning pipeline.Offline trajectories are denoised into candidate state–action sequences, gradient guidance biases plans toward higher predicted return, and actions are executed for evaluation.
- Evaluation: Table 2 compares Monte Carlo, PDG, DRGD, and DCG across reference trajectories using mean ± standard deviation over 100 samples.The table caption specifies the methods, comparison scope, and aggregation format.
- Theoretical interpretation: The guided diffusion dynamics can be interpreted as gradient descent with a time-varying objective and anisotropic gradient rescaling.The effective stepsize and rescaling are controlled implicitly by the diffusion schedule and subspace geometry.
C.2 Proof of Theorem 1
The proof decomposes a Lyapunov quantity across reverse steps and establishes geometric contraction under the linear-Gaussian setting. The contraction factor combines optimization and denoising terms.
- Proof strategy: The proof decomposes V_t(x_t) into components whose bounds are summed to obtain a one-step contraction.The resulting inequality is V_{t−1}(x_{t−1}) ≤ (1 − ηϵμ_c)V_t(x_t).
- Convergence: The projected objective error contracts geometrically under the theorem’s strong-convexity conditions.The contraction factor is expressed through the effective denoising-adjusted stepsize ηϵ and curvature μ_c.
- Assumptions: The analysis uses smoothness and strong convexity of the time-varying objective restricted to the learned subspace.The proof compares gradients at the current iterate and its projected counterpart while exploiting identical quadratic terms.
D.1 Proof of Lemma 2
The appendix proofs establish projection-related denoiser bounds and propagate feasible descent, normal-component contraction, and stationarity estimates. These results support finite-time guarantees for convex and manifold settings.
- Convex analysis: For compact convex sets, exact feasible projected-gradient updates provide the reference descent and contraction estimates.The argument uses projection optimality, nonexpansiveness, smoothness, and strong convexity.
- Finite-time stationarity: For smooth nonconvex objectives, the proof obtains an O(1/T) best-iterate bound on the squared projected-gradient mapping.The stationarity estimate is represented by min_{1≤t≤T} ||G_η(p_t)||² ≤ Δ_T/(αη,ϵT).
- Denoiser approximation: The proof bounds the Stein denoiser’s deviation from projection using local geometry and exponentially small contributions outside a chart.Compactness, tubular-neighborhood assumptions, and uniform chart control provide the required estimates.
E.2 Proof of Lemma 6
The proof establishes local geometric control of the projected diffusion update and combines descent in the objective with bounds on distance from the manifold. These estimates support the subsequent finite-time convergence argument.
- One-step geometric control: The proof first establishes a one-step recursion controlling the normal distance to the manifold under the relaxed update.This recursion is formulated as Lemma 13 under Assumption 5.
- Projection decomposition: Local graph coordinates decompose projection errors into tangent and normal components, while curvature bounds control the resulting nonlinear remainder.The proof uses the splitting R^n = T_pM ⊕ N_pM and bounds the matrix correction induced by curvature.
- One-step geometric control: Combining the auxiliary lemmas proves that the backward iterates remain inside the local tubular neighborhood under Assumptions 5 and 6.The result applies to update equation 9 subject to bounds on the projection error and step parameters.
- Descent estimate: The descent analysis combines smoothness of f with the manifold-coordinate representation to bound the change in f and the updated normal distance.The tangent projector pU_p^T appears in the resulting estimate.
- Descent estimate: A combined Lyapunov-type inequality weights projected-gradient and normal-distance terms against the decrease of the potential, up to an error term.The proof then telescopes the resulting sums and selects an index attaining the minimum.