Papers › Billion-scale similarity search with GPUs

Billion-scale similarity search with GPUs

28 Feb 2017arXiv:1702.08734archive 2025-07-28

Jeff Johnson, Matthijs Douze, Hervé Jégou

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.

PaperPDFCodeCode Syntology ran

In Syntology View this paper on Syntology: its repositories, every harvested function with whether it ran, its licence and the call to fetch it.

Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="1702.08734")

Code

Syntology Ran 8 of 35 code samples harvested from 8 repositories linked to this paper; 27 have no recorded run. Of those that ran: 1 ran · honoured contract; 2 ran · our draft was wrong; 3 ran · fixture could not drive it; 2 ran with no contract checked.

By repository: official repository: 1 sample from 1 repository, 1 ran; community (archive-listed): 34 samples from 7 repositories, 7 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

14 repositories listed; official and paper-mentioned ones first.

facebookresearch/faiss officialmentioned in papermentioned on GitHubpytorch report
CoderINusE/NIPS-implementation mentioned on GitHubpytorch report
CoderINusE/unbounded-cache-lm mentioned on GitHubpytorch report
NGDSystems/faiss mentioned on GitHubMIT report
NJU-yasuo/faiss_t mentioned on GitHubMIT report
bitsun/faiss-windows mentioned on GitHubNOASSERTION report
gauenk/faiss_fork mentioned on GitHubpytorch report
hartb/faiss-gpu-feedstock mentioned on GitHubMIT report
junjya/faiss mentioned on GitHub report
mimbres/neural-audio-fp mentioned on GitHubtf report
shiwendai/Faiss mentioned on GitHubNOASSERTION report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

35 samples harvested; 8 ran; 1 honoured the contract we drafted; 27 have no recorded run. Read from Syntology's graph 2026-09-25; that is when this build read the record, not when the samples ran.

1ran · honoured contract
2ran · our draft was wrong
3ran · fixture could not drive it
2ran
27unverified

Licence: 27 of the 35 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from 8 repositories linked to this paper, official or community; each sample names its own and says which. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

ResultHeap facebookresearch/faiss/faiss/python/extra_wrappers.py official repository ran MIT (permissive) · ea695399691d5c67 · report
TopKDecoder CoderINusE/NIPS-implementation/cachemodel/model/TopKDecoder.py community (archive-listed) ran · metamorphic tier: deterministic no licence file found · pointer only · 46daee162d87d2b7 · report
_inflate CoderINusE/NIPS-implementation/cachemodel/model/TopKDecoder.py community (archive-listed) ran · our draft was wrong fingerprinted no licence file found · pointer only · 5d2667bb7b710034 · report
conv_eye_func mimbres/neural-audio-fp/model/utils/mini_search_subroutines.py community (archive-listed) ran · our draft was wrong MIT (permissive) · 3f2d7c9af203247b · report
index_topk gauenk/faiss_fork/contrib/kmb_search/topk_impl.py community (archive-listed) ran · fixture could not drive it MIT (permissive) · a44319c627db69a6 · report
kmb_topk gauenk/faiss_fork/contrib/kmb_search/topk_impl.py community (archive-listed) ran · fixture could not drive it fingerprinted MIT (permissive) · 7af4b720e9e6976b · report
mmap_fvecs NGDSystems/faiss/benchs/bench_gpu_1bn.py community (archive-listed) ran · honoured contract MIT recorded; this copy not marked cleared · pointer only · 37bf4e15693c357b · report
pairwise_distances_for_eval mimbres/neural-audio-fp/model/utils/mini_search_subroutines.py community (archive-listed) ran · fixture could not drive it fingerprinted MIT (permissive) · b2924daa439523ca · report
Version architecture-research-group/ae-asplo25-iks-faiss/faiss/python/loader.py community (archive-listed) unverified MIT recorded; this copy not marked cleared · pointer only · dfb360f7bbe13cdf · report
array_to_AlignedTable architecture-research-group/ae-asplo25-iks-faiss/faiss/python/array_conversions.py community (archive-listed) unverified MIT recorded; this copy not marked cleared · pointer only · 59b740b6e231a05f · report
compute_GT_CPU PhilipBAdams/faiss-learned-termination-prior-weighted/benchs/learned_termination/compute_gt.py community (archive-listed) unverified MIT recorded; this copy not marked cleared · pointer only · da1a30713335ebc8 · report
dataset_iterator PhilipBAdams/faiss-learned-termination-prior-weighted/benchs/learned_termination/compute_gt.py community (archive-listed) unverified MIT recorded; this copy not marked cleared · pointer only · 09f96192d762b88a · report
factory_factory architecture-research-group/ae-asplo25-iks-faiss/benchs/bench_fw_codecs.py community (archive-listed) unverified MIT recorded; this copy not marked cleared · pointer only · 196998b7ff7b22d1 · report
format_tab NGDSystems/faiss/benchs/bench_index_flat.py community (archive-listed) unverified MIT recorded; this copy not marked cleared · pointer only · 8fb34ab9942200dd · report
fvecs_read PhilipBAdams/faiss-learned-termination-prior-weighted/benchs/learned_termination/util.py community (archive-listed) unverified MIT recorded; this copy not marked cleared · pointer only · 23c02ac2706051bc · report
handle_Index PhilipBAdams/faiss-learned-termination-prior-weighted/python/faiss.py community (archive-listed) unverified MIT recorded; this copy not marked cleared · pointer only · ca9b07ade2ce388e · report
handle_Index architecture-research-group/ae-asplo25-iks-faiss/faiss/python/class_wrappers.py community (archive-listed) unverified MIT recorded; this copy not marked cleared · pointer only · 27ffa8dd9a2a7106 · report
handle_IndexBinary PhilipBAdams/faiss-learned-termination-prior-weighted/python/faiss.py community (archive-listed) unverified MIT recorded; this copy not marked cleared · pointer only · 5fee7d1fb37901eb · report
handle_IndexBinary architecture-research-group/ae-asplo25-iks-faiss/faiss/python/class_wrappers.py community (archive-listed) unverified MIT recorded; this copy not marked cleared · pointer only · a7eb95c467797608 · report
handle_Quantizer PhilipBAdams/faiss-learned-termination-prior-weighted/python/faiss.py community (archive-listed) unverified MIT recorded; this copy not marked cleared · pointer only · b1f85415d968de69 · report
handle_Quantizer architecture-research-group/ae-asplo25-iks-faiss/faiss/python/class_wrappers.py community (archive-listed) unverified MIT recorded; this copy not marked cleared · pointer only · 971e6d130b48826e · report
index_cpu_to_all_gpus architecture-research-group/ae-asplo25-iks-faiss/faiss/python/gpu_wrappers.py community (archive-listed) unverified MIT recorded; this copy not marked cleared · pointer only · 864bb6e516b151f4 · report
index_cpu_to_gpu_multiple_py architecture-research-group/ae-asplo25-iks-faiss/faiss/python/gpu_wrappers.py community (archive-listed) unverified MIT recorded; this copy not marked cleared · pointer only · cff1de004efc1328 · report
index_cpu_to_gpus_list architecture-research-group/ae-asplo25-iks-faiss/faiss/python/gpu_wrappers.py community (archive-listed) unverified MIT recorded; this copy not marked cleared · pointer only · 80e56c7c054e0ebc · report
ivecs_read PhilipBAdams/faiss-learned-termination-prior-weighted/benchs/learned_termination/util.py community (archive-listed) unverified MIT recorded; this copy not marked cleared · pointer only · 7989213dfc5c4cc4 · report
kmax architecture-research-group/ae-asplo25-iks-faiss/faiss/python/extra_wrappers.py community (archive-listed) unverified MIT recorded; this copy not marked cleared · pointer only · b229576ee03690d2 · report
kmin junjya/faiss/python/faiss.py community (archive-listed) unverified MIT (permissive) · 7c7d46a7a6d55978 · report
kmin architecture-research-group/ae-asplo25-iks-faiss/faiss/python/extra_wrappers.py community (archive-listed) unverified MIT recorded; this copy not marked cleared · pointer only · e7675ea4deb8fd46 · report
mini_search_eval mimbres/neural-audio-fp/model/utils/mini_search_subroutines.py community (archive-listed) unverified MIT (permissive) · d5ecc4f95dcb92a0 · report
mmap_bvecs NGDSystems/faiss/benchs/bench_gpu_1bn.py community (archive-listed) unverified MIT recorded; this copy not marked cleared · pointer only · 1c59580df5e1f28e · report
sanitize NGDSystems/faiss/benchs/bench_gpu_1bn.py community (archive-listed) unverified MIT recorded; this copy not marked cleared · pointer only · 3246aac64c9cf190 · report
sanitize PhilipBAdams/faiss-learned-termination-prior-weighted/benchs/learned_termination/compute_gt.py community (archive-listed) unverified MIT recorded; this copy not marked cleared · pointer only · c7cb5f9b4731ed5a · report
topk_torch gauenk/faiss_fork/contrib/kmb_search/topk_impl.py community (archive-listed) unverified MIT (permissive) · 0cd29500df5d2f5e · report
vector_float_to_array architecture-research-group/ae-asplo25-iks-faiss/faiss/python/array_conversions.py community (archive-listed) unverified MIT recorded; this copy not marked cleared · pointer only · 8ed35895b6a30e26 · report
vector_to_array architecture-research-group/ae-asplo25-iks-faiss/faiss/python/array_conversions.py community (archive-listed) unverified MIT recorded; this copy not marked cleared · pointer only · 771b9836ad9a8c25 · report

Tasks

Image Similarity SearchQuantization

1 archive task tag without a task page not shown.

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Methods

k-NN

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections