SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2308.15136 · 2023

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

arXiv · PDF · Open in the Atlas

Code that ran

9 of 12 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 6 have no contract verdict; 3 failures of our instrument; 3 no recorded run), measured 2026-11-22; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2308.15136.json · badge: /api/ran/2308.15136.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
rapidsai/raft canonical (classifier label)
classifier basis: census
3 ran · 1 no recorded run
rapidsai/cuvs community (classifier label)
classifier basis not recorded on the link
6 ran · 2 no recorded run
FunctionStatusWhere it lives
choose_random_queries Ran
ran on a synthesized input
rapidsai/cuvs/python/cuvs_bench/cuvs_bench/generate_groundtruth/__main__.py
pointer only (licence: Apache-2.0) · get_code("b805cbcdf347d91b")
How it ran

The body of this sample is withheld: Apache-2.0, as GitHub detects it on this paper's repository, rapidsai/cuvs, is in the permissive set, but a licence decision keeps the body a pointer: the reason for that decision is not recorded with it. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

expand_param_grid Ran
ran on a synthesized input
rapidsai/cuvs/python/cuvs_bench/cuvs_bench/backends/_utils.py
pointer only (licence: Apache-2.0) · get_code("5e6889d7e7f8fe19")
How it ran

The body of this sample is withheld: Apache-2.0, as GitHub detects it on this paper's repository, rapidsai/cuvs, is in the permissive set, but a licence decision keeps the body a pointer: the reason for that decision is not recorded with it. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

generate_random_queries Ran
ran on a synthesized input
rapidsai/cuvs/python/cuvs_bench/cuvs_bench/generate_groundtruth/__main__.py
pointer only (licence: Apache-2.0) · get_code("47f3b6ffa867c7d2")
How it ran

The body of this sample is withheld: Apache-2.0, as GitHub detects it on this paper's repository, rapidsai/cuvs, is in the permissive set, but a licence decision keeps the body a pointer: the reason for that decision is not recorded with it. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

get_raft_comm_state Ran
ran; our contract draft was wrong, not the code
rapidsai/raft/python/raft-dask/raft_dask/common/comms.py
code served (permissive licence) · get_code("61e08a7e9b102edc")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned dict. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import time

class MockStateObject:
    """Mock object to serve as state_object (Worker or Scheduler)"""
    pass

class MockDaskWorker:
    """Mock dask_worker object"""
    pass

# Create instances
state_obj = MockStateObject()
dask_worker_obj = MockDaskWorker()

# Create a sessionId (can be a string or int)
session_id = "session_123"

ARGS = {
    "sessionId": session_id,
    "state_object": state_obj,
    "dask_worker": dask_worker_obj,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
import_with_fallback Ran
ran on a synthesized input
rapidsai/cuvs/python/cuvs_bench/cuvs_bench/generate_groundtruth/__main__.py
pointer only (licence: Apache-2.0) · get_code("a215ace470bb8f6e")
How it ran

The body of this sample is withheld: Apache-2.0, as GitHub detects it on this paper's repository, rapidsai/cuvs, is in the permissive set, but a licence decision keeps the body a pointer: the reason for that decision is not recorded with it. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

local_handle Ran
ran; our contract draft was wrong, not the code
rapidsai/raft/python/raft-dask/raft_dask/common/comms.py
code served (permissive licence) · get_code("a6c03b255c7f286e")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned MockHandle. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import time

class MockDaskWorker:
    """Mock dask_worker object with raft comm state"""
    def __init__(self):
        self._raft_comm_state = {}

class MockHandle:
    """Mock raft.Handle object"""
    def __init__(self):
        self.initialized = True

# Create a mock dask_worker
dask_worker = MockDaskWorker()

# Initialize the raft comm state with a session
sessionId = "test_session_123"
dask_worker._raft_comm_state[sessionId] = {
    'ts': time.time(),
    'handle': MockHandle()
}

ARGS = {
    'sessionId': sessionId,
    'dask_worker': dask_worker
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type MockHandle — a MockHandle output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a MockHandle output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
parse_host_port Ran
ran; our contract draft was wrong, not the code
rapidsai/raft/python/raft-dask/raft_dask/common/utils.py
code served (permissive licence) · get_code("ecd325143e42f86b")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

ARGS = {
    'address': 'localhost:8080'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 1, dtype family float — a tuple output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
read_bin_header Ran
ran on a synthesized input
rapidsai/cuvs/python/cuvs_bench/cuvs_bench/_bin_format.py
pointer only (licence: Apache-2.0) · get_code("06b136bd9d1ae767")
How it ran

The body of this sample is withheld: Apache-2.0, as GitHub detects it on this paper's repository, rapidsai/cuvs, is in the permissive set, but a licence decision keeps the body a pointer: the reason for that decision is not recorded with it. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

write_bin_header Ran
ran on a synthesized input
rapidsai/cuvs/python/cuvs_bench/cuvs_bench/_bin_format.py
pointer only (licence: Apache-2.0) · get_code("e11971f562a6c65d")
How it ran

The body of this sample is withheld: Apache-2.0, as GitHub detects it on this paper's repository, rapidsai/cuvs, is in the permissive set, but a licence decision keeps the body a pointer: the reason for that decision is not recorded with it. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

dtype_from_filename Not yet run
unverified (harvested, no recorded run)
rapidsai/cuvs/python/cuvs_bench/cuvs_bench/backends/_utils.py
pointer only (licence: Apache-2.0) · get_code("a8203568aae7ab37")
How it ran

The body of this sample is withheld: Apache-2.0, as GitHub detects it on this paper's repository, rapidsai/cuvs, is in the permissive set, but a licence decision keeps the body a pointer: the reason for that decision is not recorded with it. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

get_search_space Not yet run
unverified (harvested, no recorded run)
rapidsai/cuvs/python/cuvs_bench/cuvs_bench/backends/search_spaces.py
pointer only (licence: Apache-2.0) · get_code("57e66bf359c19c79")
How it ran

The body of this sample is withheld: Apache-2.0, as GitHub detects it on this paper's repository, rapidsai/cuvs, is in the permissive set, but a licence decision keeps the body a pointer: the reason for that decision is not recorded with it. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

set_nccl_root Not yet run
unverified (harvested, no recorded run)
rapidsai/raft/python/raft-dask/raft_dask/common/comms.py
code served (permissive licence) · get_code("36f6b3bde8db7a57")
How it ran

no invocation recorded.

Also present in other papers' code

Of 12 samples lifted from this paper's linked repositories, 12 carry a function identity and 0 do not. Of the 12 distinct functions with an identity, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 12 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-22.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

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.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2308.15136")
get_code_for_paper("2308.15136")
have("2308.15136")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2308.15136.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2308.15136.svg)](https://syntology.ai/paper/2308.15136)

Connect an agent — have() is free.