TL;DR
Existing Zero-Shot Composed Image Retrieval (ZS-CIR) methods rely on rigid, non-learnable composition rules to combine images and text modifications. To overcome this limitation, the authors introduce FoCo (Focus-then-Complete), a framework that treats composition as a learnable, two-stage process: first focusing on modification-relevant visual features, and then completing the target semantics using contextual cues. By leveraging large language models (LLMs) to decompose standard image captions into training proxies, FoCo achieves state-of-the-art zero-shot performance across multiple benchmarks without requiring expensive triplet annotations.
What Problem Does This Paper Address?
Composed Image Retrieval (CIR) is the task of retrieving a target image based on a reference image and a textual modification instruction (e.g., taking a picture of a cat on an indoor chair and asking to "place the cat on an outdoor chair with grass"). Standard CIR requires large datasets of human-annotated triplets (Reference Image, Modification Text, Target Image), which are incredibly costly to produce.
To scale this up, researchers turned to Zero-Shot CIR (ZS-CIR), training models on readily available image-text pairs using proxy tasks. However, existing ZS-CIR approaches suffer from a major architectural flaw: they rely on fixed, non-learnable composition rules. They either project image features into "pseudo-words" fed into a frozen text encoder or use simple linear vector arithmetic (e.g., adding the text vector to the image vector).
Because the composition function itself is never truly learned, these models struggle with complex, non-linear semantic transformations.
Methods
Inspired by human cognitive processes—where we first direct attention to an object of interest and then use broader context to understand a scene—the authors propose Focus-then-Complete (FoCo).
Since standard image-caption datasets don't contain explicit "modification instructions," FoCo uses a clever data-decomposition strategy during training:
- Local Caption Generation: An LLM (Llama-3.1-8B-Instruct) breaks down a global image caption into pairs of local captions (describing a specific object/attribute) and contextual captions (describing the rest of the scene). For example, "A woman sits in the grass with a child" becomes a local anchor ("A child is on the woman's lap") and a context modifier ("sitting in the grass").
- Text-Anchored Visual Aggregation ($\mathcal{F}_{Aggr}$): This module acts as the "Focus" stage. It uses the local caption as a textual anchor to dynamically extract localized visual features from the image backbone using cross-attention.
- Context-Conditioned Semantic Completion ($\mathcal{F}_{Comp}$): This is the "Complete" stage. A Transformer block takes the localized visual feature, the contextual caption (acting as a proxy for a modification instruction), and the remaining background features to predict the final composed target representation.
To train these modules without shortcuts (like the model ignoring the image entirely and just matching text-to-text), the authors implement a Cross-Instance Semantic Contrastive Training scheme. It uses a sigmoid-based loss that handles multiple positive pairs per image and pairs visual features from one image with text from another to enforce robust cross-modal grounding.
Datasets
- Training: Conceptual Captions 3M (CC3M), preprocessed using the LLM caption decomposition strategy.
- Evaluation: The model was evaluated across four diverse ZS-CIR benchmarks:
- FashionIQ: Focused on detailed, domain-specific attribute edits (e.g., color, material).
- CIRR: Real-world images featuring complex scenes and open-ended natural language modifications.
- CIRCO: A large-scale benchmark based on COCO with a 120K-image gallery to test real-world retrieval noise.
- GeneCIS: Designed to evaluate conditional image similarity across specific granularities (Focus, Change, Attribute, Object).
Key Insights and Ideas
- Composition is a Learnable Skill: Instead of forcing visual and textual features to fit into a predefined mathematical operation (like vector addition), composition should be modeled as an adaptive network trained directly on data.
- Decomposition as a Proxy for Modification: Deconstructing a single caption into a "local entity" and "surrounding context" perfectly mirrors the CIR inference setup (Reference Image + Modification Text $\rightarrow$ Target Image) using only single-image data.
- Preventing Unimodal Shortcuts: Standard contrastive losses (like InfoNCE) fail when an image has multiple valid semantic views. Switching to a sigmoid-based multi-positive loss with cross-instance negatives forces the model to actually look at the visual evidence rather than relying on text-matching shortcuts.
Key Results
FoCo achieves state-of-the-art performance across all four evaluation benchmarks, demonstrating strong generalization capabilities:
- CIRR: On the ViT-L/14 backbone, FoCo achieved a 34.5% Recall@1, outperforming the previous state-of-the-art (SlerpTAT) by 3.6 percentage points.
- CIRCO: FoCo led the pack with 17.5 mAP@5, successfully navigating the massive 120K gallery size and proving highly robust against retrieval noise.
- GeneCIS: FoCo outperformed baselines significantly on tasks requiring precise spatial grounding, such as the Focus (+2.4 Recall@1) and Object (+1.8 Recall@1) sub-tasks.
Qualitative visualizations confirmed that the text-anchored aggregation module dynamically shifts its visual focus depending on the text instruction, validating the interpretability of the "Focus-then-Complete" pipeline.
Limitations and Future Work
While highly effective, FoCo relies on an LLM during the offline preprocessing stage to decompose the training captions. Although this does not impact inference speed (as the LLM is only used to generate the training dataset cache), it introduces an external dependency during data preparation.
For future work, the authors plan to extend this learnable composition mechanism to more complex, open-ended vision-language settings beyond standard image retrieval.
Summary updated