Manuscript Offprint

arXiv:2608.22500

Learning Sample-wise Rank-aware Interpolation Weights for Composed Visual Data Retrieval

Boseung Jeong, Taegyu Park, Donghyeon Kwon, Hyunsouk Cho, Suha Kwak

Boseung Jeong 1^{1} ID^{ID}, Taegyu Park 2^{2} ID^{ID}, Donghyeon Kwon 2^{2} ID^{ID}, Hyunsouk Cho 3^{3} ID^{ID}, and Suha Kwak 2,4^{2,4} ID^{ID}

1^{1}AI Center, Samsung Electronics, Republic of Korea

2^{2}Dept. of CSE, POSTECH, Republic of Korea

3^{3}Dept. of AI, Ajou University, Republic of Korea

4^{4}Graduate School of AI, POSTECH, Republic of Korea

1^{1}bs0131.jeong@samsung.com, 2^{2}{taegyu.park,kinux98,suha.kwak}@postech.ac.kr, 3^{3}hyunsouk@ajou.ac.kr

Abstract. At the heart of composed visual data retrieval is the fusion of a reference visual input and a textual modification into a single query. While current state-of-the-art methods utilize multimodal large language models for this fusion, their complexity introduces prohibitive query-time latency, limiting their scalability. We instead revisit the efficacy of simple linear interpolation within an embedding space, and introduce SRAIN, the first framework that dynamically predicts query-specific interpolation weights. The key challenge lies in the fact that the quality of an interpolation weight should be measured by the interpolated embedding's discriminability from negatives as well as its proximity to true targets; this makes collecting and predicting optimal weights intractable. We overcome this bottleneck through two key innovations: batch-wise rank-aware weight estimation during training, and a compact memory bank that synthesizes hard negatives during inference. SRAIN achieves the best in composed video retrieval and matches the current state of the art in composed image retrieval, all while substantially reducing query-time latency compared to MLLM-based alternatives.

Keywords: Composed Video/Image Retrieval · Multi-Modal Retrieval

1 Introduction

Composed image retrieval (CoIR) [44] and composed video retrieval (CoVR) [43] formulate the retrieval task as identifying a target visual instance based on a composite query: a reference visual input and an accompanying textual modification. This approach improves search specificity and expands practical applications in media editing, recommendation systems, and creative content search. Also, its inherent query editing capability has driven growing attention across various applications where modifying existing media is preferred over initiating a completely new search.

Both of CoIR and CoVR demand a principled fusion of the reference and modification text into a single query that reflects the intended edit while preserving the salient content of the reference. A large body of research has been

B. Jeong et al.

Figure

(a) MLLM-based Methods

(b) SRAIN (Ours)

Fig. 1: Comparison of SRAIN with MLLM-based methods. (a) MLLM-based methods process reference and modification text together through MLLMs to generate a composed query, introducing substantial computational overhead. (b) SRAIN predicts a sample-specific interpolation weight α\alpha and fuses reference and modification embeddings through linear interpolation, enabling efficient retrieval. The right plot shows that SRAIN achieved comparable performance (mAP@5 on CIRCO) while being ×\times24 faster in throughput compared to MLLM-based methods. Meanwhile, BASIC [26], a training-free method without MLLM, underperformed in throughput as well as retrieval accuracy since it requires numerous text encoder forward passes.

devoted to the multimodal fusion in this context, e.g., via cross-attention between visual and textual embeddings [36, 39, 40, 45, 46, 49, 52, 55] or textual inversion that encodes visual data in the text embedding space [22, 28, 37]. Currently, the best-performing approach leverages multimodal large language models (MLLMs) [1, 6, 21, 23] to rewrite the paired inputs into a single natural language description, which is in turn used for text-based retrieval [12, 15, 39, 40, 50]. However, the use of MLLMs substantially increases query-time latency due to their architectural complexity, limiting the practical utility of this approach.

Meanwhile, it has been recently reported that fusing the reference and modification embeddings by linear interpolation on a unit hyper-sphere can yield effective composed queries without auxiliary fusion modules [14]. This work manually seeks a single interpolation weight for each dataset, which is however highly sub-optimal since the impact of the modification text should be determined by the specific content of the reference and the intent of the composite query.

To overcome this drawback while retaining the efficiency of linear interpolation, we introduce a novel framework, dubbed Sample-wise Rank-Aware INterpolation for multimodal fusion (SRAIN), that for the first time learns to determine how strongly a textual modification should influence the reference in an instance-wise manner. At inference, a lightweight module predicts an interpolation weight for each composite query, and its reference and modification embeddings are linearly interpolated using the predicted weight. The resulting fused embedding is compared with target embeddings through cosine similarity for retrieval. This pipeline enables efficient inference without any dependence on external models such as MLLMs (Fig. 1).

However, training the interpolation weight predictor is challenging, primarily due to the lack of ground-truth supervision. Identifying the optimal interpolation weight is computationally intractable; such a value cannot be determined solely by observing the composite query, but should be estimated by evaluating how

Figure

Spherical linear interpolation

Fused query

(a) Target-only

(b) Rank-aware

Fig. 2: Rank-aware optimal weight estimation. Rather than determining the weight solely based on the similarity to the positive target (a), SRAIN selects the weight based on rank, where the positive consistently outranks nearby hard negatives (b).

effectively the interpolated embedding discriminates true targets from hard negatives. Given the massive scale of the dataset, verifying this discriminative power against all positive and negative examples for every potential weight candidate is computationally intractable. To tackle this problem, we propose a batch-wise rank-aware weight estimation strategy (Fig. 2). This strategy derives a near-optimal weight from ranking behavior within each mini-batch of a sufficiently large size, and offers the estimated weight as the ground-truth label.

Since the ground-truth weight depends on relative ranks with hard negatives in the batch, it is infeasible to infer the optimal weight solely from the reference and modification embeddings. We mitigate this issue by introducing a conditioned weight prediction mechanism, which enables the weight predictor to reference hard negatives in both training and testing (Fig. 3). During training, the weight predictor takes as inputs a positive target and hard negatives within the batch as well as the composite query embeddings. At inference time, it samples synthetic negative embeddings from a compact memory bank that stores representative target embeddings of training data.

Building on these designs, we present a two-stage training strategy. In the first stage, the visual and text encoders are fine-tuned by aligning the interpolated embedding with its corresponding target embedding while pushing apart negatives through a hard-negative contrastive loss [27]. In the second stage, the encoders are frozen, and only the weight predictor is trained to regress the ground-truth interpolation weights. This separation is essential since the joint optimization of the encoders and the weight predictor causes the ground-truth interpolation weights to fluctuate as the encoder representation changes, which results in inconsistent supervision and unstable training.

SRAIN achieved the state of the art on the CoVR benchmark [43], and matched the best model on the CoIR benchmarks [3,24,47], all without relying on external models such as LLMs. More importantly, it substantially reduces

B. Jeong et al.

Figure

Fig. 3: Overall architecture of SRAIN. The reference video, modification text, and target video are encoded using the pretrained encoders. For each batch, optimal interpolation weights are estimated in a rank-aware manner. The model is trained in two stages: In Stage 1, the encoders are fine-tuned to align composite query embeddings with target embeddings through hard-negative contrastive learning. In Stage 2, the encoders are frozen and a lightweight weight predictor is trained to regress αi∗\alpha_{i}^{*}. A memory bank is updated via exponential moving average (EMA) during training to collect representative target prototypes. At inference, the memory bank supplies top-n prototypes as auxiliary tokens, enabling consistent weight prediction.

query-time latency compared to recent methods using MLLMs across both tasks. The main contribution of this paper is three-fold:

– We propose SRAIN, the first framework to dynamically predict a per-sample interpolation weight to fuse the reference and modification embeddings while preserving computational efficiency.

– We address the lack of ground-truth supervision and the dependence of optimal weights on hard negatives by introducing a rank-aware weight estimation procedure that derives near-optimal weights from batch-wise ranking behavior, and a conditioned weight prediction mechanism that explicitly conditions on hard negatives.

– SRAIN achieves the state of the art on the CoVR benchmark, while matching the best model on the CoIR benchmarks without reliance on external models, reducing query-time latency substantially.

References (56)

  • GPT-4 Technical Report
  • A clip-hitchhiker's guide to long video retrieval (opens arXiv in a new tab)
  • Zero-shot composed image retrieval with textual inversion
  • Effective conditioned and composed image retrieval combining clip-based features
  • Wild comparisons: A study of how representation similarity changes when input data is drawn from a shifted distribution
  • Language models are few-shot learners
  • Modality-agnostic attention fusion for visual search with text feedback (opens arXiv in a new tab)
  • An image is worth $16 \times 16$ words: Transformers for image recognition at scale
  • Fashionvlp: Vision language transformer for fashion retrieval with feedback
  • Compodiff: Versatile composed image retrieval with latent diffusion
  • Language-only training of zero-shot composed image retrieval
  • Egocvr: An egocentric benchmark for fine-grained composed video retrieval
  • Collm: A large language model for composed image retrieval (opens the publisher in a new tab)
  • Spherical linear interpolation and text-anchoring for zero-shot composed image retrieval
  • Vision-by-language for training-free compositional image retrieval
  • Dual compositional learning in interactive image retrieval
  • Cosmo: Content-style modulation for image retrieval with text feedback
  • Data roaming and quality assessment for composed image retrieval
  • Blip-2: Bootstrapping language-image pretraining with frozen image encoders and large language models
  • Blip: Bootstrapping language-image pre-training for unified vision-language understanding and generation
  • Video-llava: Learning united visual representation by alignment before projection
  • Fine-grained textual inversion network for zero-shot composed image retrieval
  • Visual instruction tuning
  • Image retrieval on real-life images with pre-trained vision-and-language models
  • Decoupled weight decay regularization
  • Instance-level composed image retrieval
  • Filtering, distillation, and hard negatives for vision-language pre-training
  • Pic2word: Mapping pictures to words for zero-shot composed image retrieval
  • Laion-5b: An open large-scale dataset for training next generation image-text models
  • Laion-400m: Open dataset of clip-filtered 400 million image-text pairs (opens arXiv in a new tab)
  • Instance level affinity-based transfer for unsupervised domain adaptation (opens the publisher in a new tab)
  • Conceptual captions: A cleaned, hypernymed, image alt-text dataset for automatic image captioning
  • Animating rotation with quaternion curves
  • Training-free zero-shot composed image retrieval with local concept reranking (opens arXiv in a new tab)
  • Lightningdot: Pre-training visual-semantic embeddings for real-time image-text retrieval
  • Image retrieval with composed query by multi-scale multi-modal fusion
  • Context-i2w: Mapping images to context-dependent words for accurate zero-shot composed image retrieval
  • Reason-before-retrieve: One-stage reflective chain-of-thoughts for training-free zero-shot composed image retrieval
  • Beyond simple edits: Composed video retrieval with dense modifications
  • Composed video retrieval via enriched context and discriminative embeddings
  • Attention is all you need
  • Covr-2: Automatic data construction for composed video retrieval
  • Covr: Learning composed video retrieval from web video captions
  • Composing text and image for image retrieval—an empirical odyssey
  • Cross-modal feature alignment and fusion for composed image retrieval
  • Target-guided composed image retrieval
  • Fashion iq: A new dataset towards retrieving images by natural language feedback
  • Context-cir: Learning from concepts in text for composed image retrieval (opens the publisher in a new tab)
  • Multi-modal transformer with global-local alignment for composed query image retrieval
  • Ldre: Llm-based divergent reasoning and ensemble for zero-shot composed image retrieval
  • Stable diffusion prompts 2.47m
  • Heterogeneous feature fusion and cross-modal alignment for composed image retrieval
  • Magiclens: Self-supervised image retrieval with open-ended instructions
  • Divide and contrast: Source-free domain adaptation via adaptive contrastive learning
  • Neucore: neural concept reasoning for composed image retrieval
  • MiniGPT-4: Enhancing Vision-Language Understanding with Advanced Large Language Models