Ranking-aware adapter for text-driven image ordering with CLIP
Wei-Hsiang Yu, Yen-Yu Lin, Ming-Hsuan Yang, Yi-Hsuan Tsai
TL;DR
This work tackles text-guided ranking of multiple images by reframing CLIP as a learning-to-rank task and introducing a lightweight ranking-aware adapter. A cross-attention-based adapter generates text-conditioned visual embeddings and a relational attention module learns pairwise visual differences to predict ranking scores. The approach combines a regression objective with a pairwise ranking loss and demonstrates strong results across facial age estimation, historical dating, image quality, and object counting without task-specific pretraining. The method offers a general and scalable solution for multi-image ranking using a single, compact extension to CLIP, with potential impact on retrieval and QA systems that require quantitative comparisons. Overall, the framework highlights the feasibility and value of integrating vision-language models with ranking objectives for flexible, text-driven image ordering.
Abstract
Recent advances in vision-language models (VLMs) have made significant progress in downstream tasks that require quantitative concepts such as facial age estimation and image quality assessment, enabling VLMs to explore applications like image ranking and retrieval. However, existing studies typically focus on the reasoning based on a single image and heavily depend on text prompting, limiting their ability to learn comprehensive understanding from multiple images. To address this, we propose an effective yet efficient approach that reframes the CLIP model into a learning-to-rank task and introduces a lightweight adapter to augment CLIP for text-guided image ranking. Specifically, our approach incorporates learnable prompts to adapt to new instructions for ranking purposes and an auxiliary branch with ranking-aware attention, leveraging text-conditioned visual differences for additional supervision in image ranking. Our ranking-aware adapter consistently outperforms fine-tuned CLIPs on various tasks and achieves competitive results compared to state-of-the-art models designed for specific tasks like facial age estimation and image quality assessment. Overall, our approach primarily focuses on ranking images with a single instruction, which provides a natural and generalized way of learning from visual differences across images, bypassing the need for extensive text prompts tailored to individual tasks. Code is available: github.com/uynaes/RankingAwareCLIP.
