Exact billion-vector search runs 270 times faster than cuVS brute force
A single-author preprint describes a GPU library that returns exact nearest neighbours, not approximate ones, at speeds close to approximate indexes. It is tested on billion-vector benchmarks and on the attention keys of eleven open LLMs.
scienceunderway.com/articles/exact-billion-vector-search-runs-270-times-faster-than-cuvs-brute-force

AI illustrationWhat the study shows
Nearest-neighbour search finds the stored items most similar to a query. It sits inside retrieval systems, data clean-up pipelines and some forms of LLM attention. Today there are two options on a GPU. Brute force checks every item, which is exact but slow. Approximate indexes, such as NVIDIA's CAGRA, are fast but can miss true matches.
The author, Dongfang Zhao, builds on his earlier method called certified exclusion. The GPU keeps a short, low-precision summary of every vector. From that summary it can prove that most vectors are too far away to matter. Only the few that cannot be ruled out are checked in full. The new step is to keep the full vectors in the server's main memory rather than on the GPU, and fetch only those few.
The author reports that on four NVIDIA H100 GPUs, 10,000 exact searches over one billion vectors (the BIGANN benchmark) take 1.1 seconds after a 79-second build. Brute force with NVIDIA's cuVS library takes about 299 seconds. On one H100, a 500-million-vector set needs 71 GB of GPU memory instead of 256 GB.
The paper also tests the attention keys of eleven open LLMs, from 7 billion to 1.6 trillion parameters. Attention keys are the internal vectors a model looks up when it reads earlier text. The library returns the exact top 10 keys 2.2 to 13.1 times faster than cuVS brute force. The usual half-precision shortcut in LLM code gets the exact top 10 for only 14% to 86% of queries.
In one end-to-end test, Qwen2.5-7B-Instruct-1M read a one-million-token text with sparse attention, where each token attends only to its 64 most relevant earlier tokens. Exact selection cut the forward pass to 3.6 seconds, against 11.2 seconds with the FlashInfer selection kernel. Quality, measured by perplexity, stayed within 0.3% across methods.
Other results cover filtered search, live inserts and deletes, deduplication of the DataComp image set and passage retrieval on MS MARCO. The paper is a preprint and has not been peer reviewed. Code is linked on GitHub. On our readiness scale this is level III, open source available, subject to the editor confirming the repository is public.
Our reading
In our reading, the most useful idea here is simple. Exact search does not need every vector on the GPU. It needs a cheap proof for most vectors and a full check for very few. On the 500-million-vector test, each query read about 700 full vectors out of half a billion. That is why moving the full data to slower main memory costs little.
The headline speed-ups are against brute force, which is the right baseline for exactness but an easy one for speed. The harder comparison is with approximate indexes at their most accurate settings. There the paper's evidence is thinner but still interesting: on MS MARCO retrieval, the exact method was faster than CAGRA and CAGRA still missed 5.5% of queries.
The LLM results show something many teams may not know: the standard half-precision shortcut often picks a different set of top keys than exact maths would. Yet the end-to-end tests show almost no quality loss from this. So the case for exactness in attention is mainly about speed and repeatability today, not better answers.
The rest of this story is for members. Membership is free: read it at scienceunderway.com/articles/exact-billion-vector-search-runs-270-times-faster-than-cuvs-brute-force
Read the rest of this story
Membership is free. You get every article in full, and can save stories and follow topics.
We send a sign-in link, no password needed. Already a member? Sign inReadiness assessment
| Level | Status | Evidence |
|---|---|---|
| I Lab only | Met | The method is described, implemented (about 15,000 lines of CUDA C++ and Python) and tested in the lab. |
| II Benchmarked | Met | Evaluated on public benchmarks: BIGANN up to 1B, Deep1B, DataComp-12.8M, MS MARCO and SIFT1M. Compared against cuVS brute force, CAGRA, IVF-PQ, DiskANN, FreshDiskANN, ACORN and Filtered-DiskANN, plus eleven open LLMs. |
| III Open source | Met | The paper links code at https://github.com/hpdic/libcertex and says it installs as a Python package with the cuVS interface. I could not check the repository or its licence. |
| IV In production | Not yet | The paper documents no deployment or adoption by a named organisation, only the author's own benchmarks. |
What would move it up
Documented use by a named organisation, for example in an LLM serving stack, a vector database or a deduplication pipeline. Independent reproduction of the benchmarks by other groups would also help.
The study
Dongfang Zhao. Zarc: Exact Nearest Neighbors over a Billion Vectors in Seconds. arXiv, 22 November 2026. doi:10.5281/zenodo.23674583
Notes
- Zhao, D. Zarc: Exact Nearest Neighbors over a Billion Vectors in Seconds. arXiv preprint, 22 November 2026, not peer reviewed. Licence CC BY-NC-ND 4.0. Source
- Code linked by the paper (not verified by us). Source
- Preprint DOI 10.5281/zenodo.23674584. Source
- Exact figures: BIGANN-1B on four H100s, 10,000 queries in 1.1 s after a 79 s build, against about 299 s for cuVS brute force; 8,997 queries per second, 269 times cuVS (the text rounds to 270). BIGANN-500M on one H100: 71 GB against 256 GB, 699 of 5,593 survivors read per query.
- LLM figures: exact top-10 keys at 2.2x to 13.1x cuVS brute force; bf16 exact for 14% to 86% of queries, fp16 for 57% to 98%, CAGRA at most 45%. Sparse attention, Qwen2.5-7B-Instruct-1M, k=64: 3.6 s against 11.2 s (bf16 plus FlashInfer), 15.9 s (torch.topk) and 7.8 s (dense); bf16 exact top-64 for 42% to 43%; perplexity within 0.3%.
- Other figures: filtered BIGANN-10M 324k to 403k queries per second; ACORN and Filtered-DiskANN exact for at most 97.9% and 63.9%. DataComp-12.8M 10-NN graph in 8.2 minutes against a projected 5.8 hours. MS MARCO MRR@10 0.338 against 0.321 to 0.337 for CAGRA.
Edited and signed by
Stefan PerdalEditor and publisher142 stories editedStefan read the study, set the readiness level and approved this story. An AI system found the paper and wrote the first draft.
How this was made
An AI model read the study and wrote this article in the structure Science Underway uses. An editor reviewed it and approved it for publication. Check the original study before you rely on the details.
How we workNo corrections


