SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2608.15438 · 2026

NeuRoute: Logit-Guided Neural Routing for Billion-Scale Vector Search with Sub-Hour Index Construction

Zi Wang, Xiaowei Xu, Xingqiao Wang

arXiv · PDF · Open in the Atlas

Code that ran

6 of 6 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; 1 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 5 failures of our instrument; 0 no recorded run), measured 2026-11-23; 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/2608.15438.json · badge: /api/ran/2608.15438.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
XingqiaoWang/NeuRoute canonical (classifier label)
classifier basis: census
6 ran · 0 no recorded run
FunctionStatusWhere it lives
fbin_to_npy Ran
ran; our contract draft was wrong, not the code
XingqiaoWang/NeuRoute/src/Deep1b/data_format_transfer.py
code served (permissive licence) · get_code("a4014af67afb8bcb")
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 str. 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 os
import struct
import tempfile
import numpy as np

# Create a temporary directory for test files
temp_dir = tempfile.mkdtemp()

# Create a minimal .fbin file for testing
fbin_path = os.path.join(temp_dir, "test.fbin")
n = 5  # num vectors
d = 3  # dimension

with open(fbin_path, 'wb') as f:
    # Write header: n and d as int32
    f.write(struct.pack('ii', n, d))
    # Write n*d float32 values (row-major)
    data = np.random.randn(n, d).astype(np.float32)
    f.write(data.tobytes())

# Set output path
npy_path = os.path.join(temp_dir, "test.npy")

ARGS = {
    "fbin_path": fbin_path,
    "npy_path": npy_path,
    "mmap_out": True,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str 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
load_config Ran
ran; our contract draft was wrong, not the code
XingqiaoWang/NeuRoute/src/SPHash_base.py
code served (permissive licence) · get_code("04df4526e72349c1")
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 json
import tempfile
import os
import torch

torch.manual_seed(0)

# Create a temporary JSON config file
temp_dir = tempfile.mkdtemp()
config_file = os.path.join(temp_dir, "config.json")

config_data = {
    "model": "test_model",
    "batch_size": 32,
    "learning_rate": 0.001,
    "epochs": 10,
    "hidden_dim": 128,
    "dropout": 0.1
}

with open(config_file, 'w') as f:
    json.dump(config_data, f)

ARGS = {
    "config_path": config_file
}
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 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
load_config Ran
ran; our contract draft was wrong, not the code
XingqiaoWang/NeuRoute/src/Bigann/training_evaluating.py
code served (permissive licence) · get_code("fa7c1c99cf5f28e7")
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 json
import tempfile
import os

# Create a temporary config file with sample data
temp_dir = tempfile.mkdtemp()
config_file_path = os.path.join(temp_dir, "config.json")

sample_config = {
    "model": "bert",
    "batch_size": 32,
    "learning_rate": 0.001,
    "epochs": 10,
    "hidden_dim": 768,
    "layers": [
        {"type": "linear", "units": 256},
        {"type": "relu"},
        {"type": "linear", "units": 10}
    ]
}

with open(config_file_path, 'w') as f:
    json.dump(sample_config, f)

ARGS = {
    "config_path": config_file_path
}
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
load_data Ran
ran, honoured the contract we drafted
XingqiaoWang/NeuRoute/src/SPHash_base.py
code served (permissive licence) · get_code("8c849414f8786e5f")
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 ndarray, ndim 2, dtype family float, shape (5, 4) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape 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 numpy as np
import tempfile
import os

# Create temporary numpy files for testing
temp_dir = tempfile.mkdtemp()

# Create sample numpy arrays and save them
array1 = np.random.randn(2, 4).astype(np.float32)
array2 = np.random.randn(3, 4).astype(np.float32)

file1 = os.path.join(temp_dir, 'data1.npy')
file2 = os.path.join(temp_dir, 'data2.npy')

np.save(file1, array1)
np.save(file2, array2)

file_list = [file1, file2]

ARGS = {
    'file_list': file_list,
    'device': 'cpu'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 2, dtype family float, shape (5, 4) — shape (5, 4) as a later run recorded it
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
load_data Ran
ran; our contract draft was wrong, not the code
XingqiaoWang/NeuRoute/src/Bigann/training_evaluating.py
code served (permissive licence) · get_code("901f64bfc825fb61")
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. 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 numpy as np
import torch
from torch.utils.data import TensorDataset
import tempfile
import os

torch.manual_seed(0)

# Create a temporary .npy file with embeddings
temp_dir = tempfile.gettempdir()
data_path = os.path.join(temp_dir, "test_embeddings.npy")

# Create small embeddings: 6 instances, 4 dimensions
embeddings = np.random.randn(6, 4).astype(np.float32)
np.save(data_path, embeddings)

ARGS = {
    "data_path": data_path,
    "training_set_ratio": 0.7,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple — a tuple output has no array shape of its own; none is 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
to_float_list Ran
ran; our contract draft was wrong, not the code
XingqiaoWang/NeuRoute/src/SPHash_base.py
code served (permissive licence) · get_code("dc7229815e054756")
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 list, 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 numpy as np
import torch

# Test case 1: numpy array input
x1 = np.array([1.5, 2.7, 3.2, 4.9])

# Test case 2: list input
x2 = [1.1, 2.2, 3.3, 4.4, 5.5]

# Test case 3: torch tensor input
torch.manual_seed(0)
x3 = torch.tensor([[1.0, 2.0, 3.0], [4.0, 5.0, 6.0]], dtype=torch.float32)

# Test case 4: nested list (will be flattened)
x4 = [[1.5, 2.5], [3.5, 4.5], [5.5, 6.5]]

# Test case 5: single scalar
x5 = 42.7

ARGS = {
    "x": x1,
    "round_ndigits": None
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, dtype family float — a list 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

Also present in other papers' code

Of 6 samples lifted from this paper's linked repositories, 6 carry a function identity and 0 do not. Of the 6 distinct functions with an identity, 1 are also present in other papers whose code we hold (1 with at least one paper dated earlier, 0 the same month, 0 later) and 5 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.

FunctionAlso present inEarliest-datedOthers named
load_config 1 other paper
1 dated earlier
2503.22719 (2025-03)
LLM-based Agent Simulation for Maternal Health Interventions: Uncertainty Estimation and Decision-focused Evaluation

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

Repositories linked to this paper

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

Abstract

Building approximate nearest neighbor (ANN) indexes at billion scale is often dominated by expensive global clustering or graph construction, making time-to-index a first-order systems concern. We present NeuRoute, a learned hashing index that turns short binary codes into an effective routing primitive for large-scale vector search. NeuRoute trains a lightweight neural network encoder with a selective similarity-preserving objective to produce well-balanced binary addresses. During construction, NeuRoute organizes vectors into buckets by their codes and performs bucket-local clustering in the encoder's low-dimensional space to form centroids. At query time, NeuRoute exploits the encoder logits as an uncertainty signal: it uses deviation-tothreshold scores to prioritize uncertain-bit perturbations for query-adaptive multi-bucket probing, scores bucket-local centroids by their distances to the query to form a compact candidate cluster set, and applies centroid-stage gating with heap-quality-driven early stopping to prune low-value clusters before exact refinement. On billion-scale benchmarks, NeuRoute achieves strong accuracy-throughput trade-offs with fast index construction: on BigANN-1B it reaches 90.3% Recall@10 at 2,414 QPS and is 1.7× faster than OPQ+IVF-PQ (refine) at comparable accuracy, while completing end-to-end training+construction in under an hour on both BigANN-1B and Deep1B-1B. These results show that logit-guided neural routing can make hashing competitive as a lightweight ANN indexing framework at billion scale. Source code and artifacts are available at https://github.com/XingqiaoWang/NeuRoute.

For agents

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

get_harvested_code_for_paper("2608.15438")
get_code_for_paper("2608.15438")
have("2608.15438")

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

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

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

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

Connect an agent — have() is free.