Zarc achieves exact billion-vector search in seconds
A new system called Zarc enables exact k-nearest-neighbor vector search over a billion vectors in seconds, solving a major bottleneck for LLM efficiency.
Source: Grafy Research LabA new vector search system named Zarc can perform exact k-nearest-neighbor searches across one billion vectors in just seconds, significantly outperforming traditional exhaustive GPU methods. This advancement addresses a critical bottleneck in machine learning workflows, where accuracy and speed are often at odds when managing massive datasets.
Why is exact vector search difficult to scale?
Vector search is essential for modern AI applications, including sparse attention in large language models (LLMs), long-context memory systems, and the deduplication of training data. Currently, developers generally face a binary choice: use exhaustive GPU search or approximate indexes.
According to the research by Dongfang Zhao, exhaustive search methods scan every single vector in a dataset for every query. While this ensures perfect accuracy, it is extremely slow and memory-intensive. For instance, performing 10,000 queries on the BIGANN-1B dataset takes approximately five minutes on four H100 GPUs using exhaustive methods. Conversely, approximate indexes like HNSW or CAGRA are much faster but lack a guarantee of correctness. These approximate methods can miss the true nearest neighbors, leading to errors in model performance or data integrity. For example, the research notes that CAGRA may only return the exact top-10 attention keys for 45% of queries in certain settings.
How does the Zarc system work?
Zarc bridges the gap between speed and accuracy by using a technique called "certified exclusion." The system utilizes a method where it computes a cheap, half-precision proof to determine if a vector is definitely too far away to be a nearest neighbor.
Instead of keeping the entire massive dataset in the expensive GPU memory, Zarc's core insight is to keep only the short rows of these half-precision proofs in the GPU. The full-precision vectors are stored in the host memory. When the system identifies the few vectors that cannot be excluded by the proofs, it fetches only those specific full vectors from the host memory for exact verification. This tiered approach allows the system to maintain 100% exactness while drastically reducing the amount of data that needs to be moved or stored on the GPU.
What are the performance gains of Zarc?
In testing, Zarc demonstrated massive improvements in both speed and memory efficiency. On a setup of four H100 GPUs, the system completed 10,000 exact queries over one billion vectors in 1.1 seconds, compared to the five minutes required by exhaustive search.
When applied to the attention mechanisms of eleven different open LLMs, Zarc was between and faster than exhaustive search. It also proved more reliable than standard half-precision (bf16) selection methods; the research states that while Zarc remains exact, bf16 selection can miss the exact top-10 neighbors for 14% to 86% of queries.
In terms of memory, Zarc is significantly more efficient. For a dataset of 500 million vectors, Zarc required only 71 GB of device memory on a single H100 GPU, whereas an exhaustive search would have required 256 GB. This efficiency is vital because, in production environments, GPU memory is a precious resource shared by model weights and KV caches.
How does Zarc handle dynamic data and filters?
Unlike some previous iterations of certified exclusion, Zarc is designed for real-world, evolving workloads. It supports concurrent updates, meaning vectors can be inserted or deleted without needing to rebuild the entire index from scratch.
The system also supports filtered queries and inner-product queries. This is particularly important for tasks like semantic deduplication or passage retrieval, where metadata must be used to narrow down the search space. By deriving tight upper bounds from data partitions, Zarc can effectively manage these complex requirements while maintaining its speed advantages.
How can researchers apply these findings?
For researchers working with massive corpora of scientific papers or large-scale datasets, the implications of efficient, exact vector search are significant. While Zarc is a specialized system for high-performance computing environments, the principles of tiered memory and certified exclusion are becoming central to the evolution of AI infrastructure.
If you are currently analyzing large sets of research papers and want to explore how AI can assist in navigating complex information, you can use Grafy Reader to search, question, and interact with your PDFs. While Reader is a user-facing application rather than a low-level vector engine, it demonstrates the practical end-use of the very technologies—like efficient retrieval—that Zarc aims to optimize.
Frequently asked questions
Does Zarc provide approximate results?
No, Zarc is designed for exact k-nearest-neighbor search. Unlike approximate index methods that trade accuracy for speed, Zarc uses certified exclusion to ensure that every result returned is mathematically guaranteed to be among the true nearest neighbors.
How much faster is Zarc than exhaustive search?
Zarc can be significantly faster depending on the workload. In tests involving 10,000 queries over one billion vectors, Zarc completed the task in 1.1 seconds, whereas exhaustive search took approximately five minutes on four H100 GPUs.
Can Zarc handle datasets that change over time?
Yes, Zarc supports streaming dynamic updates. The system is designed to handle insertions and deletions, allowing the index to remain accurate even as the underlying vector dataset is modified, without requiring a full re-indexing process.
Source: Grafy Research Lab — Zarc: Exact Nearest Neighbors over a Billion Vectors in Seconds


