Which Style Makes Me Attractive? Interpretable Control Discovery and Counterfactual Explanation on StyleGAN

Bo Li, Qiulin Wang, Jiquan Pei, Yu Yang, Xiangyang JiarXiv 2022

Abstract

Generative Adversarial Networks (GANs) like StyleGAN produce high-fidelity images, yet their latent spaces remain largely entangled, making precise semantic editing difficult. Furthermore, downstream classifiers using these images often operate as "black boxes." This paper introduces a framework for discovering highly specific, interpretable semantic controls within StyleGAN’s latent space by leveraging existing face analysis models. By identifying these latent subspaces, the authors generate "counterfactual explanations" that reveal the specific facial features—such as eye shape or lip color—that drive subjective classifier judgments like "attractiveness."

Introduction

While StyleGAN can synthesize incredibly realistic faces, its internal latent space is often a tangled representation where changing one feature inadvertently affects others. Simultaneously, deep learning classifiers for subjective attributes (e.g., "attractiveness" or "smiling") lack transparency. This research aims to bridge these gaps by providing finer control for image editing and using those controls to make AI decisions more interpretable through human-understandable counterfactuals.

Methodology

The authors propose a two-step approach to disentangle latent representations and explain model behavior:

1. Supervised Subspace Discovery

Instead of searching the latent space blindly, the method uses "criterions" derived from pre-trained face analysis models, such as face parsers and landmark detectors. By calculating the Jacobian matrix of the combined StyleGAN and analysis model, they identify specific directions in the latent space that maximize changes within a target mask (e.g., the mouth) while minimizing changes elsewhere. Disentanglement is further refined by intersecting different subspaces to ensure edits remain localized.

2. Counterfactual Generation

To explain a classifier's decision, the framework starts with a base image and uses gradient descent to find a minimal latent shift that increases the classifier's score. Crucially, this shift is restricted to the discovered interpretable subspaces. This produces a counterfactual image that answers: "If your eyes were slightly larger (and nothing else changed), the classifier would find you more attractive."

The framework discovers latent subspaces using face analysis models (left) and applies them to generate counterfactual explanations for an 'attractiveness' classifier (middle/right).

Experimental Setup

  • Generator: StyleGAN2 pre-trained on the FFHQ (Flickr-Faces-HQ) dataset.
  • Classifier: Attribute classifiers trained on the CelebA dataset.
  • Analysis Tools: BiSeNet for face parsing and a standard 68-facial-landmark detector.

Key Results and Insights

The method, referred to as ICE (Interpretable Counterfactual Explanation), successfully discovered previously unknown or poorly disentangled controls, such as "eye boundary," "lip color," and "nose size."

  • Superior Localization: ICE outperformed state-of-the-art methods like StyleSpace in localizing edits, achieving higher photometry differences in target regions while maintaining identity similarity to the original image.
  • Revealing Model Bias: By generating counterfactuals for "attractiveness," the authors highlighted specific biases in models trained on CelebA—such as favoring larger eyes, pointed faces, and redder lips. This provides a concrete way to audit models for societal biases.
Visualization of discovered controls showing localized semantic transitions for eyes, mouth shape, and lip color.

Conclusion and Future Work

This framework demonstrates that the knowledge embedded in specialized analysis tools can be "back-propagated" into GANs to find new controls and explain black-box models. While limited by the inherent disentanglement of the underlying StyleGAN, the method offers a path toward more transparent AI. Future work may apply this to domains like medical imaging, where counterfactual explanations could help clinicians understand AI-driven diagnostic flags.

Summary updated

BibTeX
@misc{li2022which,
  author = {Bo Li and Qiulin Wang and Jiquan Pei and Yu Yang and Xiangyang Ji},
  title = {{Which Style Makes Me Attractive? Interpretable Control Discovery and Counterfactual Explanation on StyleGAN}},
  year = {2022},
  eprint = {2201.09689},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2201.09689},
}
Figure