Abstract
Although an object may appear in numerous contexts, we often describe it in a limited number of ways. Language allows us to abstract away visual variation to represent and communicate concepts. Building on this intuition, we propose an alternative approach to visual representation learning: using language similarity to sample semantically similar image pairs for contrastive learning. Our approach diverges from image-based contrastive learning by sampling view pairs using language similarity instead of hand-crafted augmentations or learned clusters. Our approach also differs from image-text contrastive learning by relying on pre-trained language models to guide the learning rather than directly minimizing a cross-modal loss. Through a series of experiments, we show that language-guided learning yields better features than image-based and image-text representation learning approaches.
Introduction
Self-supervised learning (SSL) has revolutionized visual representation learning by enabling models to learn from unlabeled data. Most contemporary SSL methods rely on instance discrimination, where a model learns to recognize different augmentations of the same image as semantically identical. While effective, this approach is limited to learning visual invariances—such as rotation or cropping—rather than conceptual relationships. For example, two distinct images of "snowy owls" are treated as negatives in standard SSL, despite representing the same concept.
This paper introduces Language-Guided Contrastive Learning (LGSimCLR), a method that leverages the semantic richness of natural language to guide visual learning. By using language similarity to sample positive pairs for contrastive learning, the authors bridge the gap between low-level visual invariance and high-level conceptual similarity.
Methodology: Language-Guided Sampling
The core innovation of LGSimCLR is the transition from image-based augmentations to language-based sampling. The process consists of three main stages:
- Caption Embedding: Using a large-scale captioned dataset (e.g., RedCaps), captions are mapped into a high-dimensional vector space using a pre-trained, frozen language model like SBERT.
- Nearest Neighbor Sampling: For each image, the system identifies other images in the dataset whose captions are semantically closest in the embedding space. These pairs are designated as "positive pairs."
- Contrastive Training: A visual backbone (ResNet-50) is trained using a SimCLR-style contrastive loss. Unlike standard SimCLR, which pulls together two views of the same image, LGSimCLR pulls together the embeddings of these semantically related pairs.
Notably, this approach requires significantly less data augmentation. Because the sampled pairs naturally vary in pose, lighting, and background, the model learns robust features without the need for aggressive color jittering or other hand-crafted distortions.
Experimental Results
The authors evaluated LGSimCLR across 15 downstream classification tasks, comparing it against standard SSL (SimCLR) and image-text models (CLIP) trained on the same data (RedCaps, CC3M, and CC12M).
Linear Probing and Few-Shot Learning
LGSimCLR demonstrated superior performance in linear probing, achieving a mean accuracy of 78.2% across 15 tasks, significantly outperforming standard SimCLR (68.5%) and CLIP (72.9%). The advantages were even more pronounced in few-shot scenarios. In 5-way 5-shot settings, LGSimCLR reached 82.5% mean accuracy, while SimCLR trailed at 66.7%.
Fine-Grained Classification
The method excels at fine-grained tasks where subtle conceptual differences matter. On the Stanford Cars dataset, LGSimCLR achieved 62.3% accuracy, nearly doubling the performance of SimCLR (33.7%). This suggests that language provides a critical signal for distinguishing between closely related categories that might look visually similar but are conceptually distinct.
Discussion and Limitations
The success of LGSimCLR highlights that language can serve as a powerful "guide" for visual learning without requiring the model to map images and text into the same space. By using language to curate training data, the model implicitly learns to focus on the objects described while ignoring irrelevant background clutter.
However, the method is not without limitations:
- Caption Quality: It is inherently dependent on the quality of captions. Vague or noisy descriptions (e.g., "I found this in the garden") can lead to poor sampling.
- Context Dependency: Captions are subjective; different observers might describe the same scene differently, leading to inconsistent sampling.
- Data Requirements: Unlike pure SSL, this requires a captioned dataset, which is more expensive to collect than raw unlabelled images.
Conclusion
LGSimCLR represents a shift in how we think about supervision in computer vision. By moving beyond simple instance discrimination and leveraging the abstraction inherent in human language, we can learn visual representations that are more robust, conceptually aware, and transferable to a wide range of downstream tasks.
Summary updated