arXiv:2610.01502cs.LGOct 2026

Manuscript Offprint

arXiv:2610.01502

Learned End-to-End Guidance Schedules for Diffusion Models

Aneesh Barthakur, Mathias Niepert, Luiz F. O. Chamon

Abstract

Diffusion models are a powerful generative paradigm used across multimedia and scientific applications. Guided diffusion methods impose requirements on the generation by adding the gradient of a differentiable loss (the guidance function) as a drift term during inference. The weight of this drift (the guidance scale) is critical for the trade-off between data quality and requirement satisfaction. To achieve both of these goals, guided diffusion must resort to small guidance scales and lengthy sampling, incurring high computational costs. This work proposes learned end-to-end guidance schedules (LEEGS) to achieve these objectives with fewer sampling steps. LEEGS trains a time-dependent schedule by minimizing the guidance function over a small set of examples using stochastic gradient descent. Backpropagating through guided sampling is computationally expensive, so LEEGS uses an approximation of the gradient that cuts training time by a factor of 4. We evaluate LEEGS on diverse guidance tasks, including (a) image inpainting, (b) noisy image inverse problems, (c) face-ID-guided generation, and (d) forward and inverse PDE problems, outperforming baselines at equal budget (50 or 100 NFEs), or matching constant guidance with only 10% of the steps.

1 Introduction

Diffusion models have been successful in modeling and generating data across many domains, from multimedia tasks [e.g., image synthesis (Ho et al., 2020; Dhariwal & Nichol, 2021), image restoration (Kawar et al., 2022; Chung et al., 2023), text-to-image generation (Rombach et al., 2022; Nichol et al., 2022)] to scientific and engineering applications [e.g., molecular generation (Hoogeboom et al., 2022; Xu et al., 2022), protein generation (Watson et al., 2023), solutions to partial differential equations (PDEs) (Huang et al., 2024a; Bastek et al., 2025), design optimization (Maze & Ahmed, 2023)]. Guided diffusion [e.g., (Dhariwal & Nichol, 2021; Bansal et al., 2023; Wu et al., 2023; Corso et al., 2023)] allows these models to produce data satisfying ancillary requirements, such as the physical viability of samples for scientific and engineering applications (Chen et al., 2024; Christopher et al., 2024a), or solve inverse problems (Chung et al., 2023; Huang et al., 2024a). While several training-free approaches induce a requirement in diffusion models, such as particle-based (Wu et al., 2023; Corso et al., 2023) or projection-based methods (Christopher et al., 2024b;a), if its violation can be expressed as a differentiable loss h(x)h(x) (the guidance function), then modifying the diffusion with a drift −∇wh-\nabla_w h of strength w>0w > 0 (the guidance scale) yields a powerful, general approach [see, e.g. (Dhariwal & Nichol, 2021; Bansal et al., 2023)].

Yet, guidance exacerbates a well-known limitation of diffusion models: slow inference. All guidance techniques face a trade-off between data quality (staying close to the model's learned distribution) and requirement satisfaction (minimizing the violation hh). Small scales ( w≪1w \ll 1) do not sufficiently reduce the violation hh, yielding samples that violate the requirements; while large scales ( w≫1w \gg 1) cause substantial changes to the original diffusion trajectory, yielding unrealistic samples. To generate high-quality data satisfying requirements, guided generation algorithms such as (Chung

*Corresponding author: aneesh.barthakur@simtech.uni-stuttgart.de

Figure

(a) LEEGS training procedure. The forward pass (computing L(W)\mathcal{L}(W)) runs the guided diffusion sampling, while the backward pass (updating W) backpropagates the objective through the sampling trajectory.

Masked

w=0.15★

w=2.0

Ours

LPIPS vs w

Figure

(b) LEEGS achieves convincing inpainting results with only 10 inference steps while constant guidance only reconstructs a plausible-looking but incorrect face even at w = 0.15, which achieves the optimal LPIPS on a held-out set of 100 images. A larger scale (w = 2.0) does not improve consistency with the unmasked regions, but produces unrealistic, saturated artifacts instead. See Section 4.1 for details on the noisy box-inpainting task.

et al., 2023; Yu et al., 2023) resort to small guidance scales and many inference steps, resulting in high computational cost. Our aim is to reduce the number of steps in the sampling process to balance data quality and the satisfaction of requirements.

Different approaches have been proposed to tackle this problem. For instance, Yang et al. (2024) rescales the guidance gradient relative to the sampling noise at each step, enabling larger step sizes and thus shorter trajectories, but still requires choosing a guidance scale. Methods that alternate between denoising and guidance optimization [e.g. (Zampini et al., 2025; Jayaram et al., 2025; Huang et al., 2024b)] control the deviation explicitly via a trust region or a proximal penalty. However, tuning the trust-region radius or penalty weight is as delicate as tuning the guidance scale itself. A different strategy for mitigating this trade-off has been explored in the classifier-free guidance (CFG) setting, where the guidance scale is made time-dependent (Kynkäänniemi et al., 2024; Wang et al., 2024; Sadat et al., 2024; Malarz et al., 2025) following the observation that constant guidance is suboptimal for CFG (Kynkäänniemi et al., 2024). Learning a time-dependent scale has likewise been studied for CFG (Yehezkel et al., 2025; Galashov et al., 2025; Sun et al., 2025), but not for loss-based guidance, whose main advantage is that it conditions a pretrained model without retraining.

We bring learned time-dependent guidance scales (guidance schedules) to loss-guided diffusion, achieving better trade-offs between data quality and requirement satisfaction. LEEGS trains a schedule for a given model, task, and sampler by minimizing the value of the guidance function along the diffusion trajectory, averaged over a small set of examples. This requires backpropagating through the sampling trajectory, a naive implementation of which would incur untenable peak memory and per-batch compute. We use gradient checkpointing to bound the memory cost, similarly to when optimizing other diffusion parameters, such as sampling coefficients (Watson et al., 2022), discretizations (Tong et al., 2025), and noise (Tang et al., 2024). We further propose an approximation of the objective's gradient that reduces per-batch compute. Put together, these improvements allow LEEGS to effectively manage the guidance trade-off in a tractable manner.

The remainder of the paper is organized as follows. We first review guided diffusion sampling in Section 2, then present our problem formulation and method in Section 3. We introduce our main empirical results in Section 4, starting with a description of the applications we consider, namely various guided image generation tasks and PDE problems, followed by further experiments and ablation studies. Finally, we conclude in Section 6.

References (100)

Couldn't load all references. Reload the page to try again.