DiffuseGAE: Controllable and High-fidelity Image Manipulation from Disentangled Representation

Yipeng Leng, Qiangjuan Huang, Zhiyuan Wang, Yangyang Liu, Haoyu Zhang · DOI

Abstract

Diffusion probabilistic models (DPMs) have shown remarkable results on various image synthesis tasks such as text-to-image generation and image inpainting. However, compared to other generative methods like VAEs and GANs, DPMs lack a low-dimensional, interpretable, and well-decoupled latent code. Recently, diffusion autoencoders (Diff-AE) were proposed to explore the potential of DPMs for representation learning via autoencoding. Diff-AE provides an accessible latent space that exhibits remarkable interpretability, allowing us to manipulate image attributes based on latent codes from the space. However, previous works are not generic as they only operated on a few limited attributes. To further explore the latent space of Diff-AE and achieve a generic editing pipeline, we proposed a module called Group-supervised AutoEncoder (dubbed GAE) for Diff-AE to achieve better disentanglement on the latent code. Our proposed GAE is trained via an attribute-swap strategy to acquire the latent codes for multi-attribute image manipulation based on examples. We empirically demonstrate that our method enables multiple-attributes manipulation and achieves convincing sample quality and attribute alignments, while significantly reducing computational requirements compared to pixel-based approaches for representational decoupling.

Introduction

Diffusion Probabilistic Models (DPMs) have recently surpassed GANs in image synthesis quality and stability. Despite these breakthroughs, DPMs suffer from a significant lack of interpretability. Unlike older generative models like VAEs or GANs, which often possess a low-dimensional latent space with "knobs" for specific attributes (e.g., changing a facial expression without altering identity), standard diffusion models operate primarily on pixel-level noise. This makes precise, multi-attribute manipulation difficult.

While Diffusion Autoencoders (Diff-AE) introduced a semantic encoder to provide a latent space, these spaces often remain "tangled," where modifying one attribute inadvertently affects others. DiffuseGAE addresses this by refining the latent space through a specialized autoencoder module designed for superior attribute disentanglement.

The DiffuseGAE Framework

DiffuseGAE refines the latent space of a diffusion model through a structured three-step process designed to separate semantic features into independent, controllable components.

  1. Pre-training (The Foundation): The framework begins with a standard Diffusion Autoencoder, utilizing a CNN encoder to extract semantic information and a conditional Denoising Diffusion Implicit Model (DDIM) as the decoder. The DDIM provides a deterministic mapping, which is essential for high-fidelity reconstruction.
  2. The GAE Module (The Refiner): The core innovation is the Group-supervised AutoEncoder (GAE). This secondary module takes the initial semantic code and maps it into a highly organized, disentangled space ($W$). This allows the model to treat different visual traits as independent variables.
  3. Group-Supervised Training: To enforce disentanglement, the GAE is trained using groups of images that share specific attributes. By employing an attribute-swap strategy, the model learns to associate specific segments of the latent code with specific visual traits (e.g., pose vs. background).
The DiffuseGAE pipeline (a) and the internal structure of the MLP and Bottleneck blocks (b).

Experimental Setup and Datasets

The study primarily utilizes the ilab_20M dataset, which consists of toy vehicle images captured from various angles. This dataset is ideal for testing disentanglement due to its discrete attributes: Identity (6 vehicle types), Background (111 environments), and Pose (10 camera angles). The authors partitioned the latent code into specific dimensions for each attribute (60 for identity, 20 for background, and 20 for pose) to test the precision of the GAE module.

Key Results and Analysis

DiffuseGAE demonstrates significant improvements in both quantitative metrics and qualitative fidelity. On the ilab_20M dataset, the model achieved a Fréchet Inception Distance (FID) of 4.03, a substantial improvement over the original Diff-AE (8.07) and far surpassing GZS-Net (100.85).

Qualitatively, the model excels at swapping backgrounds or changing car poses while maintaining the vehicle's identity perfectly. As shown in the comparison below, existing methods like StarGAN and ELEGANT often suffer from identity drift or blurriness when attempting similar manipulations.

Qualitative comparison showing DiffuseGAE's superior ability to swap identity and background attributes compared to GAN and diffusion baselines.

Furthermore, the model exhibits a lower Perceptual Path Length (PPL), indicating that transitions between attributes are smooth and natural. This suggests that the latent space $W$ is not only disentangled but also continuous and well-structured.

Conclusion and Future Work

DiffuseGAE represents a major step toward making diffusion models as interpretable and controllable as their GAN predecessors without sacrificing image quality. By performing disentanglement in a low-dimensional latent space rather than at the pixel level, the method also offers significant computational efficiency.

Future research will focus on moving toward "multi-level semantic disentanglement" to allow for even finer control over sub-attributes. Additionally, the authors aim to reduce the supervision requirements of the GAE module to make it more applicable to unlabeled, real-world datasets.

Summary updated

BibTeX
@misc{leng2023diffusegae,
  author = {Yipeng Leng and Qiangjuan Huang and Zhiyuan Wang and Yangyang Liu and Haoyu Zhang},
  title = {{DiffuseGAE: Controllable and High-fidelity Image Manipulation from Disentangled Representation}},
  year = {2023},
  eprint = {2307.05899},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2307.05899},
}
Figure