SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2402.12997 · 2024

Towards Trustworthy Reranking: A Simple yet Effective Abstention Mechanism

arXiv · PDF · Open in the Atlas

Code that ran

8 of 12 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 0 have no contract verdict; 8 failures of our instrument; 4 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/2402.12997.json · badge: /api/ran/2402.12997.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
artefactory/abstention-reranker canonical (classifier label)
classifier basis: census
8 ran · 4 no recorded run
FunctionStatusWhere it lives
evaluate_oracle Ran
ran; our contract draft was wrong, not the code
artefactory/abstention-reranker/abstention_reranker/eval_utils.py
code served (permissive licence) · get_code("286470354b13cee5")
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 (5,) 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

# Construct arguments for evaluate_oracle
# The function expects:
# - metrics: array-like of numeric values that will be sorted and sliced
# - abstention_rates: array-like of rates between 0 and 1

# Create a small metrics array
metrics = np.array([0.1, 0.3, 0.5, 0.7, 0.9, 0.2, 0.4, 0.6])

# Create abstention rates (between 0 and 1)
abstention_rates = np.array([0.0, 0.25, 0.5, 0.75, 1.0])

ARGS = {
    "metrics": metrics,
    "abstention_rates": abstention_rates
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 1, dtype family float, shape (5,) — shape (5,) 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
evaluate_strategy Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
artefactory/abstention-reranker/abstention_reranker/eval_utils.py
code served (permissive licence) · get_code("db40d555f4919196")
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 (4,) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np

# Create sample confidence scores (array of floats between 0 and 1)
confidence_scores = np.array([0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 0.95])

# Create sample metrics (same length as confidence_scores)
# These represent performance metrics for each sample
metrics = np.array([0.5, 0.55, 0.6, 0.65, 0.7, 0.75, 0.8, 0.85, 0.9, 0.92])

# Create abstention rates (fractions between 0 and 1)
abstention_rates = np.array([0.1, 0.3, 0.5, 0.7])

ARGS = {
    "confidence_scores": confidence_scores,
    "metrics": metrics,
    "abstention_rates": abstention_rates,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 1, dtype family float, shape (4,) — shape (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
get_scorer_linreg Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
artefactory/abstention-reranker/abstention_reranker/abst_utils.py
code served (permissive licence) · get_code("c569e37d7b9f6be1")
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 numpy as np
from sklearn.linear_model import Ridge

# Set random seed for reproducibility
np.random.seed(0)

# Create small test data
# relevance_scores_ref: shape (n_samples, n_features) - will be sorted along axis 1
# metrics_ref: shape (n_samples,) - target values for regression
n_samples = 5
n_features = 4

relevance_scores_ref = np.random.randn(n_samples, n_features).astype(np.float64)
metrics_ref = np.random.randn(n_samples).astype(np.float64)

ARGS = {
    "relevance_scores_ref": relevance_scores_ref,
    "metrics_ref": metrics_ref,
    "alpha": 0.1,
    "return_coefs": False,
}
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 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_scorer_mlp Ran
ran; our contract draft was wrong, not the code
artefactory/abstention-reranker/abstention_reranker/abst_utils.py
code served (permissive licence) · get_code("516be41ef298766c")
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 numpy as np
import torch
import torch.nn as nn

torch.manual_seed(0)
np.random.seed(0)

# Create small dummy data
# relevance_scores_ref: shape (batch_size, input_size) = (2, 10)
relevance_scores_ref = np.random.randn(2, 10).astype(np.float32)

# metrics_ref: shape (batch_size,) - target values for training
metrics_ref = np.random.randn(2).astype(np.float32)

ARGS = {
    'relevance_scores_ref': relevance_scores_ref,
    'metrics_ref': metrics_ref,
    'input_size': 10,
    'hidden_size': 128,
    'num_iter': 500,
    'batch_size': 'full',
    'learning_rate': 0.05,
    'seed': 0
}
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 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_scorer_rf Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
artefactory/abstention-reranker/abstention_reranker/abst_utils.py
code served (permissive licence) · get_code("8d33f94d39cfe2d6")
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 numpy as np
from sklearn.ensemble import RandomForestRegressor

# Set random seed for reproducibility
np.random.seed(0)

# Create small sample data for training the RandomForest regressor
# relevance_scores_ref: shape (n_samples, n_features)
# Each row represents relevance scores that will be sorted
relevance_scores_ref = np.array([
    [0.5, 0.3, 0.8, 0.1],
    [0.2, 0.9, 0.4, 0.6],
    [0.7, 0.1, 0.5, 0.3],
    [0.4, 0.6, 0.2, 0.8],
], dtype=np.float32)

# metrics_ref: shape (n_samples,) - target values for the regression
metrics_ref = np.array([0.75, 0.65, 0.80, 0.70], dtype=np.float32)

# seed for RandomForestRegressor
seed = 42

ARGS = {
    "relevance_scores_ref": relevance_scores_ref,
    "metrics_ref": metrics_ref,
    "seed": seed,
}
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 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
last_token_pool Ran
ran; our contract draft was wrong, not the code
artefactory/abstention-reranker/abstention_reranker/compute_mistral_biencoder.py
code served (permissive licence) · get_code("2ded070fabe7bdc7")
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
from torch import Tensor

torch.manual_seed(0)

# Create small tensors for testing
batch_size = 2
seq_length = 5
hidden_dim = 4

# Create last_hidden_states: (batch_size, seq_length, hidden_dim)
last_hidden_states = torch.randn(batch_size, seq_length, hidden_dim)

# Create attention_mask: (batch_size, seq_length)
# Test case 1: left padding (all sequences are fully attended)
attention_mask = torch.ones(batch_size, seq_length, dtype=torch.long)

ARGS = {
    "last_hidden_states": last_hidden_states,
    "attention_mask": attention_mask,
}
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, 4) — shape (2, 4) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
load_relevance_scores_datasets_from_local Ran
ran; our contract draft was wrong, not the code
artefactory/abstention-reranker/abstention_reranker/utils.py
code served (permissive licence) · get_code("e33cca9c134f32c5")
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 json
import os
import tempfile
import numpy as np

# Create a temporary directory to hold test JSON files
temp_dir = tempfile.mkdtemp()

# Create sample JSON files for each model-dataset combination
model_names = ['model_a', 'model_b']
dataset_names = ['dataset_1', 'dataset_2']

for model_name in model_names:
    for dataset_name in dataset_names:
        file_path = os.path.join(temp_dir, f'{dataset_name}_{model_name}.json')
        # Create sample data with scores and targets
        data = {
            'scores': [0.1, 0.2, 0.3, 0.4],
            'targets': [0, 1, 0, 1]
        }
        with open(file_path, 'w') as f:
            json.dump(data, f)

ARGS = {
    'model_names': ['model_a', 'model_b'],
    'dataset_names': ['dataset_1', 'dataset_2'],
    'path': temp_dir
}
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
process_dataset Ran
ran; our contract draft was wrong, not the code
artefactory/abstention-reranker/abstention_reranker/utils.py
code served (permissive licence) · get_code("f53c7ebd02857bf4")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np

# Construct valid arguments for process_dataset
# The function expects:
# - queries: iterable of query identifiers
# - positives: iterable of lists/sets of positive document IDs
# - negatives: iterable of lists/sets of negative document IDs
# - num_docs_pr: int (default 10)
# - max_num_pos_pr: int (default 5)
# - random_seed: int (default 42)

# Create sample data that will pass the function's filtering conditions
queries = [
    "query_1",
    "query_2",
    "query_3"
]

# Create positives and negatives with enough documents to satisfy:
# 1. No overlap between positive and negative sets
# 2. Total docs >= num_docs_pr
# 3. Enough negatives for sampling

positives = [
    [1, 2, 3, 4, 5],           # 5 positives
    [10, 11, 12, 13],          # 4 positives
    [20, 21, 22]               # 3 positives
]

negatives = [
    [100, 101, 102, 103, 104, 105, 106, 107],  # 8 negatives (5+8=13 >= 10)
    [110, 111, 112, 113, 114, 115, 116],       # 7 negatives (4+7=11 >= 10)
    [120, 121, 122, 123, 124, 125, 126, 127]   # 8 negatives (3+8=11 >= 10)
]

ARGS = {
    "queries": queries,
    "positives": positives,
    "negatives": negatives,
    "num_docs_pr": 10,
    "max_num_pos_pr": 5,
    "random_seed": 42
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple — a tuple output has no array shape of its own; none is stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
compute_document_mistral_scores Not yet run
unverified (harvested, no recorded run)
artefactory/abstention-reranker/abstention_reranker/compute_mistral_biencoder.py
code served (permissive licence) · get_code("c6522e5146490545")
How it ran

no invocation recorded.

compute_document_scores_custom_xencoder Not yet run
unverified (harvested, no recorded run)
artefactory/abstention-reranker/abstention_reranker/compute_custom_xencoder.py
code served (permissive licence) · get_code("d73880018d643fe1")
How it ran

no invocation recorded.

compute_document_scores_xencoder Not yet run
unverified (harvested, no recorded run)
artefactory/abstention-reranker/abstention_reranker/compute_xencoder.py
code served (permissive licence) · get_code("31250fe1d923ae07")
How it ran

no invocation recorded.

load_reranking_dataset Not yet run
unverified (harvested, no recorded run)
artefactory/abstention-reranker/abstention_reranker/utils.py
code served (permissive licence) · get_code("55e89244afe05714")
How it ran

no invocation recorded.

Also present in other papers' code

Of 12 samples lifted from this paper's linked repositories, 12 carry a function identity and 0 do not. Of the 12 distinct functions with an identity, 1 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 1 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
last_token_pool 8 other papers
8 later
2404.06347 (2024-04)
RAR-b: Reasoning as Retrieval Benchmark
2406.05540 (2024-06)
A Fine-tuning Dataset and Benchmark for Large Language Models for Protein Understanding
2407.10834 (2024-07)
MetaLLM: A High-performant and Cost-efficient Dynamic Framework for Wrapping LLMs
and 5 more not named here

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

Neural Information Retrieval (NIR) has significantly improved upon heuristic-based Information Retrieval (IR) systems. Yet, failures remain frequent, the models used often being unable to retrieve documents relevant to the user's query. We address this challenge by proposing a lightweight abstention mechanism tailored for real-world constraints, with particular emphasis placed on the reranking phase. We introduce a protocol for evaluating abstention strategies in black-box scenarios (typically encountered when relying on API services), demonstrating their efficacy, and propose a simple yet effective data-driven mechanism. We provide open-source code for experiment replication and abstention implementation, fostering wider adoption and application in diverse contexts.

For agents

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

get_harvested_code_for_paper("2402.12997")
get_code_for_paper("2402.12997")
have("2402.12997")

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

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

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

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

Connect an agent — have() is free.