SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1910.14424 · 2019

Multi-Stage Document Ranking with BERT

arXiv · PDF · Open in the Atlas

Code that ran

4 of 5 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 4 have no contract verdict; 0 failures of our instrument; 1 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/1910.14424.json · badge: /api/ran/1910.14424.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
philipphager/baidu-bert-model community (classifier label)
classifier basis not recorded on the link
4 ran · 1 no recorded run
FunctionStatusWhere it lives
collate_rel_fn Ran
ran on a synthesized input
philipphager/baidu-bert-model/src/data.py
code served (permissive licence) · get_code("9914db56ad7e4e2c")
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 numpy as np
from collections import defaultdict

# Define special tokens and segment types
special_tokens = {
    'CLS': 101,
    'SEP': 102,
    'PAD': 0
}

segment_types = {
    'QUERY': 0,
    'TEXT': 1,
    'PAD': 0
}

# Create sample batch data
batch = [
    {
        'query_id': 1001,
        'query': [2054, 2003, 2054],  # "what is what" (3 tokens)
        'title': [
            [2054, 2003],  # first title (2 tokens)
            [2054, 2054]   # second title (2 tokens)
        ],
        'abstract': [
            [2054, 2003, 2054, 2003],  # first abstract (4 tokens)
            [2003, 2054, 2003]          # second abstract (3 tokens)
        ],
        'label': [1, 0],
        'frequency_bucket': 5,
        'n': 2
    },
    {
        'query_id': 1002,
        'query': [2003, 2054],  # "is what" (2 tokens)
        'title': [
            [2054, 2003, 2054]  # single title (3 tokens)
        ],
        'abstract': [
            [2054, 2003]  # single abstract (2 tokens)
        ],
        'label': [1],
        'frequency_bucket': 3,
        'n': 1
    }
]

max_tokens = 32

ARGS = {
    'batch': batch,
    'max_tokens': max_tokens,
    'special_tokens': special_tokens,
    'segment_types': segment_types
}
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 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
dict_to_numpy Ran
ran on a synthesized input
philipphager/baidu-bert-model/src/evaluator.py
code served (permissive licence) · get_code("1c1e6ae6b8e378e7")
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 jax
import jax.numpy as jnp
import numpy as np

# Create a dictionary with JAX arrays as values
test_dict = {
    "array_1": jnp.array([1.0, 2.0, 3.0, 4.0]),
    "array_2": jnp.array([[1.0, 2.0], [3.0, 4.0], [5.0, 6.0]]),
    "array_3": jnp.ones((2, 4)),
}

ARGS = {
    "_dict": test_dict
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
jax, numpy — 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
format_input Ran
ran on a synthesized input
philipphager/baidu-bert-model/src/data.py
code served (permissive licence) · get_code("e3d14a4472327aa7")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple, ndim 2, dtype family int; 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

ARGS = {
    'query': [101, 2054, 2003],
    'title': [2054, 2003, 1045],
    'abstract': [1045, 2572, 3231, 2572],
    'max_tokens': 32,
    'special_tokens': {
        'CLS': 101,
        'SEP': 102,
        'PAD': 0,
    },
    'segment_types': {
        'QUERY': 0,
        'TEXT': 1,
        'PAD': 0,
    },
}
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, ndim 2, dtype family int — a tuple output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
split_idx Ran
ran on a synthesized input
philipphager/baidu-bert-model/src/data.py
code served (permissive licence) · get_code("d77f6c7af20e3fdd")
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 int; 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

# Analyze the function:
# - text: bytes - needs to be bytes with b'\x01' separators and numeric strings
# - offset: int - integer to add to each token

# Create test bytes with token ids separated by b'\x01'
# Example: b'5\x0110\x0123' represents tokens 5, 10, 23
text = b'5\x0110\x0123\x01'
offset = 100

ARGS = {
    'text': text,
    'offset': offset,
}
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 int — 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
collect_metrics Not yet run
unverified (harvested, no recorded run)
philipphager/baidu-bert-model/src/evaluator.py
code served (permissive licence) · get_code("a01dcf4ed27f0482")
How it ran

no invocation recorded.

Also present in other papers' code

Of 5 samples lifted from this paper's linked repositories, 5 carry a function identity and 0 do not. Of the 5 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 5 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

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

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

The advent of deep neural networks pre-trained via language modeling tasks has spurred a number of successful applications in natural language processing. This work explores one such popular model, BERT, in the context of document ranking. We propose two variants, called monoBERT and duoBERT, that formulate the ranking problem as pointwise and pairwise classification, respectively. These two models are arranged in a multi-stage ranking architecture to form an end-to-end search system. One major advantage of this design is the ability to trade off quality against latency by controlling the admission of candidates into each pipeline stage, and by doing so, we are able to find operating points that offer a good balance between these two competing metrics. On two large-scale datasets, MS MARCO and TREC CAR, experiments show that our model produces results that are either at or comparable to the state of the art. Ablation studies show the contributions of each component and characterize the latency/quality tradeoff space.

For agents

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

get_harvested_code_for_paper("1910.14424")
get_code_for_paper("1910.14424")
have("1910.14424")

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

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

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

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

Connect an agent — have() is free.