Abstract
Composed image retrieval (CIR) requires complex reasoning over heterogeneous visual and textual constraints. Existing approaches largely fall into two paradigms: unified embedding retrieval, which suffers from single-model myopia, and heuristic agentic retrieval, which is limited by suboptimal, trial-and-error orchestration. To this end, we propose OSCAR, an optimization-steered agentic planning framework for composed image retrieval. We are the first to reformulate agentic CIR from a heuristic search process into a principled trajectory optimization problem. Instead of relying on heuristic trial-and-error exploration, OSCAR employs a novel offline-online paradigm. In the offline phase, we model CIR via atomic retrieval selection and composition as a two-stage mixed-integer programming problem, mathematically deriving optimal trajectories that maximize ground-truth coverage for training samples via rigorous boolean set operations. These trajectories are then stored in a golden library to serve as in-context demonstrations for online steering of VLM planner at online inference time. Extensive experiments on three public benchmarks and a private industrial benchmark show that OSCAR consistently outperforms SOTA baselines. Notably, it achieves superior performance using only 10% of training data, demonstrating strong generalization of planning logic rather than dataset-specific memorization.
The Limitations of Current Retrieval Paradigms
Composed Image Retrieval (CIR) is the task of finding a specific target image based on a reference image and a text-based modification query (e.g., "Take this picture closer, keep the chickens and remove the leaves"). Despite its utility, current solutions face significant bottlenecks.
- Unified Embedding Retrieval: These models attempt to map all visual and textual features into a single latent space. This leads to "single-model myopia," where a model specialized in one domain (like fashion) fails to capture nuances in another (like natural landscapes). No single model is optimal for all retrieval scenarios.
- Heuristic Agentic Retrieval: These systems use Vision-Language Models (VLMs) as agents to call specialized tools. However, they typically rely on greedy, iterative loops (like ReAct) that are computationally expensive and lack a global strategy, often resulting in redundant or incorrect tool usage.
The OSCAR Framework: From Heuristics to Optimization
OSCAR (Optimization-Steered Agentic Planning) transforms CIR from a trial-and-error process into a principled mathematical optimization problem. The core innovation is an offline-online paradigm that derives optimal "flight plans" for retrieval agents.
1. Offline: Building the Golden Library
For training data with known ground truths, OSCAR solves a two-stage Mixed-Integer Programming (MIP) problem to find the mathematically optimal retrieval path:
- Stage 1 (Recall-Oriented Selective MIP): Identifies the smallest subset of "atomic" retrieval tools (different models or query rewrites) that together maximize coverage of the target images.
- Stage 2 (Precision-Oriented Composition MIP): Uses rigorous boolean set operations—Union, Intersection, and Difference—to filter results. For instance, it might "Subtract" images containing leaves if the query specifies their removal.
These derived "optimal trajectories" are stored in a Golden Library.
2. Online: Steering the VLM Planner
During inference, the system does not need to solve a new optimization problem. Instead, the VLM Planner retrieves similar cases from the Golden Library and uses them as in-context demonstrations. This "steers" the agent to execute a precise, single-pass plan, avoiding the need for expensive multi-round reasoning.
Key Insights and Results
OSCAR's performance across benchmarks like CIRCO, CIRR, and FashionIQ reveals several critical advantages:
- Logic Over Memorization: OSCAR achieves state-of-the-art results using only 10% of training data. This indicates that the framework learns abstract planning logic—how to logically combine tools—rather than simply memorizing image-text pairs.
- Mathematical Precision: By framing retrieval as a variation of the "Set Cover" problem, OSCAR ensures that tool selection is efficient and exhaustive. On the CIRCO benchmark, it achieved a 23.13% relative improvement in mAP@5 over previous best methods.
- Robustness and Generalization: The system remains effective regardless of whether it is provided with 1-shot or 4-shot demonstrations, suggesting that even a single "golden" example provides sufficient signal to guide the VLM's reasoning.
Conclusion
OSCAR represents a shift in agentic retrieval, moving away from heuristic exploration toward principled trajectory optimization. By mathematically deriving optimal paths and using them to steer VLMs, OSCAR provides a scalable, efficient, and highly accurate solution for complex image retrieval tasks.
Summary updated