Tutorial on Approximate Nearest Neighbor Search (ANNS) – Techniques and Open Problems

1 ANNS AND RECENT DEVELOPMENTS Approximate nearest neighbor search (ANNS) is a classical algorithmic problem that is increasingly relevant in practice today across a variety of AI application domains. For AI-first applications, ANNS is the key index that connects neural networks for search [27], recommendation [6] and content generation/summarization [10, 18, 19, 25, 26] with relevant items in the knowledge store. This linking process helps better ground the output of the models and generates higher quality results. While ANNS is a well-studied problem, classical algorithms like LSH [2] and its derivatives fail to meet the requirements of this new generation of applications. Some of the shortcomings include inadequate query performance for large indices of high dimensional vectors (107 to 1012 vectors with dimensions in the range of 102 − 104) and memory-inefficiency and difficulty scaling in the external-memory setting. Perhaps most importantly, existing ANNS approaches are difficult to adapt to new and natural feature requirements motivated by emerging applications. Examples include (a) designing streaming indices, (b) designing ANN indices that can support a combination of hard matches and nearest neighbor search [34], and (c) designing indices that can quickly answer filtered queries. Addressing these new requirements has been a productive and active new research area, with numerous research papers [4, 15, 20, 22– 24, 31, 32] and open search packages [11, 12, 22, 28] aiming to push the research and development frontier. There are also vector-searchas-a-service companies (e.g. Milvus, Pinecone, Qdrant, Vespa, Weaviate, Zilliz) that package this research for commercial use, not to mentioned extensively customized in-house solutions at larger companies where several products stand on ANNS.

[1]  H. Simhadri,et al.  OOD-DiskANN: Efficient and Scalable Graph ANNS for Out-of-Distribution Queries , 2022, ArXiv.

[2]  Jane A. Yu,et al.  Few-shot Learning with Retrieval Augmented Language Models , 2022, J. Mach. Learn. Res..

[3]  Suhas Jayaram Subramanya,et al.  Results of the NeurIPS'21 Challenge on Billion-Scale Approximate Nearest Neighbor Search , 2022, NeurIPS.

[4]  G. Blelloch,et al.  PaC-trees: supporting parallel and compressed purely-functional collections , 2022, PLDI.

[5]  Jeff Wu,et al.  WebGPT: Browser-assisted question-answering with human feedback , 2021, ArXiv.

[6]  Diego de Las Casas,et al.  Improving language models by retrieving from trillions of tokens , 2021, ICML.

[7]  Mao Yang,et al.  SPANN: Highly-efficient Billion-scale Approximate Nearest Neighbor Search , 2021, ArXiv.

[8]  Ravishankar Krishnaswamy,et al.  FreshDiskANN: A Fast and Accurate Graph-Based ANN Index for Streaming Similarity Search , 2021, ArXiv.

[9]  Guy E. Blelloch,et al.  ParlayLib - A Toolkit for Parallel Algorithms on Shared-Memory Multicore Machines , 2020, SPAA.

[10]  Ming-Wei Chang,et al.  REALM: Retrieval-Augmented Language Model Pre-Training , 2020, ICML.

[11]  Julian Shun,et al.  Low-latency graph streaming using compressed purely-functional trees , 2019, PLDI.

[12]  Guy E. Blelloch,et al.  Optimal Parallel Algorithms in the Binary-Forking Model , 2019, SPAA.

[13]  Guy E. Blelloch,et al.  Parallelism in Randomized Incremental Algorithms , 2018, J. ACM.

[14]  Martin Aumüller,et al.  ANN-Benchmarks: A Benchmarking Tool for Approximate Nearest Neighbor Algorithms , 2018, SISAP.

[15]  Deng Cai,et al.  Fast Approximate Nearest Neighbor Search With Navigating Spreading-out Graphs , 2017, ArXiv.

[16]  Jeff Johnson,et al.  Billion-Scale Similarity Search with GPUs , 2017, IEEE Transactions on Big Data.

[17]  Guy E. Blelloch,et al.  PAM: parallel augmented maps , 2016, PPoPP.

[18]  Jianfeng Gao,et al.  MS MARCO: A Human Generated MAchine Reading COmprehension Dataset , 2016, CoCo@NIPS.

[19]  Yury A. Malkov,et al.  Efficient and Robust Approximate Nearest Neighbor Search Using Hierarchical Navigable Small World Graphs , 2016, IEEE Transactions on Pattern Analysis and Machine Intelligence.

[20]  Alexandr Andoni,et al.  Practical and Optimal LSH for Angular Distance , 2015, NIPS.

[21]  Guy E. Blelloch,et al.  A Top-Down Parallel Semisort , 2015, SPAA.

[22]  Vladimir Krylov,et al.  Approximate nearest neighbor algorithm based on navigable small world graphs , 2014, Inf. Syst..

[23]  Jian Sun,et al.  Optimized Product Quantization , 2014, IEEE Transactions on Pattern Analysis and Machine Intelligence.

[24]  Victor S. Lempitsky,et al.  The Inverted Multi-Index , 2012, IEEE Transactions on Pattern Analysis and Machine Intelligence.

[25]  Suhas Jayaram Subramanya,et al.  DiskANN : Fast Accurate Billion-point Nearest Neighbor Search on a Single Node , 2019 .

[26]  Cordelia Schmid,et al.  Product Quantization for Nearest Neighbor Search , 2011, IEEE Transactions on Pattern Analysis and Machine Intelligence.