Papers › CAGRA: Highly Parallel Graph Construction and Approximate Nearest Neighbor Search for GPUs

CAGRA: Highly Parallel Graph Construction and Approximate Nearest Neighbor Search for GPUs

29 Aug 2023arXiv:2308.15136archive 2025-07-28

Hiroyuki Ootomo, Akira Naruse, Corey Nolet, Ray Wang, Tamas Feher, Yong Wang

Approximate Nearest Neighbor Search (ANNS) plays a critical role in various disciplines spanning data mining and artificial intelligence, from information retrieval and computer vision to natural language processing and recommender systems. Data volumes have soared in recent years and the computational cost of an exhaustive exact nearest neighbor search is often prohibitive, necessitating the adoption of approximate techniques. The balanced performance and recall of graph-based approaches have more recently garnered significant attention in ANNS algorithms, however, only a few studies have explored harnessing the power of GPUs and multi-core processors despite the widespread use of massively parallel and general-purpose computing. To bridge this gap, we introduce a novel parallel computing hardware-based proximity graph and search algorithm. By leveraging the high-performance capabilities of modern hardware, our approach achieves remarkable efficiency gains. In particular, our method surpasses existing CPU and GPU-based methods in constructing the proximity graph, demonstrating higher throughput in both large- and small-batch searches while maintaining compatible accuracy. In graph construction time, our method, CAGRA, is 2.2~27x faster than HNSW, which is one of the CPU SOTA implementations. In large-batch query throughput in the 90% to 95% recall range, our method is 33~77x faster than HNSW, and is 3.8~8.8x faster than the SOTA implementations for GPU. For a single query, our method is 3.4~53x faster than HNSW at 95% recall.

PaperPDFCodeCode Syntology ran

In Syntology View this paper on Syntology, its page in Syntology's graph. That page adds which of its functions are also present in other papers' code Syntology holds, with dates, and its dated run record as JSON and a README badge. It also lists the repositories linked to the paper, the abstract and the calls for agents.

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

For agents, on Syntology's MCP service (how to connect):

Code

Syntology 12 code samples harvested from 2 repositories linked to this paper: 9 ran (of which 0 constructed an object rather than computing a result; 9 with no instrument failure: 0 honoured, 0 violated, 9 with no contract checked; 0 where Syntology's instrument failed) · 3 unverified. “Where Syntology's instrument failed” counts failures of Syntology's instrument, not of the code; here there are none.

By repository: official repository: 4 samples from 1 repository, 3 ran (3 with no instrument failure; 0 where Syntology's instrument failed); community (archive-listed): 8 samples from 1 repository, 6 ran (6 with no instrument failure; 0 where Syntology's instrument failed). The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

Levels written on 2026-09-24 (UTC): the dates Syntology's graph wrote each sample's verification level, not when the code executed.

rapidsai/raft officialmentioned in paperpytorchApache-2.0Syntology: 4 samples, 3 ran (0 instrument-failed) · 1 unverified report
rapidsai/cuvs mentioned on GitHubApache-2.0Syntology: 8 samples, 6 ran (0 instrument-failed) · 2 unverified 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

12 samples harvested: 9 ran (of which 0 constructed an object rather than computing a result; 9 with no instrument failure: 0 honoured, 0 violated, 9 with no contract checked; 0 where Syntology's instrument failed) · 3 unverified. “Where Syntology's instrument failed” counts failures of Syntology's instrument, not of the code. Syntology's record for this page has not changed since , the first build that kept a record date for it; when this build read Syntology's graph is in the build record. That date is not when the samples ran.

9ran
3unverified

Licence: 8 of the 12 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 2 repositories linked to this paper, official or community; the list below is grouped by repository, each group headed by its name and what it is to the paper. “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. A line beginning “fixture:” under a sample that ran gives the arguments Syntology's fixture called the sample with, each as name:type/rank/element kind (? where none was recorded), and the type of what the fixture's run returned, exactly as the harness recorded them; the arguments and the returned type were recorded by two separate runs of the same fixture. No output value is shown, and a returned type says nothing about whether the output was right. “Level recorded” gives the UTC date when Syntology's graph wrote the sample's verification level, not when the code executed; where the level was written before Syntology's graph kept that date, the row says “level recorded, date not recorded”. For 2 samples that ran, the graph records a signature this page does not show: an argument's recorded type or element kind is a printout of an object in Syntology's harness (such as a mock object, a class or a pandas printout), not the type of an input, so it does not describe the call's shape. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself. “Our draft was wrong” and “the contract check could not run” are failures of Syntology's instrument, not of the code: the sample ran on Syntology's synthesized input, and then the drafted contract did not describe it, or the check itself raised an error (RAISES), lacked a dependency (DEP_MISSING) or ran out of time (TIMEOUT); hover the label for which. A metamorphic tier, where shown, is evidence of the output's shape, not that the sample implements the method.

Each sample ends with its code_sha256. A sample's code_sha256 is Syntology's identity for that exact code. It is printed in full (16 hexadecimal characters for every sample in this build), and get_code(code_sha256="…") takes it exactly as printed. An agent calls it on Syntology's MCP service (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 are grouped by repository: a repository marked official first, then by how directly the repository is tied to the paper, then in the archive's order; never by how many ran. 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 six 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; the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar); this paper's copy was not located, so its licence is not recorded; or this paper's copy is cleared, but the stored copy of the same code that Syntology serves is not. 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.

rapidsai/raft official repository 4 samples, 3 ran (0 instrument-failed) · 1 unverified
get_raft_comm_state python/raft-dask/raft_dask/common/comms.py ran Apache-2.0 (permissive) · 61e08a7e9b102edc · report fixture: signature sessionId:str/0/str, state_object:MockStateObject/0/?, dask_worker:MockDaskWorker/0/? · returned dict · level recorded 2026-09-24
local_handle python/raft-dask/raft_dask/common/comms.py ran Apache-2.0 (permissive) · a6c03b255c7f286e · report fixture: signature sessionId:str/0/str, dask_worker:MockDaskWorker/0/? · returned MockHandle · level recorded 2026-09-24
parse_host_port python/raft-dask/raft_dask/common/utils.py ran Apache-2.0 (permissive) · ecd325143e42f86b · report fixture: signature address:str/0/str · returned tuple · level recorded 2026-09-24
set_nccl_root python/raft-dask/raft_dask/common/comms.py unverified Apache-2.0 (permissive) · 36f6b3bde8db7a57 · report
rapidsai/cuvs community (archive-listed) 8 samples, 6 ran (0 instrument-failed) · 2 unverified
choose_random_queries python/cuvs_bench/cuvs_bench/generate_groundtruth/__main__.py ran Apache-2.0 recorded; this copy not marked cleared · pointer only · b805cbcdf347d91b · report fixture: signature dataset:ndarray/2/float, n_queries:int/0/int · returned ndarray · level recorded 2026-09-24
expand_param_grid python/cuvs_bench/cuvs_bench/backends/_utils.py ran Apache-2.0 recorded; this copy not marked cleared · pointer only · 5e6889d7e7f8fe19 · report fixture: signature param_spec:dict/0/? · returned list · level recorded 2026-09-24
generate_random_queries python/cuvs_bench/cuvs_bench/generate_groundtruth/__main__.py ran Apache-2.0 recorded; this copy not marked cleared · pointer only · 47f3b6ffa867c7d2 · report fixture: returned ndarray · level recorded 2026-09-24
import_with_fallback python/cuvs_bench/cuvs_bench/generate_groundtruth/__main__.py ran Apache-2.0 recorded; this copy not marked cleared · pointer only · a215ace470bb8f6e · report fixture: signature primary_lib:str/0/str, secondary_lib:str/0/str, alias:str/0/str · returned module · level recorded 2026-09-24
read_bin_header python/cuvs_bench/cuvs_bench/_bin_format.py ran Apache-2.0 recorded; this copy not marked cleared · pointer only · 06b136bd9d1ae767 · report fixture: signature path:str/0/str, itemsize:int/0/int · returned tuple · level recorded 2026-09-24
write_bin_header python/cuvs_bench/cuvs_bench/_bin_format.py ran Apache-2.0 recorded; this copy not marked cleared · pointer only · e11971f562a6c65d · report fixture: returned int · level recorded 2026-09-24
dtype_from_filename python/cuvs_bench/cuvs_bench/backends/_utils.py unverified Apache-2.0 recorded; this copy not marked cleared · pointer only · a8203568aae7ab37 · report
get_search_space python/cuvs_bench/cuvs_bench/backends/search_spaces.py unverified Apache-2.0 recorded; this copy not marked cleared · pointer only · 57e66bf359c19c79 · report

Tasks

Information RetrievalRecommendation Systemsgraph construction

2 archive task tags without a task page not shown.

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

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