Introduction
Traditional image retrieval systems rely on joint-embedding models like CLIP, which map text and images into a shared mathematical space. While effective for simple, object-centric queries (e.g., "a banana"), these models frequently struggle with a "semantic gap" when faced with complex or compositional natural language queries (NLQ). For instance, a query such as "a banana gazing at its reflection in a mirror" requires an understanding of relational and situational context that standard vector-space models often fail to capture.
This paper introduces NEEDLE, a system that leverages Generative AI (GenAI) to bridge this gap. By treating image retrieval as a generative-based Monte Carlo problem, NEEDLE "imagines" the visual representation of a text query before searching the database, significantly improving performance on nuanced search tasks.
The NEEDLE Architecture
NEEDLE departs from direct text-to-image matching by introducing an intermediate visual representation layer. The system architecture is divided into two primary phases: Preprocessing and Inference.
Methodology
- Query Transformation: Upon receiving a complex query, the system utilizes a foundation model (such as DALL-E 3) to generate $m$ synthetic "guide images." This step translates the abstract text into concrete visual samples.
- Monte Carlo Sampling: To mitigate the bias or imperfections of a single generated image, NEEDLE treats these $m$ images as samples from a distribution representing the query's intent.
- Ensemble Embedding: The system employs an ensemble of $l$ distinct vector embedders (e.g., DinoV2, EVA, CLIP). For each guide image, a $k$-Nearest Neighbor ($k$-NN) search is performed across all embedders.
- Rank Aggregation: Results are synthesized using a weighted aggregation mechanism that prioritizes embedders based on their historical "trustworthiness" for specific semantic topics.
To maintain efficiency, NEEDLE includes a Query Complexity Classifier. Simple queries bypass the generative pipeline in favor of standard retrieval, while complex queries trigger the full Monte Carlo process.
Experimental Evaluation
The researchers evaluated NEEDLE against state-of-the-art baselines, including CLIP, ALIGN, and FLAVA, across diverse benchmarks such as MS COCO, LVIS, and Winoground.
Key Results
- Compositional Accuracy: NEEDLE demonstrated a superior ability to handle compositional queries. On the "hard" subset of the LVIS dataset, NEEDLE improved Mean Average Precision (MAP) by 93% over the next best baseline.
- Human Preference: In a study involving 20 human evaluators, NEEDLE's results were preferred over CLIP's in approximately 70% of complex query cases.
- Robustness through Consensus: The ensemble approach ensures that errors from individual generative samples or embedders are minimized, leading to more robust retrieval than single-model methods.
Discussion and Future Work
NEEDLE demonstrates that Generative AI can serve as a powerful bridge between disparate data modalities. By "speaking the language" of the image database through visual guides, the system overcomes the limitations of traditional text-image embeddings.
However, the system's performance remains tied to the quality of the underlying foundation models; if a generator fails to understand spatial relationships, the retrieval accuracy may suffer. Future work aims to address the computational latency of on-the-fly generation through advanced caching and to expand the Monte Carlo approach to video and audio retrieval domains.
Summary updated