Image-Text Retrieval Rank
Given a photo find its caption, or given words find the photo, ranked from a large pool. The true mate should sit at rank one.
Why Does This Exist?
Joint spaces are only useful if mates rank first. Retrieval tests both directions on COCO and Flickr sets with Recall at . Dual encoders give fast search; cross-attention reranks the top . Skill here feeds image retrieval products.
This page covers ranking tests only. Encoder training is the ALIGN and SigLIP pages.
The one idea you need first.
Recall at is share of queries whose mate lands in top . Text-to-image and image-to-text run separately. Hard negatives are close non-mates that test fine sense.
Think of It Like This
Finding one library card among thousands fast
A library holds a million cards. A fast index pulls 128 likely cards, then a careful reader orders those by hand. Speed plus care beats either alone.
Dual encoders are the index, cross-attention is the reader, and Recall at is the grade. Where it stops: library cards stay fixed, while web captions vary in style.
How It Actually Works
Encode all photos and texts once. Score cosine for fast recall. Rerank top candidates with matcher trained on hard negatives. Report both ways on COCO and Flickr.
In plain words: index broadly, read narrowly, and count top- hits.
Worked example
Query photo, captions, mate score , best negative . Rank hit counts for . Over queries with rank-one hits, percent. Reranking lifts to by fixing near misses, which is the rerank payoff.
Watch Out For
Testing only easy random negatives
Random pools flatter scores near percent while product queries flop. Hard sets from the same scene cut points. Mine hard negatives and test scene-close pools before shipping search.
The Quick Version
- Retrieval ranks mates both directions over thousands.
- Recall at 1, 5, 10 on COCO and Flickr is standard.
- Dual encoders index fast; matchers rerank top picks.
- Hard negatives reveal true fine sense.
- Bidirectional scores both matter.