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

Stochastic Sampling from Deterministic Flow Models

Saurabh Singh, Ian Fischer · DOI

Abstract

Deterministic flow models, while efficient, often suffer from the accumulation of estimation errors and a lack of output diversity. We present a mathematical framework that transforms these deterministic paths into a family of stochastic samplers without requiring model retraining. By treating flows as Stochastic Differential Equations (SDEs), we introduce a controllable "stochasticity scale" that mitigates bias, improves image quality, and enhances robustness to discretization errors.

Introduction

Generative modeling has seen a significant shift towards Flow Models, such as Rectified Flow and Flow Matching. These models learn a deterministic transport map to move points from a simple prior distribution to a complex data distribution. However, the deterministic nature of these models leads to inherent weaknesses: accumulated bias in variance estimation, rigid one-to-one mappings between noise and data, and high sensitivity to discretization steps during inference.

Methodology: From Flows to SDEs

The core contribution is a general framework that allows any deterministic flow to be reformulated as a Stochastic Differential Equation (SDE). This construction defines an infinite family of samplers that share the same marginal distributions as the original model. Crucially, for Gaussian Flow models, the necessary score function can be derived directly from the trained velocity field, enabling stochastic sampling with zero additional training.

The authors propose several sampler families, defined by their diffusion coefficient $\tilde{g}(t)$ and drift $\tilde{f}(x, t)$.

Table 1: Definitions of the proposed stochastic sampler families. The NonSingular and ZeroEnds variants avoid mathematical instabilities at the boundaries.

The NonSingular sampler is particularly noteworthy for its stability across the entire generation interval $[0, 1]$, addressing the boundary instabilities seen in earlier singular formulations.

Key Insights and Results

Evaluation on ImageNet and toy datasets reveals that stochasticity acts as a powerful tool for bias mitigation. While deterministic samplers consistently underestimate the true variance of the data distribution, increasing the stochasticity scale ($\alpha$) corrects this bias, leading to lower KL divergence.

Furthermore, stochasticity improves robustness during fast generation. In scenarios with few sampling steps (e.g., 50-100), deterministic models show visible quality degradation, whereas stochastic samplers maintain high performance. On ImageNet 128x128, the NonSingular sampler achieved an FID of 4.93, a notable improvement over the 5.19 baseline.

Figure 1: Visualizing the "diversity knob." Increasing $\alpha$ allows for exploration around a concept, while $\lambda$ controls guidance strength.

Conclusion and Future Work

This framework provides a principled way to inject diversity and robustness into existing flow models. By adjusting the scale $\alpha$, users can navigate the trade-off between structural adherence and sample variety. Future work includes identifying optimal noise schedules for specific datasets and extending score imputation techniques to non-Gaussian flows.

Summary updated

BibTeX
@misc{singh2024stochastic,
  author = {Saurabh Singh and Ian Fischer},
  title = {{Stochastic Sampling from Deterministic Flow Models}},
  year = {2024},
  eprint = {2410.02217},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2410.02217},
}
Figure