Introduction
Contrastive Learning (CL) has established itself as a cornerstone of modern visual representation learning. Traditionally, CL relies on a binary classification of image pairs: "positive" pairs consist of different views of the same image or images from the same class, while "negative" pairs are pushed apart in the feature space. This paper argues that this rigid dichotomy is overly restrictive and leads to dimensional collapse, where models ignore feature diversity and concentrate information into a few dominant dimensions, ultimately hindering generalization.
The SimLAP Framework
The authors introduce SimLAP (Universal Contrastive Learning) and its variant, Hydra, to challenge the assumption that positive pairs must be semantically similar. The core innovation is a Feature Filter mechanism that allows any two samples in a batch to function as a positive pair.
Methodology
- Arbitrary Positive Pairs: SimLAP permits pairing disparate objects (e.g., a snake and a lamp).
- Subspace Learning: Instead of forcing global identity, a small MLP (the Feature Filter) generates a "gate vector" based on class labels. This gate selectively activates specific dimensions of the feature representation.
- Gating Mechanism: This creates a unique subspace where disparate objects share commonalities—such as curved shapes or textures—allowing the model to optimize these shared features without collapsing the entire representation.
- Universal Contrastive Loss: The standard InfoNCE loss is applied within these dynamically generated, label-guided subspaces.
Key Insights
Commonalities in the Inscrutable
A significant finding is that even for pairs humans might find "inscrutable," such as a garter snake and a table lamp, pre-trained models already possess dimensions where these objects are similar. SimCLR Hydra explicitly mines these hidden connections. As shown in the similarity distributions, the model successfully identifies high-similarity subspaces for disparate pairs that would otherwise be treated as negatives in standard CL.
Preventing Dimensional Collapse
By forcing the model to utilize its full capacity to find commonalities across a massive variety of arbitrary pairs, SimLAP effectively mitigates dimensional collapse. In experiments on the IN1P dataset (a focused dog-breed subset), standard SimCLR performance declined after 3,000 epochs due to collapse, whereas SimLAP continued to improve even after 20,000 epochs.
Experimental Results
- Transfer Learning: SimLAP-MoCo achieved an average accuracy of 94.0% across six classification tasks (including CIFAR and Oxford Pets), outperforming or tying established baselines like MoCoV3.
- ViT Scaling: The Hydra variant showed remarkable gains for Vision Transformers. For ViT-tiny, Hydra reached 82.56% on CIFAR-10, significantly higher than the 76.94% achieved by supervised training.
- Robustness to Semantic Distance: In the IN25 experiments, which test models on increasing semantic distance between pairs, SimLAP remained stable while Supervised Contrastive Learning (SupCon) performance plummeted.
Conclusion and Future Work
SimLAP demonstrates that "positive" is a relative term. By allowing the model to find shared subspaces between disparate objects, we can learn more robust and transferable features. While current versions rely on class labels or pseudo-labels, future work aims to scale this approach using auxiliary information like text captions to identify shared subspaces without categorical constraints.
Summary updated