SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2008.05231 · 2020

Fine-grained Visual Textual Alignment for Cross-Modal Retrieval using Transformer Encoders

arXiv · PDF · Open in the Atlas

Code that ran

14 of 16 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, 1 violated it and 12 have no contract verdict; 1 failure of our instrument; 2 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.05231.json · badge: /api/ran/2008.05231.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
mesnico/TERAN canonical (classifier label)
classifier basis: census
14 ran · 2 no recorded run
FunctionStatusWhere it lives
EncoderText Ran
ran on a synthesized input
mesnico/TERAN/models/text.py
code served (permissive licence) · get_code("e1d7360c5be25e25")
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 EncoderTextGRU. 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
from unittest.mock import MagicMock

torch.manual_seed(0)

ARGS = {
    'config': {
        'text-model': {
            'name': 'gru',
            'vocab-size': 1000,
            'word-dim': 4,
            'layers': 2,
            'pre-extracted': False,
            'pretrain': 'bert-base-uncased',
            'extraction-hidden-layer': 12,
            'dropout': 0.1,
        },
        'model': {
            'embed-size': 5,
        },
        'training': {
            'measure': 'order',
        },
    }
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch, transformers — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type EncoderTextGRU — a EncoderTextGRU output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a EncoderTextGRU 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
cosine_sim Ran
ran on a synthesized input
mesnico/TERAN/utils.py
code served (permissive licence) · get_code("f2e17288ada8cf89")
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 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 numpy

# The function takes two 2D numpy arrays and computes their cosine similarity
# x and y should be 2D arrays where each row is a vector
# The function normalizes each row to unit norm, then computes dot product

x = numpy.random.randn(2, 4).astype(numpy.float32)  # batch_size=2, dim=4
y = numpy.random.randn(3, 4).astype(numpy.float32)  # batch_size=3, dim=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 — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, 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
dcg_score Ran
ran on a synthesized input
mesnico/TERAN/evaluate_utils/dcg.py
code served (permissive licence) · get_code("f6b4594fd6677dbe")
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

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

# Create sample data for dcg_score
# y_true: ground truth relevance labels (binary or graded relevance)
y_true = np.array([1, 0, 1, 1, 0, 1, 0, 0, 1, 1])

# y_score: predicted scores/ranking scores
y_score = np.array([0.9, 0.2, 0.8, 0.7, 0.1, 0.95, 0.3, 0.15, 0.85, 0.75])

# k: rank cutoff
k = 5

# gains: type of gain calculation
gains = 'exponential'

ARGS = {
    'y_true': y_true,
    'y_score': y_score,
    'k': k,
    'gains': gains
}
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
dot_sim Ran
ran on a synthesized input
mesnico/TERAN/models/loss.py
code served (permissive licence) · get_code("6a49bab714ec6122")
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

torch.manual_seed(0)

# The function performs im.mm(s.t())
# im needs to support .mm() method (matrix multiply)
# s needs to support .t() method (transpose)
# Both should be 2D tensors for this operation to make sense

# Create image embedding matrix: shape (2, 4) - 2 images, 4-dim embeddings
im = torch.randn(2, 4)

# Create sentence embedding matrix: shape (3, 4) - 3 sentences, 4-dim embeddings
s = torch.randn(3, 4)

ARGS = {
    "im": im,
    "s": s,
}
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, 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
dot_sim Ran
ran on a synthesized input
mesnico/TERAN/utils.py
code served (permissive licence) · get_code("36545e75ca862270")
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 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 numpy
import torch

torch.manual_seed(0)

# dot_sim takes two parameters: x and y
# The function computes numpy.dot(x, y.T)
# This means x and y should be numpy arrays or array-like objects
# x should be shape (m, n) and y should be shape (p, n) for the dot product to work with transpose

x = numpy.random.randn(2, 4)  # shape (2, 4)
y = numpy.random.randn(3, 4)  # shape (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 ndarray, 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
encode_data Ran
ran on a synthesized input
mesnico/TERAN/evaluation.py
code served (permissive licence) · get_code("e919b63bdc37e394")
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. 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 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
from collections import OrderedDict

torch.manual_seed(0)

class MockWordEmbedding(nn.Module):
    def __init__(self, vocab_size=100, emb_dim=4):
        super().__init__()
        self.embedding = nn.Embedding(vocab_size, emb_dim)
    
    def forward(self, x):
        return self.embedding(x)

class MockTextEncoder(nn.Module):
    def __init__(self):
        super().__init__()
        self.word_embeddings = MockWordEmbedding(vocab_size=100, emb_dim=4)

class MockImgTxtEnc(nn.Module):
    def __init__(self):
        super().__init__()
        self.txt_enc = MockTextEncoder()

class MockModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.img_txt_enc = MockImgTxtEnc()
        self.logger = None
    
    def eval(self):
        return super().eval()
    
    def forward_emb(self, images, text, img_length, cap_length, boxes):
        batch_size = images.size(0)
        img_emb_dim = 4
        cap_emb_dim = 4
        max_img_len = 37
        max_cap_len = 88
        
        img_emb = torch.randn(max_img_len, batch_size, img_emb_dim)
        cap_emb = torch.randn(max_cap_len, batch_size, cap_emb_dim)
        
        return None, None, img_emb, cap_emb, cap_length

class MockDataset:
    def __init__(self, size=2):
        self.size = size
    
    def __len__(self):
        return self.size

class MockDataLoader:
    def __init__(self, batch_size=2, num_batches=2):
        self.batch_size = batch_size
        self.num_batches = num_batches
        self.dataset = MockDataset(size=batch_size * num_batches)
    
    def __iter__(self):
        for i in range(self.num_batches):
            batch_size = self.batch_size
            images = torch.randn(batch_size, 3, 8, 8)
            captions = torch.randint(0, 100, (batch_size, 10))
            features = torch.randn(batch_size, 10, 4)
            wembeddings = torch.randn(batch_size, 10, 4)
            targets = (captions, features, wembeddings)
            img_length = [5] * batch_size
            cap_length = [8] * batch_size
            boxes = torch.randn(batch_size, 10, 4)
            ids = torch.arange(i * batch_size, (i + 1) * batch_size)
            yield images, targets, img_length, cap_length, boxes, ids
    
    def __len__(self):
        return self.num_batches

model = MockModel()
data_loader = MockDataLoader(batch_size=2, num_batches=2)

ARGS = {
    'model': model,
    'data_loader': data_loader,
    'log_step': 10,
    'logging': print,
}
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
find_nhead Ran
ran on a synthesized input
mesnico/TERAN/models/visual.py
code served (permissive licence) · get_code("6e963f0bd8b4ec0f")
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 int, ndim 0, dtype family int, 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 numpy as np

torch.manual_seed(0)

def find_nhead(feat_dim, higher=8):
    for i in reversed(range(higher + 1)):
        if feat_dim % i == 0:
            return i
    return 1

ARGS = {
    'feat_dim': 12,
    'higher': 8
}
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 int, ndim 0, dtype family int, 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
generate_square_subsequent_mask Ran
ran, violated the contract we drafted
mesnico/TERAN/models/utils.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from chend-vl/instructocr, is pointer only (licence: NONE) · get_code("894b253f35765276")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from chend-vl/instructocr, and GitHub detected no licence in that repository when it was checked. 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.

get_paths Ran
ran on a synthesized input
mesnico/TERAN/data.py
code served (permissive licence) · get_code("66f891f51e3bec44")
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.

import os
import numpy as np
import tempfile

# Create a temporary directory structure for the test
temp_dir = tempfile.mkdtemp()
dataset_dir = os.path.join(temp_dir, 'coco')
annotations_dir = os.path.join(dataset_dir, 'annotations')
images_dir = os.path.join(dataset_dir, 'images')
os.makedirs(annotations_dir, exist_ok=True)
os.makedirs(images_dir, exist_ok=True)

# Create dummy numpy files for the COCO dataset
np.save(os.path.join(annotations_dir, 'coco_train_ids.npy'), np.array([1, 2, 3, 4, 5]))
np.save(os.path.join(annotations_dir, 'coco_dev_ids.npy'), np.array([6, 7, 8, 9, 10, 11, 12, 13]))
np.save(os.path.join(annotations_dir, 'coco_test_ids.npy'), np.array([14, 15, 16, 17, 18]))
np.save(os.path.join(annotations_dir, 'coco_restval_ids.npy'), np.array([19, 20, 21, 22, 23]))

# Create dummy JSON files
with open(os.path.join(annotations_dir, 'captions_train2014.json'), 'w') as f:
    f.write('{}')
with open(os.path.join(annotations_dir, 'captions_val2014.json'), 'w') as f:
    f.write('{}')

ARGS = {
    'config': {
        'dataset': {
            'name': 'coco',
            'data': temp_dir,
            'images-path': images_dir,
            'restval': False
        }
    }
}
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, 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_transform Ran
ran on a synthesized input
mesnico/TERAN/data.py
code served (permissive licence) · get_code("e7518699cbc1bd68")
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

torch.manual_seed(0)

ARGS = {
    "data_name": "cifar10",
    "split_name": "train",
    "config": {
        "image_size": 224,
        "crop_size": 224,
        "augmentation": True
    }
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
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
l2norm Ran
ran; our contract draft was wrong, not the code
mesnico/TERAN/models/utils.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from Maryeon/asen, is pointer only (licence: NONE) · get_code("f92e514b398e75d8")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from Maryeon/asen, and GitHub detected no licence in that repository when it was checked. 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.

my_collate Ran
ran on a synthesized input
mesnico/TERAN/evaluate_utils/compute_relevance.py
code served (permissive licence) · get_code("d9047caaedf4aadb")
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. 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 numpy as np

torch.manual_seed(0)

# my_collate takes a batch and transposes it using zip(*batch)
# This typically works with a list of tuples/lists
# Let's create a simple batch of (input, target) pairs

batch = [
    (torch.randn(4), torch.tensor(1)),
    (torch.randn(4), torch.tensor(0)),
]

ARGS = {
    "batch": batch
}
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 list — a list 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
order_sim Ran
ran on a synthesized input
mesnico/TERAN/models/loss.py
code served (permissive licence) · get_code("da16023b8239c604")
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

torch.manual_seed(0)

# Based on the function body, it expects:
# - im: a tensor that will be unsqueezed at dimension 0, so needs shape (num_images, embedding_dim)
# - s: a tensor that will be unsqueezed at dimension 1, so needs shape (num_sentences, embedding_dim)
# Both tensors are used in broadcasting and arithmetic operations

# Create small tensors with distinct dimensions
# im: (2, 4) - 2 images, 4-dim embeddings
# s: (3, 4) - 3 sentences, 4-dim embeddings
im = torch.randn(2, 4)
s = torch.randn(3, 4)

ARGS = {
    "im": im,
    "s": s,
}
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, 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
ranking_precision_score Ran
ran on a synthesized input
mesnico/TERAN/evaluate_utils/dcg.py
code served (permissive licence) · get_code("8183b31354ef5eef")
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

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

# Create simple test data for ranking_precision_score
# y_true: binary relevance labels (0 or 1)
# y_score: predicted scores for ranking

# Create a small dataset with 10 samples
y_true = np.array([0, 1, 0, 1, 1, 0, 1, 0, 1, 0])
y_score = np.array([0.1, 0.9, 0.2, 0.8, 0.85, 0.15, 0.75, 0.25, 0.95, 0.05])

ARGS = {
    'y_true': y_true,
    'y_score': y_score,
    'k': 5
}
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
average_precision_score Not yet run
unverified (harvested, no recorded run)
mesnico/TERAN/evaluate_utils/dcg.py
code served (permissive licence) · get_code("c9ccc8160ca8229a")
How it ran

no invocation recorded.

cosine_sim Not yet run
unverified (harvested, no recorded run)
mesnico/TERAN/models/loss.py
code served (permissive licence) · get_code("7f3908ad08980104")
How it ran

no invocation recorded.

Also present in other papers' code

Of 16 samples lifted from this paper's linked repositories, 16 carry a function identity and 0 do not. Of the 16 distinct functions with an identity, 15 are also present in other papers whose code we hold (10 with at least one paper dated earlier, 0 the same month, 12 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
generate_square_subsequent_mask 8 other papers
1 dated earlier, 7 later · 1 only as an assembly brick
2004.09144 (2020-04)
Transformer Reasoning Network for Image-Text Matching and Retrieval
2107.03377 (2021-07)
Long Short-Term Transformer for Online Action Detection
2109.10852 (2021-09)
Pix2seq: A Language Modeling Framework for Object Detection
and 5 more not named here
order_sim 7 other papers
2 dated earlier, 5 later
1809.06181 (2018-09)
Dual Encoding for Zero-Example Video Retrieval
2004.09144 (2020-04)
Transformer Reasoning Network for Image-Text Matching and Retrieval
2104.00650 (2021-04)
Frozen in Time: A Joint Video and Image Encoder for End-to-End Retrieval
and 4 more not named here
l2norm 6 other papers
4 dated earlier, 2 later
1707.05612 (2017-07)
VSE++: Improving Visual-Semantic Embeddings with Hard Negatives
1809.06181 (2018-09)
Dual Encoding for Zero-Example Video Retrieval
2002.02814 (2020-02)
Fine-Grained Fashion Similarity Learning by Attribute-Specific Embedding Network
and 3 more not named here
dot_sim 3 other papers
1 dated earlier, 2 later
2004.09144 (2020-04)
Transformer Reasoning Network for Image-Text Matching and Retrieval
2203.09138 (2022-03)
MuKEA: Multimodal Knowledge Extraction and Accumulation for Knowledge-based Visual Question Answering
2306.08789 (2023-06)
Efficient Token-Guided Image-Text Retrieval with Consistent Multimodal Contrastive Training
find_nhead 2 other papers
1 dated earlier, 1 later
2004.09144 (2020-04)
Transformer Reasoning Network for Image-Text Matching and Retrieval
2306.08789 (2023-06)
Efficient Token-Guided Image-Text Retrieval with Consistent Multimodal Contrastive Training
get_transform 2 other papers
1 dated earlier, 1 later
2004.09144 (2020-04)
Transformer Reasoning Network for Image-Text Matching and Retrieval
2306.08789 (2023-06)
Efficient Token-Guided Image-Text Retrieval with Consistent Multimodal Contrastive Training
my_collate 2 other papers
1 dated earlier, 1 later
2004.09144 (2020-04)
Transformer Reasoning Network for Image-Text Matching and Retrieval
2306.08789 (2023-06)
Efficient Token-Guided Image-Text Retrieval with Consistent Multimodal Contrastive Training
EncoderText 1 other paper
1 later
2306.08789 (2023-06)
Efficient Token-Guided Image-Text Retrieval with Consistent Multimodal Contrastive Training
average_precision_score 1 other paper
1 dated earlier
2004.09144 (2020-04)
Transformer Reasoning Network for Image-Text Matching and Retrieval
cosine_sim 1 other paper
1 later
2306.08789 (2023-06)
Efficient Token-Guided Image-Text Retrieval with Consistent Multimodal Contrastive Training
cosine_sim 1 other paper
1 later
2306.08789 (2023-06)
Efficient Token-Guided Image-Text Retrieval with Consistent Multimodal Contrastive Training
dcg_score 1 other paper
1 dated earlier
2004.09144 (2020-04)
Transformer Reasoning Network for Image-Text Matching and Retrieval
dot_sim 1 other paper
1 later
2306.08789 (2023-06)
Efficient Token-Guided Image-Text Retrieval with Consistent Multimodal Contrastive Training
get_paths 1 other paper
1 later
2306.08789 (2023-06)
Efficient Token-Guided Image-Text Retrieval with Consistent Multimodal Contrastive Training
ranking_precision_score 1 other paper
1 dated earlier
2004.09144 (2020-04)
Transformer Reasoning Network for Image-Text Matching and 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

Despite the evolution of deep-learning-based visual-textual processing systems, precise multi-modal matching remains a challenging task. In this work, we tackle the task of cross-modal retrieval through image-sentence matching based on word-region alignments, using supervision only at the global image-sentence level. Specifically, we present a novel approach called Transformer Encoder Reasoning and Alignment Network (TERAN). TERAN enforces a fine-grained match between the underlying components of images and sentences, i.e., image regions and words, respectively, in order to preserve the informative richness of both modalities. TERAN obtains state-of-the-art results on the image retrieval task on both MS-COCO and Flickr30k datasets. Moreover, on MS-COCO, it also outperforms current approaches on the sentence retrieval task. Focusing on scalable cross-modal information retrieval, TERAN is designed to keep the visual and textual data pipelines well separated. Cross-attention links invalidate any chance to separately extract visual and textual features needed for the online search and the offline indexing steps in large-scale retrieval systems. In this respect, TERAN merges the information from the two domains only during the final alignment phase, immediately before the loss computation. We argue that the fine-grained alignments produced by TERAN pave the way towards the research for effective and efficient methods for large-scale cross-modal information retrieval. We compare the effectiveness of our approach against relevant state-of-the-art methods. On the MS-COCO 1K test set, we obtain an improvement of 5.7% and 3.5% respectively on the image and the sentence retrieval tasks on the Recall@1 metric. The code used for the experiments is publicly available on GitHub at https://github.com/mesnico/TERAN.

For agents

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

get_harvested_code_for_paper("2008.05231")
get_code_for_paper("2008.05231")
have("2008.05231")

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

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

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

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

Connect an agent — have() is free.