Accelerating Guided Diffusion Sampling with Splitting Numerical Methods
TL;DR
Guided diffusion allows for highly controllable image generation, but its sampling process is notoriously slow. This paper reveals that standard high-order numerical solvers—which successfully speed up unguided models—fail for guided models because the guidance term is numerically "stiff" and poorly behaved. By using operator splitting to treat the diffusion and guidance terms separately, the authors introduce STSP4, a method that achieves state-of-the-art image quality 32–58% faster than standard baselines.
The Problem: High-Order Solvers and Guided Diffusion
Diffusion models generate data by starting with pure noise and gradually "denoising" it over hundreds of steps. Guided diffusion adds an extra layer of control: at each step in the process, a separate model (like an image classifier or CLIP) provides a gradient to "nudge" the generation toward a specific target, such as a "dog" or a "starry night."
Researchers have previously found ways to speed up unguided diffusion by treating the sampling process as an Ordinary Differential Equation (ODE) and using advanced, high-order solvers (like Runge-Kutta or PLMS). However, these same tricks fail spectacularly when guidance is added. In fact, using high-order solvers for guided diffusion often results in worse, highly distorted images compared to simple first-order methods.
The authors identify the "culprit" behind this failure: the guidance term (the conditional function) is numerically "stiff." High-order solvers assume a level of mathematical smoothness that the guidance gradient simply doesn't possess, leading to extrapolation errors that accumulate rapidly at low step counts.
The Solution: Operator Splitting
To solve this stiffness problem, the authors employ Operator Splitting. Instead of trying to solve the entire guided ODE as one complex equation, they split it into two distinct subproblems:
- The Diffusion Subproblem: The standard denoising process, which is smooth and well-behaved.
- The Condition Subproblem: The guidance/gradient part, which is "stiff" and erratic.
By decoupling them, they can use a high-precision "Ferrari" (a high-order PLMS4 solver) for the diffusion part, and a robust "Tractor" (a simple, first-order Euler step) for the erratic guidance part.
The paper evaluates two splitting schemes:
- Lie-Trotter Splitting (LTSP): A simple sequential approach.
- Strang Splitting (STSP): A more accurate "sandwich" approach (half-step guidance $\rightarrow$ full-step diffusion $\rightarrow$ half-step guidance).
Their flagship method, STSP4, uses Strang Splitting combined with a 4th-order Pseudo Linear Multi-Step (PLMS4) solver for the diffusion component.
As seen above, standard high-order solvers like PLMS4 completely break down at low step counts (8-16 steps) due to the stiff guidance term. In contrast, STSP4 successfully stabilizes the generation, producing coherent images even at extremely low step counts.
Key Results
The authors validated their approach using pre-trained models on the ImageNet dataset at multiple resolutions, as well as on downstream tasks like text-to-image generation, inpainting, colorization, and super-resolution.
- Significant Speedup: STSP4 generates images of the same quality as a 250-step DDIM baseline while using 32–58% less sampling time.
- Better Quality at Low Steps: On ImageNet256, STSP4 achieved an FID score (a measure of image realism) of 4.49 in just 20 steps. For comparison, the original guided diffusion paper reported a similar FID (4.59) requiring 250 steps.
- Strang Splitting Wins: Even though Strang Splitting requires evaluating the guidance model twice per step, it is so much more accurate that significantly fewer total steps are needed to reach the same image quality, resulting in a net time saving.
Quantitative metrics confirm this efficiency. Splitting methods rapidly drop below the baseline error threshold (dashed red line) in a fraction of the time required by standard Euler or pure PLMS4 solvers.
Limitations and Future Work
- Theoretical Depth: While the authors point toward "stiffness" as the cause of the problem, a more rigorous mathematical definition of why these specific neural gradients are stiff remains an open question.
- Classifier-Free Guidance: The paper focuses primarily on classifier-guided models. While the logic should extend to classifier-free guidance (used in models like DALL-E 2 or Stable Diffusion), those models already require two passes of the main diffusion network per step, which might alter the cost-benefit analysis of the splitting method.
- Schedule Sensitivity: The performance of these solvers is still tied to the noise schedule ($\sigma$ schedule). Future work could explore how to automatically optimize the splitting steps based on the specific schedule being used.
Summary updated