Abstract
Training state-of-the-art diffusion models is computationally intensive, largely due to the standard practice of uniform timestep sampling. This paper proposes an adaptive, learning-based sampling strategy that identifies and prioritizes timesteps with high gradient variance and learning potential. By employing a small auxiliary neural network to parameterize a Beta distribution over the noise schedule, the method dynamically adjusts its focus during training. Experimental results across CIFAR-10, CelebA-HQ, and ImageNet demonstrate that this approach achieves faster convergence and superior image quality (FID) compared to uniform sampling and fixed heuristics.
1. Introduction
Diffusion models generate high-fidelity data by reversing a gradual noising process. During training, the model learns to denoise samples across a range of timesteps $t \in [1, T]$. Traditionally, these timesteps are sampled uniformly, assuming each level of noise is equally informative. However, this approach ignores the varying complexity of the denoising task across the schedule. Certain timesteps exhibit significantly higher gradient variance, creating bottlenecks that hinder convergence. While manual heuristics have been developed to re-weight these steps, they often lack robustness across different datasets and noise schedules (e.g., linear vs. cosine).
2. Methodology: Learning to Sample
The authors introduce a "Learning to Optimize" (L2O) framework to replace static sampling rules with an adaptive agent.
2.1 The Timestep Sampler
A small auxiliary network, the Timestep Sampler ($\pi_\phi$), is trained in tandem with the diffusion model. Its objective is to select timesteps that maximize the reduction of the Variational Lower Bound (VLB). To maintain a smooth and differentiable sampling process, the sampler outputs the parameters ($\alpha, \beta$) of a Beta distribution. This allows the model to concentrate its "attention" on specific segments of the noise schedule—such as the middle steps where structural features typically emerge—while still maintaining global coverage.
2.2 Surrogate Loss and Online Adaptation
A primary challenge in training a sampler is the "look-ahead" problem: determining the utility of a timestep requires observing the loss after an update. To avoid the prohibitive cost of extra forward/backward passes, the authors utilize a surrogate approximation. By maintaining a queue of recent loss gradients and employing feature selection, the sampler estimates the "bang for the buck" of each timestep. This online learning mechanism ensures that as the primary model masters "easy" timesteps, the sampler automatically redirects resources toward more difficult, high-variance regions.
3. Experimental Evaluation
The proposed method was evaluated on three diverse benchmarks:
- CIFAR-10 (32x32): Used for baseline speed and quality assessments.
- CelebA-HQ (256x256): Testing the synthesis of high-resolution facial details.
- ImageNet (256x256): Evaluating robustness across a wide variety of object categories.
4. Key Insights
4.1 Gradient Variance Heterogeneity
Empirical analysis reveals that gradient variance can fluctuate by up to 100x across the timestep range. Uniform sampling spends disproportionate time on low-variance steps where the model has already converged, while high-variance steps remain under-optimized.
4.2 Limitations of Static Heuristics
Existing methods like Min-SNR or P2 weighting rely on fixed mathematical assumptions about the noise schedule. The adaptive sampler outperforms these because it responds to the actual training dynamics. It proved effective across Linear, Cosine, and Quadratic schedules without manual retuning.
5. Results
The adaptive sampling strategy demonstrated clear advantages in both efficiency and final performance:
- Convergence Speed: On CIFAR-10, the method reached target FID scores significantly faster than uniform baselines. Even accounting for the 1.5x computational overhead per iteration, the total wall-clock time to reach convergence was reduced.
- Generative Quality: On CelebA-HQ 256x256, the model achieved an FID of 6.62, a notable improvement over the Latent Diffusion Model (LDM) baseline of 8.72 and the SpeeD acceleration method (7.98).
6. Conclusion and Future Work
Adaptive timestep sampling represents a significant step toward more efficient diffusion training. By treating the sampling strategy as a learnable component, the model overcomes the inefficiencies of uniform and heuristic-based approaches. Future research may extend this framework to score-based models and the complex temporal timesteps required for high-resolution video generation, such as Open-Sora.
Summary updated