SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2110.05789 · 2021

Learning Discrete Representations via Constrained Clustering for Effective and Efficient Dense Retrieval

arXiv · PDF · Open in the Atlas

Code that ran

16 of 22 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, 1 violated it and 9 have no contract verdict; 6 failures of our instrument; 6 no recorded run), measured 2026-11-23; 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/2110.05789.json · badge: /api/ran/2110.05789.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
jingtaozhan/DRhard canonical (classifier label)
classifier basis not recorded on the link
12 ran · 4 no recorded run
jingtaozhan/repconc canonical (classifier label)
classifier basis: classifier_2025
1 ran · 0 no recorded run
jingtaozhan/JPQ community (classifier label)
classifier basis not recorded on the link
3 ran · 2 no recorded run
FunctionStatusWhere it lives
PassagePreprocessingFn Ran
ran on a synthesized input
jingtaozhan/DRhard/preprocess.py
code served (permissive licence) · get_code("d644ea00a07b6437")
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 torch
import numpy as np

# Create a minimal tokenizer mock with the encode method
class MockTokenizer:
    def encode(self, text, add_special_tokens=True, max_length=None, truncation=False):
        # Return a simple list of token IDs
        # Simulate tokenization by returning a list proportional to text length
        tokens_per_char = 0.1
        num_tokens = max(1, int(len(text) * tokens_per_char))
        token_ids = list(range(1, num_tokens + 1))
        
        # Apply truncation if needed
        if truncation and max_length and len(token_ids) > max_length:
            token_ids = token_ids[:max_length]
        
        # Add special tokens (e.g., [CLS] at start, [SEP] at end)
        if add_special_tokens:
            token_ids = [101] + token_ids + [102]
        
        return token_ids

# Create a minimal args object with necessary attributes
class MockArgs:
    def __init__(self):
        self.data_type = 0  # Can be 0 or 1
        self.max_doc_character = 1000
        self.max_seq_length = 128
        self.pad_token = 0

# Define the arguments for PassagePreprocessingFn
ARGS = {
    "args": MockArgs(),
    "line": "P1\thttp://example.com\tExample Title\tThis is an example passage with some text content.",
    "tokenizer": MockTokenizer()
}
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
batch_to_device Ran
ran; our contract draft was wrong, not the code
jingtaozhan/JPQ/jpq/model.py
code served (permissive licence) · get_code("784e8a98f055bde0")
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
from torch import nn, Tensor

torch.manual_seed(0)

# Create a batch dictionary with various tensor entries
batch = {
    "input_ids": torch.randint(0, 100, (2, 4)),
    "attention_mask": torch.ones(2, 4),
    "token_type_ids": torch.zeros(2, 4),
    "embeddings": torch.randn(2, 4, 8),
    "non_tensor_value": "this should not be moved"
}

# Target device (CPU only)
target_device = "cpu"

ARGS = {
    "batch": batch,
    "target_device": target_device
}
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
construct_flatindex_from_embeddings Ran
ran on a synthesized input
jingtaozhan/DRhard/retrieve_utils.py
code served (permissive licence) · get_code("5149666c4e47a3f9")
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 IndexIDMap2. 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 faiss

# Create small embeddings
embeddings = np.random.randn(2, 4).astype(np.float32)

# Create corresponding IDs
ids = np.array([10, 20], dtype=np.int64)

ARGS = {
    "embeddings": embeddings,
    "ids": ids,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
faiss, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type IndexIDMap2 — a IndexIDMap2 output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a IndexIDMap2 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_collate_function Ran
ran on a synthesized input
jingtaozhan/JPQ/jpq/dataset.py
code served (permissive licence) · get_code("a9a03792761f628c")
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 function. 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)

def pack_tensor_2D(lstlst, default, dtype, length=None):
    batch_size = len(lstlst)
    length = length if length is not None else max((len(l) for l in lstlst))
    tensor = default * torch.ones((batch_size, length), dtype=dtype)
    for i, l in enumerate(lstlst):
        tensor[i, :len(l)] = torch.tensor(l, dtype=dtype)
    return tensor

def get_collate_function(max_seq_length):

    def collate_function(batch):
        input_ids = [x['input_ids'] for x in batch]
        attention_mask = [x['attention_mask'] for x in batch]
        data = {'input_ids': pack_tensor_2D(input_ids, default=1, dtype=torch.int64, length=None), 'attention_mask': pack_tensor_2D(attention_mask, default=0, dtype=torch.int64, length=None)}
        ids = [x['id'] for x in batch]
        return (data, ids)
    return collate_function

ARGS = {
    'max_seq_length': 128
}
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 function — a function output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a function 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_doc_embeds Ran
ran on a synthesized input
jingtaozhan/JPQ/jpq/run_train.py
code served (permissive licence) · get_code("9e1ebe9b0455aa43")
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 Tensor, ndim 2, dtype family float, shape (2, 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 torch

torch.manual_seed(0)

# Analyze the function:
# - psg_ids: indexed into pq_codes, so needs to be a 1D tensor of indices
# - pq_codes: 2D tensor where pq_codes[psg_ids] is indexed, shape (num_passages, M)
# - centroids: 2D tensor indexed by [first_indices, second_indices], shape (M, embedding_dim)

# Parameters:
# M = centroids.shape[0] -> number of codebook entries
# len(psg_ids) -> batch size
# pq_codes[psg_ids] -> (batch_size, M)
# centroids[first_indices, second_indices] -> (batch_size * M,) then reshape to (batch_size, M * embedding_dim)

batch_size = 2
M = 3  # number of codebooks
embedding_dim = 4

# psg_ids: indices into pq_codes, shape (batch_size,)
psg_ids = torch.tensor([0, 1], dtype=torch.long)

# pq_codes: shape (num_passages, M), values in range [0, embedding_dim)
num_passages = 2
pq_codes = torch.randint(0, embedding_dim, (num_passages, M), dtype=torch.long)

# centroids: shape (M, embedding_dim)
centroids = torch.randn(M, embedding_dim)

ARGS = {
    "psg_ids": psg_ids,
    "pq_codes": pq_codes,
    "centroids": centroids,
}
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 Tensor, ndim 2, dtype family float, shape (2, 3) — shape (2, 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
hf_bucket_url Ran
ran; our contract draft was wrong, not the code
jingtaozhan/DRhard/star_tokenizer.py
code served (permissive licence) · get_code("b2be6c932ce41084")
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 = {
    'identifier': 'bert-base-uncased',
    'postfix': 'pytorch_model.bin',
    'cdn': False
}
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
index_retrieve Ran
ran; our contract draft was wrong, not the code
jingtaozhan/DRhard/retrieve_utils.py
pointer only (licence: BSD-3-Clause); the stored copy get_code serves, from freedomintelligence/chain-of-diagnosis, is pointer only (licence: NONE) · get_code("62fc247c87911474")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (BSD-3-Clause), but get_code serves the stored copy, first harvested from freedomintelligence/chain-of-diagnosis, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

is_remote_url Ran
ran, violated the contract we drafted
jingtaozhan/DRhard/star_tokenizer.py
code served (permissive licence) · get_code("4381d1f588a7f42a")
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 bool, 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
from urllib.parse import urlparse

ARGS = {
    'url_or_filename': 'https://example.com/model.pth'
}
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 bool, 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
load_candidate_from_stream Ran
ran on a synthesized input
jingtaozhan/DRhard/msmarco_eval.py
code served (permissive licence) · get_code("1a34a07957ed4ee3")
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 io

# Create a stream (file-like object) with candidate passage data
# Format: query_id\tpassage_id\trank
stream_content = """1\t101\t1
1\t102\t2
1\t103\t3
2\t201\t1
2\t202\t2
3\t301\t1"""

f = io.StringIO(stream_content)

ARGS = {
    "f": f
}
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_rank Ran
ran on a synthesized input
jingtaozhan/DRhard/dataset.py
code served (permissive licence) · get_code("9bbe63268d471884")
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 os
import tempfile
from collections import defaultdict

# Create a temporary file with ranking data
temp_file = tempfile.NamedTemporaryFile(mode='w', delete=False, suffix='.txt')
temp_file.write("1 100 0.5\n")
temp_file.write("1 101 0.3\n")
temp_file.write("2 200 0.8\n")
temp_file.write("2 201 0.6\n")
temp_file.write("2 202 0.4\n")
temp_file.close()

ARGS = {
    'rank_path': temp_file.name
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
tqdm — 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_reference_from_stream Ran
ran on a synthesized input
jingtaozhan/DRhard/msmarco_eval.py
code served (permissive licence) · get_code("42005ba9f770d57d")
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 io

ARGS = {
    "f": io.StringIO(
        "1\tQ0\t2\t1\n"
        "1\tQ0\t3\t1\n"
        "2\tQ0\t5\t1\n"
        "3\tQ0\t7\t1\n"
    )
}
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_rel Ran
ran on a synthesized input
jingtaozhan/DRhard/dataset.py
code served (permissive licence) · get_code("3a4b386b64960337")
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 os
import tempfile
from collections import defaultdict

# Create a temporary file with test data in the expected format
temp_file = tempfile.NamedTemporaryFile(mode='w', delete=False, suffix='.txt')
temp_file.write("1 0 101 0\n")
temp_file.write("1 0 102 0\n")
temp_file.write("2 0 201 0\n")
temp_file.write("3 0 301 0\n")
temp_file.write("3 0 302 0\n")
temp_file.write("3 0 303 0\n")
temp_file.close()

ARGS = {
    "rel_path": temp_file.name
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
tqdm — 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
mean_pooling Ran
ran; our contract draft was wrong, not the code
jingtaozhan/repconc/src/repconc/models/dense/modeling_dense.py
code served (permissive licence) · get_code("07b0e4cab6c2d738")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Sonnet 4.5, prompt python_fixture_v1) and returned Tensor, ndim 2, dtype family float, shape (2, 8) 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 torch.nn as nn

torch.manual_seed(0)

# Create a simple stand-in class for model_output that has last_hidden_state attribute
class ModelOutput:
    def __init__(self, last_hidden_state):
        self.last_hidden_state = last_hidden_state

# Create model output with last_hidden_state
# Shape: (batch_size=2, sequence_length=5, hidden_size=8)
last_hidden_state = torch.randn(2, 5, 8)
model_output = ModelOutput(last_hidden_state)

# Create attention_mask
# Shape: (batch_size=2, sequence_length=5)
attention_mask = torch.tensor([[1, 1, 1, 1, 0],
                               [1, 1, 1, 0, 0]])

ARGS = {
    'model_output': model_output,
    'attention_mask': attention_mask
}
Setup block drafted by
a language model, Claude Sonnet 4.5, prompt python_fixture_v1
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 2, dtype family float, shape (2, 8) — shape (2, 8) 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
pack_tensor_2D Ran
ran on a synthesized input
jingtaozhan/DRhard/dataset.py
code served (permissive licence) · get_code("7f738a55dde7b691")
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 Tensor, ndim 2, dtype family float, shape (2, 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 torch

torch.manual_seed(0)

# lstlst: a list of lists of numbers (variable lengths)
lstlst = [
    [1.0, 2.0, 3.0],
    [4.0, 5.0]
]

# default: a scalar value to use for padding
default = 0.0

# dtype: torch data type
dtype = torch.float32

# length: optional maximum length (can be None or an integer)
length = None

ARGS = {
    "lstlst": lstlst,
    "default": default,
    "dtype": dtype,
    "length": length
}
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 Tensor, ndim 2, dtype family float, shape (2, 3) — shape (2, 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
pad_input_ids Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
jingtaozhan/DRhard/preprocess.py
pointer only (licence: BSD-3-Clause); the stored copy get_code serves, from fengranMark/QRACDR, is pointer only (licence: NONE) · get_code("b201d8d93b242b70")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (BSD-3-Clause), but get_code serves the stored copy, first harvested from fengranMark/QRACDR, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

url_to_filename Ran
ran; our contract draft was wrong, not the code
jingtaozhan/DRhard/star_tokenizer.py
code served (permissive licence) · get_code("e827d94caab33f59")
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.

from hashlib import sha256

ARGS = {
    "url": "https://example.com/model.weights",
    "etag": "abc123def456"
}
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
compute_loss Not yet run
unverified (harvested, no recorded run)
jingtaozhan/JPQ/jpq/run_train.py
code served (permissive licence) · get_code("b2c86c4e199eeb01")
How it ran

no invocation recorded.

convert_index_to_gpu Not yet run
unverified (harvested, no recorded run)
jingtaozhan/DRhard/retrieve_utils.py
code served (permissive licence) · get_code("66e8bf589981ec7f")
How it ran

no invocation recorded.

inbatch_train Not yet run
unverified (harvested, no recorded run)
jingtaozhan/DRhard/model.py
code served (permissive licence) · get_code("9004f78cc68a7b5c")
How it ran

no invocation recorded.

load_index Not yet run
unverified (harvested, no recorded run)
jingtaozhan/JPQ/jpq/run_retrieval.py
code served (permissive licence) · get_code("b32da4856889747c")
How it ran

no invocation recorded.

load_reference Not yet run
unverified (harvested, no recorded run)
jingtaozhan/DRhard/msmarco_eval.py
code served (permissive licence) · get_code("4020d64dcc4b6c53")
How it ran

no invocation recorded.

randneg_train Not yet run
unverified (harvested, no recorded run)
jingtaozhan/DRhard/model.py
code served (permissive licence) · get_code("650169b0049d3567")
How it ran

no invocation recorded.

Also present in other papers' code

Of 22 samples lifted from this paper's linked repositories, 22 carry a function identity and 0 do not. Of the 22 distinct functions with an identity, 11 are also present in other papers whose code we hold (4 with at least one paper dated earlier, 0 the same month, 11 later) and 11 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
url_to_filename 12 other papers
8 dated earlier, 4 later
1909.11942 (2019-09)
ALBERT: A Lite BERT for Self-supervised Learning of Language Representations
2004.09297 (2020-04)
MPNet: Masked and Permuted Pre-training for Language Understanding
2005.00796 (2020-05)
A Simple Language Model for Task-Oriented Dialogue
and 9 more not named here
hf_bucket_url 8 other papers
6 dated earlier, 2 later
1909.11942 (2019-09)
ALBERT: A Lite BERT for Self-supervised Learning of Language Representations
2004.09297 (2020-04)
MPNet: Masked and Permuted Pre-training for Language Understanding
2005.00796 (2020-05)
A Simple Language Model for Task-Oriented Dialogue
and 5 more not named here
is_remote_url 7 other papers
6 dated earlier, 1 later
1909.11942 (2019-09)
ALBERT: A Lite BERT for Self-supervised Learning of Language Representations
2004.09297 (2020-04)
MPNet: Masked and Permuted Pre-training for Language Understanding
2005.00796 (2020-05)
A Simple Language Model for Task-Oriented Dialogue
and 4 more not named here
load_reference 5 other papers
1 dated earlier, 4 later
1611.09268 (2016-11)
MS MARCO: A Human Generated MAchine Reading COmprehension Dataset
2022.emnlp-main.727 (2022 (year only))
CODER: An efficient framework for improving retrieval through COntextual Document Embedding Reranking
2209.00179 (2022-09)
Universal Vision-Language Dense Retrieval: Learning A Unified Representation Space for Multi-Modal Retrieval
and 2 more not named here
index_retrieve 2 other papers
2 later
2406.16332 (2024-06)
DemoRank: Selecting Effective Demonstrations for Large Language Models in Ranking Task
2407.13301 (2024-07)
CoD, Towards an Interpretable Medical Agent using Chain of Diagnosis
pad_input_ids 2 other papers
2 later
2112.09118 (2021-12)
Unsupervised Dense Information Retrieval with Contrastive Learning
2607.08540 (2026-07)
Improving Ad-hoc Search Effectiveness for Conversational Information Retrieval via Model Merging
batch_to_device 1 other paper
1 later
2403.18684 (2024-03)
Scaling Laws For Dense Retrieval
convert_index_to_gpu 1 other paper
1 later
2406.16332 (2024-06)
DemoRank: Selecting Effective Demonstrations for Large Language Models in Ranking Task
get_collate_function 1 other paper
1 later
2112.09118 (2021-12)
Unsupervised Dense Information Retrieval with Contrastive Learning
mean_pooling 1 other paper
1 later
2402.15708 (2024-02)
Query Augmentation by Decoding Semantics from Brain Signals
pack_tensor_2D 1 other paper
1 later
2112.09118 (2021-12)
Unsupervised Dense Information Retrieval with Contrastive Learning

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

Dense Retrieval (DR) has achieved state-of-the-art first-stage ranking effectiveness. However, the efficiency of most existing DR models is limited by the large memory cost of storing dense vectors and the time-consuming nearest neighbor search (NNS) in vector space. Therefore, we present RepCONC, a novel retrieval model that learns discrete Representations via CONstrained Clustering. RepCONC jointly trains dual-encoders and the Product Quantization (PQ) method to learn discrete document representations and enables fast approximate NNS with compact indexes. It models quantization as a constrained clustering process, which requires the document embeddings to be uniformly clustered around the quantization centroids and supports end-to-end optimization of the quantization method and dual-encoders. We theoretically demonstrate the importance of the uniform clustering constraint in RepCONC and derive an efficient approximate solution for constrained clustering by reducing it to an instance of the optimal transport problem. Besides constrained clustering, RepCONC further adopts a vector-based inverted file system (IVF) to support highly efficient vector search on CPUs. Extensive experiments on two popular ad-hoc retrieval benchmarks show that RepCONC achieves better ranking effectiveness than competitive vector quantization baselines under different compression ratio settings. It also substantially outperforms a wide range of existing retrieval models in terms of retrieval effectiveness, memory efficiency, and time efficiency.

For agents

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

get_harvested_code_for_paper("2110.05789")
get_code_for_paper("2110.05789")
have("2110.05789")

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

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

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

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

Connect an agent — have() is free.