Learning Cluster Representatives for Approximate Nearest Neighbor Search
Thomas Vecchiato
TL;DR
This work tackles scalable high-accuracy ANN search in dense vector spaces by focusing on clustering-based indexing. It introduces learning cluster representatives via a simple linear routing function learned through Learning-to-Rank, replacing standard centroids with learnt vectors to improve top-1 and top-k retrieval. Empirical results across multiple datasets, embedding models, and clustering variants demonstrate substantial accuracy gains, with the linear routing approach offering favorable efficiency-accuracy trade-offs and easy production integration. The study also investigates nonlinearity, concluding that a linear routing function provides the best balance, and suggests promising future extensions to other distances, larger k, and query-aware clustering. The findings highlight a productive bridge between Learning-to-Rank and ANN, with practical implications for fast, accurate vector search in real-world systems.
Abstract
Developing increasingly efficient and accurate algorithms for approximate nearest neighbor search is a paramount goal in modern information retrieval. A primary approach to addressing this question is clustering, which involves partitioning the dataset into distinct groups, with each group characterized by a representative data point. By this method, retrieving the top-k data points for a query requires identifying the most relevant clusters based on their representatives -- a routing step -- and then conducting a nearest neighbor search within these clusters only, drastically reducing the search space. The objective of this thesis is not only to provide a comprehensive explanation of clustering-based approximate nearest neighbor search but also to introduce and delve into every aspect of our novel state-of-the-art method, which originated from a natural observation: The routing function solves a ranking problem, making the function amenable to learning-to-rank. The development of this intuition and applying it to maximum inner product search has led us to demonstrate that learning cluster representatives using a simple linear function significantly boosts the accuracy of clustering-based approximate nearest neighbor search.
