Exploiting Distribution Constraints for Scalable and Efficient Image Retrieval
Mohammad Omama, Po-han Li, Sandeep P. Chinchali
TL;DR
This paper tackles the scalability and efficiency gap in image retrieval by leveraging off-the-shelf foundation models and introducing two unsupervised techniques: AE-SVC, which imposes orthogonality, mean-centering, and unit-variance constraints on a projection autoencoder to minimize the variance of cosine similarities, and (SS)$_2$D, which distills a teacher cosine-space into multiple smaller, adaptive embeddings via KL divergence. Theoretical analysis shows that minimizing the cosine-variance enhances discriminative power, and empirical results across four datasets and several foundation models show AE-SVC achieves up to 16% retrieval gains, with (SS)$_2$D delivering up to 10% improvements at smaller embedding sizes and approaching an upper bound set by per-dimension distillation. The approach improves retrieval speed and storage efficiency by enabling smaller embeddings without retraining dataset-specific models, making foundation-model-based image retrieval more scalable for robotics and vision applications. Overall, the combination of variance-aware representation learning and one-shot adaptive embedding distillation offers a practical path to scalable, high-performance image retrieval in diverse domains.
Abstract
Image retrieval is crucial in robotics and computer vision, with downstream applications in robot place recognition and vision-based product recommendations. Modern retrieval systems face two key challenges: scalability and efficiency. State-of-the-art image retrieval systems train specific neural networks for each dataset, an approach that lacks scalability. Furthermore, since retrieval speed is directly proportional to embedding size, existing systems that use large embeddings lack efficiency. To tackle scalability, recent works propose using off-the-shelf foundation models. However, these models, though applicable across datasets, fall short in achieving performance comparable to that of dataset-specific models. Our key observation is that, while foundation models capture necessary subtleties for effective retrieval, the underlying distribution of their embedding space can negatively impact cosine similarity searches. We introduce Autoencoders with Strong Variance Constraints (AE-SVC), which, when used for projection, significantly improves the performance of foundation models. We provide an in-depth theoretical analysis of AE-SVC. Addressing efficiency, we introduce Single-shot Similarity Space Distillation ((SS)$_2$D), a novel approach to learn embeddings with adaptive sizes that offers a better trade-off between size and performance. We conducted extensive experiments on four retrieval datasets, including Stanford Online Products (SoP) and Pittsburgh30k, using four different off-the-shelf foundation models, including DinoV2 and CLIP. AE-SVC demonstrates up to a $16\%$ improvement in retrieval performance, while (SS)$_2$D shows a further $10\%$ improvement for smaller embedding sizes.
