Manuscript Offprint

arXiv:2610.03034

Adaptive Second-Order Solvers for Fast Stochastic Diffusion Sampling

Ella Kemperman, Luca Ambrogioni

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

Abstract

Diffusion models rely on numerical solvers requiring time-discretization, which has a large influence on the tradeoff between sampling cost and quality. However, the computational difficulty of the reverse process varies along the sampling trajectory and across data distributions, making the choice of discretization important. We adapt proportional-integral (PI) step-size control to diffusion, using our diffusion noise-normalised error estimator. Unlike existing adaptive methods in diffusion that respond only to the current error, the PI solver also incorporates the previous error, yielding smoother step adaptation. We further show that these per-sample trajectories exhibit shared structure and can be aggregated into a fixed schedule that retains much of the benefit of adaptive sampling. We evaluate both approaches on natural-image and language datasets, in terms of quality, measured by FID at a matched number of neural network evaluations (NFE), comparing them with widely used stochastic solvers and schedules. For images, our average discretization outperforms the commonly used EDM schedule in terms of sample quality when used with the stochastic Heun sampler, and with the EDM-churn sampler at low NFE. Additionally, our PI adaptive solver obtains better FID than most stochastic and adaptive baselines, although it does not beat the EDM-churn sampler at low NFE. Moreover, we find our solver outperforms both the EDM and the entropy schedule on language diffusion at low-to-medium NFE in terms of perplexity, with the drawback of lower token entropy. Lastly, we find that the benefit of per-sample adaptivity is problem-dependent. It is highly beneficial in 1D toy examples, while only marginal for image and language data, where the average schedule sometimes even outperforms the per-sample adaptive solver. Code is available at https://github.com/ellakemperman/adaptive-second-order-diffusion-solvers.

1 Introduction

Diffusion models generate high-quality images [1–4], videos [5], and audio [6]. However, diffusion sampling is slow, as it is a process requiring a large number of function evaluations (NFE) of a neural network [1, 2, 7]. Song et al. [1] show that the process of diffusion can be treated as solving either an ordinary or stochastic differential equation (ODE/SDE). Recent work [8] identified critical windows within the integration interval during which many of the generative decisions are made, a phenomenon arising from symmetry-breaking bifurcations in the reverse denoising process [9, 10]. This suggests that numerical effort should not be distributed uniformly across the diffusion interval, but rather, more effort should be allocated to the parts of the interval where dynamics are difficult (Figure 1a), which could improve the NFE-quality tradeoff.

Many widely used schedules are handcrafted and calibrated to specific modalities [1–3,11][1–3, 11]. Recent work by Stancevic et al. [12][12] discussed constructing these schedules in a data-driven manner by enforcing a linear progression in entropy. However, the authors find that their schedules are effective only for first-order samplers, with performance degrading when used with second-order methods.

Preprint.

Figure

(a)

Figure

(b)

Figure 1: The difficulty of generative diffusion differs across time, requiring different step-sizes at different time-points, which our PI solver determines (a). These per-sample paths share structure and can then be aggregated into an average path usable for sampling (b).

This limits the applicability of such schedules, as second-order samplers have been shown to improve the NFE-quality trade-off in diffusion models [2].

Thus, we require a method of generating schedules in a data-driven manner that also functions for second-order samplers. Numerical analysis literature offers an alternative that satisfies both conditions: adaptive solvers [13–18], which adapt step-size based on the local difficulty, allowing smaller step-sizes along more difficult regions. Additionally, these are generally agnostic to solver-order, allowing them to generate second-order schedules. This allows the schedule to differ on a per-sample basis, and removes the need for handcrafting. Application of these adaptive solvers to diffusion remains limited, though not unexplored [2, 7]. Jolicoeur-Martineau et al. [7] devise an adaptive SDE solver specifically designed for diffusion, adapting step-size based on the current local-error.

We instead adapt stochastic proportional-integral (PI) control for step-size adaptation [16], which incorporates the previous local error alongside the current one, giving smoother step-size adaptation than integral-only control [19]. We adapt its error estimator to normalise by diffusion noise, substantially improving its performance in diffusion sampling. We compare our method to existing diffusion sampler-schedule combinations in terms of NFE-quality tradeoff. Additionally, we show that the per-sample trajectories have shared structure, which can be exploited by aggregating the trajectories into a single static schedule, usable as any other handcrafted schedule (an example of this is shown in Figure 1b). We evaluate its performance and compare it with the per-sample adaptive solver to determine if per-sample adaptivity is beneficial.

References (32)