TL;DR
CLAY is a training-free method that enables adaptive, conditional image retrieval by dynamically modulating the embedding space of pretrained Vision-Language Models (VLMs). By projecting fixed visual features onto a manifold-aware textual subspace, it allows users to search images based on specific, multi-conditioned criteria (like matching by color, action, or location) with state-of-the-art accuracy and exceptional computational efficiency.
What Problem Does This Paper Address?
Standard image retrieval systems rely on static, monolithic similarity metrics—they treat two images as either "similar" or "not." However, human visual perception is inherently subjective and context-dependent. As shown in Figure 1, given a query image of a dog, a user might want to retrieve images based on its species, its action (running), or its location (grass).
Existing conditional retrieval methods struggle to balance accuracy and efficiency:
- Asymmetric approaches only condition the query image on the text prompt. While fast, this leaves database features condition-agnostic, leading to suboptimal retrieval accuracy.
- Symmetric approaches condition both the query and the database images. However, this requires re-running heavy neural network feature extractors over the entire database every time a user changes their search condition, making it completely impractical for large-scale, real-world applications.
CLAY addresses this dilemma by decoupling visual feature extraction from the text-conditioning process, allowing symmetric conditioning over fixed database embeddings.
Methods
Instead of using a neural network to fuse text and image features at inference time, CLAY reformulates the similarity space itself using a training-free projection mechanism.
- Manifold-Aware Textual Subspace Construction: Pretrained VLM embeddings (like CLIP or SigLIP) reside on a unit hypersphere rather than a flat Euclidean space. To respect this geometry, CLAY takes condition-related textual prompts (generated via an LLM) and maps them onto a local tangent space centered around the mean text direction using a mathematical logarithm map. It then applies Singular Value Decomposition (SVD) to these tangent-mapped features to construct a condition-specific projection matrix ($P_c$).
- Alignment and Inference: Visual features from the database are kept fixed. At inference, CLAY applies an orthonormal rotation to align the visual database mean with the textual mean, maps the visual features to the tangent space, and projects them using $P_c$.
Because the projection matrix $P_c$ can be precomputed for various text conditions, calculating conditional similarity simplifies to a fast matrix multiplication during search, bypassing the need to re-encode database images.
Datasets
The authors evaluate CLAY on several real-world and synthetic benchmarks:
- Real-world: Stanford40 (for actions) and various fine-grained image classification datasets (Food-101, Oxfordpets, Aircraft, etc.).
- Synthetic: CLEVR4.
- CLAY-EVAL (New Benchmark): Because existing datasets lack multi-conditional annotations, the authors introduced CLAY-EVAL. Generated using the Flux.1 diffusion model, it contains 7,325 object images and 6,745 human images. Each image is explicitly annotated with multiple overlapping core and diversity attributes (e.g., category, sub-category, and color for objects; age, action, and background for humans) to facilitate rigorous multi-conditioned evaluation.
Key Insights and Ideas
- Geometry is Crucial: Naively applying linear projections (like standard SVD) directly to VLM spaces assumes a flat Euclidean structure, which distorts semantic relationships. Approximating the local structure via a hyperspherical tangent space preserves the integrity of the embeddings.
- The Power of Rotation: Simply mapping features to a tangent space isn't enough because visual and textual features often cluster in different regions (the modality gap). Applying an orthonormal rotation to align their means before projection is the "aha moment" that unlocks substantial performance gains across all datasets.
- Symmetric Benefits at Asymmetric Costs: CLAY proves that you can achieve the high accuracy of symmetric database modulation without paying the computational price of re-encoding features through a deep network.
Key Results
- Single-Condition Retrieval: CLAY consistently outperforms existing methods. On the Stanford40 dataset, CLAY (built on SigLIP-B) achieves 66.2 mAP, outperforming the previous state-of-the-art conditional method, GeneCIS (50.0 mAP).
- Multi-Condition Retrieval: CLAY scales naturally to complex multi-attribute queries. On the CLAY-Object dataset under a combined "Color + Subcategory" condition, CLAY achieves 55.0 mAP, vastly outperforming InstructBLIP's 14.7 mAP.
- Inference Speed: For subsequent queries under a new condition, CLAY boasts an average latency of just 0.126 seconds, compared to 12.74 seconds for heavy multi-modal models like Qwen3-VL, representing a massive leap in practical efficiency.
Limitations and Future Work
The paper does not include a dedicated limitations section, but its design implies a few boundaries:
- Performance is inherently bound by the zero-shot representation quality of the underlying pre-trained VLM.
- The method relies on an LLM (like ChatGPT) to generate descriptive textual prompts to build the subspace, meaning prompt quality can affect retrieval accuracy.
The authors note that this focused similarity modulation technique could extend beyond retrieval into other domains, such as text-and-visual matching within multimodal generative models.
Summary updated