Machine Learning

Contrastive Learning

A self-supervised technique where the model learns by comparing similar (positive) and dissimilar (negative) pairs of examples. It learns representations where similar items are close and different items are far apart.

Why It Matters

Contrastive learning produces excellent embeddings without labeled data. It powers image search, recommendation systems, and multimodal models like CLIP.

Example

Training a model with pairs: the same image with two different crops (positive pair) vs two completely different images (negative pair). The model learns to recognize same-content variations.

Think of it like...

Like a wine tasting where you compare similar wines side by side to notice subtle differences, and then compare with completely different wines to understand major distinctions.

Related Terms