Automatic Synthesis of High-Quality Triplet Data for Composed Image Retrieval

Haiwen Li, Delong Liu, Zhaohui Hou, Zhicheng Zhao, Fei Su · OpenReview

Abstract

Composed Image Retrieval (CIR) is a vision-language task that requires retrieving target images based on a multimodal query consisting of a reference image and a text caption. The primary bottleneck in CIR research is the scarcity of high-quality, manually labeled triplet data. We present a scalable pipeline for the automatic synthesis of high-quality triplets, resulting in the CIRHS (Composed Image Retrieval on High-quality Synthetic Triplets) dataset. By leveraging large language models (LLMs) for prompt generation and advanced text-to-image models for consistent image pair synthesis, we produce over 534,000 diverse triplets. Furthermore, we introduce CoAlign (Hybrid Contextual Alignment), a framework that utilizes global alignment and local reasoning to learn robust representations. Our approach achieves state-of-the-art results on zero-shot and supervised benchmarks, demonstrating that CIR models can be effectively trained on fully synthetic data.

Introduction

Composed Image Retrieval (CIR) allows users to search for images using a reference image modified by a text instruction (e.g., "show me this mountain, but with a small wooden cabin at its base"). Despite its utility, the field is limited by the high cost of manual annotation. Existing datasets like CIRR and FashionIQ are relatively small, which hinders the scalability and zero-shot capabilities of CIR models. Previous automated attempts often suffered from "hallucinations"—where the generated images did not match the text or lacked visual consistency. This work addresses these challenges by introducing a high-fidelity synthetic data generation pipeline and a novel retrieval framework.

Methodology: The CIRHS Pipeline

The core innovation in our data generation is ensuring "intra-image consistency" between the reference and target images.

Data Synthesis

The synthesis process follows three main stages:

  1. Diverse Quadruple Generation: An LLM (Qwen2.5) generates text descriptions for a reference image, a target image, and the "relative captions" describing the change.
  2. Consistent Image Pair Synthesis: To avoid background or object inconsistencies common in separate generations, we use Flux.1-dev to generate a single wide image containing both the reference and target side-by-side. This ensures shared elements remain identical.
  3. Data Filtering: A Multimodal LLM (Qwen2.5-VL) evaluates the triplets for quality and alignment, discarding the bottom 15%.
The CIRHS synthesis pipeline utilizes a frozen Flux.1 model to generate consistent image pairs side-by-side.

The CoAlign Framework

To maximize the utility of the synthetic data, we propose Hybrid Contextual Alignment (CoAlign). This framework consists of two main components:

  • Global Contextual Alignment (GCA): Uses distribution matching to understand relationships across a broader context, improving the model's ability to handle queries that might match multiple targets.
  • Local Contextual Reasoning (LCR): Employs masked feature prediction to force the model to learn fine-grained details and local patterns.

The CIRHS Dataset

The resulting CIRHS dataset contains 534,758 synthetic triplets. It is significantly more diverse than previous datasets, covering various modification types including object replacement, quantity changes, scenario shifts, and viewpoint variations.

Examples of synthetic triplets from the CIRHS dataset across various categories like Quantity, Scenario, and Viewpoint.

By generating captions for both directions (reference to target and vice versa), we effectively double the training signal and teach the model to understand inverse modifications.

Experimental Results

Our experiments demonstrate the power of high-quality synthetic data:

  • Zero-Shot Performance: On the CIRR benchmark, CoAlign trained solely on CIRHS achieved a 71.17% Recall@5, a significant improvement over previous synthetic-based methods.
  • Supervised Performance: When fine-tuned on standard benchmarks, CoAlign set new state-of-the-art records. On FashionIQ, it reached an average Recall@10 of 54.92%.
  • Scaling: Performance scales consistently with dataset size, showing the benefits of our automated pipeline.

Conclusion

This research marks a milestone in Composed Image Retrieval by proving that fully synthetic datasets can match or exceed the performance of human-annotated data. The combination of the CIRHS dataset and the CoAlign framework provides a scalable path forward for the field, overcoming the data bottleneck that has long limited CIR progress.

Summary updated

BibTeX
@misc{li2025automatic,
  author = {Haiwen Li and Delong Liu and Zhaohui Hou and Zhicheng Zhao and Fei Su},
  title = {{Automatic Synthesis of High-Quality Triplet Data for Composed Image Retrieval}},
  year = {2025},
  eprint = {2507.05970},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2507.05970},
}
Figure