Skip to main content
QUICK REVIEW

[Paper Review] GANalyzer: Analysis and Manipulation of GANs Latent Space for Controllable Face Synthesis

Ali Pourramezan Fard, Mohammad H. Mahoor|arXiv (Cornell University)|Feb 2, 2023
Face recognition and analysisComputer Science3 citations
TL;DR

This paper proposes GANalyzer, a framework for analyzing and manipulating the latent space of pre-trained GANs to enable controllable face synthesis. By leveraging off-the-shelf classifiers and covariance analysis of latent vectors per facial attribute, GANalyzer learns transformation functions that disentangle and edit attributes like expression, age, gender, and race, enabling accurate facial attribute editing and feature-based synthesis, with a resulting 46K-balanced, photo-realistic face dataset released publicly.

ABSTRACT

Generative Adversarial Networks (GANs) are capable of synthesizing high-quality facial images. Despite their success, GANs do not provide any information about the relationship between the input vectors and the generated images. Currently, facial GANs are trained on imbalanced datasets, which generate less diverse images. For example, more than 77% of 100K images that we randomly synthesized using the StyleGAN3 are classified as Happy, and only around 3% are Angry. The problem even becomes worse when a mixture of facial attributes is desired: less than 1% of the generated samples are Angry Woman, and only around 2% are Happy Black. To address these problems, this paper proposes a framework, called GANalyzer, for the analysis, and manipulation of the latent space of well-trained GANs. GANalyzer consists of a set of transformation functions designed to manipulate latent vectors for a specific facial attribute such as facial Expression, Age, Gender, and Race. We analyze facial attribute entanglement in the latent space of GANs and apply the proposed transformation for editing the disentangled facial attributes. Our experimental results demonstrate the strength of GANalyzer in editing facial attributes and generating any desired faces. We also create and release a balanced photo-realistic human face dataset. Our code is publicly available on GitHub.

Motivation & Objective

  • Address the lack of interpretability in GAN latent spaces, which hinders control over generated facial attributes.
  • Overcome the severe class imbalance in existing GAN training data, which leads to entangled and non-diverse facial attribute generation.
  • Enable both facial attribute editing (modifying a generated face’s attributes while preserving identity) and feature-based synthesis (generating faces with specific attributes from random noise).
  • Develop a supervised method to map latent vectors to specific facial attributes using statistical analysis of latent vector distributions per attribute class.
  • Create and release a balanced, photo-realistic human face dataset with 23 attribute combinations to support diverse downstream applications.

Proposed method

  • Synthesize 100K images using StyleGAN3 as a training set for latent space analysis.
  • Apply four pre-trained off-the-shelf classifiers to label each image for facial attributes: expression, gender, age, and race.
  • Compute the covariance matrix of latent vectors for each facial attribute class (e.g., all 'Angry' faces) and extract its eigenvectors to model attribute-specific directions in latent space.
  • Define a transformation function Ψ(z, S) that decomposes a latent vector z into identity-preserving (z_id) and feature-based (z_fb) components for targeted attribute editing.
  • Use the principal eigenvectors of the covariance matrix as direction vectors to manipulate latent codes for disentangled attribute editing.
  • Apply the transformation function to generate new images with desired attribute combinations, such as 'Angry Woman' or 'Old Black Man', by projecting and adjusting the latent vector along learned attribute directions.
Figure 1: Our proposed transformation function $\Psi$ gets an arbitrary latent vector $z$ , a facial attribute $fa$ , and manipulates $z$ to generate the latent vectors $z_{fb}$ , and $z_{id}$ . While the latent vector $z_{id}$ is used for facial attribute editing, the feature latent vector $z_{fb}$
Figure 1: Our proposed transformation function $\Psi$ gets an arbitrary latent vector $z$ , a facial attribute $fa$ , and manipulates $z$ to generate the latent vectors $z_{fb}$ , and $z_{id}$ . While the latent vector $z_{id}$ is used for facial attribute editing, the feature latent vector $z_{fb}$

Experimental results

Research questions

  • RQ1How can the latent space of pre-trained GANs be analyzed to identify and disentangle specific facial attributes such as expression, age, gender, and race?
  • RQ2To what extent does class imbalance in GAN training data lead to entanglement and poor generation of specific attribute combinations?
  • RQ3Can a supervised, classifier-based approach effectively learn disentangled latent space directions for accurate facial attribute editing and feature-based synthesis?
  • RQ4How does the proposed transformation function Ψ(z, S) enable both identity-preserving attribute editing and direct synthesis of desired attribute combinations?
  • RQ5Can a balanced, diverse, and photo-realistic face dataset be systematically generated and released to support downstream recognition and psychological research?

Key findings

  • The validation set from StyleGAN3 generated only 2.03% 'Happy Black' faces and less than 1% 'Angry Woman' faces, indicating severe attribute imbalance.
  • After applying GANalyzer, the new balanced dataset achieved 12.58% 'Happy Black' and 15.65% 'Angry Woman' samples, demonstrating effective mitigation of class imbalance.
  • The proposed transformation function Ψ(z, S) successfully enabled disentangled editing: changing facial expression or gender while preserving identity and other attributes.
  • Feature-based synthesis using GANalyzer generated high-quality images with specific attribute combinations (e.g., 'Old Black Woman') that were previously rare or absent in standard GAN outputs.
  • The covariance-based eigenvector analysis effectively captured attribute-specific directions in latent space, enabling precise manipulation with minimal identity disruption.
  • The released 46K-image dataset with 23 attribute combinations is significantly more balanced than existing GAN validation sets, as confirmed by comparisons of attribute distribution in Fig. 11 and Fig. 19.
Figure 2: The figure shows a performance of our proposed transformation function $\Psi$ for facial attribute editing.
Figure 2: The figure shows a performance of our proposed transformation function $\Psi$ for facial attribute editing.

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.