SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1803.08024 · 2018

Stacked Cross Attention for Image-Text Matching

arXiv · PDF · Open in the Atlas

Code that ran

13 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; 1 honoured the contract we drafted, 0 violated it and 3 have no contract verdict; 9 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/1803.08024.json · badge: /api/ran/1803.08024.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
kuanghuei/SCAN canonical (classifier label)
classifier basis: classifier_2025
0 ran · 1 no recorded run
idejie/SCAN community (classifier label)
classifier basis not recorded on the link
6 ran · 2 no recorded run
abhidipbhattacharyya/srl_aware_ret reimplementation (classifier label)
classifier basis: classifier_2025
6 ran · 0 no recorded run
hthoai/image-text-matching reimplementation (classifier label)
classifier basis: classifier_2025
1 ran · 0 no recorded run
FunctionStatusWhere it lives
EncoderImage Ran
ran on a synthesized input
idejie/SCAN/model.py
code served (permissive licence) · get_code("07c90e643974e90d")
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 EncoderImagePrecomp. 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 collections import OrderedDict

torch.manual_seed(0)

# Define arguments for the EncoderImage function
ARGS = {
    'data_name': 'coco',
    'img_dim': 4,
    'embed_size': 3,
    'precomp_enc_type': 'basic',
    'no_imgnorm': False
}
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 EncoderImagePrecomp — a EncoderImagePrecomp output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a EncoderImagePrecomp 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
collate_fn Ran
ran on a synthesized input
idejie/SCAN/data.py
code served (permissive licence) · get_code("eb35209092068c75")
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
import torch.utils.data as data

torch.manual_seed(0)

# Build sample data: list of (image, caption, id, img_id) tuples
# The function expects each caption to be a tensor with variable length
sample_data = [
    (
        torch.randn(3, 256, 256),  # image: (3, 256, 256)
        torch.tensor([1, 2, 3, 4, 5]),  # caption: variable length tensor
        "id_0",  # id
        "img_id_0"  # img_id
    ),
    (
        torch.randn(3, 256, 256),  # image: (3, 256, 256)
        torch.tensor([6, 7, 8]),  # caption: shorter, variable length
        "id_1",  # id
        "img_id_1"  # img_id
    ),
]

ARGS = {
    "data": sample_data
}
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
deserialize_vocab Ran
ran; our contract draft was wrong, not the code
abhidipbhattacharyya/srl_aware_ret/vocab.py
code served (permissive licence) · get_code("cdee6932aa05022e")
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) and returned Vocabulary. 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 tempfile
import os

# Create a temporary directory and file for the vocabulary
temp_dir = tempfile.mkdtemp()
vocab_file = os.path.join(temp_dir, "vocab.json")

# Create a sample vocabulary dictionary
vocab_data = {
    "word2idx": {
        "<unk>": 0,
        "hello": 1,
        "world": 2,
        "python": 3
    },
    "idx2word": {
        "0": "<unk>",
        "1": "hello",
        "2": "world",
        "3": "python"
    },
    "idx": 4
}

# Write the vocabulary to the temporary file
with open(vocab_file, 'w') as f:
    json.dump(vocab_data, f)

ARGS = {
    "src": vocab_file
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
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 Vocabulary — a Vocabulary output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Vocabulary 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
encode_data Ran
ran; our contract draft was wrong, not the code
abhidipbhattacharyya/srl_aware_ret/evaluation.py
code served (permissive licence) · get_code("1119155cc37cafa8")
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) 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
import torch.nn as nn
import numpy as np
from collections import OrderedDict

torch.manual_seed(0)

class MockModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.logger = None
    
    def val_start(self):
        pass
    
    def forward_emb(self, images, boxes, box_type, captions, lengths, no_of_prop, w_type_padded, volatile=False):
        batch_size = images.size(0)
        img_emb = torch.randn(batch_size * no_of_prop, 8, 4)
        cap_emb = torch.randn(batch_size * no_of_prop, 16, 6)
        cap_len = torch.tensor([l for l in lengths for _ in range(no_of_prop)])
        return img_emb, cap_emb, cap_len
    
    def forward_loss(self, img_emb, cap_emb, cap_len):
        pass

class MockDataLoader:
    def __init__(self, dataset_size=4, batch_size=2, num_proposals=3):
        self.dataset_size = dataset_size
        self.batch_size = batch_size
        self.num_proposals = num_proposals
        self.dataset = MockDataset(dataset_size)
    
    def __iter__(self):
        for i in range(0, self.dataset_size, self.batch_size):
            batch_end = min(i + self.batch_size, self.dataset_size)
            actual_batch_size = batch_end - i
            
            images = torch.randn(actual_batch_size, 3, 7, 7)
            boxes = torch.randn(actual_batch_size, self.num_proposals, 4)
            box_type = torch.randint(0, 2, (actual_batch_size, self.num_proposals))
            captions = torch.randint(0, 100, (actual_batch_size, 20))
            lengths = torch.tensor([15 + j for j in range(actual_batch_size)])
            ids = np.array(list(range(i, batch_end)))
            no_of_prop = self.num_proposals
            w_type_padded = torch.randn(actual_batch_size, self.num_proposals, 5)
            
            yield (images, boxes, box_type, captions, lengths, ids, no_of_prop, w_type_padded)
    
    def __len__(self):
        return (self.dataset_size + self.batch_size - 1) // self.batch_size

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

model = MockModel()
data_loader = MockDataLoader(dataset_size=4, batch_size=2, num_proposals=3)

ARGS = {
    'model': model,
    'data_loader': data_loader,
    'log_step': 2,
    'logging': print
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
numpy, 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
from_txt Ran
ran; our contract draft was wrong, not the code
abhidipbhattacharyya/srl_aware_ret/vocab.py
code served (permissive licence) · get_code("ef05dda21c1cc726")
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) 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 tempfile
import os

# Create a temporary text file with some caption data
temp_file = tempfile.NamedTemporaryFile(mode='w', delete=False, suffix='.txt')
temp_file.write(b"caption one\n".decode())
temp_file.write(b"caption two\n".decode())
temp_file.write(b"caption three\n".decode())
temp_file.close()

# Create the ARGS dictionary
ARGS = {
    'txt': temp_file.name
}

# Clean up will happen after function execution
# Note: In production, you'd want to clean up with os.unlink(temp_file.name)
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
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
from_txt_vocab Ran
ran; our contract draft was wrong, not the code
abhidipbhattacharyya/srl_aware_ret/vocab.py
code served (permissive licence) · get_code("0da42e0e379224b0")
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) and returned Vocabulary. 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

class Vocabulary(object):
    """Simple vocabulary wrapper."""

    def __init__(self):
        self.word2idx = {}
        self.idx2word = {}
        self.idx = 0

    def add_word(self, word):
        if word not in self.word2idx:
            self.word2idx[word] = self.idx
            self.idx2word[self.idx] = word
            self.idx += 1

    def __call__(self, word):
        if word not in self.word2idx:
            return self.word2idx['<unk>']
        return self.word2idx[word]

    def __len__(self):
        return len(self.word2idx)

def from_txt_vocab(txt):
    with open(txt, 'r') as f:
        lines = f.readlines()
    words = [l.strip() for l in lines]
    vocab = Vocabulary()
    for w in words:
        vocab.add_word(w)
    return vocab

# Create a temporary text file with vocabulary words
temp_file = tempfile.NamedTemporaryFile(mode='w', delete=False, suffix='.txt')
vocab_words = ['<unk>', 'hello', 'world', 'python', 'test', 'vocabulary']
temp_file.write('\n'.join(vocab_words))
temp_file.close()

ARGS = {
    'txt': temp_file.name
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
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 Vocabulary — a Vocabulary output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Vocabulary 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_loaders Ran
ran; our contract draft was wrong, not the code
idejie/SCAN/data.py
code served (permissive licence) · get_code("a3b22af17bee87cc")
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 torch
import torch.utils.data as data
import numpy as np
import nltk
import tempfile
import os

torch.manual_seed(0)

# Create a minimal vocab callable that maps tokens to indices
class SimpleVocab:
    def __init__(self):
        self.word2idx = {
            '<start>': 0,
            '<end>': 1,
            'hello': 2,
            'world': 3,
            'test': 4,
            'caption': 5,
        }
    
    def __call__(self, token):
        return self.word2idx.get(token, 2)

vocab = SimpleVocab()

# Create a temporary directory with required files
tmpdir = tempfile.mkdtemp()
data_name = 'test_data'
data_dir = os.path.join(tmpdir, data_name)
os.makedirs(data_dir, exist_ok=True)

# Create train_caps.txt
with open(os.path.join(data_dir, 'train_caps.txt'), 'wb') as f:
    for i in range(4):
        f.write(b'hello world test caption\n')

# Create train_ims.npy (batch_size=4, features=256)
train_ims = np.random.randn(4, 256).astype(np.float32)
np.save(os.path.join(data_dir, 'train_ims.npy'), train_ims)

# Create dev_caps.txt
with open(os.path.join(data_dir, 'dev_caps.txt'), 'wb') as f:
    for i in range(2):
        f.write(b'test caption hello\n')

# Create dev_ims.npy
dev_ims = np.random.randn(2, 256).astype(np.float32)
np.save(os.path.join(data_dir, 'dev_ims.npy'), dev_ims)

# Create a minimal opt config object
class OptConfig:
    def __init__(self, data_path):
        self.data_path = data_path

opt = OptConfig(tmpdir)

ARGS = {
    'data_name': data_name,
    'vocab': vocab,
    'batch_size': 2,
    'workers': 0,
    'opt': opt,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
nltk, numpy, torch — 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_precomp_loader Ran
ran on a synthesized input
idejie/SCAN/data.py
code served (permissive licence) · get_code("f8b728dce3e79700")
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 DataLoader. 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.utils.data as data
import numpy as np
import tempfile
import os

torch.manual_seed(0)

# Create a minimal vocab class that acts like a callable
class SimpleVocab:
    def __init__(self):
        self.word_to_idx = {
            '<start>': 0,
            '<end>': 1,
            'hello': 2,
            'world': 3,
            'test': 4,
        }
    
    def __call__(self, word):
        return self.word_to_idx.get(word, 0)

# Create temporary directory with mock data files
temp_dir = tempfile.mkdtemp()

# Create mock caption files
with open(os.path.join(temp_dir, 'train_caps.txt'), 'wb') as f:
    f.write(b'hello world\n')
    f.write(b'test caption\n')

with open(os.path.join(temp_dir, 'dev_caps.txt'), 'wb') as f:
    for i in range(5000):
        f.write(b'hello world\n')

# Create mock image feature files
# For train: 2 images with 4 dimensional features each
train_images = np.random.randn(2, 4).astype(np.float32)
np.save(os.path.join(temp_dir, 'train_ims.npy'), train_images)

# For dev: 5000 images with 4 dimensional features each
dev_images = np.random.randn(5000, 4).astype(np.float32)
np.save(os.path.join(temp_dir, 'dev_ims.npy'), dev_images)

# Create vocab
vocab = SimpleVocab()

# Create minimal opt object (not really used in get_precomp_loader)
opt = type('Opt', (), {})()

ARGS = {
    'data_path': temp_dir,
    'data_split': 'train',
    'vocab': vocab,
    'opt': opt,
    'batch_size': 2,
    'shuffle': True,
    'num_workers': 0,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
nltk, numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type DataLoader — a DataLoader output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a DataLoader 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
l1norm Ran
ran; our contract draft was wrong, not the code
idejie/SCAN/model.py
code served (permissive licence) · get_code("a1e099b0f700be6a")
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)

# Create a small tensor to normalize
# Shape: (2, 4) - batch size 2, dimension 4
X = torch.randn(2, 4)

# The function signature is: l1norm(X, dim, eps=1e-08)
# X: tensor to normalize
# dim: dimension along which to compute L1 norm
# eps: small constant to avoid division by zero

ARGS = {
    "X": X,
    "dim": 1,
    "eps": 1e-08
}
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
l2norm Ran
ran; our contract draft was wrong, not the code
idejie/SCAN/model.py
code served (permissive licence) · get_code("fe7440ba7662dcfc")
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)

# Create a small tensor to normalize
# Shape: (2, 4) - 2 samples, 4 features
X = torch.randn(2, 4)

# The function performs L2 normalization along a specified dimension
# We'll normalize along dimension 1 (features for each sample)
dim = 1

# eps parameter has a default value, but we can also specify it explicitly
eps = 1e-08

ARGS = {
    "X": X,
    "dim": dim,
    "eps": eps
}
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
process_sim Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
abhidipbhattacharyya/srl_aware_ret/evaluation.py
code served (permissive licence) · get_code("05aa9e5fd7ec0e01")
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) and returned ndarray, ndim 2, dtype family float, shape (3, 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 a small similarity matrix
# The function expects sim to be a 2D array where:
# - len(sim) is divisible by no_prop (number of images * no_prop)
# - len(sim[0]) is divisible by no_prop (number of captions * no_prop)
# Let's create a 6x8 matrix with no_prop=2
# This gives us 3 images and 4 captions

no_prop = 2
num_images = 3
num_captions = 4

# Create a similarity matrix of shape (6, 8)
sim = np.random.rand(num_images * no_prop, num_captions * no_prop).astype(np.float32)

ARGS = {
    "sim": sim,
    "no_prop": no_prop
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
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 (3, 4) — shape (3, 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
read_all_images Ran
ran, honoured the contract we drafted
hthoai/image-text-matching/utils/read_all_images.py
pointer only (licence: NONE) · get_code("68f208c3005da07a")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, hthoai/image-text-matching 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.

softmax Ran
ran; our contract draft was wrong, not the code
abhidipbhattacharyya/srl_aware_ret/evaluation.py
code served (permissive licence) · get_code("652f07c5ff410713")
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) and returned ndarray, 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 numpy as np

# Create a small 2D array for testing
X = np.array([[1.0, 2.0, 3.0, 4.0],
              [5.0, 6.0, 7.0, 8.0]])

# axis parameter - compute softmax along axis 1 (across columns for each row)
axis = 1

ARGS = {
    "X": X,
    "axis": axis
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
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, 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
build_vocab Not yet run
unverified (harvested, no recorded run)
idejie/SCAN/vocab.py
code served (permissive licence) · get_code("7b9b11b5023a6ca4")
How it ran

no invocation recorded.

encode_data Not yet run
unverified (harvested, no recorded run)
kuanghuei/SCAN/evaluation.py
code served (permissive licence) · get_code("77cfc8299b5facec")
How it ran

no invocation recorded.

encode_data Not yet run
unverified (harvested, no recorded run)
idejie/SCAN/evaluation.py
code served (permissive licence) · get_code("647842a3913aa59c")
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, 10 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 10 later) and 6 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
l1norm 12 other papers
12 later · 3 only as an assembly brick
2010.03403 (2020-10)
Universal Weighting Metric Learning for Cross-Modal Matching
2101.01368 (2021-01)
Similarity Reasoning and Filtration for Image-Text Matching
2303.12419 (2023-03)
BiCro: Noisy Correspondence Rectification for Multi-modality Data via Bi-directional Cross-modal Similarity Consistency
and 9 more not named here
l2norm 12 other papers
12 later · 2 only as an assembly brick
1904.01310 (2019-04)
DM-GAN: Dynamic Memory Generative Adversarial Networks for Text-to-Image Synthesis
2010.03403 (2020-10)
Universal Weighting Metric Learning for Cross-Modal Matching
2109.05433 (2021-09)
Are Gender-Neutral Queries Really Gender-Neutral? Mitigating Gender Bias in Image Search
and 9 more not named here
from_txt 3 other papers
3 later
1806.10348 (2018-06)
Learning Visually-Grounded Semantics from Contrastive Adversarial Samples
2010.03403 (2020-10)
Universal Weighting Metric Learning for Cross-Modal Matching
2506.23502 (2025-06)
LLM-enhanced Action-aware Multi-modal Prompt Tuning for Image-Text Matching
EncoderImage 1 other paper
1 later
2010.03403 (2020-10)
Universal Weighting Metric Learning for Cross-Modal Matching
build_vocab 1 other paper
1 later
2010.03403 (2020-10)
Universal Weighting Metric Learning for Cross-Modal Matching
collate_fn 1 other paper
1 later
2010.03403 (2020-10)
Universal Weighting Metric Learning for Cross-Modal Matching
deserialize_vocab 1 other paper
1 later
2010.03403 (2020-10)
Universal Weighting Metric Learning for Cross-Modal Matching
encode_data 1 other paper
1 later
2010.03403 (2020-10)
Universal Weighting Metric Learning for Cross-Modal Matching
get_loaders 1 other paper
1 later
2010.03403 (2020-10)
Universal Weighting Metric Learning for Cross-Modal Matching
softmax 1 other paper
1 later
2010.03403 (2020-10)
Universal Weighting Metric Learning for Cross-Modal Matching

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 this paper, we study the problem of image-text matching. Inferring the latent semantic alignment between objects or other salient stuff (e.g. snow, sky, lawn) and the corresponding words in sentences allows to capture fine-grained interplay between vision and language, and makes image-text matching more interpretable. Prior work either simply aggregates the similarity of all possible pairs of regions and words without attending differentially to more and less important words or regions, or uses a multi-step attentional process to capture limited number of semantic alignments which is less interpretable. In this paper, we present Stacked Cross Attention to discover the full latent alignments using both image regions and words in a sentence as context and infer image-text similarity. Our approach achieves the state-of-the-art results on the MS-COCO and Flickr30K datasets. On Flickr30K, our approach outperforms the current best methods by 22.1% relatively in text retrieval from image query, and 18.2% relatively in image retrieval with text query (based on Recall@1). On MS-COCO, our approach improves sentence retrieval by 17.8% relatively and image retrieval by 16.6% relatively (based on Recall@1 using the 5K test set). Code has been made available at: https://github.com/kuanghuei/SCAN.

For agents

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

get_harvested_code_for_paper("1803.08024")
get_code_for_paper("1803.08024")
have("1803.08024")

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

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

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

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

Connect an agent — have() is free.