TL;DR
This paper introduces the Latent Code Guidance Diffusion Model (LCG-DM), the first method to achieve disentangled latent code guidance in score-based diffusion models. LCG-DM enables unsupervised controllable image generation by treating disentangled latent codes as pseudo-labels, offering a novel way to manipulate image attributes without requiring explicit labels.
What Problem Does This Paper Address?
Score-based diffusion models have achieved remarkable success in generating high-quality images. However, a key challenge in their real-world application is controllable generation – the ability to guide the generation process to produce images with specific attributes. While existing methods often require extensive labeled data or struggle with disentangling different semantic factors, this paper tackles the problem of unsupervised controllable generation by leveraging disentangled representations within the diffusion framework. The goal is to allow users to manipulate specific semantic attributes of generated images without needing pre-annotated datasets, making diffusion models more versatile and applicable to a wider range of tasks.
Methods
The core innovation of LCG-DM is the integration of disentangled latent codes into score-based diffusion models. The authors propose a two-stage training process:
- Disentangled Latent Code Extraction: A Variational Autoencoder (VAE) structure, inspired by Factor-VAE, is trained to extract disentangled latent codes (
z). This VAE is trained with a hyperparameterγthat controls the trade-off between reconstruction quality and disentanglement strength. - Conditional Score-Based Generation: The extracted disentangled latent codes (
z) are then used as conditions for a score-based diffusion model. This means the diffusion model learns to estimate the score function of the data distribution given these disentangled latent codes, effectively learning to generate images that correspond to specific attribute combinations.
The model uses a conditional score function, sθ(xt, t, z), which estimates the score of the data distribution at time t given the noisy data xt and the disentangled latent code z. The overall loss function combines the VAE's reconstruction and disentanglement losses with the diffusion model's conditional score-matching loss.
Datasets
- dSprites: A synthetic dataset used for its known latent factors, allowing for explicit measurement of disentanglement quality.
- CelebA: A real-world dataset used for evaluating image generation quality and demonstrating image manipulation capabilities.
- MNIST: Used to demonstrate a scaling method for improving the reflection of pseudo-labels in generation.
Key Insights and Ideas
- Disentangled Latent Codes as Pseudo-Labels: The paper frames disentangled latent codes as "pseudo-labels" for the data. This perspective is crucial because it allows for controllable generation without requiring explicit, human-annotated labels for each attribute.
- Unsupervised Controllable Generation: LCG-DM is presented as the first approach to achieve disentanglement and controllable generation within the score-based diffusion model framework in an unsupervised manner.
- Two-Stage Training for Stability: Separating the disentanglement learning (VAE) from the conditional generation (diffusion model) into two stages helps stabilize training and allows the diffusion model to effectively leverage the disentangled latent codes.
- Trade-off between Disentanglement and Generation Quality: While disentanglement is beneficial, the paper explores how to achieve it without significantly degrading the image generation quality (measured by FID).
Key Results
- dSprites Dataset: LCG-DM achieved state-of-the-art performance in both sample quality (FID) and disentanglement metrics (FVM, MIG) compared to VAE and GAN-based disentanglement methods. The encoded version of LCG-DM (using the VAE encoder) performed slightly better.
- CelebA Dataset: LCG-DM demonstrated comparable FID performance to non-disentangling score-based diffusion models while offering the crucial ability to manipulate disentangled latent variables. The "encoded" version showed better FID than the "prior" version, suggesting the VAE's learned latent space is more effective for generation.
- Image Manipulation: Qualitative results on CelebA show that LCG-DM can smoothly edit attributes like age, hair brightness, and face brightness by manipulating individual dimensions of the disentangled latent code
z. - Scaling Method: Experiments on MNIST showed that a scaling method can enhance the reflection of pseudo-labels in generation, though it might reduce sample diversity.
Limitations and Future Work
- VAE Inflexibility on Complex Datasets: The paper notes that the VAE structure can be inflexible on complex datasets like CelebA, leading to a large variational gap between the prior and encoded latent spaces. This suggests that more advanced VAE architectures or alternative disentanglement methods might be beneficial.
- Trade-off in Scaling: The scaling method for pseudo-label reflection, while effective, can lead to a reduction in sample diversity. Future work could explore ways to mitigate this trade-off.
- Future Directions: The authors suggest that LCG-DM is a "gateway to causal inference and counterfactual generations," hinting at future applications in areas like fairness research and more sophisticated data manipulation.
Summary updated