SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2305.07011 · CVPR · 2023

Region-Aware Pretraining for Open-Vocabulary Object Detection with Vision Transformers

Weicheng Kuo, Anelia Angelova, Dahun Kim

arXiv · PDF · Open in the Atlas

Code that ran

5 of 8 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (3 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; 1 failure of our instrument; 3 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/2305.07011.json · badge: /api/ran/2305.07011.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
google-research/google-research marked official in Papers with Code
Papers with Code archive
5 ran · 3 no recorded run
FunctionStatusWhere it lives
Encoder Ran
ran on a synthesized input · constructed an object; no result was computed
google-research/google-research/moe_mtl/modeling/vit.py
code served (permissive licence) · get_code("d8ad1a5da80c6c5a")
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, Encoder: 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 jax
import jax.numpy as jnp
import flax.linen as nn

# Set seed for reproducibility
jax.config.update('jax_default_prng_impl', 'threefry2x32')

# Create small test input
# Shape: (batch=2, seq_len=12, hidden_dim=4)
x = jnp.ones((2, 12, 4), dtype=jnp.float32)

ARGS = {
    'depth': 2,
    'mlp_dim': 16,
    'num_heads': 2,
    'dropout': 0.1,
    'stoch_depth': 0.0,
    'use_taps': False,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
absl, flax, jax — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Encoder — 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 Encoder 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
Encoder1DBlock Ran
ran on a synthesized input · constructed an object; no result was computed
google-research/google-research/moe_mtl/modeling/vit.py
code served (permissive licence) · get_code("e2cdd60f8bf0cc83")
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, Encoder1DBlock: 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 jax
import jax.numpy as jnp
import flax.linen as nn
from typing import Optional

# Create input tensor: (batch=2, sequence_length=5, embedding_dim=4)
x = jnp.ones((2, 5, 4), dtype=jnp.float32)

# Define ARGS dict with all parameters for Encoder1DBlock
ARGS = {
    'mlp_dim': 16,
    'num_heads': 2,
    'dropout': 0.1,
    'layer_drop_p': 0.0,
    'use_taps': False,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
flax, jax — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Encoder1DBlock — 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 Encoder1DBlock 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
MlpBlock Ran
ran on a synthesized input · constructed an object; no result was computed
google-research/google-research/moe_mtl/modeling/vit.py
code served (permissive licence) · get_code("6d80bcd9c94bd100")
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, MlpBlock: 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 jax
import jax.numpy as jnp
import flax.linen as nn

class MlpBlock(nn.Module):
    """Transformer MLP / feed-forward block."""
    mlp_dim: int = None
    dropout: float = 0.0

    @nn.compact
    def __call__(self, x, deterministic=True):
        """Applies Transformer MlpBlock module."""
        inits = dict(kernel_init=nn.initializers.xavier_uniform(), bias_init=nn.initializers.normal(stddev=1e-06))
        n, l, d = x.shape
        x = nn.Dense(self.mlp_dim or 4 * d, **inits)(x)
        x = nn.gelu(x)
        x = nn.Dropout(rate=self.dropout)(x, deterministic)
        x = nn.Dense(d, **inits)(x)
        return x

# Create test input: (batch=2, sequence_length=3, embedding_dim=4)
x = jnp.ones((2, 3, 4), dtype=jnp.float32)

# Initialize the module
mlp_block = MlpBlock(mlp_dim=16, dropout=0.1)

# Initialize parameters
key = jax.random.PRNGKey(0)
params = mlp_block.init(key, x)

# Create arguments dict
ARGS = {
    "mlp_dim": 16,
    "dropout": 0.1,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
flax, jax — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type MlpBlock — 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 MlpBlock 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_posemb Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
google-research/google-research/moe_mtl/modeling/vit.py
code served (permissive licence) · get_code("a8f77cb87a6eb75b")
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 ArrayImpl, ndim 3, dtype family float, shape (1, 12, 8) 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 jax
import jax.numpy as jnp
import numpy as np
import flax.linen as nn
from functools import partial

# Create a minimal Flax Module that has the param method
class DummyModule(nn.Module):
    def setup(self):
        pass
    
    def __call__(self, x):
        return x

# Instantiate the module
dummy_module = DummyModule()

# Create a function that simulates the get_posemb method
def get_posemb(self, typ, seqshape, width, name, dtype=jnp.float32):
    if typ == 'learn':
        return self.param(name, nn.initializers.normal(stddev=1 / np.sqrt(width)), (1, np.prod(seqshape), width), dtype)
    elif typ == 'sincos2d':
        def posemb_sincos_2d(h, w, width, temperature=10000.0, dtype=jnp.float32):
            """Follows the MoCo v3 logic."""
            y, x = jnp.mgrid[:h, :w]
            assert width % 4 == 0, 'Width must be mult of 4 for sincos posemb'
            omega = jnp.arange(width // 4) / (width // 4 - 1)
            omega = 1.0 / temperature ** omega
            y = jnp.einsum('m,d->md', y.flatten(), omega)
            x = jnp.einsum('m,d->md', x.flatten(), omega)
            pe = jnp.concatenate([jnp.sin(x), jnp.cos(x), jnp.sin(y), jnp.cos(y)], axis=1)
            return jnp.asarray(pe, dtype)[None, :, :]
        return posemb_sincos_2d(*seqshape, width, dtype=dtype)
    else:
        raise ValueError(f'Unknown posemb type: {typ}')

# Bind the method to the dummy module
dummy_module.get_posemb = partial(get_posemb, dummy_module)

# Define arguments for the function
ARGS = {
    'self': dummy_module,
    'typ': 'sincos2d',
    'seqshape': (3, 4),
    'width': 8,
    'name': 'pos_emb',
    'dtype': jnp.float32
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
flax, jax, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ArrayImpl, ndim 3, dtype family float, shape (1, 12, 8) — shape (1, 12, 8) 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
posemb_sincos_2d Ran
ran, honoured the contract we drafted
google-research/google-research/moe_mtl/modeling/vit.py
code served (permissive licence) · get_code("2d67a8a756fe7cf8")
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 ArrayImpl, ndim 3, dtype family float, shape (1, 12, 8) 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 jax.numpy as jnp

ARGS = {
    'h': 4,
    'w': 3,
    'width': 8,
    'temperature': 10000.0,
    'dtype': jnp.float32,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
jax — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ArrayImpl, ndim 3, dtype family float, shape (1, 12, 8) — shape (1, 12, 8) 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
Model Not yet run
unverified (harvested, no recorded run)
google-research/google-research/moe_mtl/modeling/vit.py
code served (permissive licence) · get_code("6aec67ee501d1501")
How it ran

no invocation recorded.

window_merge Not yet run
unverified (harvested, no recorded run)
google-research/google-research/moe_mtl/modeling/vit.py
code served (permissive licence) · get_code("6c0a4f49af0bfb40")
How it ran

no invocation recorded.

window_partition Not yet run
unverified (harvested, no recorded run)
google-research/google-research/moe_mtl/modeling/vit.py
code served (permissive licence) · get_code("476400e99387d750")
How it ran

no invocation recorded.

Also present in other papers' code

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

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

FunctionAlso present inEarliest-datedOthers named
posemb_sincos_2d
brick of this paper's assembly: helper
5 other papers
1 dated earlier, 4 later
2205.01580 (2022-05)
Better plain ViT baselines for ImageNet-1k
2309.16588 (2023-09)
Vision Transformers Need Registers
2310.13807 (2023-10)
Learning to (Learn at Test Time)
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

We present Region-aware Open-vocabulary Vision Transformers (RO-ViT) -a contrastive image-text pretraining recipe to bridge the gap between image-level pretraining and open-vocabulary object detection. At the pretraining phase, we propose to randomly crop and resize regions of positional embeddings instead of using the whole image positional embeddings. This better matches the use of positional embeddings at region-level in the detection finetuning phase. In addition, we replace the common softmax cross entropy loss in contrastive learning with focal loss to better learn the informative yet difficult examples. Finally, we leverage recent advances in novel object proposals to improve open-vocabulary detection finetuning. We evaluate our full model on the LVIS and COCO open-vocabulary detection benchmarks and zero-shot transfer. RO-ViT achieves a state-of-the-art 32.1 AP r on LVIS, surpassing the best existing approach by +5.8 points in addition to competitive zero-shot transfer detection. Surprisingly, RO-ViT improves the image-level representation as well and achieves the state of the art on 9 out of 12 metrics on COCO and Flickr imagetext retrieval benchmarks, outperforming competitive approaches with larger models.

For agents

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

get_harvested_code_for_paper("2305.07011")
get_code_for_paper("2305.07011")
have("2305.07011")

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

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

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

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

Connect an agent — have() is free.