Skip to main content
QUICK REVIEW

[Paper Review] Unifying Diffusion Models' Latent Space, with Applications to CycleDiffusion and Guidance

Chen Wu, Fernando De la Torre|arXiv (Cornell University)|Oct 11, 2022
Generative Adversarial Networks and Image SynthesisComputer Science18 citations
TL;DR

This paper proposes a unified Gaussian latent space formulation for diffusion models, enabling a reconstructable DPM-Encoder to map images to latent codes. By leveraging this shared latent space, the authors introduce CycleDiffusion for unpaired image-to-image translation and plug-and-play guidance via energy-based models, demonstrating that diffusion models achieve broader coverage of low-density sub-populations and individuals than GANs.

ABSTRACT

Diffusion models have achieved unprecedented performance in generative modeling. The commonly-adopted formulation of the latent code of diffusion models is a sequence of gradually denoised samples, as opposed to the simpler (e.g., Gaussian) latent space of GANs, VAEs, and normalizing flows. This paper provides an alternative, Gaussian formulation of the latent space of various diffusion models, as well as an invertible DPM-Encoder that maps images into the latent space. While our formulation is purely based on the definition of diffusion models, we demonstrate several intriguing consequences. (1) Empirically, we observe that a common latent space emerges from two diffusion models trained independently on related domains. In light of this finding, we propose CycleDiffusion, which uses DPM-Encoder for unpaired image-to-image translation. Furthermore, applying CycleDiffusion to text-to-image diffusion models, we show that large-scale text-to-image diffusion models can be used as zero-shot image-to-image editors. (2) One can guide pre-trained diffusion models and GANs by controlling the latent codes in a unified, plug-and-play formulation based on energy-based models. Using the CLIP model and a face recognition model as guidance, we demonstrate that diffusion models have better coverage of low-density sub-populations and individuals than GANs. The code is publicly available at https://github.com/ChenWu98/cycle-diffusion.

Motivation & Objective

  • To unify the latent space of diverse diffusion models into a common, Gaussian-formulated space for consistent representation.
  • To develop a reconstructable DPM-Encoder that maps real images to the latent code of stochastic diffusion models.
  • To enable unpaired image-to-image translation using two independently trained diffusion models via a shared latent space.
  • To provide a plug-and-play, finetuning-free guidance framework for both diffusion models and GANs using energy-based models.
  • To evaluate whether diffusion models generalize better to low-density sub-populations and individuals than GANs under guided generation.

Proposed method

  • Reformulates trained diffusion models as deterministic mappings from a Gaussian latent code z to image x, enabling a unified latent space.
  • Proposes the DPM-Encoder, a reconstructable encoder that maps images to the latent code by inverting the diffusion process using a denoising U-Net.
  • Introduces CycleDiffusion, a method that uses the DPM-Encoder to encode images from two domains into a shared latent space and decode them back, enabling unpaired image-to-image translation.
  • Applies energy-based models for plug-and-play guidance: defines an energy function based on CLIP or face recognition embeddings to steer generation toward desired attributes.
  • Uses Langevin dynamics with a fixed number of steps and noise schedule to sample from the guided distribution without finetuning the diffusion model.
  • Employs a bounded distance metric between images generated from the same latent code to formalize the emergence of a common latent space across models.

Experimental results

Research questions

  • RQ1Can a common, Gaussian-formulated latent space be established across independently trained diffusion models?
  • RQ2Can CycleDiffusion achieve state-of-the-art performance in unpaired image-to-image translation using only pre-trained diffusion models?
  • RQ3Can text-to-image diffusion models be used as zero-shot image-to-image editors via the proposed latent space and DPM-Encoder?
  • RQ4Does plug-and-play guidance via energy-based models improve coverage of low-density sub-populations in diffusion models compared to GANs?
  • RQ5Can the same guidance framework be applied uniformly to both diffusion models and GANs without model-specific finetuning?

Key findings

  • CycleDiffusion outperforms prior GAN-based and diffusion-based methods in unpaired image-to-image translation, achieving state-of-the-art results on multiple benchmarks.
  • Large-scale text-to-image diffusion models like Stable Diffusion can be used as zero-shot image-to-image editors via CycleDiffusion, enabling editing without retraining.
  • Diffusion models achieve significantly better identity similarity (e.g., 0.911 cosine similarity on ID-D) than 2D/3D GANs (e.g., 0.687 for StyleGAN2) when guided to reproduce a reference face.
  • Among diffusion models, deterministic LDM-DDIM (η=0) achieves the highest identity guidance performance (0.911 on ID-D), indicating improved stability and coverage.
  • DDGAN and DiffAE show strong performance in identity guidance (0.837 and 0.873 respectively), but are outperformed by LDM-DDIM and SN-DDPM.
  • SN-DDPM achieves high identity similarity (0.873 on ID-D), demonstrating that score-based diffusion models also benefit from the unified latent space and guidance framework.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.