SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2010.15831 · 2020

RelationNet++: Bridging Visual Representations for Object Detection via Transformer Decoder

arXiv · PDF · Open in the Atlas

Code that ran

4 of 5 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 1 honoured the contract we drafted, 0 violated it and 3 have no contract verdict; 0 failures of our instrument; 1 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/2010.15831.json · badge: /api/ran/2010.15831.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
microsoft/RelationNet2 canonical (classifier label)
classifier basis: census
4 ran · 1 no recorded run
FunctionStatusWhere it lives
anchorfree_forward_feature_single Ran
ran on a synthesized input
microsoft/RelationNet2/code/models/utils/bvr_utils.py
code served (permissive licence) · get_code("69d11c2f1a409fff")
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.nn as nn

torch.manual_seed(0)

# Create a minimal mock class for self
class MockAnchorFreeHead(nn.Module):
    def __init__(self):
        super().__init__()
        # Create simple convolutional layers for cls and reg branches
        self.cls_convs = nn.ModuleList([
            nn.Conv2d(4, 8, kernel_size=1),
            nn.Conv2d(8, 16, kernel_size=1)
        ])
        self.reg_convs = nn.ModuleList([
            nn.Conv2d(4, 8, kernel_size=1),
            nn.Conv2d(8, 12, kernel_size=1)
        ])

model = MockAnchorFreeHead()

# Create a small input tensor (batch=2, channels=4, height=3, width=3)
x = torch.randn(2, 4, 3, 3)

ARGS = {
    'self': model,
    '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 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
atss_forward_prediction_single Ran
ran on a synthesized input
microsoft/RelationNet2/code/models/utils/bvr_utils.py
code served (permissive licence) · get_code("432371ded78e0429")
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.nn as nn

torch.manual_seed(0)

class ATSSHead(nn.Module):
    def __init__(self):
        super().__init__()
        self.atss_cls = nn.Linear(4, 3)
        self.atss_reg = nn.Linear(4, 4)
        self.atss_centerness = nn.Linear(4, 1)
    
    def atss_forward_prediction_single(self, cls_feat, reg_feat, scale):
        cls_score = self.atss_cls(cls_feat)
        bbox_pred = scale(self.atss_reg(reg_feat)).float()
        centerness = self.atss_centerness(reg_feat)
        return (cls_score, bbox_pred, centerness)

class ScaleModule(nn.Module):
    def __init__(self):
        super().__init__()
        self.scale = nn.Parameter(torch.ones(4))
    
    def forward(self, x):
        return x * self.scale

# Create model instance
model = ATSSHead()

# Create input tensors
cls_feat = torch.randn(2, 4)  # batch_size=2, feature_dim=4
reg_feat = torch.randn(2, 4)  # batch_size=2, feature_dim=4

# Create scale callable
scale = ScaleModule()

ARGS = {
    'self': model,
    'cls_feat': cls_feat,
    'reg_feat': reg_feat,
    'scale': scale
}
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
multi_head_attention_forward Ran
ran on a synthesized input
microsoft/RelationNet2/code/models/utils/bvr_transformer/multihead_attention.py
code served (permissive licence) · get_code("150c213138c1ac1a")
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.nn as nn
import torch.nn.functional as F

torch.manual_seed(0)

# Dimensions
embed_dim = 8
num_heads = 2
head_dim = embed_dim // num_heads
batch_size = 2
seq_len_query = 3
seq_len_key = 4

# Query, Key, Value tensors
query = torch.randn(seq_len_query, batch_size, embed_dim)
key = torch.randn(seq_len_key, batch_size, embed_dim)
value = torch.randn(seq_len_key, batch_size, embed_dim)

# Projection weights and biases
in_proj_weight = torch.randn(3 * embed_dim, embed_dim)
in_proj_bias = torch.randn(3 * embed_dim)

# Output projection weights and biases
out_proj_weight = torch.randn(embed_dim, embed_dim)
out_proj_bias = torch.randn(embed_dim)

# Optional bias for key and value
bias_k = None
bias_v = None

# Attention mask and key padding mask
attn_mask = None
key_padding_mask = None

# Static key and value (for cross-attention patterns)
static_k = None
static_v = None

# Relative attention weights
relative_atten_weights = None

# Separate projection weights (not used in this case)
q_proj_weight = None
k_proj_weight = None
v_proj_weight = None

ARGS = {
    'query': query,
    'key': key,
    'value': value,
    'embed_dim_to_check': embed_dim,
    'num_heads': num_heads,
    'in_proj_weight': in_proj_weight,
    'in_proj_bias': in_proj_bias,
    'bias_k': bias_k,
    'bias_v': bias_v,
    'add_zero_attn': False,
    'dropout_p': 0.0,
    'out_proj_weight': out_proj_weight,
    'out_proj_bias': out_proj_bias,
    'training': True,
    'key_padding_mask': key_padding_mask,
    'need_weights': True,
    'attn_mask': attn_mask,
    'use_separate_proj_weight': False,
    'q_proj_weight': q_proj_weight,
    'k_proj_weight': k_proj_weight,
    'v_proj_weight': v_proj_weight,
    'static_k': static_k,
    'static_v': static_v,
    'relative_atten_weights': relative_atten_weights,
    'app_relation': 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 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
reduce_mean Ran
ran, honoured the contract we drafted
microsoft/RelationNet2/code/models/dense_heads/keypoint_head.py
code served (permissive licence) · get_code("57ba5c957e237b5f")
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.distributed as dist

torch.manual_seed(0)

# Create a small tensor to pass as the argument
tensor = torch.randn(2, 4)

ARGS = {
    "tensor": tensor
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 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
gaussian_radius Not yet run
unverified (harvested, no recorded run)
microsoft/RelationNet2/code/core/bbox/assigners/point_kpt_assigner.py
code served (permissive licence) · get_code("fd2a3221f3c55b7f")
How it ran

no invocation recorded.

Also present in other papers' code

Of 5 samples lifted from this paper's linked repositories, 5 carry a function identity and 0 do not. Of the 5 distinct functions with an identity, 1 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 1 later) and 4 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
reduce_mean 5 other papers
5 later
2308.05581 (2023-08)
Category Feature Transformer for Semantic Segmentation
2402.02500 (2024-02)
Point Cloud Matters: Rethinking the Impact of Different Observation Spaces on Robot Learning
2410.08208 (2024-10)
SPA: 3D Spatial-Awareness Enables Effective Embodied Representation
and 2 more not named here

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

Existing object detection frameworks are usually built on a single format of object/part representation, i.e., anchor/proposal rectangle boxes in RetinaNet and Faster R-CNN, center points in FCOS and RepPoints, and corner points in CornerNet. While these different representations usually drive the frameworks to perform well in different aspects, e.g., better classification or finer localization, it is in general difficult to combine these representations in a single framework to make good use of each strength, due to the heterogeneous or non-grid feature extraction by different representations. This paper presents an attention-based decoder module similar as that in Transformer~\cite{vaswani2017attention} to bridge other representations into a typical object detector built on a single representation format, in an end-to-end fashion. The other representations act as a set of \emph{key} instances to strengthen the main \emph{query} representation features in the vanilla detectors. Novel techniques are proposed towards efficient computation of the decoder module, including a \emph{key sampling} approach and a \emph{shared location embedding} approach. The proposed module is named \emph{bridging visual representations} (BVR). It can perform in-place and we demonstrate its broad effectiveness in bridging other representations into prevalent object detection frameworks, including RetinaNet, Faster R-CNN, FCOS and ATSS, where about $1.5\sim3.0$ AP improvements are achieved. In particular, we improve a state-of-the-art framework with a strong backbone by about $2.0$ AP, reaching $52.7$ AP on COCO test-dev. The resulting network is named RelationNet++. The code will be available at https://github.com/microsoft/RelationNet2.

For agents

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

get_harvested_code_for_paper("2010.15831")
get_code_for_paper("2010.15831")
have("2010.15831")

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

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

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

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

Connect an agent — have() is free.