SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2410.18926 · NeurIPS · 2024

LoRANN: Low-Rank Matrix Factorization for Approximate Nearest Neighbor Search

Teemu Roos, Elias Jääsaari, Ville Hyvönen

arXiv · PDF · Open in the Atlas

Code that ran

17 of 20 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; 3 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 14 failures of our instrument; 3 no recorded run), measured 2026-11-24; 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/2410.18926.json · badge: /api/ran/2410.18926.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
ejaasaari/lorann-experiments canonical (classifier label)
classifier basis: census
16 ran · 2 no recorded run
ejaasaari/lorann canonical (classifier label)
classifier basis: census
1 ran · 1 no recorded run
FunctionStatusWhere it lives
algorithm_status Ran
ran; our contract draft was wrong, not the code
ejaasaari/lorann-experiments/ann_benchmarks/definitions.py
code served (permissive licence) · get_code("1a459680e482b1e0")
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 InstantiationStatus. 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
from dataclasses import dataclass
from enum import Enum
from typing import Any, Dict, List, Optional, Union
import sys
import types

# Create a stand-in module that will be importable
mock_module = types.ModuleType('mock_algorithm')

class MockConstructor:
    """A simple stand-in constructor class."""
    def __init__(self):
        pass

# Add the constructor to the mock module
mock_module.MockConstructor = MockConstructor

# Register it in sys.modules so importlib can find it
sys.modules['mock_package.module'] = mock_module

@dataclass
class Definition:
    algorithm: str
    constructor: str
    module: str
    docker_tag: str
    arguments: List[Any]
    query_argument_groups: List[List[Any]]
    disabled: bool

class InstantiationStatus(Enum):
    """Possible status of instantiating an algorithm from a python module import."""
    AVAILABLE = 0
    NO_CONSTRUCTOR = 1
    NO_MODULE = 2

# Create a valid Definition instance
ARGS = {
    "definition": Definition(
        algorithm="test_algorithm",
        constructor="MockConstructor",
        module="mock_package",
        docker_tag="v1.0",
        arguments=[1, 2, 3],
        query_argument_groups=[[1], [2, 3]],
        disabled=False
    )
}
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 InstantiationStatus — a InstantiationStatus output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a InstantiationStatus 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
build Ran
ran; our contract draft was wrong, not the code
ejaasaari/lorann-experiments/install.py
code served (permissive licence) · get_code("1a2ffd7252fad4b2")
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 subprocess

# The build function takes two parameters:
# 1. library: a string representing the library name
# 2. args: either None or a list of strings representing build arguments

# Looking at the function body:
# - library is used in string formatting and as a docker tag/path component
# - args is checked for None and len(), then each element is joined with '--build-arg' prefix
# - The function executes a docker build command, which will fail in this sandbox,
#   but that's expected behavior (the function catches CalledProcessError)

ARGS = {
    'library': 'test-library',
    'args': ['ARG1=value1', 'ARG2=value2']
}
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
build_multiprocess Ran
ran; our contract draft was wrong, not the code
ejaasaari/lorann-experiments/install.py
code served (permissive licence) · get_code("eb502608c05c9c3a")
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 subprocess
from unittest.mock import patch, MagicMock

# The function build_multiprocess expects a single argument 'args'
# which is then unpacked as *args to the build function
# build(library, args) expects:
#   - library: a string (library name)
#   - args: either None or a list of strings (build arguments)

# We'll mock subprocess.check_call to avoid actual docker execution
# and provide valid test arguments

def mock_check_call(cmd, shell=True):
    # Mock successful docker build
    return None

# Construct valid arguments for build_multiprocess
# build_multiprocess takes a tuple/list that gets unpacked to build(library, args)

library_name = "test-lib"
build_args = ["--arg1=value1", "--arg2=value2"]

# The args parameter for build_multiprocess should be a tuple/list
# containing (library, args) for the build function
multiprocess_args = (library_name, build_args)

ARGS = {
    'args': multiprocess_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 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
compute_distance Ran
ran; our contract draft was wrong, not the code
ejaasaari/lorann-experiments/ann_benchmarks/distance.py
code served (permissive licence) · get_code("33781da3207cc49d")
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 numpy as np

# Set up arguments for compute_distance function
metric = 'euclidean'
a = np.array([1.0, 2.0, 3.0, 4.0])
b = np.array([5.0, 6.0, 7.0, 8.0])

ARGS = {
    'metric': metric,
    'a': a,
    'b': b
}
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 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
compute_recall Ran
ran, honoured the contract we drafted
ejaasaari/lorann/python/lorann/lorann.py
code served (permissive licence) · get_code("67137b50ff87ea9b")
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 numpy as np

# Create small test arrays
# approx: approximate indices (2 rows, 4 columns each)
approx = np.array([
    [0, 1, 2, 3],
    [1, 2, 3, 4]
], dtype=np.int32)

# exact: exact ground truth indices (same shape as approx)
exact = np.array([
    [0, 1, 5, 6],
    [1, 2, 7, 8]
], dtype=np.int32)

ARGS = {
    "approx": approx,
    "exact": exact
}
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 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
convert_color Ran
ran; our contract draft was wrong, not the code
ejaasaari/lorann-experiments/create_website.py
code served (permissive licence) · get_code("24ec4bb9c63da4f6")
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

torch.manual_seed(0)

ARGS = {
    'color': (0.5, 0.3, 0.8, 255)
}
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
convert_linestyle Ran
ran; our contract draft was wrong, not the code
ejaasaari/lorann-experiments/create_website.py
code served (permissive licence) · get_code("feb0a5830b75c0f5")
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 torch

point_styles = {'o': 'circle', '<': 'triangle', '*': 'star', 'x': 'cross', '+': 'rect'}

def convert_color(color):
    r, g, b, a = color
    return 'rgba(%(r)d, %(g)d, %(b)d, %(a)d)' % {'r': r * 255, 'g': g * 255, 'b': b * 255, 'a': a}

def convert_linestyle(ls):
    new_ls = {}
    for algo in ls.keys():
        algostyle = ls[algo]
        new_ls[algo] = (convert_color(algostyle[0]), convert_color(algostyle[1]), algostyle[2], point_styles[algostyle[3]])
    return new_ls

# Build test data
# Each algorithm maps to a tuple of (color1, color2, value, point_style_key)
# Colors are (r, g, b, a) tuples where values are in [0, 1]
ls_value = {
    'algorithm_1': ((1.0, 0.0, 0.0, 1.0), (0.0, 1.0, 0.0, 1.0), 42, 'o'),
    'algorithm_2': ((0.0, 0.0, 1.0, 0.8), (1.0, 1.0, 0.0, 0.5), 99, '<'),
    'algorithm_3': ((0.5, 0.5, 0.5, 1.0), (0.2, 0.8, 0.3, 0.9), 15, '*'),
}

ARGS = {
    'ls': ls_value,
}
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
euclidean Ran
ran, honoured the contract we drafted
ejaasaari/lorann-experiments/ann_benchmarks/distance.py
code served (permissive licence) · get_code("58e6e4420d6b0cef")
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 1, dtype family float, shape (2,) 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 torch

torch.manual_seed(0)

# The euclidean function computes the norm of the difference between a and b
# along the last axis. Both a and b should be numpy arrays.
# We'll create two small numpy arrays with distinct dimensions.

a = np.random.randn(2, 4)  # batch of 2, dimension 4
b = np.random.randn(2, 4)  # batch of 2, dimension 4

ARGS = {
    "a": a,
    "b": b,
}
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 ndarray, ndim 1, dtype family float, shape (2,) — shape (2,) 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
float_parse_entry Ran
ran, honoured the contract we drafted
ejaasaari/lorann-experiments/ann_benchmarks/data.py
code served (permissive licence) · get_code("44fa38f4dba6c740")
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
import numpy as np

def float_parse_entry(line: str) -> list:
    return [float(x) for x in line.strip().split()]

# The function takes a single string parameter 'line'
# It strips whitespace, splits on whitespace, and converts each token to float
# We need to provide a valid string with space-separated numbers

ARGS = {
    "line": "1.5 2.3 3.14 4.0 5.99"
}
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
float_unparse_entry Ran
ran; our contract draft was wrong, not the code
ejaasaari/lorann-experiments/ann_benchmarks/data.py
code served (permissive licence) · get_code("43546c638e833781")
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

torch.manual_seed(0)

ARGS = {
    "entry": [1.5, 2.3, 3.14, 4.0, 5.99]
}
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
get_config_files Ran
ran; our contract draft was wrong, not the code
ejaasaari/lorann-experiments/ann_benchmarks/definitions.py
code served (permissive licence) · get_code("781712699c80561e")
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 os
import tempfile
import shutil

# Create a temporary directory structure that mimics ann_benchmarks/algorithms
temp_dir = tempfile.mkdtemp()
base_dir = os.path.join(temp_dir, 'ann_benchmarks', 'algorithms')

# Create directory structure with config files
os.makedirs(os.path.join(base_dir, 'base'), exist_ok=True)
os.makedirs(os.path.join(base_dir, 'algo1'), exist_ok=True)
os.makedirs(os.path.join(base_dir, 'algo2'), exist_ok=True)
os.makedirs(os.path.join(base_dir, 'algo3'), exist_ok=True)

# Create config.yml files
with open(os.path.join(base_dir, 'base', 'config.yml'), 'w') as f:
    f.write('# base config\n')

with open(os.path.join(base_dir, 'algo1', 'config.yml'), 'w') as f:
    f.write('# algo1 config\n')

with open(os.path.join(base_dir, 'algo2', 'config.yml'), 'w') as f:
    f.write('# algo2 config\n')

with open(os.path.join(base_dir, 'algo3', 'config.yml'), 'w') as f:
    f.write('# algo3 config\n')

ARGS = {
    'base_dir': base_dir
}
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 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 Ran
ran; our contract draft was wrong, not the code
ejaasaari/lorann-experiments/ann_benchmarks/datasets.py
code served (permissive licence) · get_code("1832a37264ff8488")
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 os
import h5py
import tempfile
import shutil

# Create a temporary directory for the test
temp_dir = tempfile.mkdtemp()
original_dir = os.getcwd()
os.chdir(temp_dir)

# Create a mock dataset creator function
def create_mock_dataset(filepath):
    """Create a minimal HDF5 file for testing."""
    with h5py.File(filepath, 'w') as f:
        # Create a simple dataset with some data
        train_data = f.create_dataset('train', data=[[1.0, 2.0, 3.0, 4.0], [5.0, 6.0, 7.0, 8.0]])
        f.attrs['dimension'] = 4

# Define the DATASETS dict that the function expects
DATASETS = {
    'test_dataset': create_mock_dataset
}

# Ensure the data directory exists
if not os.path.exists('data'):
    os.mkdir('data')

# Create the test dataset file
test_dataset_path = os.path.join('data', 'test_dataset.hdf5')
if not os.path.exists(test_dataset_path):
    create_mock_dataset(test_dataset_path)

# Define arguments for get_dataset function
ARGS = {
    'dataset_name': 'test_dataset'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
h5py — 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
get_run_desc Ran
ran; our contract draft was wrong, not the code
ejaasaari/lorann-experiments/create_website.py
code served (permissive licence) · get_code("239f62264b6ae120")
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 = {
    'properties': {
        'dataset': 'cifar10',
        'count': 42,
        'distance': 'euclidean'
    }
}
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
int_parse_entry Ran
ran; our contract draft was wrong, not the code
ejaasaari/lorann-experiments/ann_benchmarks/data.py
code served (permissive licence) · get_code("378ed3f6e88f78c2")
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 frozenset. 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
from typing import List, Union, Set, FrozenSet

torch.manual_seed(0)

# The function int_parse_entry takes a single parameter 'line' which is a string.
# It strips whitespace, splits by spaces, converts each element to int, and returns a frozenset.
# We need to provide a valid string input that contains space-separated integers.

line = "1 2 3 4 5"

ARGS = {
    "line": line
}
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 frozenset — a frozenset output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a frozenset 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
jaccard Ran
ran; our contract draft was wrong, not the code
ejaasaari/lorann-experiments/ann_benchmarks/distance.py
code served (permissive licence) · get_code("df5a5ca06135cc3f")
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
from typing import List

# Set seed for reproducibility
torch.manual_seed(0)

# Define test data for the jaccard function
# The function takes two lists of integers and computes Jaccard similarity

# Example 1: Two lists with some overlap
list_a = [1, 2, 3, 4, 5]
list_b = [3, 4, 5, 6, 7]

ARGS = {
    "a": list_a,
    "b": list_b,
}
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
replace_hyphens_in_keys Ran
ran; our contract draft was wrong, not the code
ejaasaari/lorann-experiments/convert_algos.py
code served (permissive licence) · get_code("a78b6c11cea19a3d")
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 torch

torch.manual_seed(0)

# The function takes a dictionary and replaces hyphens in keys with underscores
# It iterates over k, v pairs and calls k.replace('-', '_')
# So we need a dict with string keys that may contain hyphens

ARGS = {
    "data": {
        "key-with-hyphens": "value1",
        "another-hyphen-key": 42,
        "normal_key": [1, 2, 3],
        "key-multiple-hyphens": {"nested": "dict"},
        "no_hyphens": 3.14
    }
}
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
train_test_split Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
ejaasaari/lorann-experiments/ann_benchmarks/datasets.py
code served (permissive licence) · get_code("762ddcae80faee0b")
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. 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
import numpy as np

# Create a small dataset for testing
# X should be a 2D numpy array with samples as rows
# Using shape (100, 5) - 100 samples with 5 features
X = np.random.randn(100, 5).astype(np.float32)

# Define all arguments for the function
ARGS = {
    'X': X,
    'test_size': 20,
    'dimension': None
}
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 list — a list 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
compute_V Not yet run
unverified (harvested, no recorded run)
ejaasaari/lorann/python/lorann_gpu/lorann_gpu.py
code served (permissive licence) · get_code("ba29d4db272d5078")
How it ran

no invocation recorded.

config_write Not yet run
unverified (harvested, no recorded run)
ejaasaari/lorann-experiments/convert_algos.py
code served (permissive licence) · get_code("71f7ee0bb635fb1a")
How it ran

no invocation recorded.

get_dataset_fn Not yet run
unverified (harvested, no recorded run)
ejaasaari/lorann-experiments/ann_benchmarks/datasets.py
code served (permissive licence) · get_code("08c7a13d549d2592")
How it ran

no invocation recorded.

Also present in other papers' code

Of 20 samples lifted from this paper's linked repositories, 20 carry a function identity and 0 do not. Of the 20 distinct functions with an identity, 10 are also present in other papers whose code we hold (10 with at least one paper dated earlier, 0 the same month, 0 later) and 10 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
build_multiprocess 2 other papers
2 dated earlier
2308.07061 (2023-08)
Machine Unlearning: Solutions and Challenges
2409.17424 (2024-09)
Results of the Big ANN: NeurIPS'23 competition
convert_color 1 other paper
1 dated earlier
2308.07061 (2023-08)
Machine Unlearning: Solutions and Challenges
convert_linestyle 1 other paper
1 dated earlier
2308.07061 (2023-08)
Machine Unlearning: Solutions and Challenges
float_parse_entry 1 other paper
1 dated earlier
1807.05614 (2018-07)
ANN-Benchmarks: A Benchmarking Tool for Approximate Nearest Neighbor Algorithms
float_unparse_entry 1 other paper
1 dated earlier
1807.05614 (2018-07)
ANN-Benchmarks: A Benchmarking Tool for Approximate Nearest Neighbor Algorithms
get_dataset_fn 1 other paper
1 dated earlier
1807.05614 (2018-07)
ANN-Benchmarks: A Benchmarking Tool for Approximate Nearest Neighbor Algorithms
get_run_desc 1 other paper
1 dated earlier
2308.07061 (2023-08)
Machine Unlearning: Solutions and Challenges
int_parse_entry 1 other paper
1 dated earlier
1807.05614 (2018-07)
ANN-Benchmarks: A Benchmarking Tool for Approximate Nearest Neighbor Algorithms
jaccard 1 other paper
1 dated earlier
1807.05614 (2018-07)
ANN-Benchmarks: A Benchmarking Tool for Approximate Nearest Neighbor Algorithms
train_test_split 1 other paper
1 dated earlier
1807.05614 (2018-07)
ANN-Benchmarks: A Benchmarking Tool for Approximate Nearest Neighbor Algorithms

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

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 (ANN) search is a key component in many modern machine learning pipelines; recent use cases include retrieval-augmented generation (RAG) and vector databases. Clustering-based ANN algorithms, that use score computation methods based on product quantization (PQ), are often used in industrial-scale applications due to their scalability and suitability for distributed and disk-based implementations. However, they have slower query times than the leading graph-based ANN algorithms. In this work, we propose a new supervised score computation method based on the observation that inner product approximation is a multivariate (multi-output) regression problem that can be solved efficiently by reduced-rank regression. Our experiments show that on modern high-dimensional data sets, the proposed reduced-rank regression (RRR) method is superior to PQ in both query latency and memory usage. We also introduce LoRANN 1 , a clustering-based ANN library that leverages the proposed score computation method. LoRANN is competitive with the leading graph-based algorithms and outperforms the state-of-the-art GPU ANN methods on high-dimensional data sets.

For agents

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

get_harvested_code_for_paper("2410.18926")
get_code_for_paper("2410.18926")
have("2410.18926")

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

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

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

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

Connect an agent — have() is free.