Abstract
Diffusion models (DMs) have achieved state-of-the-art results for image synthesis tasks as well as density estimation. Applied in the latent space of a powerful pretrained autoencoder (LDM), their immense computational requirements can be significantly reduced without sacrificing sampling quality. However, DMs and LDMs lack a semantically meaningful representation space as the diffusion process gradually destroys information in the latent variables. We introduce a framework for learning such representations with diffusion models (LRDM). To that end, a LDM is conditioned on the representation extracted from the clean image by a separate encoder. In particular, the DM and the representation encoder are trained jointly in order to learn rich representations specific to the generative denoising process. By introducing a tractable representation prior, we can efficiently sample from the representation distribution for unconditional image synthesis without training of any additional model. We demonstrate that i) competitive image generation results can be achieved with image-parameterized LDMs, ii) LRDMs are capable of learning semantically meaningful representations, allowing for faithful image reconstructions and semantic interpolations.
Introduction
Diffusion models are the current kings of image synthesis, but they lack the structured, interpretable latent spaces found in models like Variational Autoencoders (VAEs). While Diffusion Models (DMs) produce state-of-the-art visual results, they are fundamentally "destructive" processes. They work by gradually adding noise to data until it becomes a Gaussian distribution, then learning to reverse that process. Because information is destroyed step-by-step, standard DMs lack a single, compressed "representation" vector that captures the essence of an image. This makes it difficult to perform tasks that require semantic understanding, such as interpolating between two images or reconstructing a specific image from a compact code. This paper introduces Latent Representation Diffusion Models (LRDM), a framework that jointly trains a representation encoder with a diffusion model to create a semantically meaningful bottleneck.
Methodology
The LRDM framework bridges the gap between generative quality and semantic structure through several key components:
- Latent Foundation: The model operates in the latent space of a pretrained autoencoder (VQ-AE or KL-AE), which reduces computational costs while keeping the data "image-like."
- Representation Encoder ($E_r$): A separate encoder is introduced to extract a representation $r$ from the clean latent $z_0$.
- Conditional Denoising: The standard diffusion U-Net is modified to be conditioned on this representation $r$. During training, the U-Net learns to use $r$ to help predict the original image from noisy versions.
- Joint Training & Regularization: The DM and the representation encoder are trained together. Crucially, a KL-divergence penalty is applied to the representation $r$, pushing it toward a standard Gaussian prior. This ensures the representation space is "well-behaved" and allows for unconditional sampling.
- Image-Parameterization: Unlike standard DMs that predict the noise added to an image, the authors find that predicting the original image ($z_0$-prediction) is significantly better for representation learning, as it forces the encoder to capture global semantics rather than just local noise patterns.
Key Insights and Ideas
The VAE-DM Spectrum
The LRDM effectively acts as a bridge between VAEs and DMs. By tuning the regularization parameter ($\lambda$), the model can behave more like a VAE (focusing on reconstruction) or more like a standard LDM (focusing on generative quality). This allows for a flexible trade-off depending on the application requirements.
Parameterization and Timestep Dynamics
The paper highlights a structural difference in learning tasks: while noise-prediction ($\epsilon$-prediction) is the industry standard for synthesis, $z_0$-prediction is superior for representation learning. It provides a stronger incentive for the encoder to bridge the "information gap" at high noise levels. In t-LRDM experiments, the authors observed a sharp transition in the KL-divergence. At high noise levels, the model relies heavily on the representation to "guess" the structure, whereas at low noise levels, the representation becomes almost unused as the model switches to fine-grained denoising.
Experimental Results
The authors evaluated their framework on several standard benchmarks, including LSUN-Churches, CelebA-HQ, and MNIST.
- Competitive Synthesis: The image-parameterized LDM achieved an FID of 5.64 on LSUN-Churches, proving that generative quality is not sacrificed to gain a representation space.
- Faithful Reconstruction: The model can reconstruct images from a highly compressed representation (e.g., $16 \times 16 \times 16$) with much higher fidelity than a standard Latent VAE.
- Smooth Interpolation: Using Spherical Linear Interpolation (Slerp) in the LRDM representation space yielded smooth transitions in head pose and architectural features, avoiding the messy blending seen in standard LDM latent spaces.
Conclusion and Future Work
LRDM demonstrates that diffusion models can indeed host semantically meaningful latent spaces. While the framework achieves high-fidelity synthesis and faithful reconstructions, it remains limited by the sequential sampling speed inherent to diffusion processes. Future work may explore non-spatial representations to learn even more abstract global semantics and investigate the utility of these learned representations for downstream discriminative tasks like classification or detection.
Summary updated