Abstract: Contrastive learning demonstrates great promise for representation learning. Data augmentations play a critical role in contrastive learning by providing informative views of the data without necessitating explicit labels. Nonetheless, the efficacy of current methodologies heavily hinges on the quality of employed data augmentation (DA) functions, often chosen manually from a limited set of options. While exploiting diverse data augmentations is appealing, the complexities inherent in both DAs and representation learning can lead to performance deterioration. Addressing this challenge and facilitating the systematic incorporation of diverse data augmentations, this paper proposes Contrastive Learning with Consistent Representations (CoCor). At the heart of CoCor is a novel consistency metric termed DA consistency. This metric governs the mapping of augmented input data to the representation space. Moreover, we propose to learn the optimal mapping locations as a function of DA. Experimental results demonstrate that CoCor notably enhances the generalizability and transferability of learned representations in comparison to baseline methods.
Introduction
In standard self-supervised contrastive learning frameworks like MoCo or SimSiam, models are trained to achieve invariance. The objective is to map different "views" of the same image—regardless of whether the distortion is a slight crop or a heavy rotation—to the same point in the representation space.
However, this "augmentation-agnostic" approach has significant drawbacks. By forcing a model to ignore massive visual distortions, researchers often encounter performance degradation and dimensional collapse, where the model stops utilizing its full feature space to satisfy the rigid requirement that all views be identical. Furthermore, this necessitates a narrow, manually curated set of "safe" augmentations to avoid confusing the model.
The CoCor Framework
CoCor (Contrastive Learning with Consistent Representations) shifts the paradigm from invariance to DA consistency. Instead of treating all augmentations as equal, CoCor enforces a structured relationship: stronger image distortions should result in representations that are proportionally further from the original in the latent space.
Monotonic Mapping Neural Network (MMNN)
To implement this, the authors introduce a Monotonic Mapping Neural Network (MMNN). This auxiliary network takes "composition vectors"—which track the type and intensity of 14 basic augmentations (e.g., Rotate, Solarize, Sharpness)—and predicts the optimal similarity for that specific view.
Crucially, the MMNN utilizes monotonic layers to ensure that adding more augmentations always results in a lower predicted similarity. The system employs a bi-level optimization strategy: the main image encoder is trained on unlabeled data, while the MMNN is tuned using a minimal amount of labeled data (as little as 0.1%) to find the similarity mappings that best serve downstream tasks.
Key Results and Insights
CoCor demonstrates that allowing representations to vary predictably based on augmentation strength prevents feature collapse and captures richer data geometry.
- State-of-the-Art Performance: On ImageNet-100, SimSiam integrated with CoCor achieved 83.70% accuracy, a significant improvement over the 73.92% baseline.
- Enhanced Transferability: In fine-grained classification tasks like CUB-200 (Birds), CoCor boosted SimSiam's performance from 26.13% to 34.50%, indicating that the learned features are more semantically robust.
- Improved Retrieval: Qualitative analysis of nearest neighbors shows that CoCor-trained models are less distracted by low-level visual cues (like color) and focus more on latent semantics, such as the specific species of a flower or bird.
Conclusion
By replacing forced invariance with learned consistency, CoCor enables the use of diverse and strong data augmentations without the risk of dimensional collapse. While the method introduces a slight computational overhead (1.3x to 1.5x training time), the gains in generalizability and label efficiency make it a powerful advancement for self-supervised representation learning. Future work may explore data-dependent MMNNs that adjust similarity targets based on specific image content.
Summary updated