Viyan

Viyan AI

Optimizing Diffusion Schedules with Fiberwise Risk

By mapping a model's prediction risk during denoising, you can compute a non-uniform schedule that improves sampling quality without retraining.

Diffusion models generate images by iteratively removing Gaussian noise. The sampling process requires a schedule that defines how much signal to reconstruct at each step, yet standard approaches often assume that prediction error remains uniform across the entire trajectory. This assumption is inaccurate. Models often struggle significantly more during specific phases of the denoising transition, and because these errors are cumulative, they degrade the final image quality.

Measuring Risk Within an Affine Fiber

To locate these failure points, you must evaluate the model's task: mapping a noisy latent state to a target prediction. The model operates within an affine fiber, which represents the set of all possible signal and noise combinations that project to a single noisy state. Risk is defined as the expected L2 distance between the ground-truth target and the model's output within that fiber. This distance serves as a proxy for optimal-transport cost. Since optimal transport minimizes the work required to move one distribution to another, measuring the L2 error within the fiber directly quantifies how far the model's current denoising path deviates from the ideal trajectory required to reach the target data distribution.

This calculation generates a profile that acts as a heat map of expected model drift. The solver logic uses this profile to adjust step size. In regions where fiberwise risk is high, the integration error is elevated, and the solver is instructed to take smaller, more precise steps. The risk value acts as a scaling factor for the step size, forcing the ODE solver to resolve high-error regions with higher density. This process minimizes the total integration error by concentrating the computational budget where the model is mathematically prone to higher variance, rather than wasting steps in stable regions where the model is confident.

Empirical Universality of Error

These risk profiles show that the difficulty of the denoising task is a fundamental property of reversing a Gaussian diffusion kernel. Because the signal-to-noise ratio drops in a non-linear way, the model naturally encounters intervals where the latent state is inherently more ambiguous. This geometry is consistent across different architectures, meaning a diagnostic profile created on one model can often inform the scheduling of another. You do not need to retrain your weights; a frozen analytic template derived from the risk profile captures most of the potential gains.

Metric Model-Agnostic Schedule Model-Aware (Flow Matching)
Objective Minimize Kinetic Action Minimize Fiberwise Risk
Dependency None Early Checkpoint Diagnostics
Relative Performance Baseline 38.6% relative FID reduction for flow matching on CIFAR-10

Applying Risk-Aware Allocation

Implementing this in a production pipeline requires a one-time diagnostic step. You run your model over a validation set to calculate the risk profile and derive the optimal step-spacing. Once generated, this template serves as a fixed instruction set for the sampler. It eliminates the need for manual, trial-and-error adjustment of schedules. The remaining unknown is the extent to which these profiles remain stable when shifting between radically different domains, such as from generic imagery to highly specialized medical or satellite datasets. If the risk profile remains robust across these domains, it would suggest that fixed, optimized templates could replace adaptive scheduling entirely for most deployment scenarios.

Sources