Imagine showing a model two photos of the same dog, one cropped and one recolored, and telling it “these match,” then showing it a photo of a cat and saying “this one doesn’t.” Repeated millions of times, the model learns features that capture what makes images alike. The same idea works across types of data: OpenAI’s CLIP learned to match images with their captions from hundreds of millions of image-text pairs found online.
Because the “match” pairs can often be created automatically, for example by cropping the same image two ways, contrastive learning is a common form of self-supervised learning that needs little hand-labeled data.
Why it matters
Contrastive training is behind many embedding models that power semantic search, recommendations and retrieval for AI assistants, where the goal is to find items that mean the same thing even when the words differ.
No published Chain of Thought episode discusses contrastive learning directly yet, so this entry relies on the papers below.
Related terms
Embeddings are the representations contrastive learning produces. Self-supervised learning is the broader training approach.
Sources
- Chen et al.: A Simple Framework for Contrastive Learning of Visual Representations (SimCLR) — Learns image representations by pulling together two augmented views of the same image and pushing apart views of different images, without labels; checked October 24, 2026.
- Radford et al.: Learning Transferable Visual Models From Natural Language Supervision (CLIP) — Trains image and text encoders contrastively to predict which caption goes with which image, using 400 million image-text pairs; checked October 24, 2026.