Quality-Diversity Generative Sampling for Learning with Synthetic Data

Allen Chang, Matthew C. Fontaine, Serena Booth, Maja J. Mataric, Stefanos Nikolaidis

Abstract

Generative models can serve as surrogates for some real data sources by creating synthetic training datasets, but in doing so they may transfer biases to downstream tasks. We focus on protecting quality and diversity when generating synthetic training datasets. We propose quality-diversity generative sampling (QDGS), a framework for sampling data uniformly across a user-defined measure space, despite the data coming from a biased generator. QDGS is a model-agnostic framework that uses prompt guidance to optimize a quality objective across measures of diversity for synthetically generated data, without fine-tuning the generative model. Using balanced synthetic datasets generated by QDGS, we first debias classifiers trained on color-biased shape datasets as a proof-of-concept. By applying QDGS to facial data synthesis, we prompt for desired semantic concepts, such as skin tone and age, to create an intersectional dataset with a combined blend of visual features. Leveraging this balanced data for training classifiers improves fairness while maintaining accuracy on facial recognition benchmarks.

Introduction

Generative models like StyleGAN2 are powerful tools for creating synthetic training data, but they often act as mirrors of their training data—which is frequently biased. For example, the popular FFHQ face dataset contains roughly seven light-skinned faces for every one dark-skinned face. When these models are used to generate synthetic training data, downstream classifiers inherit these "representational biases."

Standard sampling methods tend to "collapse" onto the most common modes of the data. While previous attempts to fix this usually focus on one attribute at a time, this paper addresses the challenge of generating intersectional synthetic data. QDGS aims to find rare combinations of features (like "elderly" + "dark skin tone" + "feminine") that are buried deep within a model's latent space but are rarely seen in random samples.

Methodology: Quality-Diversity Generative Sampling

QDGS treats data generation as a search problem rather than a random draw. It combines two core concepts:

  1. Quality-Diversity (QD) Optimization: Instead of just finding the single "best" sample, QD algorithms (specifically CMA-MAEGA) aim to find the highest-quality sample for every cell in a multi-dimensional "measure space." Imagine a grid where one axis is skin tone and another is age; QDGS attempts to find a high-quality image for every single square in that grid.
  2. Prompt Guidance (CLIP): To navigate the latent space without manual labeling, the authors use CLIP (Contrastive Language-Image Pre-training). "Quality prompts" (e.g., "a detailed photo") maximize image clarity, while "measure prompts" (e.g., "dark skin tone," "long hair") define the axes of diversity.
The QDGS framework uses language-guided optimization to explore a generative model's latent space across a multi-dimensional measure space.

Crucially, QDGS is model-agnostic and requires no fine-tuning of the generator. It simply explores the existing latent space more effectively by acting as a specialized "flashlight" to find hidden regions.

Experimental Results

The paper evaluates QDGS across two domains: color-biased shapes and facial recognition. In the shape task, QDGS improved classification accuracy on a fair evaluation set by up to ~27% compared to models trained on biased random samples.

Accuracy gains on color-biased shape classification tasks when augmenting real data with QDGS-generated synthetic samples.

In facial recognition experiments using StyleGAN2 trained on FFHQ, QDGS significantly shifted the data distribution. It increased the proportion of dark-skinned faces in the synthetic set from 9.4% (random) to 25.2%, and elderly faces from 37.0% to 45.7%. This more uniform training distribution improved fairness on the RFW (Racial Faces in-the-Wild) benchmark, increasing accuracy on dark-skinned faces from 88.08% to 88.94%.

Discussion and Limitations

QDGS demonstrates that latent spaces are often richer than they appear; the capability to generate underrepresented groups often exists even if the model rarely outputs them. By defining multi-dimensional grids, QDGS ensures synthetic data covers complex combinations of features that single-factor debiasing methods miss.

However, the method has limitations. QDGS cannot generate what isn't there; if a model has "mode dropped" an attribute entirely during training, it cannot be recovered. Additionally, latent attributes can be "entangled," where changing one feature (like pose) might unintentionally affect another (like age). Future research will focus on better decoupling these attributes and refining prompt sensitivity to avoid extreme out-of-distribution results.

Summary updated

Abstract

Generative models can serve as surrogates for some real data sources by creating synthetic training datasets, but in doing so they may transfer biases to downstream tasks. We focus on protecting quality and diversity when generating synthetic training datasets. We propose quality-diversity generative sampling (QDGS), a framework for sampling data uniformly across a user-defined measure space, despite the data coming from a biased generator. QDGS is a model-agnostic framework that uses prompt guidance to optimize a quality objective across measures of diversity for synthetically generated data, without fine-tuning the generative model. Using balanced synthetic datasets generated by QDGS, we first debias classifiers trained on color-biased shape datasets as a proof-of-concept. By applying QDGS to facial data synthesis, we prompt for desired semantic concepts, such as skin tone and age, to create an intersectional dataset with a combined blend of visual features. Leveraging this balanced data for training classifiers improves fairness while maintaining accuracy on facial recognition benchmarks. Code available at: https://github.com/Cylumn/qd-generative-sampling.
BibTeX
@inproceedings{chang2024quality,
  author = {Allen Chang and Matthew C. Fontaine and Serena Booth and Maja J. Mataric and Stefanos Nikolaidis},
  title = {{Quality-Diversity Generative Sampling for Learning with Synthetic Data}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2024},
  doi = {10.1609/aaai.v38i18.29955},
}
Figure