SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2110.01445 · 2021

Robust and Decomposable Average Precision for Image Retrieval

arXiv · PDF · Open in the Atlas

Code that ran

5 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; 1 honoured the contract we drafted, 0 violated it and 1 has no contract verdict; 3 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/2110.01445.json · badge: /api/ran/2110.01445.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
elias-ramzi/roadmap canonical (classifier label)
classifier basis not recorded on the link
5 ran · 0 no recorded run
FunctionStatusWhere it lives
get_color_distortion Ran
ran; our contract draft was wrong, not the code
elias-ramzi/roadmap/roadmap/datasets/base_dataset.py
code served (permissive licence) · get_code("b8ef2b49a369cb69")
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 Compose. 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 torchvision.transforms as transforms
from PIL import Image
import numpy as np

torch.manual_seed(0)

# The function get_color_distortion takes one parameter: s (a float scale factor)
# It constructs a composition of color distortion transforms
# We just need to provide a valid value for s

ARGS = {
    "s": 1.0
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL, numpy, torch, torchvision — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Compose — a Compose output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Compose 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
heaviside Ran
ran, honoured the contract we drafted
elias-ramzi/roadmap/roadmap/losses/smooth_rank_ap.py
code served (permissive licence) · get_code("a2a835592cd98f2b")
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

torch.manual_seed(0)

# Construct arguments for the heaviside function
tens = torch.randn(2, 4)
val = 1.0
target = None
general = None

ARGS = {
    "tens": tens,
    "val": val,
    "target": target,
    "general": general
}
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
rank Ran
ran; our contract draft was wrong, not the code
elias-ramzi/roadmap/roadmap/losses/blackbox_ap.py
pointer only (licence: MIT); the stored copy get_code serves, from BorealisAI/ranksim-imbalanced-regression, is pointer only (licence: NOASSERTION) · get_code("2e1e2e8c543195f7")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from BorealisAI/ranksim-imbalanced-regression, and GitHub could not classify the licence of that repository (NOASSERTION). 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.

rank_normalised Ran
ran; our contract draft was wrong, not the code
elias-ramzi/roadmap/roadmap/losses/blackbox_ap.py
pointer only (licence: MIT); the stored copy get_code serves, from BorealisAI/ranksim-imbalanced-regression, is pointer only (licence: NOASSERTION) · get_code("ed49cae4f66fd45c")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from BorealisAI/ranksim-imbalanced-regression, and GitHub could not classify the licence of that repository (NOASSERTION). 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.

tau_sigmoid Ran
ran on a synthesized input
elias-ramzi/roadmap/roadmap/losses/smooth_rank_ap.py
code served (permissive licence) · get_code("74f2a948e1eb6041")
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 torch.nn as nn

torch.manual_seed(0)

# Construct arguments for tau_sigmoid function
tensor = torch.randn(2, 4)  # Small tensor with batch size 2, dim 4
tau = 0.5  # Temperature parameter (scalar float)
target = None  # Not used in function body
general = None  # Not used in function body

ARGS = {
    "tensor": tensor,
    "tau": tau,
    "target": target,
    "general": general
}
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

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, 4 are also present in other papers whose code we hold (3 with at least one paper dated earlier, 0 the same month, 4 later) and 1 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
get_color_distortion 6 other papers
2 dated earlier, 4 later
2002.05709 (2020-02)
A Simple Framework for Contrastive Learning of Visual Representations
2104.09866 (2021-04)
Distill on the Go: Online knowledge distillation in self-supervised learning
2207.01156 (2022-07)
Removing Batch Normalization Boosts Adversarial Training
and 3 more not named here
rank 4 other papers
1 dated earlier, 3 later
2003.11657 (2020-03)
Deep Graph Matching via Blackbox Differentiation of Combinatorial Solvers
2205.15236 (2022-05)
RankSim: Ranking Similarity Regularization for Deep Imbalanced Regression
2410.22124 (2024-10)
RankUp: Boosting Semi-Supervised Regression with an Auxiliary Ranking Classifier
and 1 more not named here
rank_normalised 4 other papers
1 dated earlier, 3 later
2003.11657 (2020-03)
Deep Graph Matching via Blackbox Differentiation of Combinatorial Solvers
2205.15236 (2022-05)
RankSim: Ranking Similarity Regularization for Deep Imbalanced Regression
2410.22124 (2024-10)
RankUp: Boosting Semi-Supervised Regression with an Auxiliary Ranking Classifier
and 1 more not named here
heaviside 1 other paper
1 later
2207.04873 (2022-07)
Hierarchical Average Precision Training for Pertinent Image Retrieval

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

In image retrieval, standard evaluation metrics rely on score ranking, e.g. average precision (AP). In this paper, we introduce a method for robust and decomposable average precision (ROADMAP) addressing two major challenges for end-to-end training of deep neural networks with AP: non-differentiability and non-decomposability. Firstly, we propose a new differentiable approximation of the rank function, which provides an upper bound of the AP loss and ensures robust training. Secondly, we design a simple yet effective loss function to reduce the decomposability gap between the AP in the whole training set and its averaged batch approximation, for which we provide theoretical guarantees. Extensive experiments conducted on three image retrieval datasets show that ROADMAP outperforms several recent AP approximation methods and highlight the importance of our two contributions. Finally, using ROADMAP for training deep models yields very good performances, outperforming state-of-the-art results on the three datasets.

For agents

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

get_harvested_code_for_paper("2110.01445")
get_code_for_paper("2110.01445")
have("2110.01445")

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

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

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

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

Connect an agent — have() is free.