A Multidimensional Analysis of Social Biases in Vision Transformers

Jannik Brinkmann, Paul Swoboda, Christian Bartelt

Abstract

Vision Transformers (ViTs) have become a cornerstone of modern computer vision, yet they are susceptible to encoding human-like social biases during pre-training. This study investigates how training objectives, model scale, and data composition influence these biases. By evaluating models using the Image Embedding Association Test (iEAT) and implementing Counterfactual Data Augmentation (CDA), the researchers demonstrate that discriminative training objectives and larger model scales generally reduce bias. However, the study also reveals that models trained on identical datasets can exhibit divergent biases based on their specific training goals, highlighting the complex interplay between architecture and social representation.

Introduction

As Vision Transformers (ViTs) increasingly replace convolutional neural networks in various applications, understanding their internal representations becomes paramount. Like their predecessors, ViTs are prone to "baking in" social biases—such as gender-career or racial associations—from their training data. These biases in the embedding space can propagate to downstream tasks, potentially leading to discriminatory outcomes in real-world deployments. This paper provides a comprehensive analysis of the factors contributing to these biases and explores methods for their mitigation.

Methodology: Measuring and Mitigating Bias

The primary tool for bias evaluation in this study is the Image Embedding Association Test (iEAT). This test quantifies the differential association between target concepts (e.g., "Male" vs. "Female") and attributes (e.g., "Career" vs. "Family") by calculating the cosine similarity between their respective vectors in the model's embedding space.

Visualization of the Image Embedding Association Test (iEAT) showing the relationship between gendered concepts and career/family attributes in the embedding space.

To address these biases, the authors propose Counterfactual Data Augmentation (CDA). This pipeline involves generating gender-balanced versions of existing datasets:

  1. Captioning: Using BLIP and CLIP to describe images from ImageNet.
  2. Editing: Swapping gendered terms in the captions (e.g., changing "man" to "woman").
  3. Inpainting: Utilizing Stable Diffusion with CLIPSeg guidance to modify the original images to align with the new, counterfactual captions.

The study systematically compares three dimensions: training objectives (discriminative vs. generative), model scale (parameter count and resolution), and data composition (standard vs. augmented).

Key Insights: The Role of Objectives and Scale

The research yields several critical insights into how ViTs represent social information:

1. Training Objectives Drive Bias

A significant finding is that discriminative models (e.g., DINO, MoCo), which learn by contrasting different views of an image, typically exhibit lower bias than generative models (e.g., MAE, BEiT). Generative objectives require the model to reconstruct masked portions of an image, which may force the model to rely more heavily on spurious correlations and stereotypical patterns present in the training data to "fill in the blanks."

2. Divergent Biases from Identical Data

Perhaps most surprisingly, the study found that two models trained on the exact same dataset can develop opposite biases if their training objectives differ. For instance, while one model might associate a specific demographic with a positive attribute, another model trained on the same data with a different objective might show the reverse association. This indicates that bias is not merely a reflection of data co-occurrence but is deeply influenced by the learning task itself.

3. Scaling as a Mitigant

Increasing model size and input resolution consistently correlates with reduced bias magnitudes. Larger models appear to capture more complex semantic nuances, which may reduce their reliance on the simplistic, biased shortcuts that smaller models often adopt.

4. Layer-wise Bias Emergence

The authors observed that biases related to low-level features, such as skin tone, manifest in the early layers of the network. In contrast, more abstract "semantic" biases, such as gender-career associations, diverge in the later layers as the model constructs higher-level conceptual representations.

Results and Trade-offs

The implementation of CDA successfully reduced gender bias; for example, the iEAT effect size for the BEiT model dropped from 0.65 to 0.45. However, this mitigation often came with a "fairness-accuracy trade-off," where downstream performance on tasks like CIFAR-10 classification saw a slight decrease (from 87.5% to 84.8%).

Furthermore, discriminative models like ViT-DINO-B and ViT-MSN-B demonstrated superior robustness, showing fewer statistically significant biases across 15 different association tests compared to generative models like MAE.

Conclusion and Future Directions

While scaling and counterfactual augmentation are effective tools for reducing social bias in ViTs, they do not eliminate it entirely. The study underscores the importance of considering training objectives as a primary factor in model fairness. Future research should focus on developing architecture-specific debiasing techniques and investigating why discriminative objectives are inherently more resistant to social bias. For practitioners, these findings highlight the need to balance performance, model size, and fairness when selecting pre-trained backbones for downstream applications.

Summary updated

BibTeX
@inproceedings{brinkmann2023multidimensional,
  author = {Jannik Brinkmann and Paul Swoboda and Christian Bartelt},
  title = {{A Multidimensional Analysis of Social Biases in Vision Transformers}},
  booktitle = {IEEE/CVF International Conference on Computer Vision},
  year = {2023},
}
Figure