Contrastive learning has become a cornerstone of modern representation learning. The core intuition is elegant: take two different augmentations of the same image (a positive pair) and pull them together in the embedding space, while pushing away augmentations of different images (negative pairs). When data is uniformly distributed, this simple push-and-pull mechanism naturally organizes the latent space into a beautifully symmetric geometry where classes are cleanly separated.
However, real-world data is rarely uniform; it is frequently long-tailed, skewed, or heavily imbalanced. When contrastive learning algorithms are applied to these imbalanced datasets, the underlying mathematical assumptions break down. Instead of a well-distributed feature space, models suffer from severe representation distortion and, in extreme cases, total embedding collapse.
To understand why this happens, we must look under the hood at the optimization dynamics and the geometry of the loss function.
The Mechanics of Gradient Norm Disparity
The fundamental driver behind representation failure in imbalanced contrastive learning is a phenomenon known as gradient norm disparity.
In standard non-parametric contrastive objectives (such as InfoNCE or Supervised Contrastive Loss), the gradient updates are directly tied to sample frequency. As demonstrated by Cui et al., high-frequency "head" classes generate significantly steeper gradient norms than rare "tail" classes during optimization. Because the gradient signals from the majority classes are so overwhelming, the optimization process prioritizes minimizing the loss for these dominant categories. The learning signals from the tail classes are effectively drowned out, preventing the network's individual neurons from specializing in rare features (Liao et al.).
This imbalance is exacerbated by how positive and negative pairs are formed in a batch. As Zhang et al. observe, head classes have an abundance of distinct same-class neighbors to pull from, creating a robust, semantically driven attractive force. In contrast, tail classes have very few same-class neighbors. Their optimization is driven almost entirely by self-augmentation (contrasting two views of the exact same instance). This mathematical disparity forces rare categories to rely on low-level visual shortcuts—like color or texture—rather than learning robust semantic features.
Geometric Collapse on the Hypersphere
When the optimization process heavily favors majority classes, the physical layout of the embedding space becomes severely distorted.
Contrastive loss functions typically optimize for sample-level uniformity across a hypersphere. However, as Zhou et al. show, this uniform allocation occurs proportionally to class frequency. Because head classes dominate the sampling process, they exert an overwhelming repulsive force that expands their own territory on the hypersphere, crowding out rare classes (Zhu et al.).
Balanced Data Geometry:
[Class A] <---> [Class B] <---> [Class C]
(Equal, symmetric separation)
Imbalanced Data Geometry:
[ Class A (Head) ] -> [] []
^ ^
Collapsed Tail Classes squeezed into overlapping regions
This crowding forces minority classes into tiny, overlapping regions of the embedding space. In highly skewed or binary imbalanced settings (such as medical diagnosis datasets), this imbalance can lead to a catastrophic failure mode: representation collapse. As documented by Mildenberger et al. and Kara et al., the majority class can completely dominate the gradient, forcing the model to map all samples—regardless of their actual class—to a single point in the embedding space.
Furthermore, the mathematical structure of standard contrastive objectives introduces an inherent cluster enforcement bias. As Thanh-Dat Truong demonstrates, the strength of cluster enforcement in these loss functions is often inversely proportional to the number of samples per class. This mathematical quirk results in highly rigid, compact clusters for majority classes, while minority classes remain scattered, fragmented, and poorly defined in the latent space.
Restoring Symmetry via Prototypes and Decoupling
To combat this representation disparity, recent research focuses on rebalancing the optimization forces and enforcing geometric symmetry.
Parametric Class Centers
One of the most effective solutions is to shift from non-parametric instance comparison to parametric contrastive learning. Instead of contrasting a sample against an imbalanced pool of other samples, Cui et al. introduce learnable class centers (prototypes) directly into the contrastive framework.
By calculating contrastive forces relative to these centers rather than individual instances, the framework decouples the loss from raw sample frequencies. Gill et al. demonstrate that anchoring the space with fixed or learnable prototypes mathematically forces the model toward a "neural collapse" geometry—a perfectly symmetrical regular simplex where every class center is equidistant from every other center, preserving distinct boundaries for rare categories.
Force Equalization
Another angle of attack involves explicitly balancing the attractive and repulsive forces within the loss function. For instance, Wang et al. propose equalizing the weight of positive and negative pairs to prevent the sheer volume of negative pairs from overwhelming the optimization.
Similarly, Zhu et al. utilize class-averaging mechanisms to ensure that each category, whether it contains ten samples or ten thousand, exerts an identical repulsive force on the rest of the embedding space.
By neutralizing the gradient norm disparity and protecting the geometric territory of minority classes, these architectural adjustments allow contrastive learning to retain its powerful representation-mapping capabilities, even when the underlying data distribution is profoundly skewed.
Key Foundational Work
Parametric Contrastive Learning (2021) — contributed 3 concept elements to this direction.
Balanced Contrastive Learning for Long-Tailed Visual Recognition (2022) — contributed 2 concept elements to this direction.
Generalized Parametric Contrastive Learning (2022) — contributed 2 concept elements to this direction.