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

TL;DR

Self-supervised contrastive learning (CL) models trained on imbalanced data suffer from "representation harm," where minority group embeddings collapse into semantically similar majority groups. Using causal mediation analysis and graph theory, this paper proves that this representational collapse directly drives downstream classification errors and algorithmic biases, revealing that current mitigation strategies fall short.

What Problem Does This Paper Address?

Self-supervised learning (SSL) has revolutionized machine learning by enabling models to train on massive, uncurated datasets scraped from the internet. However, these web-scale datasets are inherently imbalanced, containing severe underrepresentation of certain demographic groups or object classes.

While the negative impacts of underrepresentation are well-documented in supervised learning, they remain poorly understood in SSL. This paper addresses this gap by investigating how group underrepresentation affects contrastive learning (CL)—a popular SSL variant. Specifically, the authors explore how data imbalance distorts the geometry of learned embedding spaces and how these distortions causally impact downstream tasks, leading to unfair resource allocation or classification errors.

Methods

The authors combine empirical machine learning workflows with rigorous statistical and graph-theoretic frameworks:

  1. Empirical Evaluation of CL Frameworks: The authors evaluate popular CL frameworks, including SimCLR and SimSiam for computer vision, and SimCSE for natural language processing.
  2. Representation Harm (RH) Metric: They introduce a quantitative metric based on average cosine distances to measure how much a minority group's embedding space shifts toward a majority group when its training data is restricted.
  3. Causal Mediation Analysis (CMA): To prove that downstream classification errors (allocation harm) are directly caused by distorted embeddings, the authors use CMA. This allows them to decompose the total downstream error into a direct effect of data scarcity and an indirect effect mediated specifically by the corrupted representations.
  4. Stochastic Block Model (SBM): To provide a theoretical foundation, the authors model sample similarities as a graph using an SBM. This allows them to mathematically analyze the phenomenon of "neural collapse" under severe dataset imbalance.

Datasets

The study evaluates representation harms across two primary benchmarks:

  • CIFAR10: A standard image dataset used for a controlled study. The authors simulate underrepresentation by systematically subsampling a target class (e.g., automobiles) down to 1% or 5% of its original size during CL pre-training.
  • BIASBIOS: A real-world natural language processing dataset containing approximately 400,000 online professional biographies. It features natural imbalances across 28 occupations and exhibits strong societal gender stereotypes (e.g., a high percentage of male surgeons vs. female nurses).

Key Insights and Ideas

  • Stereotyping in Embedding Space: Underrepresented groups do not simply become scattered or noisy in the embedding space. Instead, they actively collapse into semantically similar majority groups. For example, when images of automobiles are scarce, their representations are completely swallowed by the "truck" cluster.
  • Asymmetric Neural Collapse: Prior theoretical work on contrastive learning showed that balanced datasets cause representations to collapse into a perfectly symmetric geometric structure (a simplex). This paper proves that data imbalance warps this geometry into an asymmetric structure dictated by the degree of underrepresentation and the semantic connectivity between groups.
  • The Causal Pipeline of Bias: Downstream classifier heads inherit bias directly from the representation layer. The causal mediation analysis confirms that representation harm is explicitly responsible for a significant portion of downstream misclassifications.
  • The Failure of Current Mitigations: Existing fairness techniques, such as Boosted Contrastive Learning (BCL), fail to completely eliminate representation harm, meaning minority groups still suffer non-trivial drops in downstream accuracy.

Key Results

Image Domain (CIFAR10)

When the "automobile" class is restricted to 1% of the training data, its embeddings collapse into the "truck" class, yielding a Representation Harm metric of 0.78 (where a value below 1.0 indicates representational collapse).

tSNE visualization of representation collapse

Causal mediation analysis shows that this representation harm accounts for up to 6.2% of downstream misclassifications (the Natural Indirect Effect).

Figure 2: Representation harms in CIFAR10 over 10 repetitions.

Text Domain (BIASBIOS)

In the naturally imbalanced biography dataset, the Gender Representation Harm (GRH) metric reveals distinct stereotyping. For instance, the embeddings of female attorneys collapse significantly closer to female paralegals than to male attorneys (GRH = 0.94), mirroring real-world occupational stereotypes.

Figure 3: Gender RH in BIASBIOS dataset.

Theoretical Verification

The SBM simulations mathematically mirror these empirical findings: as a group's sample size ($n$) drops, its cosine similarity to a connected majority group drastically increases, confirming that representation harm is an intrinsic property of the contrastive loss function under imbalance.

Limitations and Future Work

The primary limitation highlighted by the authors is that current algorithmic fixes for representation harm—such as loss reweighting or graph connectivity adjustments—rely heavily on explicit group annotations (labels) during the self-supervised pre-training phase. Requiring these labels defeats the core purpose of self-supervised learning, which aims to leverage massive amounts of unlabeled data.

The authors suggest that future research should focus on developing fully unsupervised mitigation techniques that can automatically detect and counteract representation collapse using proxies for group structure rather than explicit human annotations.

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