SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2008.13368 · 2020

PT-Ranking: A Benchmarking Platform for Neural Learning-to-Rank

arXiv · PDF · Open in the Atlas

Code that ran

7 of 7 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 7 have no contract verdict; 0 failures of our instrument; 0 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/2008.13368.json · badge: /api/ran/2008.13368.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
wildltr/ptranking canonical (classifier label)
classifier basis: census
7 ran · 0 no recorded run
FunctionStatusWhere it lives
decode_sf_str Ran
ran on a synthesized input
wildltr/ptranking/ptranking/base/utils.py
code served (permissive licence) · get_code("1b7372cd0e2d5f1b")
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 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.

# Setup code for decode_sf_str

ARGS = {
    "file_name": "model_SF_relu.tanh_checkpoint.pt"
}

# Additional test cases to verify the function works
test_cases = [
    "model_SF_relu_final.pt",  # 1 layer case
    "model_SF_relu.tanh_weights.pt",  # 2 layer case
    "model_SF_relu.h64n.sigmoid_final.pt",  # 3+ layer case
]
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 tuple, ndim 1, dtype family float — 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
get_AF Ran
ran on a synthesized input
wildltr/ptranking/ptranking/base/utils.py
code served (permissive licence) · get_code("9103b64007d43030")
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 ReLU. 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 torch.nn as nn

torch.manual_seed(0)

# The function get_AF takes a single parameter: af_str (a string identifier)
# It returns an activation function based on the string identifier
# Valid identifiers are: 'R', 'LR', 'RR', 'PR', 'E', 'SE', 'CE', 'GE', 'S', 'SW', 'T', 'ST'

ARGS = {
    'af_str': 'R'
}
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 ReLU — a ReLU output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a ReLU 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
ltr_batch_norm Ran
ran on a synthesized input
wildltr/ptranking/ptranking/base/utils.py
code served (permissive licence) · get_code("b0616171820d6a63")
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

torch.manual_seed(0)

# Construct arguments for ltr_batch_norm
# X: input tensor with shape (batch_size, feature_dim)
# gamma, beta: learnable affine parameters with shape (feature_dim,)
# moving_mean, moving_var: running statistics with shape (1, feature_dim)
# eps: small constant for numerical stability
# momentum: decay factor for moving averages

batch_size = 2
feature_dim = 4

X = torch.randn(batch_size, feature_dim)
gamma = torch.randn(feature_dim)
beta = torch.randn(feature_dim)
moving_mean = torch.randn(1, feature_dim)
moving_var = torch.abs(torch.randn(1, feature_dim))  # variance should be positive
eps = 1e-5
momentum = 0.1

ARGS = {
    'X': X,
    'gamma': gamma,
    'beta': beta,
    'moving_mean': moving_mean,
    'moving_var': moving_var,
    'eps': eps,
    'momentum': momentum
}
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 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
make_clones Ran
ran on a synthesized input
wildltr/ptranking/ptranking/base/list_ranker.py
code served (permissive licence) · get_code("6e296d305b6a65c7")
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 ModuleList. 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 torch.nn as nn
import copy

torch.manual_seed(0)

# Create a simple module to clone
class SimpleModule(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 3)
    
    def forward(self, x):
        return self.linear(x)

module = SimpleModule()
N = 5

ARGS = {
    "module": module,
    "N": N
}
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 ModuleList — a ModuleList output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a ModuleList output the recorded ndim 1 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
ndcg_loss1_power_weights Ran
ran on a synthesized input
wildltr/ptranking/ptranking/ltr_adhoc/listwise/lambdaloss.py
code served (permissive licence) · get_code("16a9389f86962a03")
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, 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 torch
import numpy as np

torch.manual_seed(0)

# Construct arguments for ndcg_loss1_power_weights
# The function divides batch_n_gains by discounts, so both should be tensors
# that support element-wise division

batch_n_gains = torch.tensor([[1.0, 2.0, 3.0, 4.0],
                               [2.0, 3.0, 4.0, 5.0]], dtype=torch.float32)

discounts = torch.tensor([[1.0, 2.0, 3.0, 4.0],
                          [1.0, 2.0, 3.0, 4.0]], dtype=torch.float32)

ARGS = {
    'batch_n_gains': batch_n_gains,
    'discounts': discounts
}
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 Tensor, 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
ndcg_loss2_power_weights Ran
ran on a synthesized input
wildltr/ptranking/ptranking/ltr_adhoc/listwise/lambdaloss.py
code served (permissive licence) · get_code("57e32f4411a30dc0")
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 3, dtype family float, shape (2, 4, 4) as a later run recorded it. The image it ran in was not recorded. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is 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:
# - batch_n_gains: used with .size(1), indexing with [:, :, None] and [:, None, :]
#   Shape appears to be (batch_size, num_items)
# - discounts: indexed with [abs_rank_deltas - 1] and [abs_rank_deltas]
#   Should be a 1D tensor of discount values
# - gpu: boolean flag for device selection

# Create batch_n_gains tensor: (batch_size=2, num_items=4)
batch_n_gains = torch.randn(2, 4)

# Create discounts tensor: needs to be 1D and have enough elements
# abs_rank_deltas ranges from 0 to num_items-1, so we need at least num_items elements
# Actually, abs_rank_deltas - 1 ranges from -1 to num_items-2, and abs_rank_deltas ranges from 0 to num_items-1
# So we need discounts to be indexable up to num_items-1 (which is 3)
# Create a discounts tensor with enough values
discounts = torch.tensor([1.0, 0.5, 0.33, 0.25, 0.2])

gpu = False

ARGS = {
    "batch_n_gains": batch_n_gains,
    "discounts": discounts,
    "gpu": gpu
}
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 3, dtype family float, shape (2, 4, 4) — shape (2, 4, 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
ndcg_loss2plusplus_power_weights Ran
ran on a synthesized input
wildltr/ptranking/ptranking/ltr_adhoc/listwise/lambdaloss.py
code served (permissive licence) · get_code("6591ceed7e214955")
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 3, dtype family float, shape (2, 4, 4) as a later run recorded it. The image it ran in was not recorded. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is 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 usage:
# - batch_n_gains: indexed as batch_n_gains.size(1), batch_n_gains[:, :, None], batch_n_gains[:, None, :]
#   This suggests shape (batch_size, num_items, ...)
# - discounts: indexed as discounts[:, None], discounts[None, :], discounts[abs_rank_deltas - 1], discounts[abs_rank_deltas]
#   This suggests a 1D tensor of discount values

# Create small tensors
batch_size = 2
num_items = 4

# batch_n_gains: (batch_size, num_items) - gain scores for each item in each batch
batch_n_gains = torch.randn(batch_size, num_items)

# discounts: 1D tensor of discount values (one per rank position)
# Need at least num_items elements since it's indexed by rank deltas
discounts = torch.tensor([1.0, 0.63, 0.5, 0.43], dtype=torch.float32)

mu = 5.0
gpu = False

ARGS = {
    'batch_n_gains': batch_n_gains,
    'discounts': discounts,
    'mu': mu,
    'gpu': gpu
}
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 3, dtype family float, shape (2, 4, 4) — shape (2, 4, 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

Also present in other papers' code

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

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

Abstract

Deep neural networks has become the first choice for researchers working on algorithmic aspects of learning-to-rank. Unfortunately, it is not trivial to find the optimal setting of hyper-parameters that achieves the best ranking performance. As a result, it becomes more and more difficult to develop a new model and conduct a fair comparison with prior methods, especially for newcomers. In this work, we propose PT-Ranking, an open-source project based on PyTorch for developing and evaluating learning-to-rank methods using deep neural networks as the basis to construct a scoring function. On one hand, PT-Ranking includes many representative learning-to-rank methods. Besides the traditional optimization framework via empirical risk minimization, adversarial optimization framework is also integrated. Furthermore, PT-Ranking's modular design provides a set of building blocks that users can leverage to develop new ranking models. On the other hand, PT-Ranking supports to compare different learning-to-rank methods based on the widely used datasets (e.g., MSLR-WEB30K, Yahoo!LETOR and Istella LETOR) in terms of different metrics, such as precision, MAP, nDCG, nERR. By randomly masking the ground-truth labels with a specified ratio, PT-Ranking allows to examine to what extent the ratio of unlabelled query-document pairs affects the performance of different learning-to-rank methods. We further conducted a series of demo experiments to clearly show the effect of different factors on neural learning-to-rank methods, such as the activation function, the number of layers and the optimization strategy.

For agents

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

get_harvested_code_for_paper("2008.13368")
get_code_for_paper("2008.13368")
have("2008.13368")

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

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

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

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

Connect an agent — have() is free.