EFSA: Episodic Few-Shot Adaptation for Text-to-Image Retrieval
Muhammad Huzaifa, Yova Kementchedjhieva
TL;DR
This work tackles open-domain text-to-image retrieval, where standard zero-shot or single-domain fine-tuning struggles with hard negatives. It introduces EFSA, a test-time episodic adaptation framework that fine-tunes a vision-language model on top-$k$ retrieved candidates and their synthetic captions using LoRA, then re-ranks the pool for each query while resetting after each inference. Across eight diverse domains and a large open-domain pool, EFSA achieves consistent improvements in Recall@1 and demonstrates robustness to domain shifts, outperforming strong baselines including fine-tuning and RLCF. The approach offers a practical, compute-friendly path to robust cross-domain T2I retrieval with modest storage overhead and strong generalization, highlighting the value of episodic few-shot adaptation for open-domain multimodal tasks.
Abstract
Text-to-image retrieval is a critical task for managing diverse visual content, but common benchmarks for the task rely on small, single-domain datasets that fail to capture real-world complexity. Pre-trained vision-language models tend to perform well with easy negatives but struggle with hard negatives--visually similar yet incorrect images--especially in open-domain scenarios. To address this, we introduce Episodic Few-Shot Adaptation (EFSA), a novel test-time framework that adapts pre-trained models dynamically to a query's domain by fine-tuning on top-k retrieved candidates and synthetic captions generated for them. EFSA improves performance across diverse domains while preserving generalization, as shown in evaluations on queries from eight highly distinct visual domains and an open-domain retrieval pool of over one million images. Our work highlights the potential of episodic few-shot adaptation to enhance robustness in the critical and understudied task of open-domain text-to-image retrieval.
