OSCAR: Optimization-Steered Agentic Planning for Composed Image Retrieval

Teng Wang, Rong Shan, Jianghao Lin, Junjie Wu, Tianyi Xu, Jianping Zhang, Wenteng Chen, Changwang Zhang, Zhaoxiang Wang, Weinan Zhang, Se Jun Wang

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.

Figure 1: (a) Unified models suffer from domain-specific "myopia," while (b) heuristic agents often follow suboptimal, redundant trajectories.
  1. 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.
  2. 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.

Figure 2: The OSCAR pipeline: Offline Mixed-Integer Programming (MIP) derives optimal trajectories for a Golden Library, which then steers the VLM Planner during online inference.

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

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.

Empirical ResultsBrowse all benchmarks →

BenchmarkMethodMetricScoreProtocol / Evidence
CIRCOOSCARRecall@5 (R@5)75.50+4.38 vs baselineImage Retrieval
Source quote
L995: OSCAR (Ours) │ 75.50 │ 85.50 │ 94.62 │ 97.50
CIRCOOSCARRecall@10 (R@10)85.50+5.75 vs baselineImage Retrieval
Source quote
L995: OSCAR (Ours) │ 75.50 │ 85.50 │ 94.62 │ 97.50
CIRCOOSCARRecall@25 (R@25)94.62Image Retrieval
Source quote
L995: OSCAR (Ours) │ 75.50 │ 85.50 │ 94.62 │ 97.50
Reported baseline / comparator measurements (2)
BenchmarkMethodMetricScoreProtocol / Evidence
CIRCOQQMM-embed-v2 baselineRecall@5 (R@5)71.12Image Retrieval
Source quote
L989: QQMM-embed-v2 │ {\ul 71.12} │ {\ul 79.75} │ {\ul 90.25} │ {\ul 95.26}
CIRCOQQMM-embed-v2 baselineRecall@10 (R@10)79.75Image Retrieval
Source quote
L989: QQMM-embed-v2 │ {\ul 71.12} │ {\ul 79.75} │ {\ul 90.25} │ {\ul 95.26}
BibTeX
@misc{wang2026oscar,
  author = {Teng Wang and Rong Shan and Jianghao Lin and Junjie Wu and Tianyi Xu and Jianping Zhang and Wenteng Chen and Changwang Zhang and Zhaoxiang Wang and Weinan Zhang and Se Jun Wang},
  title = {{OSCAR: Optimization-Steered Agentic Planning for Composed Image Retrieval}},
  year = {2026},
  eprint = {2602.08603},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2602.08603},
}
Figure