SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2108.04024 · ICCV · 2021

Image Retrieval on Real-life Images with Pre-trained Vision-and-Language Models

Stephen Gould, Damien Teney, Cristian Rodriguez-Opazo, Zheyuan Liu

arXiv · PDF · Open in the Atlas

Code that ran

10 of 13 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 5 have no contract verdict; 5 failures of our instrument; 3 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/2108.04024.json · badge: /api/ran/2108.04024.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
Cuberick-Orion/CIRPLANT canonical (classifier label)
classifier basis: census
10 ran · 3 no recorded run
FunctionStatusWhere it lives
args_formatted_to_file Ran
ran on a synthesized input
Cuberick-Orion/CIRPLANT/_trainval_base.py
code served (permissive licence) · get_code("2241b22aac3dc66f")
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 str. 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

# Construct a simple args dictionary with various types of values
args = {
    'learning_rate': 0.001,
    'batch_size': 32,
    'epochs': 10,
    'model_name': 'bert',
    'output_dir': '/tmp/output',
    'debug': False,
    'empty_field': '',
    'none_field': None,
    'threshold': 0.5,
    'seed': 42
}

ARGS = {
    'args': args,
    'ignore_empty': False,
    'sorted_': False,
    'multiline': False
}
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 str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str 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
batched_index_select Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
Cuberick-Orion/CIRPLANT/model/utils/utils.py
code served (permissive licence) · get_code("dd1daced3a380bf9")
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 4, dtype family float, shape (2, 4, 40, 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 torch

torch.manual_seed(0)

# Construct valid arguments for batched_index_select
# The function performs batched indexing along a specified dimension

# Create input tensor: shape (batch_size=2, dim0=4, dim1=3, dim2=5)
input_tensor = torch.randn(2, 4, 3, 5)

# Dimension to index along (must be > 0 since dim 0 is batch)
dim = 2

# Create index tensor for batching
# Index shape should be (batch_size=2, ..., size_at_dim, ...)
# For dim=2, indices should have shape (2, 4, 2, 5) where 2 is the selected size at dim 2
index_tensor = torch.randint(0, 3, (2, 4, 2, 5))

ARGS = {
    "input": input_tensor,
    "dim": dim,
    "index": index_tensor
}
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 4, dtype family float, shape (2, 4, 40, 5) — shape (2, 4, 40, 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
instance_bce_with_logits Ran
ran on a synthesized input
Cuberick-Orion/CIRPLANT/model/OSCAR/modeling/modeling_bert.py
code served (permissive licence) · get_code("5a4d93d8be97ccd9")
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 0, dtype family float, shape () 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.functional as F

torch.manual_seed(0)

# The function expects:
# - logits: 2D tensor of shape (batch_size, num_instances)
# - labels: 2D tensor of shape (batch_size, num_instances) with binary values
# - reduction: string, either 'mean' or 'none'

batch_size = 2
num_instances = 4

logits = torch.randn(batch_size, num_instances)
labels = torch.randint(0, 2, (batch_size, num_instances)).float()
reduction = 'mean'

ARGS = {
    'logits': logits,
    'labels': labels,
    'reduction': reduction
}
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 0, dtype family float, shape () — shape () 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_folder Ran
ran; our contract draft was wrong, not the code
Cuberick-Orion/CIRPLANT/model/utils/utils.py
code served (permissive licence) · get_code("6ebb002290340830")
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 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 os
import tempfile
import shutil

# Create a temporary directory with some test files
temp_dir = tempfile.mkdtemp()

# Create some files with the target suffix
with open(os.path.join(temp_dir, "image1.jpg"), "w") as f:
    f.write("dummy")
with open(os.path.join(temp_dir, "image2.jpg"), "w") as f:
    f.write("dummy")
with open(os.path.join(temp_dir, "image3.png"), "w") as f:
    f.write("dummy")
with open(os.path.join(temp_dir, "other.txt"), "w") as f:
    f.write("dummy")

ARGS = {
    "folder": temp_dir,
    "suffix": ".jpg"
}
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 list, ndim 1, dtype family float — 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
load_wordforms Ran
ran on a synthesized input
Cuberick-Orion/CIRPLANT/model/OSCAR/utils/cbs.py
code served (permissive licence) · get_code("9ae9f4ec47eca173")
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 tempfile
import os

# Create a temporary TSV file with wordforms data
temp_dir = tempfile.mkdtemp()
wordforms_tsvpath = os.path.join(temp_dir, "wordforms.tsv")

with open(wordforms_tsvpath, 'w') as f:
    f.write("run\tran,runs,running\n")
    f.write("walk\twalk,walks,walked,walking\n")
    f.write("jump\tjump,jumps,jumped\n")

ARGS = {
    "wordforms_tsvpath": wordforms_tsvpath
}
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 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
pairwise_cossim Ran
ran on a synthesized input
Cuberick-Orion/CIRPLANT/model/OSCAR/torch_functions.py
code served (permissive licence) · get_code("fe97aee1e09f00f2")
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, 2) 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)

# Create a small Nxd matrix for x
# N=2 samples, d=4 dimensions
x = torch.randn(2, 4)

# y is optional, so we'll test with y=None (which means y=x in the function)
y = None

ARGS = {
    "x": x,
    "y": y,
}
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, 2) — shape (2, 2) 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
pairwise_distances Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
Cuberick-Orion/CIRPLANT/model/OSCAR/torch_functions.py
code served (permissive licence) · get_code("66d5486f0c42398d")
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, 3) 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)

# Create two small tensors for testing pairwise_distances
# x: 2x4 matrix (N=2 samples, d=4 dimensions)
x = torch.randn(2, 4)

# y: 3x4 matrix (M=3 samples, d=4 dimensions)
y = torch.randn(3, 4)

ARGS = {
    'x': x,
    'y': y
}
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, 3) — shape (2, 3) 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
select_best_beam_with_constraints Ran
ran on a synthesized input
Cuberick-Orion/CIRPLANT/model/OSCAR/utils/cbs.py
code served (permissive licence) · get_code("513a7d2ac738d21f")
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)

# Parameters:
# - beams: shape (batch_size, num_states, beam_size, max_decoding_steps)
# - beam_log_probabilities: shape (batch_size, num_states, beam_size)
# - given_constraints: shape (batch_size,) with integer values
# - min_constraints_to_satisfy: int

batch_size = 2
max_decoding_steps = 5
beam_size = 3

# given_constraints will determine num_states as 2^given_constraints
# Let's use given_constraints = [2, 1] so num_states will be [4, 2]
# We need to support the max, so num_states = 4
given_constraints = torch.tensor([2, 1], dtype=torch.long)
num_states = 4  # 2^2 = 4 for the first batch element

beams = torch.randint(0, 100, (batch_size, num_states, beam_size, max_decoding_steps), dtype=torch.long)
beam_log_probabilities = torch.randn(batch_size, num_states, beam_size)

min_constraints_to_satisfy = 2

ARGS = {
    "beams": beams,
    "beam_log_probabilities": beam_log_probabilities,
    "given_constraints": given_constraints,
    "min_constraints_to_satisfy": min_constraints_to_satisfy,
}
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
setup_logger Ran
ran; our contract draft was wrong, not the code
Cuberick-Orion/CIRPLANT/model/OSCAR/utils/logger.py
code served (permissive licence) · get_code("fc284dbe8d84606e")
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 Logger. 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 logging
import os
import sys
import tempfile

# Create a temporary directory for logging
temp_dir = tempfile.mkdtemp()

ARGS = {
    'name': 'test_logger',
    'save_dir': temp_dir,
    'distributed_rank': 0,
    'filename': 'test_log.txt'
}
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 Logger — a Logger output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Logger 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
top_k_top_p_filtering Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
Cuberick-Orion/CIRPLANT/model/OSCAR/modeling/modeling_utils.py
code served (permissive licence) · get_code("8164123ea94d7bb5")
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.functional as F

torch.manual_seed(0)

# Create a small logits tensor: batch_size=2, vocab_size=4
logits = torch.randn(2, 4)

ARGS = {
    "logits": logits,
    "top_k": 2,
    "top_p": 0.9,
    "filter_value": -float('Inf'),
    "min_tokens_to_keep": 1,
}
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
create_model Not yet run
unverified (harvested, no recorded run)
Cuberick-Orion/CIRPLANT/trainval_oscar.py
code served (permissive licence) · get_code("f4cf22a5a6952c82")
How it ran

no invocation recorded.

evaluate_on_nocaps Not yet run
unverified (harvested, no recorded run)
Cuberick-Orion/CIRPLANT/model/OSCAR/utils/caption_evaluate.py
code served (permissive licence) · get_code("0c36cf6fecae9668")
How it ran

no invocation recorded.

load_dataloader Not yet run
unverified (harvested, no recorded run)
Cuberick-Orion/CIRPLANT/trainval_oscar.py
code served (permissive licence) · get_code("7703c53c246a68fa")
How it ran

no invocation recorded.

Also present in other papers' code

Of 13 samples lifted from this paper's linked repositories, 13 carry a function identity and 0 do not. Of the 13 distinct functions with an identity, 6 are also present in other papers whose code we hold (5 with at least one paper dated earlier, 1 the same month, 4 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.

FunctionAlso present inEarliest-datedOthers named
top_k_top_p_filtering 21 other papers
6 dated earlier, 15 later
1909.11942 (2019-09)
ALBERT: A Lite BERT for Self-supervised Learning of Language Representations
2005.00796 (2020-05)
A Simple Language Model for Task-Oriented Dialogue
2009.06367 (2020-09)
GeDi: Generative Discriminator Guided Sequence Generation
and 18 more not named here
load_folder 7 other papers
3 dated earlier, 4 later
1805.07932 (2018-05)
Bilinear Attention Networks
1902.09368 (2019-02)
Dual Attention Networks for Visual Reference Resolution in Visual Dialog
2006.14744 (2020-06)
Graph Optimal Transport for Cross-Domain Alignment
and 4 more not named here
pairwise_distances 5 other papers
4 dated earlier, 1 the same month
1812.07119 (2018-12)
Composing Text and Image for Image Retrieval - An Empirical Odyssey
1902.00640 (2019-02)
Particle Flow Bayes' Rule
2006.11149 (2020-06)
Compositional Learning of Image-Text Query for Image Retrieval
and 2 more not named here
batched_index_select 2 other papers
1 dated earlier, 1 later
1906.07510 (2019-06)
Attention Guided Graph Convolutional Networks for Relation Extraction
2201.12296 (2022-01)
Benchmarking Robustness of 3D Point Cloud Recognition Against Common Corruptions
instance_bce_with_logits 2 other papers
2 later
2206.03428 (2022-06)
Revealing Single Frame Bias for Video-and-Language Learning
2303.04995 (2023-03)
Text-Visual Prompting for Efficient 2D Temporal Video Grounding
setup_logger 1 other paper
1 dated earlier
2004.01946 (2020-04)
Weakly-Supervised Mesh-Convolutional Hand Reconstruction in the Wild

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

We extend the task of composed image retrieval, where an input query consists of an image and short textual description of how to modify the image. Existing methods have only been applied to non-complex images within narrow domains, such as fashion products, thereby limiting the scope of study on in-depth visual reasoning in rich image and language contexts. To address this issue, we collect the Compose Image Retrieval on Real-life images (CIRR) dataset, which consists of over 36,000 pairs of crowd-sourced, open-domain images with human-generated modifying text. To extend current methods to the open-domain, we propose CIRPLANT, a transformer based model that leverages rich pre-trained vision-and-language (V&L) knowledge for modifying visual features conditioned on natural language. Retrieval is then done by nearest neighbor lookup on the modified features. We demonstrate that with a relatively simple architecture, CIRPLANT outperforms existing methods on open-domain images, while matching state-of-theart accuracy on the existing narrow datasets, such as fashion. Together with the release of CIRR, we believe this work will inspire further research on composed image retrieval. Our dataset, code and pre-trained models are available at https://cuberick-orion.github.io/CIRR/.

For agents

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

get_harvested_code_for_paper("2108.04024")
get_code_for_paper("2108.04024")
have("2108.04024")

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

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

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

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

Connect an agent — have() is free.