CLIP (Contrastive Language–Image Pretraining) trains a joint image-text embedding space by maximizing similarity of matching image-text pairs while minimizing similarity of non-matching pairs. The InfoNCE loss treats each batch of N pairs as N classification problems. This shared space enables zero-shot transfer to any image classification task.
Batch similarity matrix - see the N×N cosine similarity grid where diagonal entries are positive pairs and off-diagonal are negatives
InfoNCE loss - watch how the loss pushes matched embeddings together and unmatched embeddings apart simultaneously
Zero-shot classification - see how text prompts like "a photo of a dog" are compared to image embeddings at inference
Embedding space visualization - watch image and text embeddings cluster by semantic meaning after contrastive training
Compare CLIP, ALIGN, and SigLIP loss formulations and understand why SigLIP uses sigmoid instead of softmax
Part of the EngineersOfAI Interactive 3D - free interactive visualizations covering every major concept in machine learning and AI engineering. Hover any element for a plain-English explanation. No code required.