SPANN: Highly-efficient Billion-scale Approximate Nearest Neighbor Search

The in-memory algorithms for approximate nearest neighbor search (ANNS) have\nachieved great success for fast high-recall search, but are extremely expensive\nwhen handling very large scale database. Thus, there is an increasing request\nfor the hybrid ANNS solutions with small memory and inexpensive solid-state\ndrive (SSD). In this paper, we present a simple but efficient memory-disk\nhybrid indexing and search system, named SPANN, that follows the inverted index\nmethodology. It stores the centroid points of the posting lists in the memory\nand the large posting lists in the disk. We guarantee both disk-access\nefficiency (low latency) and high recall by effectively reducing the\ndisk-access number and retrieving high-quality posting lists. In the\nindex-building stage, we adopt a hierarchical balanced clustering algorithm to\nbalance the length of posting lists and augment the posting list by adding the\npoints in the closure of the corresponding clusters. In the search stage, we\nuse a query-aware scheme to dynamically prune the access of unnecessary posting\nlists. Experiment results demonstrate that SPANN is 2$\\times$ faster than the\nstate-of-the-art ANNS solution DiskANN to reach the same recall quality $90\\%$\nwith same memory cost in three billion-scale datasets. It can reach $90\\%$\nrecall@1 and recall@10 in just around one millisecond with only 32GB memory\ncost. Code is available at:\n{\\footnotesize\\color{blue}{\\url{https://github.com/microsoft/SPTAG}}}.\n

Paper

Similar papers

© 2026 NYSGPT2525 LLC