Matched sample selection with GANs for mitigating attribute confounding

Chandan Singh, Guha Balakrishnan, Pietro PeronaarXiv 2021

Abstract

Measuring algorithmic bias in computer vision is often hindered by confounding variables within real-world datasets. This paper proposes a novel framework to perform causal matching on image data by leveraging the latent spaces of Generative Adversarial Networks (GANs). By projecting images into a regularized StyleGAN2 space, the authors identify "matched pairs" that differ primarily in a protected attribute, such as perceived gender, while remaining similar in other semantic dimensions. Experimental results on facial recognition models demonstrate that significant gender bias persists even after dataset confounders are neutralized, indicating that algorithmic disparities are not merely a reflection of dataset imbalances.

Introduction

A central challenge in auditing computer vision models for fairness is the presence of confounding variables. For instance, if a dataset contains more female subjects wearing makeup or more male subjects in professional settings, a model's performance gap might be attributed to these secondary features rather than the protected attribute itself. Traditional statistical methods employ causal matching to isolate variables, but the high dimensionality of raw pixels makes direct matching nearly impossible. This research bridges this gap by using GANs to perform matching in a semantically meaningful latent space.

Methodology

The proposed method utilizes StyleGAN2 to represent images in a structured, low-dimensional environment.

Regularized GAN Projection

To ensure that the latent representations are useful for causal inference, the authors introduce a regularized projection technique. Standard GAN inversion often faces a trade-off between visual fidelity and semantic consistency. By applying a regularization penalty that keeps the expanded latent vector close to the restricted StyleGAN space, the authors achieve high-fidelity reconstructions that preserve critical semantic properties like pose, lighting, and age.

Matching Strategies

Once images are embedded, two matching strategies are employed to create balanced evaluation sets:

  1. GAN-distance matching: Identifying nearest neighbors in the latent space to find pairs with minimal semantic difference.
  2. Propensity-score matching: Training a logistic regression model on latent vectors to predict the protected attribute and matching images with similar scores.
Example of a matched pair across perceived gender, illustrating similar composition and lighting.

Results and Discussion

The effectiveness of the approach was validated using the CelebA-HQ dataset and several open-source facial recognition systems, including dlib, Inception ResNet v1, and CASIA-WebFace.

Covariate Balancing

The matching process successfully reduced distribution gaps for correlated attributes such as age, skin color, and expression. This created a "clean" environment for testing bias, where the primary difference between groups was the protected attribute.

Persistent Algorithmic Bias

Surprisingly, the study found that facial recognition models continued to perform significantly worse on female faces in the matched dataset. In some cases, the performance gap was even more pronounced than in the original, confounded dataset. This suggests that dataset imbalances can sometimes mask the true extent of algorithmic bias, and that the models themselves possess fundamental weaknesses in processing certain demographic groups.

Conclusion

This work demonstrates that GAN latent spaces are powerful tools for causal inference in computer vision. By isolating protected attributes through regularized projection and matching, researchers can more accurately measure and understand the roots of algorithmic bias. Future work may extend this technique to other domains, such as medical imaging, where disentangling complex features is critical for fair and reliable model deployment.

Summary updated

BibTeX
@misc{singh2021matched,
  author = {Chandan Singh and Guha Balakrishnan and Pietro Perona},
  title = {{Matched sample selection with GANs for mitigating attribute confounding}},
  year = {2021},
  eprint = {2103.13455},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2103.13455},
}
Figure