SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2308.09351 · ICCV · 2023

RLIPv2: Fast Scaling of Relational Language-Image Pre-training

Xiang Wang, Yingya Zhang, Shiwei Zhang, Hangjie Yuan, Jianwen Jiang, Samuel Albanie, Tao Feng, Dong Ni, Deli Zhao, Yining Pan

arXiv · PDF · Open in the Atlas

Code that ran

22 of 30 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (5 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 2 violated it and 7 have no contract verdict; 13 failures of our instrument; 8 no recorded run), measured 2026-11-23; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2308.09351.json · badge: /api/ran/2308.09351.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
jacobyuan7/ocn-hoi-benchmark canonical (classifier label)
classifier basis: census
7 ran · 3 no recorded run
jacobyuan7/rlipv2 canonical (classifier label)
classifier basis: census
7 ran · 2 no recorded run
jacobyuan7/rlip community
Papers with Code archive
7 ran · 3 no recorded run
JacobYuan7/RLIPv2 community
Papers with Code archive
1 ran · 0 no recorded run
FunctionStatusWhere it lives
CrossModelTransformerEncoder Ran
ran on a synthesized input · constructed an object; no result was computed
jacobyuan7/rlip/models/ParSetransformer.py
code served (permissive licence) · get_code("4a630df05e78ca0c")
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 an instance of its own class, CrossModelTransformerEncoder: the run constructed the object and did not call it, so no result was computed. 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 typing import Optional

torch.manual_seed(0)

# Create a minimal encoder layer that matches the interface expected
class MinimalEncoderLayer(nn.Module):
    def __init__(self, d_model=4):
        super().__init__()
        self.d_model = d_model
        self.linear = nn.Linear(d_model, d_model)
    
    def forward(self, src, src_mask=None, src_key_padding_mask=None, pos=None):
        # The forward method receives src and optional mask/pos parameters
        return self.linear(src)

# Create a minimal norm layer
class MinimalNorm(nn.Module):
    def __init__(self, d_model=4):
        super().__init__()
        self.d_model = d_model
    
    def forward(self, x):
        return torch.nn.functional.layer_norm(x, (self.d_model,))

# Build arguments
encoder_layer = MinimalEncoderLayer(d_model=4)
num_layers = 2
norm = MinimalNorm(d_model=4)
return_intermediate = False

ARGS = {
    "encoder_layer": encoder_layer,
    "num_layers": num_layers,
    "norm": norm,
    "return_intermediate": return_intermediate,
}
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 CrossModelTransformerEncoder — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a CrossModelTransformerEncoder 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
DeformableTransformerEncoder Ran
ran on a synthesized input · constructed an object; no result was computed
jacobyuan7/rlip/models/ParSetransformer.py
code served (permissive licence) · get_code("4621c1ee7b2ff5e6")
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 an instance of its own class, DeformableTransformerEncoder: the run constructed the object and did not call it, so no result was computed. 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 copy
import torch
from torch import nn

torch.manual_seed(0)

# Create a minimal encoder layer that satisfies the forward signature
class MinimalEncoderLayer(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 4)
    
    def forward(self, src, pos, reference_points, spatial_shapes, level_start_index, padding_mask):
        # Minimal implementation - just return processed src
        return self.linear(src)

# Create encoder layer instance
encoder_layer = MinimalEncoderLayer()

# Number of layers
num_layers = 2

# Create the DeformableTransformerEncoder instance
class DeformableTransformerEncoder(nn.Module):
    def __init__(self, encoder_layer, num_layers):
        super().__init__()
        self.layers = nn.ModuleList([copy.deepcopy(encoder_layer) for i in range(num_layers)])
        self.num_layers = num_layers

    @staticmethod
    def get_reference_points(spatial_shapes, valid_ratios, device):
        reference_points_list = []
        for lvl, (H_, W_) in enumerate(spatial_shapes):
            ref_y, ref_x = torch.meshgrid(torch.linspace(0.5, H_ - 0.5, H_, dtype=torch.float32, device=device), torch.linspace(0.5, W_ - 0.5, W_, dtype=torch.float32, device=device), indexing='ij')
            ref_y = ref_y.reshape(-1)[None] / (valid_ratios[:, None, lvl, 1] * H_)
            ref_x = ref_x.reshape(-1)[None] / (valid_ratios[:, None, lvl, 0] * W_)
            ref = torch.stack((ref_x, ref_y), -1)
            reference_points_list.append(ref)
        reference_points = torch.cat(reference_points_list, 1)
        reference_points = reference_points[:, :, None] * valid_ratios[:, None]
        return reference_points

    def forward(self, src, spatial_shapes, level_start_index, valid_ratios, pos=None, padding_mask=None):
        output = src
        reference_points = self.get_reference_points(spatial_shapes, valid_ratios, device=src.device)
        for _, layer in enumerate(self.layers):
            output = layer(output, pos, reference_points, spatial_shapes, level_start_index, padding_mask)
        return output

# Prepare forward arguments
src = torch.randn(2, 12, 4)  # batch_size=2, num_queries=12, dim=4
spatial_shapes = [(3, 4), (2, 2)]  # Two levels: 3x4 and 2x2
level_start_index = torch.tensor([0, 12])  # Start indices for each level
valid_ratios = torch.ones(2, 2, 2)  # batch_size=2, num_levels=2, (ratio_h, ratio_w)
pos = torch.randn(2, 12, 4)  # Positional encoding
padding_mask = None

ARGS = {
    'encoder_layer': encoder_layer,
    'num_layers': num_layers,
}
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 DeformableTransformerEncoder — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a DeformableTransformerEncoder 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
FeatureResizer Ran
ran on a synthesized input · constructed an object; no result was computed
jacobyuan7/rlip/models/ParSetransformer.py
code served (permissive licence) · get_code("b3b492f41ac84c02")
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 an instance of its own class, FeatureResizer: the run constructed the object and did not call it, so no result was computed. 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
from torch import nn

torch.manual_seed(0)

ARGS = {
    "input_feat_size": 4,
    "output_feat_size": 3,
    "dropout": 0.1,
    "do_ln": True,
}
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 FeatureResizer — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a FeatureResizer 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
MSDeformAttn Ran
ran on a synthesized input · constructed an object; no result was computed
jacobyuan7/rlip/models/ParSetransformer.py
code served (permissive licence) · get_code("5d8915fe61383bce")
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 an instance of its own class, MSDeformAttn: the run constructed the object and did not call it, so no result was computed. 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 math

torch.manual_seed(0)

# Parameters for MSDeformAttn
d_model = 256
n_levels = 4
n_heads = 8
n_points = 4

# Create the module
module = nn.Module()

# Create sample tensors
batch_size = 2
len_query = 3
len_input = 12  # sum of H_l * W_l across all levels

# query: (N, Length_{query}, C)
query = torch.randn(batch_size, len_query, d_model)

# reference_points: (N, Length_{query}, n_levels, 2)
reference_points = torch.rand(batch_size, len_query, n_levels, 2)

# input_flatten: (N, sum of H_l*W_l, C)
input_flatten = torch.randn(batch_size, len_input, d_model)

# input_spatial_shapes: (n_levels, 2)
# Create shapes that sum to len_input (12)
# Use: [2x2, 2x2, 2x2, 1x2] = 4 + 4 + 4 + 2 = 14 (need adjustment)
# Use: [2x2, 2x2, 1x2, 1x1] = 4 + 4 + 2 + 1 = 11 (close)
# Use: [2x3, 2x2, 1x2, 1x1] = 6 + 4 + 2 + 1 = 13 (close)
# Use: [2x2, 2x2, 2x1, 2x1] = 4 + 4 + 2 + 2 = 12 ✓
input_spatial_shapes = torch.tensor([[2, 2], [2, 2], [2, 1], [2, 1]], dtype=torch.long)

# input_level_start_index: (n_levels,)
# Cumulative sum: [0, 4, 8, 10, 12]
input_level_start_index = torch.tensor([0, 4, 8, 10], dtype=torch.long)

# input_padding_mask: (N, sum of H_l*W_l)
input_padding_mask = torch.zeros(batch_size, len_input, dtype=torch.bool)

ARGS = {
    'd_model': d_model,
    'n_levels': n_levels,
    'n_heads': n_heads,
    'n_points': n_points,
}
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 MSDeformAttn — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a MSDeformAttn 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
RLIPv2_BiMultiHeadAttention Ran
ran on a synthesized input
JacobYuan7/RLIPv2/models/fuse_helper.py
code served (permissive licence) · get_code("2303ca2dfb7c411f")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) 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

class Args:
    stable_softmax_2d = True
    clamp_min_for_underflow = True
    clamp_max_for_overflow = True

v_dim = 8
l_dim = 6
embed_dim = 12
num_heads = 3
dropout = 0.1

INIT_ARGS = {
    'v_dim': v_dim,
    'l_dim': l_dim,
    'embed_dim': embed_dim,
    'num_heads': num_heads,
    'dropout': dropout,
    'args': Args()
}

batch_size = 2
v_seq_len = 5
l_seq_len = 7

v = torch.randn(batch_size, v_seq_len, v_dim)
l = torch.randn(batch_size, l_seq_len, l_dim)
v_pos = torch.randn(batch_size, v_seq_len, v_dim)
attention_mask_l = torch.ones(batch_size, l_seq_len)
attention_mask_l[0, 5:] = 0
attention_mask_v = torch.ones(batch_size, v_seq_len)
attention_mask_v[1, 4:] = 0

ARGS = {
    'v': v,
    'l': l,
    'v_pos': v_pos,
    'attention_mask_l': attention_mask_l,
    'attention_mask_v': attention_mask_v
}
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
TransformerDecoderHOI Ran
ran on a synthesized input · constructed an object; no result was computed
jacobyuan7/rlip/models/ParSetransformer.py
code served (permissive licence) · get_code("cf0fda09312fb592")
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 an instance of its own class, TransformerDecoderHOI: the run constructed the object and did not call it, so no result was computed. 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 copy

torch.manual_seed(0)

# Create a minimal decoder layer that matches what TransformerDecoderHOI expects
class MinimalDecoderLayer(nn.Module):
    def __init__(self, d_model=256):
        super().__init__()
        self.d_model = d_model
        self.linear = nn.Linear(d_model, d_model)
    
    def forward(self, tgt, query_pos, reference_points, src, src_spatial_shapes, src_level_start_index, src_padding_mask):
        # Minimal implementation: just return the input transformed
        return self.linear(tgt)

# Create minimal bbox embed layers
class MinimalBBoxEmbed(nn.Module):
    def __init__(self, d_model=256, output_dim=4):
        super().__init__()
        self.linear = nn.Linear(d_model, output_dim)
    
    def forward(self, x):
        return self.linear(x)

# Setup dimensions
d_model = 256
num_layers = 2
batch_size = 2
num_queries = 3
num_src_levels = 2

# Create decoder layer
decoder_layer = MinimalDecoderLayer(d_model=d_model)

# Create the main module
transformer_decoder = nn.Module()

# Create tgt (target embeddings)
# Shape: [batch_size, num_queries, d_model]
tgt = torch.randn(batch_size, num_queries, d_model)

# Create reference points - tuple of (sub_ref_points, obj_ref_points)
# Each shape: [batch_size, num_queries, 4] for bbox format
sub_ref_points = torch.rand(batch_size, num_queries, 4) * 0.5 + 0.25  # Keep in (0, 1)
obj_ref_points = torch.rand(batch_size, num_queries, 4) * 0.5 + 0.25  # Keep in (0, 1)
reference_points = (sub_ref_points, obj_ref_points)

# Create source features
# Shape: [num_src_tokens, batch_size, d_model]
num_src_tokens = 100
src = torch.randn(num_src_tokens, batch_size, d_model)

# Create spatial shapes (for multi-scale features)
# Shape: [num_src_levels, 2] - height, width of each level
src_spatial_shapes = torch.tensor([[10, 10], [5, 5]], dtype=torch.long)

# Create level start index
# Shape: [num_src_levels]
src_level_start_index = torch.tensor([0, 100], dtype=torch.long)

# Create valid ratios
# Shape: [batch_size, num_src_levels, 2] or [batch_size, num_src_levels, 4]
src_valid_ratios = torch.ones(batch_size, num_src_levels, 2)

# Optional query_pos
query_pos = torch.randn(batch_size, num_queries, d_model)

# Optional src_padding_mask
src_padding_mask = None

ARGS = {
    'decoder_layer': decoder_layer,
    'num_layers': num_layers,
    'return_intermediate': False,
    'ParSe': 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 TransformerDecoderHOI — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a TransformerDecoderHOI 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
TransformerEncoderLayer Ran
ran on a synthesized input
jacobyuan7/rlip/models/ParSetransformer.py
code served (permissive licence) · get_code("107ffdb07dbd2f9d")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) and returned Tensor, ndim 3, 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.nn as nn
import torch.nn.functional as F
from typing import List, Optional
from torch import Tensor

def _get_activation_fn(activation):
    """Return an activation function given a string"""
    if activation == 'relu':
        return F.relu
    if activation == 'gelu':
        return F.gelu
    if activation == 'glu':
        return F.glu
    raise RuntimeError(f'activation should be relu/gelu, not {activation}.')

class TransformerEncoderLayer(nn.Module):

    def __init__(self, d_model, nhead, dim_feedforward=2048, dropout=0.1, activation='relu', normalize_before=False):
        super().__init__()
        self.self_attn = nn.MultiheadAttention(d_model, nhead, dropout=dropout)
        self.linear1 = nn.Linear(d_model, dim_feedforward)
        self.dropout = nn.Dropout(dropout)
        self.linear2 = nn.Linear(dim_feedforward, d_model)
        self.norm1 = nn.LayerNorm(d_model)
        self.norm2 = nn.LayerNorm(d_model)
        self.dropout1 = nn.Dropout(dropout)
        self.dropout2 = nn.Dropout(dropout)
        self.activation = _get_activation_fn(activation)
        self.normalize_before = normalize_before

    def with_pos_embed(self, tensor, pos: Optional[Tensor]):
        return tensor if pos is None else tensor + pos

    def forward_post(self, src, src_mask: Optional[Tensor]=None, src_key_padding_mask: Optional[Tensor]=None, pos: Optional[Tensor]=None):
        q = k = self.with_pos_embed(src, pos)
        src2 = self.self_attn(q, k, value=src, attn_mask=src_mask, key_padding_mask=src_key_padding_mask)[0]
        src = src + self.dropout1(src2)
        src = self.norm1(src)
        src2 = self.linear2(self.dropout(self.activation(self.linear1(src))))
        src = src + self.dropout2(src2)
        src = self.norm2(src)
        return src

    def forward_pre(self, src, src_mask: Optional[Tensor]=None, src_key_padding_mask: Optional[Tensor]=None, pos: Optional[Tensor]=None):
        src2 = self.norm1(src)
        q = k = self.with_pos_embed(src2, pos)
        src2 = self.self_attn(q, k, value=src2, attn_mask=src_mask, key_padding_mask=src_key_padding_mask)[0]
        src = src + self.dropout1(src2)
        src2 = self.norm2(src)
        src2 = self.linear2(self.dropout(self.activation(self.linear1(src2))))
        src = src + self.dropout2(src2)
        return src

    def forward(self, src, src_mask: Optional[Tensor]=None, src_key_padding_mask: Optional[Tensor]=None, pos: Optional[Tensor]=None):
        if self.normalize_before:
            return self.forward_pre(src, src_mask, src_key_padding_mask, pos)
        return self.forward_post(src, src_mask, src_key_padding_mask, pos)


INIT_ARGS = {
    'd_model': 4,
    'nhead': 2,
    'dim_feedforward': 8,
    'dropout': 0.1,
    'activation': 'relu',
    'normalize_before': False,
}

ARGS = {
    'src': torch.randn(3, 2, 4),
    'src_mask': None,
    'src_key_padding_mask': None,
    'pos': None,
}

if __name__ == '__main__':
    layer = TransformerEncoderLayer(**INIT_ARGS)
    output = layer(**ARGS)
    print(f"Output shape: {output.shape}")
    print(f"Output: {output}")
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
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 3, dtype family float — no output shape is stated: observe_signature.py observed this class with its constructor sizes canonicalised where it could, which the node does not record, so its shape is not stated as this setup block's
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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
_get_clones Ran
ran; our contract draft was wrong, not the code
jacobyuan7/rlip/models/ParSetransformer.py
code served (permissive licence) · get_code("c03e17b75656115f")
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 ModuleList. 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 copy

torch.manual_seed(0)

# Create a simple nn.Module to use as the module parameter
class SimpleModule(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 3)
    
    def forward(self, x):
        return self.linear(x)

# Construct the arguments
module = SimpleModule()
N = 5

ARGS = {
    "module": module,
    "N": N
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ModuleList — a ModuleList output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a ModuleList output the recorded ndim 1 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
check_list_out_of_bounds Ran
ran, violated the contract we drafted
jacobyuan7/rlipv2/generate_relations_using_verb_tagger.py
code served (permissive licence) · get_code("5425cd58fc9f60ff")
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 bool, 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 numpy as np

torch.manual_seed(0)

# Analyzing the function:
# - relation_candidates is iterated over with enumerate
# - Each element is unpacked as (pair_i, rel_i)
# - pair_i is iterated over, yielding (s, o) tuples
# - s and o are compared with len(boxes)
# - boxes needs to support len()

# Create valid arguments:
# relation_candidates: list of tuples where each tuple is (pair_i, rel_i)
# - pair_i: list of tuples (subject_idx, object_idx)
# - rel_i: some relation info (not used in function body)
# boxes: any object supporting len() - we'll use a list or tensor

# Case 1: In-bounds example
boxes_valid = [{'id': 0}, {'id': 1}, {'id': 2}, {'id': 3}]  # 4 boxes
relation_candidates_valid = [
    ([(0, 1), (1, 2)], "rel_type_1"),  # pair_i with valid indices, rel_i
    ([(2, 3)], "rel_type_2")
]

# Let's create an out-of-bounds case to make it more interesting
relation_candidates_oob = [
    ([(0, 1), (1, 5)], "rel_type_1"),  # 5 >= len(boxes), out of bounds
    ([(2, 3)], "rel_type_2")
]

# Use the out-of-bounds version to test the function properly
ARGS = {
    "relation_candidates": relation_candidates_oob,
    "boxes": boxes_valid
}
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 bool, 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
compute_relation_distribution_from_scene_graphs Ran
ran; our contract draft was wrong, not the code
jacobyuan7/rlipv2/datasets/rlipv2_helper/coco_caption_helper.py
code served (permissive licence) · get_code("de2f09364131391c")
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 torch
import numpy as np

# Construct the scene graph data structure
sng = {
    '12345': [
        {
            'entities': ['person', 'dog', 'ball'],
            'relations': [
                {'relation': 'holding'},
                {'relation': 'next_to'},
                {'relation': 'holding'},
            ]
        },
        {
            'entities': ['cat', 'chair'],
            'relations': [
                {'relation': 'sitting_on'},
                {'relation': 'next_to'},
            ]
        }
    ],
    '23456': [
        {
            'entities': ['car', 'road'],
            'relations': [
                {'relation': 'on'},
                {'relation': 'moving_on'},
            ]
        }
    ],
    '34567': [
        {
            'entities': ['tree', 'bird', 'branch'],
            'relations': [
                {'relation': 'on'},
                {'relation': 'perched_on'},
                {'relation': 'holding'},
            ]
        }
    ]
}

ARGS = {
    'sng': sng
}
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 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
count_fusion Ran
ran; our contract draft was wrong, not the code
jacobyuan7/ocn-hoi-benchmark/models/hoi.py
code served (permissive licence) · get_code("b66569473e9784e1")
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 small tensors for x and y
x = torch.randn(2, 4)
y = torch.randn(2, 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
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
dice_loss Ran
ran, violated the contract we drafted
jacobyuan7/ocn-hoi-benchmark/models/segmentation.py
code served (permissive licence) · get_code("ac8fe530cdad4d8c")
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 as nn

torch.manual_seed(0)

# Create sample inputs and targets tensors
# The function expects tensors that can be flattened and have sigmoid applied
# Shape: batch_size=2, spatial_dims flattened to create predictions
batch_size = 2
num_spatial = 4

# inputs: predictions before sigmoid, shape (batch_size, num_spatial)
inputs = torch.randn(batch_size, num_spatial)

# targets: binary labels matching inputs shape, values 0 or 1
targets = torch.randint(0, 2, (batch_size, num_spatial), dtype=torch.float32)

# num_boxes: number of boxes for normalization
num_boxes = 2

ARGS = {
    "inputs": inputs,
    "targets": targets,
    "num_boxes": num_boxes,
}
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
exponential_inc_iterative_loss Ran
ran; our contract draft was wrong, not the code
jacobyuan7/ocn-hoi-benchmark/engine.py
code served (permissive licence) · get_code("5dad3494aed8377b")
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 torch
import torch.nn as nn

torch.manual_seed(0)

# Create a minimal model (not actually used in function body, but required as parameter)
class SimpleModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 2)
    
    def forward(self, x):
        return self.linear(x)

model = SimpleModel()

# Create loss_dict_reduced with some sample losses
loss_dict_reduced = {
    'loss_ce': torch.tensor(0.5),
    'loss_bbox': torch.tensor(0.3),
    'loss_giou': torch.tensor(0.2),
}

# Create weight_dict with weights for each loss type
weight_dict = {
    'loss_ce': 1.0,
    'loss_bbox': 5.0,
    'loss_giou': 2.0,
}

ARGS = {
    'loss_dict_reduced': loss_dict_reduced,
    'weight_dict': weight_dict,
    'model': model,
}
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 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
flip_lr Ran
ran; our contract draft was wrong, not the code
jacobyuan7/ocn-hoi-benchmark/models/decode.py
code served (permissive licence) · get_code("1d2943763d1f2ef8")
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, 3, 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
import numpy as np

torch.manual_seed(0)

# x: a tensor with shape (batch, channels, ...) that will be flipped horizontally
# The function does x[..., ::-1] which flips the last dimension
# and accesses x[:, e[0], ...] and x[:, e[1], ...] for channel swapping
x = torch.randn(2, 4, 3, 5)

# flip_idx: a list of tuples where each tuple contains two channel indices to swap
# These indices are used to swap channels: tmp[:, e[0], ...] <-> tmp[:, e[1], ...]
flip_idx = [(0, 1), (2, 3)]

ARGS = {
    "x": x,
    "flip_idx": flip_idx,
}
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 4, dtype family float, shape (2, 4, 3, 5) — shape (2, 4, 3, 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
flip_tensor Ran
ran; our contract draft was wrong, not the code
jacobyuan7/ocn-hoi-benchmark/models/decode.py
code served (permissive licence) · get_code("6e3e0dbceafbf01c")
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, 3, 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)

# The function flip_tensor takes a tensor x and flips it along dimension 3
# We need to create a tensor with at least 4 dimensions (since we're flipping dimension [3])
# Using shape (2, 4, 3, 5) to have distinct sizes for each dimension
x = torch.randn(2, 4, 3, 5)

ARGS = {
    "x": x
}
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, 3, 5) — shape (2, 4, 3, 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
grammartical_tranform Ran
ran; our contract draft was wrong, not the code
jacobyuan7/rlipv2/datasets/rlipv2_helper/coco_caption_helper.py
code served (permissive licence) · get_code("46b10090febf5d85")
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 torch

torch.manual_seed(0)

# Construct a valid scene graph dictionary structure
# The function expects: dict[image_id] -> list of scene graphs
# Each scene graph has 'entities' key with list of objects
# Each object has 'span' key with text to lowercase

sng = {
    "image_1": [
        {
            "entities": [
                {"span": "A LARGE DOG", "type": "object"},
                {"span": "RED CAR", "type": "object"}
            ]
        },
        {
            "entities": [
                {"span": "BLUE HOUSE", "type": "object"}
            ]
        }
    ],
    "image_2": [
        {
            "entities": [
                {"span": "HAPPY PERSON", "type": "object"},
                {"span": "GREEN TREE", "type": "object"},
                {"span": "YELLOW FLOWER", "type": "object"}
            ]
        }
    ]
}

ARGS = {
    "sng": sng
}
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 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
load_hico_object_txt Ran
ran; our contract draft was wrong, not the code
jacobyuan7/rlipv2/datasets/rlipv2_helper/OD_rel_cand_select.py
code served (permissive licence) · get_code("45e4eb399a99d475")
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 json
import tempfile
import os

# Create a temporary directory and file for testing
temp_dir = tempfile.mkdtemp()
temp_file = os.path.join(temp_dir, 'hico_object_names.txt')

# Create a valid JSON file with object names
# The function expects a dict where keys are indices and values are object names
object_data = {
    "0": "person",
    "1": "bicycle",
    "2": "car",
    "3": "motorcycle",
    "4": "airplane",
    "5": "bus",
    "6": "train"
}

with open(temp_file, 'w') as f:
    json.dump(object_data, f)

ARGS = {
    'file_path': temp_file
}
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
load_hico_object_txt Ran
ran; our contract draft was wrong, not the code
jacobyuan7/rlipv2/inference_on_custom_imgs_hico.py
code served (permissive licence) · get_code("be161ebd7c1a3d07")
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 json
import tempfile
import os

# Create a temporary directory and file for testing
temp_dir = tempfile.mkdtemp()
file_path = os.path.join(temp_dir, 'hico_object_names.txt')

# Create a valid JSON file with object names
object_data = {
    "adjust": 0,
    "board": 1,
    "brush": 2,
    "buy": 3,
    "call": 4,
    "carry": 5
}

with open(file_path, 'w') as f:
    json.dump(object_data, f)

ARGS = {
    'file_path': file_path
}
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_hico_verb_txt Ran
ran; our contract draft was wrong, not the code
jacobyuan7/rlipv2/inference_on_custom_imgs_hico.py
code served (permissive licence) · get_code("5e1b3b1dd052111f")
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 tempfile
import os

# Create a temporary file with sample verb data in the expected format
temp_dir = tempfile.mkdtemp()
file_path = os.path.join(temp_dir, 'hico_verb_names.txt')

with open(file_path, 'w') as f:
    f.write('0 train\n')
    f.write('1 boat\n')
    f.write('2 traffic_light\n')
    f.write('3 fire_hydrant\n')

ARGS = {
    'file_path': file_path
}
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
norm_tensor Ran
ran; our contract draft was wrong, not the code
jacobyuan7/ocn-hoi-benchmark/models/hoi.py
code served (permissive licence) · get_code("d6d0aa8ce6bedcbb")
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 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 with distinct dimensions
# Shape: (2, 4) - batch size 2, feature dimension 4
tensor = torch.randn(2, 4)

ARGS = {
    "tensor": tensor
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
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
sigmoid_focal_loss Ran
ran; our contract draft was wrong, not the code
jacobyuan7/ocn-hoi-benchmark/models/segmentation.py
code served (permissive licence) · get_code("5c0711aada67957e")
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 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)

# Create small tensors for inputs and targets
# inputs: predictions (logits) - shape (2, 4) for batch_size=2, num_predictions=4
inputs = torch.randn(2, 4, requires_grad=True)

# targets: binary labels - shape (2, 4) matching inputs
targets = torch.randint(0, 2, (2, 4), dtype=torch.float32)

# num_boxes: number of boxes for normalization
num_boxes = 2

# alpha and gamma are already float parameters with defaults
alpha = 0.25
gamma = 2.0

ARGS = {
    "inputs": inputs,
    "targets": targets,
    "num_boxes": num_boxes,
    "alpha": alpha,
    "gamma": gamma,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
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
transform_coco_bbox_to_VG_format Ran
ran; our contract draft was wrong, not the code
jacobyuan7/rlipv2/inference_on_custom_imgs_pseudo_coco.py
code served (permissive licence) · get_code("34ca1776c2c6b50f")
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 torch

torch.manual_seed(0)

# The function expects coco_bbox to be a list of dicts
# Each dict should have:
# - 'bbox': a tensor with 4 elements [x1, y1, x2, y2]
# - 'category_id': an integer representing the category

coco_bbox = [
    {
        'bbox': torch.tensor([10.0, 20.0, 50.0, 80.0]),
        'category_id': 1
    },
    {
        'bbox': torch.tensor([100.0, 150.0, 200.0, 250.0]),
        'category_id': 2
    }
]

ARGS = {
    'coco_bbox': coco_bbox
}
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 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
DeformableTransformerDecoderLayer Not yet run
unverified (harvested, no recorded run)
jacobyuan7/rlip/models/ParSetransformer.py
code served (permissive licence) · get_code("66064a88a6ab62de")
How it ran

no invocation recorded.

DeformableTransformerEncoderLayer Not yet run
unverified (harvested, no recorded run)
jacobyuan7/rlip/models/ParSetransformer.py
code served (permissive licence) · get_code("64cee3e52db36a85")
How it ran

no invocation recorded.

ParSeDeformableTransformer Not yet run
unverified (harvested, no recorded run)
jacobyuan7/rlip/models/ParSetransformer.py
code served (permissive licence) · get_code("4107165e358237d6")
How it ran

no invocation recorded.

build_transformer Not yet run
unverified (harvested, no recorded run)
jacobyuan7/ocn-hoi-benchmark/models/transformer.py
code served (permissive licence) · get_code("9a524c433c47ed10")
How it ran

no invocation recorded.

filter_by_gt_object_annotations Not yet run
unverified (harvested, no recorded run)
jacobyuan7/rlipv2/inference_on_custom_imgs_pseudo_coco.py
code served (permissive licence) · get_code("9b06d4ed21a99088")
How it ran

no invocation recorded.

flip_lr_off Not yet run
unverified (harvested, no recorded run)
jacobyuan7/ocn-hoi-benchmark/models/decode.py
code served (permissive licence) · get_code("5f199ad5ac482895")
How it ran

no invocation recorded.

set_hoi Not yet run
unverified (harvested, no recorded run)
jacobyuan7/ocn-hoi-benchmark/convert_vcoco_annotations.py
code served (permissive licence) · get_code("3755b0f2896c9d66")
How it ran

no invocation recorded.

transform_o365_official_to_VG_format Not yet run
unverified (harvested, no recorded run)
jacobyuan7/rlipv2/datasets/rlipv2_helper/BLIP_o365_caption_helper.py
code served (permissive licence) · get_code("e040382fdc48b50a")
How it ran

no invocation recorded.

Also present in other papers' code

Of 30 samples lifted from this paper's linked repositories, 30 carry a function identity and 0 do not. Of the 30 distinct functions with an identity, 12 are also present in other papers whose code we hold (12 with at least one paper dated earlier, 3 the same month, 8 later) and 18 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

FunctionAlso present inEarliest-datedOthers named
_get_clones
brick of this paper's assembly: helper
73 other papers
45 dated earlier, 3 the same month, 25 later · 59 only as an assembly brick
1706.03762 (2017-06)
Attention Is All You Need
2005.12872 (2020-05)
End-to-End Object Detection with Transformers
2010.04159 (2020-10)
Deformable DETR: Deformable Transformers for End-to-End Object Detection
and 70 more not named here
sigmoid_focal_loss 56 other papers
31 dated earlier, 2 the same month, 20 later, 3 same year, order not determinable · 1 only as an assembly brick
2005.12872 (2020-05)
End-to-End Object Detection with Transformers
2010.04159 (2020-10)
Deformable DETR: Deformable Transformers for End-to-End Object Detection
2103.11731 (2021-03)
Meta-DETR: Image-Level Few-Shot Object Detection with Inter-Class Correlation Exploitation
and 53 more not named here
dice_loss 40 other papers
24 dated earlier, 14 later, 2 same year, order not determinable · 1 only as an assembly brick
2005.12872 (2020-05)
End-to-End Object Detection with Transformers
2010.04159 (2020-10)
Deformable DETR: Deformable Transformers for End-to-End Object Detection
2103.12115 (2021-03)
End-to-End Trainable Multi-Instance Pose Estimation with Transformers
and 37 more not named here
TransformerEncoderLayer
brick of this paper's assembly: model
16 other papers
11 dated earlier, 1 the same month, 4 later · 8 only as an assembly brick
2005.12872 (2020-05)
End-to-End Object Detection with Transformers
2103.11468 (2021-03)
Learning Multi-Scene Absolute Pose Regression with Transformers
2104.02439 (2021-04)
Few-Shot Transformation of Common Actions into Time and Space
and 13 more not named here
MSDeformAttn
brick of this paper's assembly: helper
6 other papers
3 dated earlier, 3 later
2010.04159 (2020-10)
Deformable DETR: Deformable Transformers for End-to-End Object Detection
2103.11161 (2021-03)
MonteFloor: Extending MCTS for Reconstructing Accurate Large-Scale Floor Plans
2209.02242 (2022-09)
PTSEFormer: Progressive Temporal-Spatial Enhanced TransFormer Towards Video Object Detection
and 3 more not named here
DeformableTransformerEncoder
brick of this paper's assembly: helper
5 other papers
3 dated earlier, 2 later · 1 only as an assembly brick
2103.11161 (2021-03)
MonteFloor: Extending MCTS for Reconstructing Accurate Large-Scale Floor Plans
2204.01918 (2022-04)
Text Spotting Transformers
2209.02242 (2022-09)
PTSEFormer: Progressive Temporal-Spatial Enhanced TransFormer Towards Video Object Detection
and 2 more not named here
DeformableTransformerEncoderLayer
brick of this paper's assembly: helper
5 other papers
3 dated earlier, 2 later
2103.11161 (2021-03)
MonteFloor: Extending MCTS for Reconstructing Accurate Large-Scale Floor Plans
2204.01918 (2022-04)
Text Spotting Transformers
2209.02242 (2022-09)
PTSEFormer: Progressive Temporal-Spatial Enhanced TransFormer Towards Video Object Detection
and 2 more not named here
FeatureResizer
brick of this paper's assembly: helper
3 other papers
2 dated earlier, 1 later · 1 only as an assembly brick
2209.13306 (2022-09)
Embracing Consistency: A One-Stage Approach for Spatio-Temporal Video Grounding
2307.13537 (2023-07)
Spectrum-guided Multi-granularity Referring Video Object Segmentation
2403.12042 (2024-03)
Exploring Pre-trained Text-to-Video Diffusion Models for Referring Video Object Segmentation
count_fusion 1 other paper
1 dated earlier
2202.00259 (2022-02)
Detecting Human-Object Interactions with Object-Guided Cross-Modal Calibrated Semantics
flip_tensor 1 other paper
1 dated earlier
2001.04608 (2020-01)
Actions as Moving Points
norm_tensor 1 other paper
1 dated earlier
2202.00259 (2022-02)
Detecting Human-Object Interactions with Object-Guided Cross-Modal Calibrated Semantics
set_hoi 1 other paper
1 dated earlier
2204.03541 (2022-04)
End-to-End Zero-Shot HOI Detection via Vision and Language Knowledge Distillation

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-23.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Relational Language-Image Pre-training (RLIP) aims to align vision representations with relational texts, thereby advancing the capability of relational reasoning in computer vision tasks. However, hindered by the slow convergence of RLIPv1 1 architecture and the limited availability of existing scene graph data, scaling RLIPv1 is challenging. In this paper, we propose RLIPv2, a fast converging model that enables the scaling of relational pre-training to largescale pseudo-labelled scene graph data. To enable fast scaling, RLIPv2 introduces Asymmetric Language-Image Fusion (ALIF), a mechanism that facilitates earlier and deeper gated cross-modal fusion with sparsified language encoding layers. ALIF leads to comparable or better performance than RLIPv1 in a fraction of the time for pre-training and fine-tuning. To obtain scene graph data at scale, we extend object detection datasets with free-form relation labels by introducing a captioner (e.g., BLIP) and a designed Relation Tagger. The Relation Tagger assigns BLIP-generated relation texts to region pairs, thus enabling larger-scale relational pre-training. Through extensive experiments conducted on Human-Object Interaction Detection and Scene Graph Generation, RLIPv2 shows state-of-the-art performance on three benchmarks under fully-finetuning, fewshot and zero-shot settings. Notably, the largest RLIPv2 achieves 23.29mAP on HICO-DET without any fine-tuning, yields 32.22mAP with just 1% data and yields 45.09mAP with 100% data. Code and models are publicly available at https://github.com/JacobYuan7/RLIPv2.

For agents

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

get_harvested_code_for_paper("2308.09351")
get_code_for_paper("2308.09351")
have("2308.09351")

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

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

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

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

Connect an agent — have() is free.