NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Exploring the Optimal Choice for Generative Processes in Diffusion Models: Ordinary vs Stochastic Differential Equations

Yu Cao, Jingrun Chen, Yixin Luo, Xiang Zhou

Abstract

Diffusion models generate high-fidelity data by reversing a noise-injection process, a task that can be formulated as either a deterministic Ordinary Differential Equation (ODE) or a stochastic Stochastic Differential Equation (SDE). While mathematically equivalent under a perfect score function, their performance diverges significantly in the presence of neural network approximation errors. This paper provides a rigorous mathematical framework to analyze how score-function errors accumulate in both regimes. We demonstrate that SDEs possess a "self-correcting" property that exponentially suppresses errors occurring early in the generation process (near the noise distribution). Conversely, ODEs are more precise when errors occur late in the process (near the data distribution). Our findings provide a theoretical basis for the empirical success of SDE-based samplers and suggest strategies for optimizing generative processes based on the temporal distribution of training inaccuracies.

Introduction

The choice between ODE and SDE samplers in diffusion models has largely been empirical. ODEs, or "Probability Flow" models, are valued for their speed and deterministic nature, while SDEs often yield higher-quality samples at the cost of increased computational steps. This paper addresses the fundamental question: which generative process is more robust to the inevitable errors in the learned score function? By treating the diffusion coefficient $h$ as a controllable parameter, we investigate how different levels of stochasticity affect the propagation of these errors to the final generated sample.

Theoretical Framework

To isolate the effects of score error from discretization error, we analyze the generative process in a continuous-time framework. We introduce a perturbation analysis where a small "pulse-shape" error is injected into the score function at a specific time $s$. Using Fokker-Planck dynamics, we track how this error evolves as the probability distribution of the generated samples moves toward the data manifold.

Conceptual framework of error accumulation in diffusion models. The total sampling error is an additive combination of errors from different temporal regions, with the diffusion coefficient $h$ determining the trade-off between ODE and SDE regimes.

As illustrated in Figure 1, the total sampling error is "additive" across different temporal regions. The analysis reveals two distinct regimes:

  1. The Noise-Side (Early Generation): Errors occurring when the image is still mostly noise are exponentially suppressed by the diffusion term in an SDE. The suppression factor is proportional to $\exp(-h^2 \gamma)$, where $h$ is the diffusion magnitude.
  2. The Data-Side (Late Generation): Errors occurring as the model adds final fine details are amplified by the extra noise in an SDE. In this regime, the deterministic ODE is superior as it avoids adding unnecessary variance to an already accurate trajectory.

Key Insights: The Self-Correcting SDE

The most striking discovery is the inherent ability of SDEs to "wash away" early-stage errors. In practice, neural networks often struggle to learn the score function accurately in high-noise regions where the data density is low. The stochasticity of the SDE acts as a regularizer, preventing the generative trajectory from drifting too far due to these early inaccuracies.

Empirical validation of the self-correcting property. For errors introduced early in the generation process ($t \le 0.95T$), increasing the diffusion coefficient $h^2$ significantly reduces the final sampling error $L(h)$.

Figure 2 demonstrates this effect empirically. When errors are concentrated in the early stages of generation, increasing the diffusion coefficient $h^2$ leads to a monotonic decrease in the final sampling error $L(h)$. This confirms that for models with high noise-side inaccuracies, an SDE is the optimal choice.

Results and Empirical Validation

The theoretical findings were validated across synthetic datasets (1D Gaussian, Swiss Roll) and real-world benchmarks (MNIST, CIFAR-10). On CIFAR-10, using a pre-trained continuous DDPM++ checkpoint, SDE-based samplers consistently outperformed ODE samplers as the number of discretization steps increased. For instance, at 2000 steps, an SDE sampler with $h^2/g^2=2$ achieved an FID score of 6.70, compared to 6.98 for the ODE sampler ($h=0$).

Furthermore, the research suggests that we can optimize ODE training by adjusting the loss weights $\omega_t$. By "pushing" the neural network's errors toward the noise-end of the spectrum, we can make the faster ODE sampler more robust, as those errors have less impact on the final sample quality.

Conclusion and Future Work

This work establishes that the "optimal" sampler is not universal but depends on the temporal distribution of a model's score-function errors. While SDEs are robust to early errors, ODEs offer better precision for late-stage refinement. Future research could explore time-dependent diffusion coefficients $h_t$ that transition from high stochasticity (to suppress early errors) to zero (to leverage ODE precision at the end). Additionally, extending these proofs beyond the assumption of strong convexity to more complex, multi-modal data distributions remains a critical open challenge.

Summary updated

BibTeX
@inproceedings{cao2023exploring,
  author = {Yu Cao and Jingrun Chen and Yixin Luo and Xiang ZHOU},
  title = {{Exploring the Optimal Choice for Generative Processes in Diffusion Models: Ordinary vs Stochastic Differential Equations}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2023},
  url = {https://openreview.net/forum?id=1mJQq6zYaE},
}
Figure