NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

An Investigation of Representation and Allocation Harms in Contrastive Learning

Subha Maity, Mayank Agarwal, Mikhail Yurochkin, Yuekai Sun

Introduction

Most research on algorithmic bias has historically focused on allocation harms—the visible disparities in how a model treats different groups, such as higher loan rejection rates for specific demographics. However, as machine learning increasingly relies on self-supervised learning (SSL), models are often trained on massive, uncurated, and imbalanced datasets to learn general-purpose representations before ever being fine-tuned for a downstream task.

This paper identifies a critical gap in our understanding of fairness in SSL: representation harms. This phenomenon occurs when underrepresentation in the initial unlabeled data warps the geometry of the embedding space. If a minority group loses its unique identity in the embedding space by collapsing into a similar majority group, no amount of downstream "fairness fixing" at the classifier level can fully recover that lost information. The authors demonstrate that Contrastive Learning (CL), a popular variant of SSL, is particularly susceptible to this "erasure" of minority groups.

Methodology

The researchers employ a comprehensive three-pronged approach to investigate and quantify representation harm:

  1. Empirical Investigation: The authors train popular CL models (SimCLR and SimSiam for images; SimCSE for text) on imbalanced versions of standard datasets. They introduce a novel Representation Harm (RH) metric, based on average cosine distances, to quantify the extent to which a minority group's representation merges with a majority group.
  2. Theoretical Analysis: Utilizing a Stochastic Block Model (SBM), the paper analyzes the asymptotic behavior of the contrastive loss. The authors extend the concept of "neural collapse" to imbalanced settings, proving mathematically that while balanced data leads to a symmetric geometry, imbalanced data forces minority groups to collapse toward semantically similar (or "connected") majority groups.
  3. Causal Mediation Analysis (CMA): To definitively link representation flaws to downstream errors, they use CMA to decompose the "Total Effect" of underrepresentation into a direct effect (flaws in the classifier) and an indirect effect (flaws in the underlying representation).

Datasets

The study validates its claims across both controlled and real-world datasets:

  • CIFAR10: Used for controlled image studies. The authors simulate underrepresentation by drastically subsampling specific classes (e.g., reducing "automobile" to 1% of its original size) while keeping others at 100%.
  • BIASBIOS: A real-world text dataset of approximately 400k professional biographies. It contains natural imbalances in both occupation (e.g., many professors, few rappers) and gender within those occupations (e.g., 85% of surgeons are male).

Key Findings

The "Stereotyping" Effect and Connectivity

Representation harm is not merely random noise; it manifests as a form of mathematical stereotyping. Minority samples are lumped together with a similar majority group, erasing their unique characteristics. Crucially, the theoretical model shows that this collapse only happens between groups that share semantic similarity. A totally unique minority group suffers less representation harm than one that shares features with a majority group.

Geometry of Collapse

In the CIFAR10 experiments, when "automobiles" are artificially underrepresented, they lose their distinct cluster and merge into the "trucks" cluster.

Visualizing representation collapse in CIFAR10, where underrepresented automobiles (crosses) merge with trucks (red dots).

This visual collapse is backed by the quantitative RH metric. The RH metric between automobiles and trucks drops significantly to 0.78, indicating a severe merge in the embedding space.

Representation Harm (RH) metric heatmap for CIFAR10. The dark red cell (0.78) indicates a significant merge between underrepresented automobiles and trucks.

Similar stereotyping effects were observed in the BIASBIOS dataset, where female attorneys' embeddings were found to be closer to female paralegals than to male attorneys.

Through causal mediation, the authors provide an "aha" moment: representation harm is partly responsible for downstream misclassification. The Natural Indirect Effect (NIE)—the portion of error caused specifically by the representation—was found to be significant. For example, in the "deer" class, representation harm caused a 15.5% reduction in accuracy that could not be attributed to the classifier head alone. Even with a perfectly fair classifier, the system remains fundamentally biased if the underlying features are collapsed.

Limitations and Future Directions

The authors note that their theoretical analysis relies on a "layer-peeled" assumption (optimizing representations directly), which simplifies the complex dynamics of deep neural networks.

More importantly, mitigating these harms remains an open challenge. The authors tested "Boosted Contrastive Learning" (BCL), a state-of-the-art method for imbalanced SSL. While it offered slight improvements, it failed to completely eliminate representation harm. Furthermore, current solutions often require explicit group labels, contradicting the unsupervised nature of contrastive learning. Future work must explore structural interventions on the similarity graph or develop SSL methods capable of protecting minority clusters without relying on explicit demographic labels.

Summary updated

BibTeX
@inproceedings{maity2024investigation,
  author = {Subha Maity and Mayank Agarwal and Mikhail Yurochkin and Yuekai Sun},
  title = {{An Investigation of Representation and Allocation Harms in Contrastive Learning}},
  booktitle = {International Conference on Learning Representations},
  year = {2024},
  url = {https://openreview.net/forum?id=q4SiDyYQbo},
}
Figure