SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1603.09320 · 2016

Efficient and robust approximate nearest neighbor search using Hierarchical Navigable Small World graphs

arXiv · PDF · Open in the Atlas

Code that ran

23 of 32 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 23 have no contract verdict; 0 failures of our instrument; 9 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/1603.09320.json · badge: /api/ran/1603.09320.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
nmslib/nmslib canonical (classifier label)
classifier basis: census
11 ran · 0 no recorded run
kakao/n2 community (classifier label)
classifier basis not recorded on the link
6 ran · 3 no recorded run
unum-cloud/usearch community (classifier label)
classifier basis not recorded on the link
3 ran · 0 no recorded run
javaCJ/HNSW_explain community (classifier label)
classifier basis not recorded on the link
1 ran · 4 no recorded run
oddconcepts/n2o community (classifier label)
classifier basis not recorded on the link
1 ran · 2 no recorded run
searchivarius/NonMetricSpaceLib community (classifier label)
classifier basis not recorded on the link
1 ran · 0 no recorded run
FunctionStatusWhere it lives
clear Ran
ran on a synthesized input
nmslib/nmslib/previous_releases_scripts/genplot.py
code served (permissive licence) · get_code("f38de72dd78893f4")
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 re

def clear(str):
    return re.sub('[^a-zA-Z0-9 ]', ' ', str)

ARGS = {
    'str': 'Hello, World! @#$%^&*() 123'
}
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 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
dict_param_to_nsmlib_bin_str Ran
ran on a synthesized input
nmslib/nmslib/benchmark/misc_utils.py
code served (permissive licence) · get_code("18e581112ad83723")
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 torch

ARGS = {
    'params': {'M': 30, 'indexThreadQty': 4, 'efConstruction': 200}
}
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 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
genPGFPlot Ran
ran on a synthesized input
nmslib/nmslib/previous_releases_scripts/genplot.py
code served (permissive licence) · get_code("1c950e4966ec9598")
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 torch
import numpy as np

# Create enum type
def enum(*sequential, **named):
    enums = dict(zip(sequential, range(len(sequential))), **named)
    return type('Enum', (), enums)

AXIS_TYPES = enum('NORMAL', 'LOGX_NORMALY', 'NORMALX_LOGY', 'LOGLOG')

# Define test data
experiments = {
    'Method_A': ['0.1 0.5', '0.2 0.6', '0.3 0.7'],
    'Method_B': ['0.1 0.4', '0.2 0.5', '0.3 0.6']
}

methStyles = {
    'Method_A': 'color=blue,mark=*',
    'Method_B': 'color=red,mark=o'
}

outputFile = 'test_plot'

xAxisField = 'NumData'

yAxisField = 'Recall'

axisType = AXIS_TYPES.NORMAL

noLegend = False

printXaxis = '1'

printYaxis = '1'

title = 'Test Plot'

ARGS = {
    'experiments': experiments,
    'methStyles': methStyles,
    'outputFile': outputFile,
    'xAxisField': xAxisField,
    'yAxisField': yAxisField,
    'axisType': axisType,
    'noLegend': noLegend,
    'printXaxis': printXaxis,
    'printYaxis': printYaxis,
    'title': title
}
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 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
genPGFPlot Ran
ran on a synthesized input
searchivarius/NonMetricSpaceLib/previous_releases_scripts/nips2013/figures/genplots_nips2013.py
code served (permissive licence) · get_code("f2e1e86c45959434")
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.

def enum(*sequential, **named):
    enums = dict(zip(sequential, range(len(sequential))), **named)
    return type('Enum', (), enums)

AXIS_TYPES = enum('NORMAL', 'LOGX_NORMALY', 'NORMALX_LOGY', 'LOGLOG')

AXIS = {'Recall': 'Recall', 'RelPosError': 'Relative position error', 'NumCloser': 'Number closer', 'QueryTime': 'Query time (ms)', 'DistComp': 'Distance computations', 'ImprEfficiency': 'Improvement of efficiency', 'ImprDistComp': 'Improvement of dist. computations', 'Mem': 'Memory usage'}

experiments = {
    'Method A': ['1 10', '2 20', '3 30'],
    'Method B': ['1 15', '2 25', '3 35']
}

searchParam = 'test_search'
xAxisField = 'QueryTime'
yAxisField = 'Recall'
axisType = AXIS_TYPES.NORMAL
legendPos = 'north west'
printYaxis = '1'
title = 'Performance Comparison'

ARGS = {
    'experiments': experiments,
    'searchParam': searchParam,
    'xAxisField': xAxisField,
    'yAxisField': yAxisField,
    'axisType': axisType,
    'legendPos': legendPos,
    'printYaxis': printYaxis,
    'title': title
}
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 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
getAxisLatex Ran
ran on a synthesized input
nmslib/nmslib/previous_releases_scripts/genplot.py
code served (permissive licence) · get_code("ff42ba0e2e3b9192")
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 torch

def enum(*sequential, **named):
    enums = dict(zip(sequential, range(len(sequential))), **named)
    return type('Enum', (), enums)

AXIS_TYPES = enum('NORMAL', 'LOGX_NORMALY', 'NORMALX_LOGY', 'LOGLOG')

def getAxisLatex(axisType):
    if axisType == AXIS_TYPES.NORMAL:
        return ['     \\begin{axis}', '    \\end{axis}']
    if axisType == AXIS_TYPES.LOGX_NORMALY:
        return ['     \\begin{semilogxaxis}', '    \\end{semilogxaxis}']
    if axisType == AXIS_TYPES.NORMALX_LOGY:
        return ['     \\begin{semilogyaxis}', '    \\end{semilogyaxis}']
    if axisType == AXIS_TYPES.LOGLOG:
        return ['     \\begin{loglogaxis}', '    \\end{loglogaxis}']
    assert False

ARGS = {
    'axisType': AXIS_TYPES.NORMAL
}
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 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
get_dataset_fn Ran
ran on a synthesized input
kakao/n2/benchmarks/download_dataset.py
code served (permissive licence) · get_code("706485776c880850")
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

def get_dataset_fn(dataset):
    if not os.path.exists('data'):
        os.mkdir('data')
    return os.path.join('data', '%s.hdf5' % dataset)

ARGS = {
    'dataset': 'mnist'
}
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 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
get_fn Ran
ran on a synthesized input
javaCJ/HNSW_explain/benchmarks/benchmark_script.py
code served (permissive licence) · get_code("c329b3648ba301d2")
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 tempfile

class Args:
    def __init__(self, dataset, limit):
        self.dataset = dataset
        self.limit = limit

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

ARGS = {
    'base': temp_dir,
    'args': Args(dataset='test_dataset', limit=-1)
}
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 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
get_fn Ran
ran on a synthesized input
oddconcepts/n2o/benchmarks/benchmark_script.py
code served (permissive licence) · get_code("64e8a6840e30069d")
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 tempfile

class Args:
    def __init__(self, dataset, data_size, test_size, random_state):
        self.dataset = dataset
        self.data_size = data_size
        self.test_size = test_size
        self.random_state = random_state

# Create a temporary base directory for testing
base = tempfile.mkdtemp()

# Construct arguments for get_fn
args = Args(
    dataset="my_dataset",
    data_size=100,
    test_size=20,
    random_state=42
)

ARGS = {
    "base": base,
    "args": args
}
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 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
guess_numpy_dtype_from_filename Ran
ran on a synthesized input
unum-cloud/usearch/python/usearch/io.py
code served (permissive licence) · get_code("f51acd5adbd5e1f7")
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 type. 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

# The function takes a filename string and returns a numpy dtype based on the file extension
# We need to provide test cases that cover the various file extensions

ARGS = {
    "filename": ".fbin"
}
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 type — a type output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a type 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
knn_recall Ran
ran on a synthesized input
kakao/n2/benchmarks/metrics.py
code served (permissive licence) · get_code("db909965da54b5b6")
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 float, ndim 0, dtype family float, shape () 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 torch
import numpy as np

torch.manual_seed(0)

# Analyze the function:
# - dataset_distances: indexed with [count-1], iterated over with [:count], so it's a sequence/list
# - run_distances: indexed with [:count], iterated over, so it's a sequence/list
# - count: integer, used for indexing and division
# - epsilon: numeric, default 0.001

# Create small dataset_distances: a sorted list of distances
# The function accesses dataset_distances[count-1], so we need at least count elements
count = 5
dataset_distances = [0.1, 0.2, 0.3, 0.4, 0.5]

# Create run_distances: a list of distances to compare against threshold
# The function checks how many are <= threshold
run_distances = [0.15, 0.25, 0.35, 0.45, 0.55]

epsilon = 0.001

ARGS = {
    "dataset_distances": dataset_distances,
    "run_distances": run_distances,
    "count": count,
    "epsilon": epsilon,
}
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 float, ndim 0, dtype family float, shape () — shape () 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
knn_threshold Ran
ran on a synthesized input
kakao/n2/benchmarks/metrics.py
code served (permissive licence) · get_code("42b99a41e74dbeeb")
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 float64, ndim 0, 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
import numpy as np

torch.manual_seed(0)

# The function indexes into data at position (count - 1) and adds epsilon
# So data needs to be indexable (list, array, or tensor)
# count should be an integer >= 1
# epsilon should be a number that can be added to data[count - 1]

# Create a simple array-like data structure
data = np.array([1.0, 2.5, 3.7, 4.2, 5.1])

# count should be a positive integer that is valid for indexing
count = 3

# epsilon should be a scalar that can be added to the indexed element
epsilon = 0.5

ARGS = {
    "data": data,
    "count": count,
    "epsilon": epsilon
}
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 float64, ndim 0, dtype family float — no output shape is stated: observe_signature.py recorded float ndim 0, which disagrees with the fixture run
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_dense Ran
ran on a synthesized input
nmslib/nmslib/benchmark/data_utils.py
code served (permissive licence) · get_code("d4eb67b43f42acff")
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 (2, 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 a temporary directory and a dummy .npy file
temp_dir = tempfile.mkdtemp()
file_name_pref = os.path.join(temp_dir, "test_array")

# Create and save a small dummy numpy array
dummy_array = np.array([[1.0, 2.0, 3.0, 4.0],
                        [5.0, 6.0, 7.0, 8.0]])
np.save(file_name_pref + '.npy', dummy_array)

ARGS = {
    'file_name_pref': file_name_pref
}
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 (2, 4) — shape (2, 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_entries Ran
ran on a synthesized input
nmslib/nmslib/benchmark/make_plots.py
code served (permissive licence) · get_code("859111b60568c802")
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 torch

torch.manual_seed(0)

# The function `load_entries` accepts a `data` parameter that can be:
# 1. A list of dicts (each with 'result_list')
# 2. A dict whose values may contain such lists
# 3. A single dict with 'result_list'

# Create test data covering all cases
entry1 = {"result_list": [1, 2, 3], "name": "entry1"}
entry2 = {"result_list": [4, 5, 6], "name": "entry2"}
entry3 = {"result_list": [7, 8, 9], "name": "entry3"}

# Test case 1: list of dicts with result_list
list_data = [entry1, entry2]

# Test case 2: dict with result_list at top level and nested lists
dict_data = {
    "result_list": [10, 11, 12],
    "nested_entries": [entry3],
    "other_key": "not_a_list"
}

# Test case 3: single dict with result_list
single_dict = {"result_list": [13, 14, 15], "metadata": "test"}

# We'll use one of these as the argument
data = list_data

ARGS = {
    "data": data
}
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 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
load_matrix Ran
ran on a synthesized input
unum-cloud/usearch/python/usearch/io.py
code served (permissive licence) · get_code("6232ffacb8dd099a")
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, 3) 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 os
import numpy as np
import tempfile

# Create a temporary binary file for testing
temp_dir = tempfile.mkdtemp()
test_file = os.path.join(temp_dir, "test.fbin")

# Create a small test matrix file in .fbin format (float32)
rows, cols = 5, 3
dtype = np.float32
data = np.arange(rows * cols, dtype=dtype).reshape(rows, cols)

with open(test_file, 'wb') as f:
    # Write header: rows and cols as int32
    np.array([rows, cols], dtype=np.int32).tofile(f)
    # Write data
    data.tofile(f)

ARGS = {
    "filename": test_file,
    "start_row": 0,
    "count_rows": None,
    "view": False,
    "dtype": None,
}
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, 3) — shape (5, 3) 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_test_data Ran
ran on a synthesized input
kakao/n2/benchmarks/benchmark_script.py
code served (permissive licence) · get_code("4e54de2be24f817c")
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

# Create a mock HDF5-like database dictionary
db = {
    'test': np.random.rand(10, 5).tolist(),  # Small test data
    'distances': np.random.rand(10, 10).tolist()  # Distance matrix
}

which = 'youtube1m-40-angular'

ARGS = {
    'db': db,
    'which': which
}
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 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
load_train_data Ran
ran on a synthesized input
kakao/n2/benchmarks/benchmark_script.py
code served (permissive licence) · get_code("08e39aef547dffd7")
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 (2, 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

# The function accesses db['train'] and converts it to a numpy array
# So db needs to be a dict with a 'train' key containing array-like data
db = {
    'train': np.array([[1.0, 2.0, 3.0, 4.0],
                       [5.0, 6.0, 7.0, 8.0]])
}

ARGS = {
    'db': db
}
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 (2, 4) — shape (2, 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
numpy_scalar_size Ran
ran on a synthesized input
unum-cloud/usearch/python/usearch/io.py
code served (permissive licence) · get_code("5c21b4b0da32e8da")
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 int, ndim 0, dtype family int, shape () 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

# The function takes a single parameter: dtype
# It expects a numpy dtype and returns the size in bytes
# Valid dtypes according to the function are: np.float64, np.int64, np.uint64, 
# np.float32, np.int32, np.uint32, np.float16, np.int16, np.uint16, np.int8, np.uint8

ARGS = {
    "dtype": np.float32
}
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 int, ndim 0, dtype family int, shape () — shape () 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
pdist Ran
ran on a synthesized input
kakao/n2/benchmarks/metrics.py
code served (permissive licence) · get_code("54a1c6f06f1a932f")
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 float64, ndim 0, 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
import numpy as np
from scipy.spatial.distance import pdist as scipy_pdist

torch.manual_seed(0)

# The function pdist(a, b, metric) calls scipy_pdist([a, b], metric=metric)
# This means a and b should be array-like objects that can be passed to scipy_pdist
# scipy_pdist expects an array of observations, so [a, b] creates a 2-row array
# where a and b are each treated as single observations

# Create two small 1D vectors to act as observations
a = np.array([1.0, 2.0, 3.0, 4.0])
b = np.array([5.0, 6.0, 7.0, 8.0])

# Use a valid metric for pdist
metric = 'euclidean'

ARGS = {
    'a': a,
    'b': b,
    'metric': metric
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, scipy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float64, ndim 0, dtype family float — no output shape is stated: observe_signature.py recorded float ndim 0, which disagrees with the fixture run
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
plot_entry Ran
ran on a synthesized input
nmslib/nmslib/benchmark/make_plots.py
code served (permissive licence) · get_code("906dd13e8bf7767c")
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 PosixPath. 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 tempfile
from pathlib import Path

ARGS = {
    'entry': {
        'nmslib_version': '1.0.6',
        'py_ver': '3.9',
        'os_ver': 'Linux-5.10',
        'cpu': 'Intel-i7-9700K',
        'dataset_name': 'SIFT1M',
        'dist_type': 'L2',
        'K': 10,
        'is_index_reload': True,
        'result_list': [
            {'recall': 0.85, 'qps': 1000},
            {'recall': 0.90, 'qps': 950},
            {'recall': 0.95, 'qps': 800},
            {'recall': 0.99, 'qps': 500},
        ]
    },
    'out_root': Path(tempfile.gettempdir()) / 'plot_test_output'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
matplotlib — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type PosixPath — a PosixPath output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a PosixPath 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
read_dense_from_text Ran
ran on a synthesized input
nmslib/nmslib/benchmark/data_utils.py
code served (permissive licence) · get_code("22b1e9b52b1b0f3a")
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 (2, 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 a temporary text file with dense vectors
temp_file = tempfile.NamedTemporaryFile(mode='w', delete=False, suffix='.txt')
temp_file_name = temp_file.name

# Write some sample dense vectors to the file
sample_vectors = np.array([
    [1.0, 2.0, 3.0, 4.0],
    [5.0, 6.0, 7.0, 8.0],
    [9.0, 10.0, 11.0, 12.0],
    [13.0, 14.0, 15.0, 16.0]
])
np.savetxt(temp_file, sample_vectors)
temp_file.close()

ARGS = {
    'file_name': temp_file_name,
    'max_qty': 2
}
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 (2, 4) — shape (2, 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
sanitize Ran
ran on a synthesized input
nmslib/nmslib/benchmark/make_plots.py
code served (permissive licence) · get_code("4ca9f55920b86b16")
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 re

def sanitize(s) -> str:
    """Return a filesystem-safe string."""
    s = str(s)
    s = s.replace(' ', '_')
    return re.sub('[^A-Za-z0-9._\\-+]', '_', s)

# The function takes a single parameter 's' which can be any value
# It converts it to string, replaces spaces with underscores,
# and removes special characters keeping only alphanumeric, dots, underscores, hyphens, and plus signs

ARGS = {
    's': 'hello world! @#$% test-file_123.txt+extra'
}
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 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
split_data Ran
ran on a synthesized input
nmslib/nmslib/benchmark/data_utils.py
code served (permissive licence) · get_code("2687bda4a867ff8a")
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
from sklearn.model_selection import train_test_split

# Create a small sample data matrix
# The function uses train_test_split which expects array-like input
all_data_matrix = np.array([
    [1.0, 2.0, 3.0, 4.0],
    [5.0, 6.0, 7.0, 8.0],
    [9.0, 10.0, 11.0, 12.0],
    [13.0, 14.0, 15.0, 16.0],
    [17.0, 18.0, 19.0, 20.0],
    [21.0, 22.0, 23.0, 24.0],
])

ARGS = {
    "all_data_matrix": all_data_matrix,
    "test_size": 0.1,
    "seed": 0,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, sklearn — 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_int Ran
ran on a synthesized input
nmslib/nmslib/benchmark/misc_utils.py
code served (permissive licence) · get_code("6d8f5a668d2ace9f")
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 int, ndim 0, dtype family int, shape () 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 torch
import numpy as np

torch.manual_seed(0)

# The function to_int takes a single parameter 'n' which should be a string
# It attempts to convert it to an integer, returning None if conversion fails

# Test with a valid string that can be converted to int
ARGS = {
    "n": "42"
}
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 int, ndim 0, dtype family int, shape () — shape () 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
compare Not yet run
unverified (harvested, no recorded run)
kakao/n2/benchmarks/compare.py
code served (permissive licence) · get_code("7f2e786868a36028")
How it ran

no invocation recorded.

get_dataset Not yet run
unverified (harvested, no recorded run)
javaCJ/HNSW_explain/benchmarks/benchmark_script.py
code served (permissive licence) · get_code("00fd55582acb50eb")
How it ran

no invocation recorded.

get_dataset Not yet run
unverified (harvested, no recorded run)
javaCJ/HNSW_explain/benchmarks/youtube_reproduce.py
code served (permissive licence) · get_code("e835d9076670deaf")
How it ran

no invocation recorded.

get_dataset Not yet run
unverified (harvested, no recorded run)
oddconcepts/n2o/benchmarks/benchmark_script.py
code served (permissive licence) · get_code("642902330718ba50")
How it ran

no invocation recorded.

get_queries Not yet run
unverified (harvested, no recorded run)
javaCJ/HNSW_explain/benchmarks/benchmark_script.py
code served (permissive licence) · get_code("52763ab12190a56b")
How it ran

no invocation recorded.

get_queries Not yet run
unverified (harvested, no recorded run)
javaCJ/HNSW_explain/benchmarks/youtube_reproduce.py
code served (permissive licence) · get_code("0a70bd6ca6481e54")
How it ran

no invocation recorded.

get_queries Not yet run
unverified (harvested, no recorded run)
oddconcepts/n2o/benchmarks/benchmark_script.py
code served (permissive licence) · get_code("21dfacf227bb72f7")
How it ran

no invocation recorded.

parse Not yet run
unverified (harvested, no recorded run)
kakao/n2/benchmarks/compare.py
code served (permissive licence) · get_code("8ab19cdee9a46e74")
How it ran

no invocation recorded.

parse Not yet run
unverified (harvested, no recorded run)
kakao/n2/benchmarks/visualize.py
code served (permissive licence) · get_code("9765c8d022e20684")
How it ran

no invocation recorded.

Also present in other papers' code

Of 32 samples lifted from this paper's linked repositories, 32 carry a function identity and 0 do not. Of the 32 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 32 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

More are linked than shown here.

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

Abstract

We present a new approach for the approximate K-nearest neighbor search based on navigable small world graphs with controllable hierarchy (Hierarchical NSW, HNSW). The proposed solution is fully graph-based, without any need for additional search structures, which are typically used at the coarse search stage of the most proximity graph techniques. Hierarchical NSW incrementally builds a multi-layer structure consisting from hierarchical set of proximity graphs (layers) for nested subsets of the stored elements. The maximum layer in which an element is present is selected randomly with an exponentially decaying probability distribution. This allows producing graphs similar to the previously studied Navigable Small World (NSW) structures while additionally having the links separated by their characteristic distance scales. Starting search from the upper layer together with utilizing the scale separation boosts the performance compared to NSW and allows a logarithmic complexity scaling. Additional employment of a heuristic for selecting proximity graph neighbors significantly increases performance at high recall and in case of highly clustered data. Performance evaluation has demonstrated that the proposed general metric space search index is able to strongly outperform previous opensource state-of-the-art vector-only approaches. Similarity of the algorithm to the skip list structure allows straightforward balanced distributed implementation.

For agents

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

get_harvested_code_for_paper("1603.09320")
get_code_for_paper("1603.09320")
have("1603.09320")

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

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

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

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

Connect an agent — have() is free.