SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1805.08716 · 2018

Reducing Disparate Exposure in Ranking: A Learning To Rank Approach

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 3 have no contract verdict; 1 failure 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/1805.08716.json · badge: /api/ran/1805.08716.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
fair-search/fairsearchdeltr-python community (classifier label)
classifier basis not recorded on the link
2 ran · 1 no recorded run
fair-search/fairsearch-deltr-python reimplementation (classifier label)
classifier basis: classifier_2025
1 ran · 0 no recorded run
fair-search/fairsearch-deltr-for-elasticsearch community (classifier label)
classifier basis not recorded on the link
1 ran · 0 no recorded run
FunctionStatusWhere it lives
find_items_per_group_per_query Ran
ran on a synthesized input
fair-search/fairsearchdeltr-python/fairsearchdeltr/trainer.py
code served (permissive licence) · get_code("dc6b97d3fd7029d6")
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

# Create sample data
# data: matrix of predictions/judgments (num_items x num_features)
data = np.array([
    [0.9, 0.1, 0.2, 0.3],
    [0.8, 0.2, 0.3, 0.4],
    [0.7, 0.3, 0.4, 0.5],
    [0.6, 0.4, 0.5, 0.6],
    [0.5, 0.5, 0.6, 0.7],
    [0.4, 0.6, 0.7, 0.8],
], dtype=np.float32)

# query_ids: array indicating which query each item belongs to
query_ids = np.array([1, 1, 2, 2, 3, 3], dtype=np.int32)

# which_query: the query ID we're looking for
which_query = np.int32(2)

# prot_idx: boolean array indicating protected (True) vs non-protected (False) items
prot_idx = np.array([
    [True],
    [False],
    [True],
    [False],
    [True],
    [False],
], dtype=bool)

ARGS = {
    "data": data,
    "query_ids": query_ids,
    "which_query": which_query,
    "prot_idx": prot_idx,
}
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
normalized_exposure Ran
ran on a synthesized input
fair-search/fairsearchdeltr-python/fairsearchdeltr/trainer.py
code served (permissive licence) · get_code("8e623e96e250df87")
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 numpy arrays for the function parameters
# group_data: predictions of relevance scores for one group
group_data = np.array([0.5, 1.2, 0.8, 1.5], dtype=np.float32)

# all_data: all predictions (should be larger or equal to group_data)
# This represents scores for all items including the group
all_data = np.array([0.5, 1.2, 0.8, 1.5, 0.3, 0.9], dtype=np.float32)

ARGS = {
    "group_data": group_data,
    "all_data": all_data
}
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
prepare_data Ran
ran; our contract draft was wrong, not the code
fair-search/fairsearch-deltr-python/fairsearchdeltr/deltr.py
code served (permissive licence) · get_code("526319b0136b57a6")
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 pandas as pd
import numpy as np

# Create a small DataFrame with the required structure
# Columns: query_id, doc_id, protected_attr, feature1, feature2, feature3, score
data = pd.DataFrame({
    'query_id': [1, 2],
    'doc_id': [101, 102],
    'protected_attr': ['A', 'B'],
    'feature1': [0.1, 0.2],
    'feature2': [0.3, 0.4],
    'feature3': [0.5, 0.6],
    'score': [5, 3]
})

ARGS = {
    'data': data,
    'protected_column': 0,
    'has_judgment': True
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, pandas — 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
singleton Ran
ran on a synthesized input
fair-search/fairsearch-deltr-for-elasticsearch/utils.py
code served (permissive licence) · get_code("20b09647f7a56e44")
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 ExampleClass. 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 singleton function takes a class as its parameter
# It returns an instance of that class, caching it

class ExampleClass:
    """A simple class to be used with the singleton decorator"""
    def __init__(self):
        self.value = 42

# Create the arguments dictionary
ARGS = {
    "cls": ExampleClass
}
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 ExampleClass — a ExampleClass output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a ExampleClass 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
normalized_topp_prot_deriv_per_group Not yet run
unverified (harvested, no recorded run)
fair-search/fairsearchdeltr-python/fairsearchdeltr/trainer.py
code served (permissive licence) · get_code("51ee7554594db825")
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

Ranked search results have become the main mechanism by which we find content, products, places, and people online. Thus their ordering contributes not only to the satisfaction of the searcher, but also to career and business opportunities, educational placement, and even social success of those being ranked. Researchers have become increasingly concerned with systematic biases in data-driven ranking models, and various post-processing methods have been proposed to mitigate discrimination and inequality of opportunity. This approach, however, has the disadvantage that it still allows an unfair ranking model to be trained. In this paper we explore a new in-processing approach: DELTR, a learning-to-rank framework that addresses potential issues of discrimination and unequal opportunity in rankings at training time. We measure these problems in terms of discrepancies in the average group exposure and design a ranker that optimizes search results in terms of relevance and in terms of reducing such discrepancies. We perform an extensive experimental study showing that being "colorblind" can be among the best or the worst choices from the perspective of relevance and exposure, depending on how much and which kind of bias is present in the training set. We show that our in-processing method performs better in terms of relevance and exposure than a pre-processing and a post-processing method across all tested scenarios.

For agents

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

get_harvested_code_for_paper("1805.08716")
get_code_for_paper("1805.08716")
have("1805.08716")

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

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

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

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

Connect an agent — have() is free.