Alleviating Exposure Bias in Diffusion Models through Sampling with Shifted Time Steps

Mingxiao Li, Tingyu Qu, Ruicong Yao, Wei Sun, Marie-Francine Moens

TL;DR

Diffusion models suffer from "exposure bias" because tiny prediction errors accumulate over hundreds of generation steps, causing the model's inference states to drift away from its training states. This paper introduces the Time-Shift Sampler, a training-free plug-and-play method that dynamically adjusts the time step during inference to perfectly match the actual noise profile of the generated image. This simple correction drastically improves image quality (FID scores) with almost zero extra computational cost, especially for ultra-fast, few-step generation.

What Problem Does This Paper Address?

Diffusion Probabilistic Models (DPMs) generate images by starting with pure static (Gaussian noise) and iteratively denoising it over many steps.

During training, the model is fed perfect, ground-truth images that have been mathematically corrupted with exact amounts of noise. However, during inference (generation), the model doesn't have ground-truth images. It has to feed its own slightly flawed predictions back into itself for the next step.

Because the model is never exposed to its own mistakes during training, these tiny prediction errors accumulate over the sequence. This training-inference discrepancy is known as exposure bias. Previous attempts to fix this involved intentionally adding noise to the training data, which is computationally expensive because it requires retraining massive diffusion models from scratch. The authors wanted to find a way to fix exposure bias entirely during the inference phase, without touching the model's weights.

Methods

The authors propose the Time-Shift Sampler, a novel inference algorithm that can be wrapped around existing samplers (like DDPM, DDIM, or PNDM).

Overview of the Time-Shift Sampler pipeline, illustrating the selection window for finding the optimal shifted time step and the cutoff value where standard sampling resumes.
  • The Standard Approach: Normally, if a model is at time step $t$, it predicts the image for step $t-1$, and the sampler blindly assumes the resulting image perfectly matches the theoretical noise profile of $t-1$.
  • The Novel Approach: The authors realized that due to prediction errors, the generated image at step $t-1$ might actually look more like step $t-2$ or $t+1$. To fix this, the Time-Shift Sampler calculates the actual variance of the newly predicted image. It then searches a small "window" of nearby time steps to find a shifted time step, $t_s$, whose theoretical variance best matches the empirical variance of the generated image.
  • The Cutoff: Because this variance-matching trick relies on the image still being relatively noisy, the algorithm uses a "cutoff" threshold. Once the generation process reaches the later stages (where the image is mostly formed and noise is low), the sampler stops shifting and reverts to the standard schedule.

Datasets

The authors evaluated their method on several standard image generation benchmarks:

  • CIFAR-10 (32x32)
  • CelebA (64x64)
  • LSUN-bedroom (256x256)
  • ImageNet (64x64)
  • MSCOCO val2017 (for text-to-image generation)

Key Insights and Ideas

  • Time-State Mismatch is measurable: Exposure bias manifests as a measurable drift in the variance of the generated samples. By tracking this variance, you can quantify exactly how "far off" the model's current state is from the theoretical schedule.
Visualization of the variance of generated samples over time steps, which the Time-Shift Sampler uses to quantify and correct state mismatch.
  • You don't need to fix the image; just fix the clock: Instead of trying to mathematically correct the pixels of the flawed image, it is much easier to just tell the model the correct time step that corresponds to the flawed image. If the image is slightly too noisy for step 50, just tell the model it's actually at step 52.
  • Generation happens in two distinct phases: The authors observed that early in the reverse process (high noise), the model is just shifting the Gaussian distribution toward the target data distribution—errors here accumulate heavily. In the later stages (low noise), the image's layout is already locked in, and the model is just refining details. Time-shifting is highly effective in the first phase but unnecessary in the second.

Key Results

  • Massive gains for few-step generation: The Time-Shift Sampler shines brightest when generating images in very few steps (e.g., 5 to 20 steps), where exposure bias is typically most punishing due to large jump sizes.
  • State-of-the-Art Efficiency: By integrating the Time-Shift Sampler into the F-PNDM solver, the authors achieved an FID of 3.88 on CIFAR-10 in just 10 steps. This is a 44.49% improvement over the baseline F-PNDM and actually outperforms a standard 100-step DDIM.
  • Negligible Compute Overhead: Because calculating the variance of a tensor is incredibly cheap, the method adds virtually zero time to the generation process. For 5-20 steps, the time difference is negligible; for 50 steps, it adds less than 10% to the total sampling time.
  • Beats Retraining: The method outperformed ADM-IP, a competing technique that attempts to solve exposure bias by completely retraining the model with perturbed inputs.

Limitations and Future Work

  • Hyperparameter Dependency: The method introduces two new hyperparameters: the search window size ($w$) and the cutoff time step ($t_c$). Currently, these need to be estimated based on statistical analysis of the training data or tuned empirically for different step counts.
  • Future Work: The authors note that because both the cutoff value and window size are related to the noise level at each step, future work could focus on analytically deriving the optimal values for these parameters dynamically, removing the need for manual tuning. They also suggest applying this time-shifting concept to other Markovian processes outside of diffusion models.

Summary updated

BibTeX
@inproceedings{li2024alleviating,
  author = {Mingxiao Li and Tingyu Qu and Ruicong Yao and Wei Sun and Marie-Francine Moens},
  title = {{Alleviating Exposure Bias in Diffusion Models through Sampling with Shifted Time Steps}},
  booktitle = {International Conference on Learning Representations},
  year = {2024},
  url = {https://openreview.net/forum?id=ZSD3MloKe6},
}
Figure