To obtain information comparable to a given query, large-scale web search engines train an encoder to contain the query and then connect the encoder to a Nearest Neighbor Search (ANNS) pipeline. The learned representations are often high-dimensional rigid vectors that are generally used as-is throughout the ANNS pipeline. They can result in computationally expensive recovery due to their ability to accurately capture final queries and data points.
An integral part of retrieval pipelines is a semantic search for learned representations. Learning a neural network to embed queries and a large number (N) of data points in a d-dimensional vector space is the bare minimum for a semantic search approach. All steps of an ANN use the same information learned by existing semantic search algorithms, which are rigid representations (RRs). That is, while ANNS indices allow a wide range of parameters to be searched in the design space to maximize the trade-off between precision and computation, it is commonly believed that the dimensionality of the input data is fixed.
Different ANNS stages can use adaptive representations of different capabilities to achieve significantly better precision computation trade-offs than would be possible with rigid representations, i.e. ANNS stages that can get away with a more approximate calculation should use a smaller capacity representation of the same data point. The researchers offer AdANNS, a new ANNS design framework that takes advantage of the adaptability offered by Matryoshka Representations.
The researchers show next-generation computation and precision trade-offs using unique key ANNS building pieces based on AdANNS, such as search (AdANNS-IVF) and quantization (AdANNS-OPQ) data structures. AdANNS-IVF, for example, achieves 1.5% higher accuracy than rigid representation-based IVF on ImageNet retrieval while using the same compute budget and achieves parity of accuracy while running 90 times faster on the same data set. AdANNS-OPQ, a 32-byte variant of OPQ built with flexible representations, achieves the same precision as the 64-byte OPQ baseline for natural questions. They also demonstrate that the benefits of AdANNS can be applied to next-generation ANNS composite indices using search and quantification structures. Finally, they show that ANNS indices constructed without adaptation using matryoshka representations can be searched computationally with AdANNS.
Visit https://github.com/RAIVNLab/AdANNS to get the source code.
key features
- Better precision calculation trade-offs are achieved by using AdANNS to develop new search data structures and quantization techniques.
- AdANNS-IVF can be implemented 90% faster than traditional IVF and increases accuracy by up to 1.5%.
- AdANNS-OPQ has the same precision as the gold standard at a fraction of the price.
- AdANNS-powered data structure search (AdANNS-IVF) and quantization (AdANNS-OPQ) significantly outperform next-generation alternatives with respect to precision computational tradeoff.
- In addition to enabling computation-aware elastic search during inference, AdANNS generalizes to next-generation composite ANNS indices.
AdANNS – Adaptive ANNS
AdANNS is a system for improving computational precision compensation for semantic search components that takes advantage of the inherent flexibility of matryoshka representations. There are two main parts to the typical ANNS pipeline: (a) a search data structure that indexes and stores data points; and (b) a query point calculation method that provides the (approximate) distance between a query and a set of data points.
In this study, we demonstrate that AdANNS can be used to improve the performance of both ANNS subsystems and quantify the improvements in terms of the tradeoff between computational effort and precision. Specifically, they present AdANNS-IVF, an AdANNS-based index structure that is similar to the more common IVF structure and the related ScanN structure. Furthermore, they introduce representation adaptability into the OPQ, a de facto standard quantization, with the help of AdANNS-OPQ. AdANNS-IVFOPQ, an AdANNS variant of IVFOPQ, and AdANNS-DiskANN, a variant of DiskANN, are two other examples of hybrid methods demonstrated by researchers. Compared to RR-constructed IVF indices, AdANNS-IVF has been shown experimentally to be substantially more accurate: the calculation is optimal. AdANNS-OPQ has been shown to be as accurate as OPQ in RR, but significantly cheaper.
AdANNS are designed with search architectures that can accommodate various large-scale use cases, each with unique resource requirements for training and inference. However, it is only sometimes the case that the user is unable to search the design space due to storage and index creation issues.
In conclusion
AdANNS was proposed by a group of researchers from the University of Washington, Google Research, and Harvard University to improve the balance between precision and computation by using adaptive representations at many stages of ANNS pipelines. Compared to traditional ANNS building blocks, which employ the same inflexible representation throughout, AdANNS takes advantage of the inherent flexibility of matryoshka representations to build superior building blocks. For the two main building blocks of ANNS: search (AdANNS-IVF) and quantization (AdANNS-OPQ) data structures, AdANNS achieves the balance between precision and computation of SOTA. Finally, by combining AdANNS-based building blocks, improved real-world composite ANNS indexes can be built, enabling computation-aware elastic search and reducing costs by up to 8 times compared to lines of solid foundation.
review the Paper and Github. Don’t forget to join our 23k+ ML SubReddit, discord channel, and electronic newsletter, where we share the latest AI research news, exciting AI projects, and more. If you have any questions about the article above or if we missed anything, feel free to email us at [email protected]
🚀 Check out 100 AI tools at AI Tools Club
Dhanshree Shenwai is a Computer Engineer and has good experience in FinTech companies covering Finance, Cards & Payments and Banking domain with strong interest in AI applications. She is enthusiastic about exploring new technologies and advancements in today’s changing world, making everyone’s life easier.