Auditing for Diversity Using Representative Examples

Vijay Keswani, L. Elisa Celis

Abstract

Auditing large-scale datasets for demographic diversity is a critical step in mitigating bias in machine learning. However, this process is often prohibitively expensive because protected attributes—such as gender, race, or dialect—are rarely labeled in massive datasets. This paper introduces DivScore, a cost-effective framework that approximates a dataset's demographic disparity using only a small, labeled "control set" and a similarity metric. By strategically selecting representative examples, the authors demonstrate that diversity can be accurately audited in millions of data points with as few as several dozen labels.

Introduction

Before deploying or even training a machine learning model, researchers must understand the composition of their training data. Biases in data—such as a search engine returning predominantly male results for the query "CEO" or a language model failing to represent diverse dialects—can lead to discriminatory outcomes.

Traditionally, the "gold standard" for auditing these biases is manual labeling via crowdsourcing. Unfortunately, this approach is slow, expensive, and fails to scale to the size of modern web-scale datasets. While one might consider using an automated classifier to predict these attributes, such classifiers often harbor their own internal biases, potentially masking the very disparities they are meant to detect. The authors address this challenge through unsupervised diversity auditing, seeking to estimate the "disparity" (the difference in proportions between groups) without exhaustive labeling or reliance on biased black-box models.

The DivScore Framework

The core of the proposed approach is a method called similarity bootstrapping. DivScore estimates the distribution of a large, unlabeled dataset ($S$) by comparing it to a tiny, labeled control set ($T$).

Methodology

  1. The Control Set ($T$): A small collection of labeled examples (e.g., 50 images) representing the target groups (e.g., Group A and Group B).
  2. Similarity Metric: A function to measure the distance between data points. For image data, the authors utilize cosine similarity on feature vectors from a pre-trained VGG-16 network; for text, they employ Word2Vec embeddings.
  3. The Algorithm: For every unlabeled item in the large dataset, DivScore calculates its average similarity to the groups in the control set. If an item is consistently more similar to Group A than to Group B, it contributes to the overall estimate that the dataset leans toward Group A.

Adaptive Selection

The paper introduces two versions of the algorithm:

  • DivScore-Random: Uses a control set sampled randomly from the population.
  • DivScore-Adaptive: Uses a novel selection strategy (Algorithm 2) to pick control set elements that are both "distinctive" (effective at differentiating groups) and "non-redundant" (covering diverse regions of the data distribution). This approach is inspired by Maximal Marginal Relevance (MMR) and aims to maximize the information gain from each labeled example.

Theoretical and Practical Insights

A key theoretical contribution of the paper is the proof that a control set of size $O(\log |S|)$—where $|S|$ is the total dataset size—is sufficient to achieve a small approximation error. This suggests that a million-row dataset can be audited with a surprisingly small number of labels.

Furthermore, the authors distinguish between individual classification accuracy and expectation accuracy. Unlike a standard classifier, which must be correct for every specific instance, DivScore only needs to be accurate on average. Even if the underlying similarity metric is relatively weak, the true disparity of the dataset emerges when averaged over the entire collection.

Experimental Evaluation

The authors validated DivScore across three distinct domains:

  • PPB-2017 (Pilots Parliamentary Benchmark): 1,270 portrait images labeled by gender and skin tone (Fitzpatrick scale). DivScore-Random provided near-perfect gender disparity estimates, while DivScore-Adaptive significantly reduced error margins for the more challenging attribute of skin tone.
  • CelebA: A large-scale face dataset where the authors audited 29 different facial attributes (e.g., eyeglasses, facial hair).
  • TwitterAAE: A collection of tweets filtered for African-American English (AAE) and White English (WHE) dialects. The success here demonstrated that the method is effective for text data using standard embeddings.

Discussion and Limitations

While DivScore offers a powerful tool for efficiency, the authors highlight several important considerations:

  • Binary Constraints: The current theoretical framework primarily focuses on binary protected attributes. While extensions to multi-group attributes are possible, they require further simulation.
  • Stereotyping Risks: There is a risk that an automated "adaptive" selection might favor stereotypical examples to maximize group differentiation. The authors advocate for human-in-the-loop curation and making control sets public to ensure transparency.
  • Embedding Dependence: The audit's accuracy is inherently tied to the quality of the underlying feature extractor. If the embedding space is blind to certain nuances, the audit will reflect those same blind spots.
  • Qualitative vs. Quantitative: DivScore is designed to measure representation (how many), not depiction (how they are portrayed). Qualitative audits still require human-centric analysis.

Conclusion

DivScore represents a significant step toward making dataset auditing accessible and scalable. By shifting the focus from individual classification to aggregate disparity estimation, the framework allows researchers to identify demographic imbalances in massive datasets with minimal manual effort. Its efficiency—linear $O(|S| \cdot |T|)$ relative to dataset size—makes it a practical choice for modern machine learning pipelines.

Summary updated

BibTeX
@inproceedings{keswani2021auditing,
  author = {Vijay Keswani and L. Elisa Celis},
  title = {{Auditing for Diversity Using Representative Examples}},
  booktitle = {ACM SIGKDD Conference on Knowledge Discovery and Data Mining},
  year = {2021},
  doi = {10.1145/3447548.3467433},
}
Figure