Abstract
Composed Image Retrieval (CIR) is a challenging task that requires models to retrieve a target image based on a reference image and a textual modification instruction. Current state-of-the-art systems often struggle with fine-grained visual details and the high computational costs associated with training dedicated multi-stage ranking models. In this paper, we introduce PMTFR (Pyramid Matching Model with Training-Free Refinement), a novel framework that addresses these issues. PMTFR utilizes a "Pyramid Patcher" to capture multi-scale visual information and a training-free refinement stage that leverages Representation Engineering (RepE) to inject "reasoning vectors" directly into a Large Vision-Language Model's (LVLM) hidden layers. Our approach achieves new state-of-the-art performance on the Fashion-IQ and CIRR benchmarks while significantly reducing the time required for model refinement.
Introduction
Composed Image Retrieval (CIR) represents a sophisticated intersection of computer vision and natural language processing. Unlike standard image retrieval, CIR requires the model to understand a reference image and apply a textual modification (e.g., "change the shirt to blue" or "make the dog stick its tongue out") to find a specific target.
This task is notoriously difficult due to two primary bottlenecks:
- Granularity: Standard Vision Transformers (ViT) often fail to balance macroscopic scene layout with microscopic details, such as small textures or specific object features.
- Reasoning vs. Retrieval Efficiency: High-performing CIR systems typically use a two-stage pipeline: a fast matching model followed by a heavy ranking model. Training this second-stage ranker is computationally expensive and requires complex data reconstruction. While Large Vision-Language Models (LVLMs) offer reasoning capabilities, traditional methods like Chain-of-Thought (CoT) are often too slow for real-time retrieval tasks.
Methodology: The PMTFR Framework
To overcome these challenges, we propose the PMTFR framework, which consists of two main components: a multi-scale matching model and a training-free refinement stage.
1. The Pyramid Matching Model
To address the granularity problem, we introduced the Pyramid Patcher. Instead of processing an image through a single fixed-scale lens, the Pyramid Patcher analyzes the image at $M$ different scales simultaneously. This allows the model to capture both the "forest" (global layout) and the "trees" (fine-grained details) without a massive increase in parameters, ensuring that subtle modifications requested in the text are not overlooked.
2. Training-Free Refinement (TFR)
The most significant innovation of PMTFR is the use of Representation Engineering (RepE) to enhance the ranking stage without additional training. The process involves two steps:
- Extraction: We use GPT-4o to generate "reasoning paths" that explain the relationship between queries and target images. By comparing the LVLM's internal hidden states when processing a simple query versus a query augmented with a reasoning path, we isolate a "reasoning vector" (RAug-Rep).
- Injection: During inference, this pre-calculated vector is injected into the LVLM’s hidden layers. This "activates" the model's latent reasoning capabilities, allowing it to score candidate images more accurately without the overhead of generating text or training a new ranking head.
Experimental Results
Benchmarks and Performance
We evaluated PMTFR on two prominent supervised CIR benchmarks: Fashion-IQ (77k fashion images) and CIRR (36k real-life scene triplets). PMTFR set new state-of-the-art (SOTA) records on both:
- Fashion-IQ: Achieved an average Recall@10/50 improvement of 1.42% over the previous best model.
- CIRR: Surpassed the previous SOTA by 1.22% on average across all metrics.
Ablation Studies and Efficiency
Ablation studies confirmed that both the Pyramid Patcher and the Training-Free Refinement stage contribute significantly to the performance gains. The Pyramid Patcher provided an initial ~1.01% boost, while the TFR added another ~1.26% on top.
Crucially, the TFR approach is highly efficient. The refinement process took only 0.3 hours, compared to 2.6 hours for a traditional trained ranking model, representing a nearly 9x speedup in the refinement phase while maintaining or exceeding accuracy.
Key Insights
- Reasoning as a Latent Vector: Our results suggest that reasoning does not need to be externalized as text to be effective. Injecting the mathematical "essence" of reasoning into hidden states can unlock model capabilities more efficiently.
- Distributed Reasoning: We found that injecting the reasoning vector into all layers of the LVLM performed better than targeting specific layers, suggesting that reasoning is a distributed process within the architecture.
- Multi-Scale Necessity: The success of the Pyramid Patcher highlights that CIR models specifically struggle when they cannot reconcile different visual scales simultaneously.
Conclusion and Future Work
PMTFR demonstrates that high-performance CIR can be achieved without the heavy computational burden of training multi-stage rankers. By combining multi-scale visual processing with representation-based reasoning injection, we provide a scalable path for future retrieval systems. Future work will explore more sophisticated methods for isolating reasoning vectors and investigate whether smaller, open-source models can generate equally effective representations as GPT-4o.
Summary updated