Abstract
Composed Image Retrieval (CIR) involves retrieving a target image based on a reference image and a modifying text instruction. A significant challenge in this task is "compositional conflict," where attributes of the reference image directly contradict the desired changes in the instruction. We introduce CCIN (Compositional Conflict Identification and Neutralization), a novel framework that utilizes Large Language Models (LLMs) to resolve these contradictions in the interpretable domain of natural language. By explicitly identifying conflicting attributes and employing a dual-instruction guidance mechanism, CCIN achieves state-of-the-art performance across major benchmarks, including FashionIQ, CIRR, and Shoes.
Introduction: The Challenge of Compositional Conflict
In Composed Image Retrieval (CIR), a user might provide a reference image of a blue, long-sleeved shirt and an instruction like "I want a dark grey short sleeve shirt with red lettering." The model must then synthesize these inputs to find the correct target.
The primary difficulty lies in the inherent contradictions between the source and the target. In the example above, the "blue" and "long sleeve" attributes of the reference image conflict with the "dark grey" and "short sleeve" requirements of the instruction. Traditional methods often attempt to "mask" or "hide" these conflicting features in high-dimensional latent space. However, this approach is often imprecise, leading to the loss of important non-conflicting details (like texture or branding) and resulting in "blurry" query representations.
The CCIN Framework
The CCIN framework shifts conflict resolution from the "black box" of feature space into natural language. It operates in two distinct stages: Conflict Identification and Conflict Neutralization.
1. Compositional Conflict Identification (CCI)
The first stage aims to pinpoint exact logical contradictions. CCIN uses an image captioning model (such as BLIP-2) to generate a detailed textual description of the reference image. An LLM (e.g., GPT-4) then compares this caption against the user's modified instruction. By reasoning in text space, the LLM can precisely identify which keywords in the reference caption conflict with the new intent.
2. Compositional Conflict Neutralization (CCN)
Once conflicts are identified, the LLM generates a "kept instruction"—a version of the original image caption that retains only the non-conflicting, relevant attributes.
The core of the retrieval model is a Dual-instruction Q-Former. This architecture features two parallel branches:
- Kept Instruction Branch: Extracts visual features from the reference image guided by the "kept instruction," ensuring the model preserves the foundational context the user wants to keep.
- Modified Instruction Branch: Extracts features guided by the user's "modified instruction," focusing on the specific changes requested.
An Adaptive Fusion Module then merges these two sets of visual tokens with textual tokens from the modified instruction to create a final, refined query representation.
Experimental Evaluation
CCIN was evaluated on three standard CIR benchmarks, consistently outperforming previous state-of-the-art (SOTA) methods:
- FashionIQ: Achieved a Mean Recall@10/50 of 64.59%, surpassing previous top models like SPRC (64.27%).
- CIRR: Reached a Mean Recall of 81.66%, surpassing the previous SOTA of 80.37%.
- Shoes: Achieved a Mean Recall of 59.42%, compared to the previous best of 58.05%.
Qualitative analysis demonstrates that CCIN excels at disambiguation. For instance, when a user asks for a "white shirt" to replace a patterned one, CCIN correctly identifies the pattern as a conflict and discards it, whereas older models might struggle to separate the color change from the existing pattern.
Conclusion and Future Directions
CCIN demonstrates that reasoning in text space using LLMs provides a more precise and interpretable way to handle compositional conflicts in CIR than latent-space masking. By explicitly defining what to keep and what to change, the model maintains high fidelity to the reference image while accurately reflecting user modifications.
While the current implementation relies on a two-step captioning and LLM process, future work will explore Multi-modal Large Language Models (MLLMs) to perform conflict identification directly on visual inputs. Additionally, the authors aim to extend this framework to support diverse input modalities, such as sketches or audio instructions.
Summary updated