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

Exposure bias in diffusion models—caused by the discrepancy between ground-truth training data and noisy inference predictions—leads to error accumulation and degraded image quality. This paper introduces the Time-Shift Sampler, a training-free method that dynamically adjusts time steps during inference to better match the actual variance of generated samples, significantly improving performance (e.g., a 44% FID improvement on CIFAR-10) with negligible computational overhead.

What Problem Does This Paper Address?

Diffusion Probabilistic Models (DPMs) have revolutionized image synthesis, but they typically require hundreds of iterative steps to produce high-quality results. To speed this up, researchers often use fewer sampling steps, which unfortunately exacerbates exposure bias.

Exposure bias occurs because of a fundamental mismatch:

  1. During Training: The model learns to denoise a sample $x_t$ that was created by adding exact Gaussian noise to a ground-truth image $x_0$.
  2. During Inference: The model must denoise its own previous (and imperfect) prediction $\hat{x}_t$.

Small errors in these predictions accumulate over time, leading the model into regions of the data space it never encountered during training. While previous solutions suggested retraining models with added perturbations, this is computationally expensive and impractical for large-scale pre-trained models.

The accumulation of prediction errors over different sampling steps.
Figure 3: CIFAR-10 prediction errors show that errors initially decrease before steadily accumulating as the sampling process progresses.

Methods

The authors propose a novel, training-free inference algorithm called the Time-Shift Sampler. The core idea is that if a predicted sample $\hat{x}_t$ has a noise level (variance) that doesn't perfectly match the theoretical noise level for time $t$, we should find a "shifted" time step $t_s$ that does match.

Key Components:

  • Time-State Coupling: Instead of strictly using the predefined time step $t$ as input to the U-Net, the sampler searches for an optimal $t_s$ within a small window $[t - w/2, t + w/2]$.
  • Variance Matching: The optimal $t_s$ is found by matching the variance of the current generated sample to the theoretical variance schedule learned during training.
  • Cutoff Mechanism ($t_c$): The authors observed that exposure bias is most damaging in the early and middle stages of denoising. Consequently, they only apply the time-shift for steps where $t > t_c$, reverting to standard sampling for the final refinement stages.
Figure 1: The comparison of TS-DDPM (ours) and DDPM. The orange and blue arrows denote the time-state coupling at each denoising step of TS-DDPM and DDPM, respectively. In TS-DDPM, we search for coupled time step within the [t −w/2, t + w/2] window, until the cutoff time step tc.
Figure 1: TS-DDPM searches for a coupled time step $t_s$ within a selection window to better align the model with the actual state of the generated image.

Datasets

The method was evaluated across several standard benchmarks to demonstrate its versatility:

  • CIFAR-10 (32x32): A classic small-image benchmark.
  • CelebA (64x64): Focused on human face generation.
  • LSUN-bedroom (256x256): Testing higher-resolution scene generation.
  • ImageNet (64x64): A diverse, large-scale dataset.
  • MSCOCO val2017: Used to evaluate performance in text-to-image generation tasks.

Key Insights and Ideas

  • Variance as a Compass: The authors theoretically and empirically demonstrate that the variance of a sample is a robust proxy for its "true" corruption level. By realigning the time step to the sample's variance, they effectively "reset" the model back onto its trained manifold.
  • Sensitivity Shift: The network is more sensitive to noise levels in later stages of the forward process (approaching white noise). Figure 2 shows how the variance distribution narrows and stabilizes as noise increases, meaning even minor prediction errors here can derail the entire generation.
  • Training-Free Versatility: Because it only modifies the inference loop, the Time-Shift Sampler can be "plugged into" existing solvers like DDIM, PNDM, and DEIS without needing to touch the original model weights.
Figure 2: The density distribution of the vari- ance of 5000 samples from CIFAR-10 by dif- ferent time steps.
Figure 2: The variance distribution becomes much more constrained at higher time steps, making the model more sensitive to errors.

Key Results

The Time-Shift Sampler consistently outperforms baseline samplers across all tested datasets and step counts:

  • Significant FID Gains: On CIFAR-10 with only 10 steps, integrating the Time-Shift Sampler with F-PNDM improved the FID score from ~7.0 to 3.88 (a 44.49% improvement). Remarkably, this 10-step version outperformed a vanilla DDIM running for 100 steps.
  • Efficiency: The additional computation required to calculate variance and search the window is minimal. For instance, TS-S-PNDM requires only about 9.7% more sampling time than the standard version while providing much higher quality.
  • Robustness: The method proved effective even when compared against ADM-IP, a method that requires retraining to alleviate exposure bias.
Sampling time vs FID score.
Figure 5: The "x" marks show that Time-Shift variants achieve significantly lower (better) FID scores with very little increase in sampling time.

Limitations and Future Work

  • Hyperparameter Tuning: The method introduces two new parameters: the window size ($w$) and the cutoff value ($t_c$). While the authors provide heuristics based on statistical analysis, these currently need to be estimated per dataset.
  • Analytical Derivation: The authors suggest that future work could focus on analytically deriving the optimal values for $w$ and $t_c$ based on the specific noise schedule of a model.
  • Broader Applications: The concept of time-shifting could potentially be applied to other Markovian generative processes beyond standard image diffusion.

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