CAT: Controllable Attribute Translation for Fair Facial Attribute Classification

Jiazhi Li, Wael Abd-Almageed

TL;DR

Researchers have developed Controllable Attribute Translation (CAT), a generative pipeline that creates high-quality synthetic face images to fix imbalances in training datasets. By precisely controlling both protected attributes (like sex) and target facial attributes (like hair color), CAT significantly improves model fairness without sacrificing classification accuracy.

What Problem Does This Paper Address?

Machine learning models for facial analysis often suffer from significant bias, performing worse on minority groups. This usually stems from two sources: task bias (spurious correlations the model learns) and dataset bias (imbalanced training data).

While researchers have tried to fix dataset bias by collecting more diverse images or resampling existing ones, these methods have limits. It is extremely difficult to find real-world images that are balanced across every possible combination of attributes—for example, finding as many "chubby" or "blond" men as there are women in a celebrity dataset. Furthermore, collecting more real data raises serious privacy concerns.

Methods

The authors propose a semi-synthetic approach. Instead of relying solely on real images, they use a generative model (StyleGAN2) to "fill in the gaps" of a dataset. Their core contribution is the Controllable Attribute Translation (CAT) algorithm.

The process works by identifying specific dimensions in the GAN's latent space that control an Attribute of Interest (AOI). They use two key concepts to find these dimensions:

  1. Intra-class similarity: Finding the common latent dimensions shared by a small set of "seed" images that all have the desired attribute.
  2. Inter-class difference: Identifying dimensions that differ between images that have the attribute and those that don't.

By perturbing these specific dimensions, they can take a "base identity" and precisely toggle attributes like sex, hair color, or face shape while keeping the rest of the face the same. This allows them to create a perfectly balanced "semi-synthetic" dataset where every demographic group is equally represented across all target attributes.

The CAT pipeline supplements imbalanced real data with synthetic images to create a balanced training set.

Datasets

The study primarily utilizes the CelebA dataset, a massive collection of over 200,000 celebrity images annotated with 40 binary attributes. The authors use the training portion of CelebA to train their GAN and then evaluate their classification models on the original, real-world CelebA test set to ensure their synthetic training translates to real-world performance.

Key Insights and Ideas

  • Multi-Level Balance is Mandatory: The authors demonstrate that simply balancing a dataset by a protected attribute (e.g., 50% male, 50% female) isn't enough. You must also balance the target attributes within those groups (e.g., ensuring there aren't more "smiling" women than "smiling" men) to truly mitigate bias.
  • Labeling by Design, Not Discovery: Unlike other methods that generate random images and then use a (potentially biased) classifier to label them, CAT assigns labels during the generation process. Because the researchers know exactly which latent dimensions they changed, the labels are ground-truth by definition.
  • Disentanglement via Resolution: The method leverages StyleGAN2’s architecture, which handles different features at different resolutions. Coarse resolutions (4x4 to 8x8) are used for face shape, while fine resolutions (128x128+) handle skin tone and hair color, preventing different attributes from "bleeding" into each other during translation.
Fig. 3: Examples of generated images with the protected attribute and a single assigned facial attribute, negative samples (left) and positive samples (right) in each 2 × 2 grid.

Key Results

The effectiveness of CAT was tested on sex classification and multi-attribute facial classification.

  • Accuracy: Models trained with CAT-supplemented datasets achieved comparable Average Precision (AP) to models trained on the original imbalanced data, proving that synthetic images can teach a model as effectively as real ones.
  • Fairness: CAT showed dramatic improvements across a wide range of fairness metrics. For instance, the Difference in Equal Opportunity (DEO)—a measure of how much error rates vary between groups—dropped from a baseline of 23.4 to 8.4 on average.
  • Superiority: The method outperformed traditional resampling techniques and even specialized "debiasing" models that try to ignore protected attributes during training.

Limitations and Future Work

The authors acknowledge a classic fairness-performance tradeoff: while fairness increases significantly, there can be a very slight decrease in overall raw accuracy compared to models that "cheat" by using biased correlations.

Additionally, while CAT effectively addresses dataset bias, some "task bias" remains. This suggests that some facial attributes are inherently harder for neural networks to learn regardless of how balanced the data is. Future work could involve extending this pipeline to other types of data (like medical imaging) and exploring how to combine CAT with in-process debiasing algorithms for even better results.

Summary updated

Abstract

As the social impact of visual recognition has been under scrutiny, several protected-attribute balanced datasets emerged to address dataset bias in imbalanced datasets. However, in facial attribute classification, dataset bias stems from both protected attribute level and facial attribute level, which makes it challenging to construct a multi-attribute-level balanced real dataset. To bridge the gap, we propose an effective pipeline to generate high-quality and sufficient facial images with desired facial attributes and supplement the original dataset to be a balanced dataset at both levels, which theoretically satisfies several fairness criteria. The effectiveness of our method is verified on sex classification and facial attribute classification by yielding comparable task performance as the original dataset and further improving fairness in a comprehensive fairness evaluation with a wide range of metrics. Furthermore, our method outperforms both resampling and balanced dataset construction to address dataset bias, and debiasing models to address task bias.
BibTeX
@inproceedings{li2022cat,
  author = {Jiazhi Li and Wael Abd-Almageed},
  title = {{CAT: Controllable Attribute Translation for Fair Facial Attribute Classification}},
  booktitle = {Workshops @ ECCV},
  year = {2022},
  doi = {10.1007/978-3-031-25085-9\_21},
}

Loading related content...

Figure