Billion-scale similarity search with GPUs
Authors: Jeff Johnson, Matthijs Douze, Hervé Jégou
Abstract
Similarity search finds application in specialized database systems handling complex data such as images or videos, which are typically represented by high-dimensional features and require specific indexing structures. This paper tackles the problem of better utilizing GPUs for this task. While GPUs excel at data-parallel tasks, prior approaches are bottlenecked by algorithms that expose less parallelism, such as k-min selection, or make poor use of the memory hierarchy. We propose a design for k-selection that operates at up to 55% of theoretical peak performance, enabling a nearest neighbor implementation that is 8.5x faster than prior GPU state of the art. We apply it in different similarity search scenarios, by proposing optimized design for brute-force, approximate and compressed-domain search based on product quantization. In all these setups, we outperform the state of the art by large margins. Our implementation enables the construction of a high accuracy k-NN graph on 95 million images from the Yfcc100M dataset in 35 minutes, and of a graph connecting 1 billion vectors in less than 12 hours on 4 Maxwell Titan X GPUs. We have open-sourced our approach for the sake of comparison and reproducibility.
The papers around it, by date and closeness
Higher is closer to this paper; left is older. Lines join papers close to each other: groups of lines are sub-topics. Select a point to see why it is there. Back to the summary of this paper
Papers around this one
Ranked by how close their title and abstract are to this paper’s. Select some to read them together.
Closest papers
-
GTS: GPU-based Tree Index for Fast Similarity SearchYi-Fan Zhu, Rui Ma, Bai-Hua Zheng et al. · 2024 · Proc. ACM Manag. Data · cited 18 times · Not summarized yet
GTS builds a GPU tree index for similarity search in general metric spaces, while this paper accelerates GPU k-selection and several search strategies.
Abstract
Similarity search, the task of identifying objects most similar to a given query object under a specific metric, has gathered significant attention due to its practical applications. However, the absence of coordinate information to accelerate similarity search and the high computational cost of measuring object similarity hinder the efficiency of existing CPU-based methods. Additionally, these methods struggle to meet the demand for high throughput data management. To address these challenges, we propose GTS, a GPU-based tree index designed for the parallel processing of similarity search in general metric spaces, where only the distance metric for measuring object similarity is known. The …
-
Vector and Line Quantization for Billion-scale Similarity Search on GPUsWei Chen, Jin-Cai Chen, Fuhao Zou et al. · 2019 · Future generations computer systems · cited 17 times · Not summarized yet
Vector and Line Quantization develops GPU quantization methods for billion-scale approximate nearest-neighbor search, also addressed here with product-quantized search.
Abstract
Abstract Billion-scale high-dimensional approximate nearest neighbor (ANN) search has become an important problem for searching similar objects among the vast amount of images and videos available online. The existing ANN methods are usually characterized by their specific indexing structures, including the inverted index and the inverted multi-index structure. The inverted index structure is amenable to GPU-based implementations, and the state-of-the-art systems such as Faiss are able to exploit the massive parallelism offered by GPUs. However, the inverted index requires high memory overhead to index the dataset effectively. The inverted multi-index structure is difficult to implement for …
-
Accelerating Nearest Neighbor Search on Manycore SystemsLawrence Cayton · 2011 · IEEE International Parallel and Distributed Processing Symposium · cited 59 times · Not summarized yet
Accelerating Nearest Neighbor Search develops parallel metric-search algorithms for multicore CPUs and GPUs, rather than this paper’s optimized GPU selection and search designs.
Abstract
We develop methods for accelerating metric similarity search that are effective on modern hardware. Our algorithms factor into easily parallelizable components, making them simple to deploy and efficient on multicore CPUs and GPUs. Despite the simple structure of our algorithms, their search performance is provably sub linear in the size of the database, with a factor dependent only on its intrinsic dimensionality. We demonstrate that our methods provide substantial speedups on a range of datasets and hardware platforms. In particular, we present results on a 48-core server machine, on graphics hardware, and on a multicore desktop.
-
Efficient Selection Algorithm for Fast k-NN Search on GPUsXiaoxin Tang, Zhiyi Huang, D. Eyers et al. · 2015 · IEEE International Parallel and Distributed Processing Symposium · cited 17 times · Not summarized yet
Efficient Selection Algorithm optimizes GPU k-selection, the bottleneck this paper addresses with a faster selection design.
Abstract
k Nearest Neighbours (k-NN) search is a fundamental problem in many computer vision and machine learning tasks. These tasks frequently involve a large number of high-dimensional vectors, which require intensive computations. Recent research work has shown that the Graphics Processing Unit (GPU) is a promising platform for solving k-NN search. However, these search algorithms often meet a serious bottleneck on GPUs due to a selection procedure, called k-selection, which is the final stage of k-NN and significantly affects the overall performance. In this paper, we propose new data structures and optimization techniques to accelerate k-selection on GPUs. Three key techniques are proposed: Merg…
-
OctEx: Billion-Scale Vector Search by Precomputed Lattice Neighbor Lists on GPUsDongfang Zhao · 2026 · Not summarized yet
OctEx develops a later GPU system for billion-scale vector search and cites this paper as prior work.
Abstract
Approximate nearest-neighbor search on GPUs serves retrieval-augmented generation, recommendation, and deduplication over datasets of up to billions of vectors. The fastest GPU indexes at high recall, such as CAGRA, walk proximity graphs in chained rounds, each of which waits for the distances of the previous one. High recall therefore costs many dependent rounds per query. Our insight is to spend the HBM of the GPUs on precomputed neighbor lists, so that a query reads its candidates in one parallel step instead of a chain of rounds. This paper turns the above insight into a GPU vector search system, namely OctEx, which holds hundreds of randomly projected copies of the dataset in GPU memory…
-
Fast top-K Cosine Similarity Search through XOR-Friendly Binary Quantization on GPUsX. Jian, Jianqiu Lu, Ze-Xi Yuan et al. · 2020 · arXiv.org · preprint, not peer reviewed · cited 6 times · Not summarized yet
Fast top-K Cosine Similarity Search accelerates GPU nearest-neighbor search with binary quantization, while this paper targets multiple similarity-search settings.
Abstract
We explore the use of GPU for accelerating large scale nearest neighbor search and we propose a fast vector-quantization-based exhaustive nearest neighbor search algorithm that can achieve high accuracy without any indexing construction specifically designed for cosine similarity. This algorithm uses a novel XOR-friendly binary quantization method to encode floating-point numbers such that high-complexity multiplications can be optimized as low-complexity bitwise operations. Experiments show that, our quantization method takes short preprocessing time, and helps make the search speed of our exhaustive search method much more faster than that of popular approximate nearest neighbor algorithms…
-
Efficient Computation of k-Nearest Neighbour Graphs for Large High-Dimensional Data Sets on GPU ClustersA. Dashti, I. Komarov, R. D'Souza · 2013 · PLoS ONE · cited 23 times · Not summarized yet
Efficient Computation constructs exact high-dimensional k-nearest-neighbor graphs with GPUs across clusters, a task this paper also scales to large datasets.
Abstract
This paper presents an implementation of the brute-force exact k-Nearest Neighbor Graph (k-NNG) construction for ultra-large high-dimensional data cloud. The proposed method uses Graphics Processing Units (GPUs) and is scalable with multi-levels of parallelism (between nodes of a cluster, between different GPUs on a single node, and within a GPU). The method is applicable to homogeneous computing clusters with a varying number of nodes and GPUs per node. We achieve a 6-fold speedup in data processing as compared with an optimized method running on a cluster of CPUs and bring a hitherto impossible -NNG generation for a dataset of twenty million images with 15 k dimensionality into the realm o…
-
RobustiQ: A Robust ANN Search Method for Billion-scale Similarity Search on GPUsWei Chen, Jin-Cai Chen, Fuhao Zou et al. · 2019 · International Conference on Multimedia Retrieval · cited 17 times · Not summarized yet
RobustiQ addresses robust billion-scale approximate nearest-neighbor search on GPUs, the same broad search problem studied here.
Abstract
GPU-based methods represent state-of-the-art in approximate nearest neighbor (ANN) search, as they are scalable (billion-scale), accurate (high recall) as well as efficient (sub-millisecond query speed). Faiss, the representative GPU-based ANN system, achieves considerably faster query speed than the representative CPU-based systems. The query accuracy of Faiss critically depends on the number of indexing regions, which in turn is dependent on the amount of available memory. At the same time, query speed deteriorates dramatically with the increase in the number of partition regions. Thus, it can be observed that Faiss suffers from a lack of robustness, that the fine-grained partitioning of d…
Prior work it builds on
-
Efficient Large-Scale Approximate Nearest Neighbor Search on the GPUP. Wieschollek, Oliver Wang, A. Sorkine-Hornung et al. · 2016 · Computer Vision and Pattern Recognition · cited 67 times · Not summarized yet
Efficient Large-Scale Approximate Nearest Neighbor Search uses product quantization and GPU parallelism for high-dimensional ANN, also covered by this paper.
Abstract
We present a new approach for efficient approximate nearest neighbor (ANN) search in high dimensional spaces, extending the idea of Product Quantization. We propose a two level product and vector quantization tree that reduces the number of vector comparisons required during tree traversal. Our approach also includes a novel highly parallelizable re-ranking method for candidate vectors by efficiently reusing already computed intermediate values. Due to its small memory footprint during traversal the method lends itself to an efficient, parallel GPU implementation. This Product Quantization Tree (PQT) approach significantly outperforms recent state of the art methods for high dimensional near…
-
Efficient k-nearest neighbor graph construction for generic similarity measuresWei Dong, Charikar Moses, K. Li · 2011 · The Web Conference · cited 889 times · Not summarized yet
Efficient k-nearest neighbor graph construction for generic similarity measures is cited as prior work on GPU-compatible neighbor-graph construction.
-
Fast GPU-based locality sensitive hashing for k-nearest neighbor computationJia Pan, Dinesh Manocha · 2011 · ACM SIGSPATIAL International Workshop on Advances in Geographic Information Systems · cited 124 times · Not summarized yet
Fast GPU-based locality sensitive hashing for k-nearest neighbor computation is cited as earlier GPU-based neighbor-search work.
-
Searching in one billion vectors: Re-rank with source codingH. Jégou, R. Tavenard, Matthijs Douze et al. · 2011 · IEEE International Conference on Acoustics, Speech, and Signal Processing · cited 420 times · Not summarized yet
Searching in one billion vectors reranks source-coded neighbor candidates and introduces a billion-vector dataset, relevant to this paper’s compressed-domain search.
Abstract
Recent indexing techniques inspired by source coding have been shown successful to index billions of high-dimensional vectors in memory. In this paper, we propose an approach that re-ranks the neighbor hypotheses obtained by these compressed-domain indexing methods. In contrast to the usual post-verification scheme, which performs exact distance calculation on the short-list of hypotheses, the estimated distances are refined based on short quantization codes, to avoid reading the full vectors from disk. We have released a new public dataset of one billion 128-dimensional vectors and proposed an experimental setup to evaluate high dimensional indexing algorithms on a realistic scale. Experime…
-
kNN Query Processing in Metric Spaces Using GPUsR. Barrientos, J. Gómez, C. Tenllado et al. · 2011 · European Conference on Parallel Processing · cited 67 times · Not summarized yet
kNN Query Processing in Metric Spaces Using GPUs is cited as prior GPU work on nearest-neighbor query processing.
Papers that cite it
-
GPU-Based Algorithms for Processing the k-CP Query on Spatial DataIoannis Pateras, Polychronis Velentzas, M. Vassilakopoulos et al. · 2026 · ISPRS International Journal of Geo-Information · Not summarized yet
GPU-Based Algorithms processes exact closest-pair queries on spatial data, a neighboring GPU query problem rather than vector similarity search.
Abstract
Algorithms for processing large-scale spatial datasets are of significant interest in both scientific research and industrial applications. The efficient implementation of such algorithms is crucial for modern data-intensive systems, and GPU-based parallel processing has emerged as a particularly effective approach for accelerating spatial queries. Among these, computing the k closest pairs (k-CP) between large spatial datasets is a fundamental problem with applications in spatial data analysis, geographic information systems, and data mining. This paper presents an exact GPU-based framework for processing k-CP queries in both two- and three-dimensional spaces, including variants capable of …
-
Turbocharging PiPNN for Proximity and $k$-NN Graph BuildingTobias Rubel, Richard Wen, G. Blelloch et al. · 2026 · cited 1 time · Not summarized yet
Turbocharging PiPNN presents GPU graph-index construction methods and cites this paper among its prior work.
Abstract
Graph-based Approximate Nearest Neighbor Search (ANNS) indexes such as HNSW and Vamana deliver state-of-the-art query performance at the cost of large indexing times. The recently introduced PiPNN method drastically accelerated index construction by way of a partitioning-based algorithm leveraging dense matrix multiplication and top-$K$ aggregation kernels. In this paper, we unlock the full potential of PiPNN's hardware-friendly algorithm design. We introduce PiPNN II, which optimizes multiple steps of the PiPNN recipe, giving up to $8\times$ speedups for graph-based ANNS index construction. In addition, we present GPiPNN, a GPU implementation which builds comparable ANNS indices up to $43.7…
-
Hybrid GPU-CPU Retrieval for Personalized Search at Ultra-Large ScaleHao-Hao Fu, Ji-Chao Sun, Bai-Ting Zhu et al. · 2026 · Not summarized yet
Hybrid GPU-CPU Retrieval addresses personalized retrieval over trillion-scale documents, rather than similarity search over vectors.
Abstract
Embedding-based retrieval on user-generated content at the trillion-document scale exposes a sharp conflict between two production demands: deep, expressive personalization for queries with rich user intent, and broad coverage of a massive inventory under fixed latency and resource budgets. We characterize this as the personalization-scale paradox: hosting the full serving inventory in GPU memory is too resource intensive, while CPU compute cannot execute the same interaction-heavy model on the latency-critical path. We present a hybrid GPU-CPU co-serving system that resolves the paradox through orchestration rather than a new model class. A high-depth GPU pathway fuses retrieval and interac…
-
CertEx: Exact Visual Retrieval at Scale by Certified ExclusionDongfang Zhao · 2026 · cited 1 time · Not summarized yet
CertEx presents exact GPU visual retrieval and cites this paper as earlier work on large-scale GPU nearest-neighbor search.
Abstract
Exact $k$-nearest-neighbor (kNN) search over image descriptors and embeddings underlies visual retrieval, near-duplicate detection, the evaluation of learned representations, and increasingly the memory of LLM agents. However, exhaustive search computes every distance at full precision, whereas approximate indexes return recall below one. We observe that exact search only needs a proof that each excluded vector cannot be a neighbor. Because such a proof only has to be conservative, it can be checked in low precision, much as the retina examines the whole scene at low resolution. We call this principle certified exclusion and realize it in an exact kNN method for GPUs, which we call CertEx. S…
-
GEM-KMeans: Memory-Efficient and Accurate Clustering on Massive Scale with GPU OptimizationPeng Xu, Nihar Koganti, Volodymyr Kindratenko et al. · 2026 · Not summarized yet
GEM-KMeans optimizes GPU clustering through memory-efficient matrix factorization, a different large-scale data-analysis task.
Abstract
Memory-efficient scaling on clustering problems without sacrificing statistical accuracy is of central interest for large-scale data analysis and machine learning problems. Nonnegative low-rank (NLR) matrix factorization for $K$-means is a scalable clustering method, which connects to semidefinite relaxations with optimal average-case exact recovery guarantees. However, a direct GPU implementation of NLR requires multiple large factor-sized buffers and substantial data movements that are essentially memory-bound. In this paper, we introduce GEM-KMeans, a spectrally normalized yet mathematically equivalent NLR formulation that fuses the gradient update, nonnegative projection, and sufficient …
Go further
How are these papers found?
We compare the title and abstract of this paper with those of every paper summarized on this site, and with the papers Semantic Scholar recommends, those it cites and those citing it (for a much-cited paper, its most recent citations and, from OpenAlex, the most cited ones). Among the prior work and the follow-ups, the papers that use each other in depth, a method it uses and the much-cited follow-ups come a little higher. The levels (very close, close, related) come from the similarity of the texts, not from a judgment of quality; * marks a paper without an abstract, compared by its title. The sentence under a paper is written by an AI from the two abstracts: check it in the papers. A paper marked not relevant by three readers leaves the list.
Updated on 6 November 2026.