# 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.

- Category: Efficiency
- Readiness level: III (Open source) on Science Underway's four-step scale, as proposed
- Published: 2026-11-24
- Editor: Stefan Perdal
- URL: https://scienceunderway.com/articles/exact-billion-vector-search-runs-270-times-faster-than-cuvs-brute-force

## The study

Zarc: Exact Nearest Neighbors over a Billion Vectors in Seconds (preprint, not peer reviewed). DOI 10.5281/zenodo.23674583, arXiv 2611.29252. https://arxiv.org/abs/2611.29252

## At a glance

- What it shows: A new GPU library finds the exact closest matches in a collection of a billion items in about one second for 10,000 searches. Plain checking of every item takes about five minutes. Every answer was checked against a slow, careful reference.
- What it does not show: It does not show the library running in any company's product. It also does not show that exact answers make AI models noticeably better: in the tests, output quality barely changed.
- Why it matters: Many AI systems quietly accept slightly wrong search results because exact search was too slow. If exact search becomes this cheap, that trade-off may no longer be needed.

## What 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 the article (what it means, limits, what to watch) is free for members: https://scienceunderway.com/articles/exact-billion-vector-search-runs-270-times-faster-than-cuvs-brute-force

## 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.

---
Source: Science Underway, https://scienceunderway.com/. Please link to the article when you cite it.
