NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Unsupervised Representation Learning from Pre-trained Diffusion Probabilistic Models

Zijian Zhang, Zhou Zhao, Zhijie Lin

TL;DR

Pre-trained DPM AutoEncoding (PDAE) is a novel framework that transforms existing, pre-trained diffusion models into powerful autoencoders without needing to train them from scratch. By learning to "fill the gap" of information lost during the diffusion process, PDAE achieves state-of-the-art reconstruction and representation learning with significantly higher training efficiency than previous methods.

What Problem Does This Paper Address?

Diffusion Probabilistic Models (DPMs) are the current kings of high-quality image generation. However, they are traditionally "blind"—they generate images from noise but don't inherently "understand" the semantic content of the images they create.

To fix this, researchers previously proposed Diffusion Autoencoders (Diff-AE), which jointly train an encoder (to find a latent representation) and a DPM decoder (to reconstruct the image). The problem? Training these from scratch is computationally brutal. Meanwhile, the community already has a wealth of high-quality, pre-trained DPMs.

This paper asks: Can we "recycle" these pre-trained models for representation learning instead of starting from zero?

The authors identify a specific technical hurdle: pre-trained DPMs fail to reconstruct images because of the "posterior mean gap"—the information lost during the forward (noise-adding) process that the model can't recover on its own.

Methods

To overcome this, the authors introduce PDAE, which consists of three main components designed to adapt existing models efficiently.

Architecture of PDAE showing the pre-trained DPM (grey), encoder (blue), and gradient estimator (green) with skip connections.
  1. The Gap Filler (Gradient Estimator): Instead of training a whole new decoder, PDAE uses a pre-trained, frozen DPM. The authors then train a small "gradient estimator" ($G_\psi$) that predicts a "mean shift." This shift essentially "corrects" the pre-trained model’s guess at each step, filling in the information gap using a latent code $z$ provided by a trainable encoder ($E_\varphi$).
  2. Network Recycling: To speed up training, PDAE reuses the encoder portion and time-embedding layers of the pre-trained DPM's U-Net via skip connections. This provides a massive head start for the new gradient estimator.
  3. SNR-Based Weighting Scheme: The authors discovered that not all diffusion timesteps are equally important for learning representations. They designed a new weighting scheme based on the Signal-to-Noise Ratio (SNR) that down-weights the very early and very late stages of diffusion, forcing the model to focus on the "critical stage" where the most important semantic structures are formed.

Key Insights and Ideas

  • The "Aha" Moment on Guidance: The authors realized that "classifier guidance" (using a label to steer generation) is actually just a specific way of filling the posterior mean gap. If a label can fill the gap with class info, a learned latent vector $z$ can fill it with all the image's semantic info.
  • The Critical Stage: Through "mixed sampling" experiments, they proved that there is a specific window of time during the diffusion process where the model decides the high-level identity of the image.
Mixed sampling procedure demonstrating the early, critical, and late stages of diffusion. The critical stage is where the image identity is primarily determined.

As seen in the mixed sampling procedure, guidance outside this "critical stage" window is much less effective. The early stage mostly handles coarse outlines, while the late stage handles fine details. The critical stage is where the core semantic identity solidifies.

  • Efficiency is King: By leveraging pre-trained weights, PDAE requires only 1/2 to 1/3 of the training iterations compared to Diff-AE to reach convergence, while actually achieving better results.

Key Results

The model was evaluated on several standard high-resolution benchmarks, including FFHQ, CelebA-HQ, LSUN, and ImageNet.

  • Reconstruction Quality: On CelebA-HQ, PDAE achieved an SSIM of 0.993, outperforming Diff-AE (0.991) and rivaling massive models like NVAE, despite having a much smaller latent dimensionality.
  • Generation Quality: PDAE improved the unconditional sampling of pre-trained models. For FFHQ, it lowered the FID (lower is better) from 11.95 (standard DDIM) to 10.31.
  • Semantic Manipulation: The learned latent space is highly linear. The authors demonstrated that you can perform smooth interpolations between faces or manipulate specific attributes (like adding a smile or changing age) by simply moving the latent code along a vector, all while keeping the rest of the image details (background, hair texture) perfectly stable.

Limitations and Future Work

The authors note that the gradient estimator can be sensitive to the latent code $z$ during the final steps of the sampling process, which can sometimes lead to "out-of-domain" artifacts. To mitigate this, they found it best to apply the guidance primarily in the last 30% of the sampling steps.

For future work, they suggest exploring how to extract even more "interpretable" directions from pre-trained DPMs, potentially allowing for fine-grained image editing without any supervised attribute labels.

Summary updated

BibTeX
@inproceedings{zhang2022unsupervised,
  author = {Zijian Zhang and Zhou Zhao and Zhijie Lin},
  title = {{Unsupervised Representation Learning from Pre-trained Diffusion Probabilistic Models}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2022},
  url = {https://openreview.net/forum?id=OtczUjcgnG},
}
Figure