Composed image retrieval (CIR) is a search task in which the query combines a reference image with a modification text, and the system must return images that look like the reference but reflect the requested change. In Multimodal AI, it sits between image search and text search: a shopper who uploads a photo of a red dress and types “same cut, but in navy with long sleeves” is issuing a composed query.
The task is harder than ordinary cross-modal retrieval because neither input alone describes the target. The image supplies what to keep, the text supplies what to change, and the model must merge both into a single representation that ranks a large gallery correctly.
How composed image retrieval builds a query
A CIR system works by encoding the reference image and the modification text, fusing them into one composed query embedding, and comparing that vector with precomputed embeddings of every gallery image. Ranking usually relies on cosine similarity in a shared vector space, the same mechanism used by CLIP-style search.
The decisive component is the composition function. Early designs such as TIRG used gated residual connections that kept most image features and added a text-conditioned correction. Current systems typically start from a pretrained vision-language model such as CLIP or BLIP and train a lightweight combiner network or fine-tune the text encoder on top of it.
The pipeline below shows the stages that almost every implementation shares, regardless of the backbone it uses.
| Stage | What happens | Typical choice |
|---|---|---|
| Image encoding | Reference image becomes a feature vector | Vision encoder of CLIP, BLIP or SigLIP |
| Text encoding | Modification text becomes a feature vector | Matching text encoder |
| Composition | Both vectors merge into one query | Combiner network, cross-attention or pseudo-word token |
| Gallery indexing | Candidate images are embedded once | Approximate nearest neighbor index |
| Ranking | Gallery sorted by similarity to the query | Cosine similarity, optional re-ranking |
Supervised and zero-shot approaches
Supervised CIR learns from triplets that contain a reference image, a modification text and the correct target image. Triplets are expensive to annotate, because a person must look at two images and write a precise description of their difference, so public training sets contain only tens of thousands of examples.
Zero-shot composed image retrieval (ZS-CIR) removes the need for triplets. Methods such as Pic2Word and SEARLE use textual inversion: they map the reference image to a pseudo-word token and insert it into a sentence such as “a photo of [token] that is navy with long sleeves”, which the frozen text encoder then embeds. Training-free variants caption the reference image and ask a large language model to rewrite the caption according to the modification before running ordinary text-to-image search.
The following comparison summarizes how the main families differ in data needs and behavior.
| Approach | Training data | Strength | Weakness |
|---|---|---|---|
| Supervised fusion | Annotated triplets | Highest accuracy in its domain | Poor transfer to new domains |
| Textual inversion | Unlabeled images only | Works across domains without triplets | Loses fine visual detail |
| Caption and rewrite | None beyond pretrained models | Interpretable intermediate text | Caption errors propagate |
| Synthetic triplets | Generated image-edit pairs | Scales training cheaply | Synthetic bias in edits |
How CIR differs from related retrieval tasks
Composed retrieval differs from neighboring tasks in what the query contains and what counts as a correct answer. Plain image-to-image search returns visually similar items and ignores intent, while text-to-image search cannot express a precise visual starting point. Multimodal search in a broad sense may accept several inputs, but CIR specifically treats the text as a relative instruction rather than an independent description.
| Task | Query | Correct result |
|---|---|---|
| Image-to-image search | One image | Visually similar images |
| Text-to-image search | One sentence | Images matching the sentence |
| Composed image retrieval | Image plus change text | Images matching the edited reference |
| Text-guided image editing | Image plus change text | A newly generated image |
The last row matters in practice: text-guided image editing produces a synthetic picture, whereas CIR must return an existing item from a catalog. Some recent systems combine both, generating an edited image first and then using it as an additional query vector.
Benchmarks and evaluation metrics
CIR is evaluated with ranking metrics on a handful of public benchmarks, each with a different domain and annotation style. Results are not comparable across benchmarks, and small differences of one or two points are often within the noise of training randomness.
| Benchmark | Domain | Main metric | Known issue |
|---|---|---|---|
| FashionIQ | Dresses, shirts and tops | Recall at 10 and 50 | Many valid targets left unlabeled |
| CIRR | Natural real-world scenes | Recall at K and subset recall | Ambiguous or reference-free texts |
| CIRCO | Everyday objects from COCO | Mean average precision at K | Smaller test set |
| Shoes | Footwear product photos | Recall at K | Narrow visual variety |
A persistent problem is false negatives: one modification text often fits several gallery images, yet only one is labeled correct. CIRCO addresses this by annotating multiple ground-truth targets per query, which is why it reports mean average precision instead of plain recall.
Limitations and common failure modes
The main weakness of current CIR models is imbalanced modality use. Many systems learn to rely mostly on the text and nearly ignore the reference image, or the opposite, and benchmark scores can hide this shortcut.
- Negation and counting such as “without a logo” or “two instead of three” are handled poorly by contrastive encoders.
- Fine attributes such as fabric texture or exact shade are lost when the image is compressed into a single vector.
- Domain shift between training triplets and a real catalog sharply reduces accuracy.
- Multi-turn refinement, where a user adds several changes in sequence, accumulates errors unless the system keeps dialog state.
Practitioners therefore test models on their own gallery with realistic queries and inspect failure cases manually, rather than trusting leaderboard recall alone.
The simple explanation
Composed image retrieval is a way to search with a picture and a few words together. The picture shows a starting point. The words say what should be different. The system then looks for real pictures that match the edited idea.
Think of showing a shop assistant a photo of a chair and saying “like this, but in oak”. The assistant keeps the shape in mind and swaps the material. A CIR model does the same with numbers. It turns the photo and the words into one search key and finds the closest items. The key point is simple: the image says what to keep, the text says what to change.
How it is used in practice
An online furniture retailer with a catalog of about 400,000 product photos adds a search box next to each product image. A customer viewing a gray three-seat sofa types “same shape, green velvet, wooden legs”. The system encodes the sofa photo and the sentence with a fine-tuned CLIP backbone, fuses them with a small combiner network, and queries an approximate nearest neighbor index that returns results in under 100 milliseconds.
During a pilot, the team compares composed queries with plain keyword search on 2,000 logged sessions. Composed queries place a purchasable match in the first ten results far more often, especially for style-preserving changes such as color or material. The team also finds that requests involving negation, such as “no armrests”, still fail regularly, so it routes those to a filter-based fallback. The outcome is a measurable increase in product discovery without retraining the whole search stack.