Optimal Stopping in Latent Diffusion Models

Yu-Han Wu, Quentin Berthet, Gérard Biau, Claire Boyer, Romuald Elie, Pierre Marion · DOI

Introduction

Standard diffusion models typically follow a "more is better" philosophy: the more denoising steps performed, the cleaner the resulting image. However, Latent Diffusion Models (LDMs), such as Stable Diffusion, exhibit a counter-intuitive behavior where sample quality often peaks before the final generation step. This paper investigates the theoretical and empirical foundations of this "optimal stopping" phenomenon, demonstrating that the best stopping time is intrinsically linked to the dimensionality of the latent space.

Methodology

The researchers address the stopping problem and the dimensionality dilemma through a multi-faceted approach:

  • Gaussian Framework: By analyzing the system using Gaussian distributions and linear autoencoders, the authors derived the Wasserstein-2 distance (equivalent to the Fréchet distance) between true data and generated samples.
  • Noisy Autoencoder (AE) Proxy: A "noisy AE" was introduced as a low-cost predictive tool. This model encodes an image, adds noise in the latent space, and decodes it. The hypothesis is that this simple setup can accurately predict the behavior of complex LDMs.
  • Theoretical Characterization: The study provides proofs on how the optimal latent dimension shifts based on the allocated denoising time.
An intermediate generation step showing early structure formation in the latent space.

Key Insights

The U-Shaped Quality Curve

Empirical evidence shows that the Fréchet Inception Distance (FID) in LDMs often follows a U-shaped curve. Quality improves initially, reaches a "sweet spot," and then begins to degrade. This confirms that early stopping is not merely a speed optimization but a requirement for maximizing image quality.

Dimension-Time Trade-off

There is a fundamental interplay between latent space dimensionality and denoising time. Lower-dimensional latent spaces (higher compression) tend to benefit from earlier stopping. Conversely, higher-dimensional spaces require more time to reconstruct fine details but are more susceptible to noise if the process is terminated too early.

Results

The "Noisy AE" proxy demonstrated remarkable predictive power. On the ImageNet-256 dataset, the optimal stopping time for a full LDM (at $t \approx 0.956$) was precisely predicted by the proxy. Furthermore, qualitative results indicate that LDM-generated images stabilize early. Unlike pixel-space diffusion models (e.g., DDPMs), where final steps are essential for high-frequency noise removal, LDMs reach a point of visual stability where further steps provide diminishing or even negative returns.

A high-quality sample from CelebA-HQ demonstrating the visual stability achieved by LDMs at the optimal stopping point.

Conclusion

This research establishes that the degradation in LDM quality at late stages is an intrinsic property of dimensionality reduction rather than a numerical artifact. By using the Noisy AE proxy, researchers can efficiently determine optimal latent dimensions and stopping times, potentially saving significant computational resources during both model development and inference.

Summary updated

BibTeX
@inproceedings{wu2026optimal,
  author = {Yu-Han Wu and Quentin Berthet and Gérard Biau and Claire Boyer and Romuald Elie and Pierre Marion},
  title = {{Optimal Stopping in Latent Diffusion Models}},
  booktitle = {International Conference on Machine Learning},
  year = {2026},
  url = {https://openreview.net/forum?id=X4OakhiSzp},
}
Figure