What it is
Images and captions become vectors in one space, and you compare them
Feeding an image through the image encoder gives a vector. Feeding a sentence through the text encoder gives a vector of the same size. The cosine similarity between them is a single number, and the whole method follows from that.
To classify with no training, you write one short caption per class and embed them once, then take the caption whose vector is closest to the image's. To search a library, you embed every image once, then embed the query text and return the nearest images.
Scoring five images against five captions with the smallest CLIP model puts real numbers on that.

The right answer is always the highest score in its row, so ranking works. The numbers themselves sit in a narrow band, between 0.185 and 0.312, with no natural cutoff between "matches" and "doesn't". Libraries hide this by multiplying the scores by a scale learned during training and running a softmax over them, which turns the bicycle row's gap of 0.026 into 93% against 7%. Those percentages only compare the captions you supplied.
That narrow band has a cause, and you can see it by looking at where the vectors sit.

Two images average 0.657 with each other and two captions average 0.655, while an image and its own caption average 0.295. The image vectors and the text vectors occupy separate regions, and every cross-modal score you ever read is a comparison across that divide. Liang et al. (2022) named this the modality gap and traced it to how these models are initialized and trained, showing that the two modalities end up "embedded at arm's length in their shared representation".
Keep reading
The rest of this article is free with an account
Create a free account to read the remaining 6 sections. It takes about twenty seconds and there's nothing to pay. The same account opens the slide decks and CV reviews.
- 02It shows up wherever text and images have to meet
- 03Training pulls matching pairs together and pushes the rest apart
- 04The versions you'll see, as of September 2026
- 05Pick CLIP when words have to meet images, and a neighbor when they don't
- 06How to try it
- and 1 more
