Multimodal / Objectives
verifiedContrastive Learning
Instead of predicting a label, learn by telling matched pairs apart from mismatched ones. Pull the representations of things that belong together closer, push everything else away. No annotation is needed — the pairing itself is the supervision, and it can come from a caption, a crop, or the next second of audio.
Score every pair in a batch and treat the diagonal as correct, so a batch of size B gives B positives and B²−B negatives for free. Batch size is therefore not a tuning knob but part of the objective: more negatives sharpen the task, which is why these methods are trained at batch sizes that need distributed accumulation.
InfoNCE: ℓ = −log[exp(s(x,y⁺)/τ) / Σ sub j exp(s(x,y sub j )/τ)], a softmax cross-entropy over one positive and the batch's negatives. It lower-bounds the mutual information between the paired views, and the bound is capped by log B — so a small batch limits what the objective can express regardless of the model.
8 values. The left group decays steeply; the right group is 12% of the way to flat, and reads flatter than the left.
Similarity scores across a batch, positives against negatives. Drag the temperature to watch the objective sharpen or flatten.
Reviewed by opendroid · 2026-08-04
- arXiv:1807.03748 — Representation Learning with Contrastive Predictive Coding
- arXiv:2002.05709 — A Simple Framework for Contrastive Learning of Visual Representations