Gaussian Harmony: Attaining Fairness in Diffusion-based Face Generation Models

Basudha Pal, Arunkumar Kannan, Ram Prabhakar Kathirvel, Alice J. O'Toole, Rama ChellappaarXiv 2023 · DOI

Introduction

Diffusion models have emerged as the state-of-the-art for generating high-fidelity human faces. However, these models frequently inherit and amplify societal biases present in their training data. For instance, a slight imbalance in training data can lead to significant over-representation of certain demographics in the generated output. This "bias amplification" poses a critical challenge for the ethical deployment of generative AI, particularly in sensitive domains like facial recognition and medical imaging.

The Gaussian Harmony Approach

To address this, we introduce Gaussian Harmony, a novel inference-time intervention designed to achieve representational fairness without the need for costly model retraining. The method leverages the inherent mathematical structure of Denoising Diffusion Probabilistic Models (DDPMs).

Methodology

The Gaussian Harmony pipeline consists of three key stages:

  1. Unconditional Generation: Utilizing a standard pre-trained DDPM as the base model.
  2. GMM Clustering: Since the reverse diffusion process involves Gaussian transitions, the latent space is naturally modeled using Gaussian Mixture Models (GMMs). We fit GMMs to latent codes to identify clusters associated with specific facial attributes.
  3. Attribute Localization and Steering: By analyzing the Kullback-Leibler (KL) divergence between GMM components, we disentangle attributes like age, gender, and race based on their relative "expressivity" in the latent space.

During inference, the model "steers" the generation by localizing the means of noise tensors at a critical juncture (typically the 350th denoising step). This allows for balanced sampling across different attribute classes, ensuring that the final output distribution is equitable.

Overview of the diffusion-based generation process using the Gaussian Harmony framework.

Experimental Setup and Datasets

The effectiveness of Gaussian Harmony was evaluated on two benchmark datasets:

  • FFHQ (Flickr Faces HQ): Comprising 70,000 high-quality images, categorized into "Young" (<40) and "Old" (≥40).
  • FairFace: A dataset of 108,501 images specifically curated for racial diversity, which we further categorized by age, gender, and race (White, Black, and Other).
Demographic distributions of the FairFace and FFHQ datasets used for training and evaluation.

Key Insights

  • Bias is Algorithmic, Not Just Data-Driven: Even when trained on perfectly balanced data, diffusion models tend to introduce bias during the sampling process. This suggests that fairness must be addressed at the model level, not just through data curation.
  • Structured Latent Space: Sensitive attributes occupy distinct, localizable subspaces within the diffusion process, making targeted intervention possible.
  • Inference-Time Efficiency: Representational fairness can be achieved by manipulating noise during sampling, bypassing the need for expensive fine-tuning or retraining.

Results and Discussion

Gaussian Harmony significantly reduced demographic bias across age, gender, and race. In FairFace experiments, the method corrected the over-representation of younger and male faces, achieving near-parity in the generated distributions. Crucially, this was achieved while maintaining high image quality, as measured by Fréchet Inception Distance (FID) scores, which remained comparable to biased baselines.

Limitations

The approach currently relies on external classifiers (e.g., ResNet101) for attribute identification, which may introduce their own biases. Additionally, the study utilizes simplified binary or tripartite categories for complex human traits. Future research will focus on handling a broader spectrum of diversity and assessing the impact of "harmonized" synthetic data on downstream machine learning tasks.

Summary updated

BibTeX
@misc{pal2023gaussian,
  author = {Basudha Pal and Arunkumar Kannan and Ram Prabhakar Kathirvel and Alice J. O'Toole and Rama Chellappa},
  title = {{Gaussian Harmony: Attaining Fairness in Diffusion-based Face Generation Models}},
  year = {2023},
  eprint = {2312.14976},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2312.14976},
}
Figure