SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2104.11227 · ICCV · 2021

Multiscale Vision Transformers

Jitendra Malik, Karttikeya Mangalam, Christoph Feichtenhofer, Haoqi Fan, Yanghao Li, Bo Xiong, Zhicheng Yan

arXiv · PDF · Open in the Atlas

Code that ran

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

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2104.11227.json · badge: /api/ran/2104.11227.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
towhee-io/towhee community
Papers with Code archive
11 ran · 10 no recorded run
rohanshad/cmr_transformer community
Papers with Code archive
2 ran · 3 no recorded run
FunctionStatusWhere it lives
AttentionPool Ran
ran on a synthesized input · constructed an object; no result was computed
towhee-io/towhee/towhee/models/multiscale_vision_transformers/mvit.py
code served (permissive licence) · get_code("aabc00fba35e5b60")
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, AttentionPool: 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 einops import rearrange

torch.manual_seed(0)

# Create a minimal pool operation that works with the expected input shape
class MinimalPool(nn.Module):
    def forward(self, x):
        # x shape: (b*n, c, t, h, w)
        # Simple average pooling that reduces spatial dimensions
        return torch.nn.functional.avg_pool3d(x, kernel_size=(1, 2, 2), stride=(1, 2, 2))
    
    def relprop(self, cam, **kwargs):
        # For relprop, just return the input as-is (minimal implementation)
        return cam

# Create a minimal normalization operation
class MinimalNorm(nn.Module):
    def forward(self, x):
        # Simple layer norm
        return torch.nn.functional.layer_norm(x, normalized_shape=x.shape[-1:])
    
    def relprop(self, cam, **kwargs):
        # For relprop, just return the input as-is
        return cam

# Construct the ARGS dictionary
ARGS = {
    'pool': MinimalPool(),
    'has_cls_embed': True,
    'norm': MinimalNorm(),
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
einops, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type AttentionPool — 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 AttentionPool 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
DropPath Ran
ran on a synthesized input · constructed an object; no result was computed
towhee-io/towhee/towhee/models/multiscale_vision_transformers/mvit.py
code served (permissive licence) · get_code("8eadaa524165fa27")
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, DropPath: 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)

# DropPath.__init__ takes drop_prob as parameter
# The forward method calls drop_path_func with x, self.drop_prob, and self.training
# We need to provide a valid drop_prob value

ARGS = {
    "drop_prob": 0.1
}
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 DropPath — 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 DropPath 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
LayerNorm Ran
ran on a synthesized input · constructed an object; no result was computed
towhee-io/towhee/towhee/models/multiscale_vision_transformers/mvit.py
code served (permissive licence) · get_code("137b894a55248107")
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, LayerNorm: 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)

# LayerNorm inherits from nn.LayerNorm and RelProp
# nn.LayerNorm.__init__ signature:
# nn.LayerNorm(normalized_shape, eps=1e-05, elementwise_affine=True, bias=True, device=None, dtype=None)

# We need to provide:
# 1. normalized_shape: int or list of ints - the shape of the input to be normalized
# 2. eps: float (optional, has default)
# 3. elementwise_affine: bool (optional, has default)
# 4. bias: bool (optional, has default)
# 5. device: optional
# 6. dtype: optional

ARGS = {
    "normalized_shape": 4,
    "eps": 1e-5,
    "elementwise_affine": True,
    "bias": True,
    "device": None,
    "dtype": None,
}
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 LayerNorm — 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 LayerNorm 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
MaxPool3d Ran
ran on a synthesized input · constructed an object; no result was computed
towhee-io/towhee/towhee/models/multiscale_vision_transformers/mvit.py
code served (permissive licence) · get_code("11bb9021dd0d5f1d")
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, MaxPool3d: 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)

# MaxPool3d inherits from nn.MaxPool3d and RelPropSimple
# nn.MaxPool3d.__init__ takes: kernel_size, stride, padding, dilation, ceil_mode, return_indices
# We need to construct a valid input tensor for forward pass

# Create a small 5D input tensor (batch, channels, depth, height, width)
input_tensor = torch.randn(2, 3, 4, 5, 6)

# MaxPool3d parameters
kernel_size = 2
stride = 1
padding = 0
dilation = 1
ceil_mode = False
return_indices = False

ARGS = {
    'kernel_size': kernel_size,
    'stride': stride,
    'padding': padding,
    'dilation': dilation,
    'ceil_mode': ceil_mode,
    'return_indices': return_indices,
}
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 MaxPool3d — 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 MaxPool3d 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
Mlp Ran
ran on a synthesized input · constructed an object; no result was computed
towhee-io/towhee/towhee/models/multiscale_vision_transformers/mvit.py
code served (permissive licence) · get_code("9220e80dfcec043a")
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, Mlp: 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 torch.nn import GELU as OrigGELU

torch.manual_seed(0)

# Define the custom modules from the provided code
class RelProp(nn.Module):
    def __init__(self):
        super().__init__()
        self.register_forward_hook(forward_hook)

    def gradprop(self, z, x, s):
        c = torch.autograd.grad(z, x, s, retain_graph=True)
        return c

    def relprop(self, r, alpha):
        _ = alpha
        return r

def forward_hook(self, inp, output):
    if type(inp[0]) in (list, tuple):
        self.x = []
        for i in inp[0]:
            x = i.detach()
            x.requires_grad = True
            self.x.append(x)
    else:
        self.x = inp[0].detach()
        self.x.requires_grad = True
    self.y = output

def safe_divide(a, b):
    den = b.clamp(min=1e-09) + b.clamp(max=1e-09)
    den = den + den.eq(0).type(den.type()) * 1e-09
    return a / den * b.ne(0).type(b.type())

class Dropout(nn.Dropout, RelProp):
    pass

class GELU(OrigGELU, RelProp):
    pass

class Linear(nn.Linear, RelProp):
    def relprop(self, r, alpha):
        import torch.nn.functional as F
        beta = alpha - 1
        pw = torch.clamp(self.weight, min=0)
        nw = torch.clamp(self.weight, max=0)
        px = torch.clamp(self.x, min=0)
        nx = torch.clamp(self.x, max=0)

        def f(w1, w2, x1, x2):
            z1 = F.linear(x1, w1)
            z2 = F.linear(x2, w2)
            s1 = safe_divide(r, z1 + z2)
            s2 = safe_divide(r, z1 + z2)
            c1 = x1 * torch.autograd.grad(z1, x1, s1)[0]
            c2 = x2 * torch.autograd.grad(z2, x2, s2)[0]
            return c1 + c2
        activator_relevances = f(pw, nw, px, nx)
        inhibitor_relevances = f(nw, pw, px, nx)
        r = alpha * activator_relevances - beta * inhibitor_relevances
        return r

class Mlp(nn.Module):
    def __init__(self, in_features, hidden_features=None, out_features=None, act_layer=GELU, drop_rate=0.0):
        super().__init__()
        self.drop_rate = drop_rate
        out_features = out_features or in_features
        hidden_features = hidden_features or in_features
        self.fc1 = Linear(in_features, hidden_features)
        self.act = act_layer()
        self.fc2 = Linear(hidden_features, out_features)
        if self.drop_rate > 0.0:
            self.drop = Dropout(drop_rate)

    def forward(self, x):
        x = self.fc1(x)
        x = self.act(x)
        if self.drop_rate > 0.0:
            x = self.drop(x)
        x = self.fc2(x)
        if self.drop_rate > 0.0:
            x = self.drop(x)
        return x

    def relprop(self, cam, **kwargs):
        if self.drop_rate > 0.0:
            cam = self.drop.relprop(cam, **kwargs)
        cam = self.fc2.relprop(cam, **kwargs)
        if self.drop_rate > 0.0:
            cam = self.drop.relprop(cam, **kwargs)
        cam = self.act.relprop(cam, **kwargs)
        cam = self.fc1.relprop(cam, **kwargs)
        return cam

# Define arguments for Mlp instantiation
ARGS = {
    "in_features": 4,
    "hidden_features": 8,
    "out_features": 3,
    "act_layer": GELU,
    "drop_rate": 0.1,
}
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 Mlp — 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 Mlp 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
MultiscaleVisionTransformers Ran
ran on a synthesized input · constructed an object; no result was computed
rohanshad/cmr_transformer/arch/mvit.py
pointer only (licence: NOASSERTION) · get_code("73d46d814f26bc08")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, rohanshad/cmr_transformer (NOASSERTION). The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

PatchEmbed Ran
ran on a synthesized input · constructed an object; no result was computed
towhee-io/towhee/towhee/models/multiscale_vision_transformers/mvit.py
code served (permissive licence) · get_code("56cfb3a853df70e9")
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, PatchEmbed: 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

torch.manual_seed(0)

ARGS = {
    'dim_in': 3,
    'dim_out': 768,
    'kernel': (1, 16, 16),
    'stride': (1, 4, 4),
    'padding': (1, 7, 7),
    'conv_2d': 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 PatchEmbed — 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 PatchEmbed 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
Sigmoid Ran
ran on a synthesized input · constructed an object; no result was computed
towhee-io/towhee/towhee/models/multiscale_vision_transformers/mvit.py
code served (permissive licence) · get_code("ca6f8c79a4ba5eea")
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, Sigmoid: 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)

class Sigmoid(nn.Sigmoid):
    """Minimal Sigmoid implementation for testing"""
    pass

# Create a simple instance of Sigmoid
sigmoid_model = Sigmoid()

# The Sigmoid class inherits from nn.Sigmoid which is a standard PyTorch module
# nn.Sigmoid takes no required arguments in __init__
# The forward method takes an input tensor

# Create a small input tensor (batch_size=2, features=4)
input_tensor = torch.randn(2, 4)

# ARGS dictionary mapping parameters
ARGS = {
}
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 Sigmoid — 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 Sigmoid 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
SpatioTemporalClsPositionalEncoding Ran
ran on a synthesized input · constructed an object; no result was computed
rohanshad/cmr_transformer/arch/mvit.py
pointer only (licence: NOASSERTION) · get_code("8e8401b5c2cbe9af")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, rohanshad/cmr_transformer (NOASSERTION). The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

TransformerBasicHead Ran
ran on a synthesized input · constructed an object; no result was computed
towhee-io/towhee/towhee/models/multiscale_vision_transformers/mvit.py
code served (permissive licence) · get_code("a84009ea4b4e7411")
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, TransformerBasicHead: 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
import torch.nn.functional as F

torch.manual_seed(0)

# Build the custom Linear class from the code
class RelProp(nn.Module):
    def __init__(self):
        super().__init__()
        self.register_forward_hook(forward_hook)

    def gradprop(self, z, x, s):
        c = torch.autograd.grad(z, x, s, retain_graph=True)
        return c

    def relprop(self, r, alpha):
        _ = alpha
        return r

class Sigmoid(nn.Sigmoid, RelProp):
    pass

class Softmax(nn.Softmax, RelProp):
    pass

def forward_hook(self, inp, output):
    if type(inp[0]) in (list, tuple):
        self.x = []
        for i in inp[0]:
            x = i.detach()
            x.requires_grad = True
            self.x.append(x)
    else:
        self.x = inp[0].detach()
        self.x.requires_grad = True
    self.y = output

def safe_divide(a, b):
    den = b.clamp(min=1e-09) + b.clamp(max=1e-09)
    den = den + den.eq(0).type(den.type()) * 1e-09
    return a / den * b.ne(0).type(b.type())

class Linear(nn.Linear, RelProp):
    def relprop(self, r, alpha):
        beta = alpha - 1
        pw = torch.clamp(self.weight, min=0)
        nw = torch.clamp(self.weight, max=0)
        px = torch.clamp(self.x, min=0)
        nx = torch.clamp(self.x, max=0)

        def f(w1, w2, x1, x2):
            z1 = F.linear(x1, w1)
            z2 = F.linear(x2, w2)
            s1 = safe_divide(r, z1 + z2)
            s2 = safe_divide(r, z1 + z2)
            c1 = x1 * torch.autograd.grad(z1, x1, s1)[0]
            c2 = x2 * torch.autograd.grad(z2, x2, s2)[0]
            return c1 + c2
        activator_relevances = f(pw, nw, px, nx)
        inhibitor_relevances = f(nw, pw, px, nx)
        r = alpha * activator_relevances - beta * inhibitor_relevances
        return r

class Softmax(nn.Softmax, RelProp):
    pass

class TransformerBasicHead(nn.Module):
    def __init__(self, dim_in, num_classes, dropout_rate=0.0, act_func='softmax'):
        super().__init__()
        if dropout_rate > 0.0:
            self.dropout = nn.Dropout(dropout_rate)
        self.projection = Linear(dim_in, num_classes, bias=True)
        if act_func == 'softmax':
            self.act = Softmax(dim=1)
        elif act_func == 'sigmoid':
            self.act = Sigmoid()
        else:
            raise NotImplementedError(f'{act_func} is not supported as an activationfunction.')

    def forward(self, x):
        if hasattr(self, 'dropout'):
            x = self.dropout(x)
        x = self.projection(x)
        if not self.training:
            x = self.act(x)
        return x

    def relprop(self, cam, **kwargs):
        if not self.training:
            cam = self.act.relprop(cam, **kwargs)
        cam = self.projection.relprop(cam, **kwargs)
        if hasattr(self, 'dropout'):
            cam = self.dropout.relprop(cam, **kwargs)
        return cam

# Create test inputs
dim_in = 8
num_classes = 3
dropout_rate = 0.1
act_func = 'softmax'

ARGS = {
    'dim_in': dim_in,
    'num_classes': num_classes,
    'dropout_rate': dropout_rate,
    'act_func': act_func
}
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 TransformerBasicHead — 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 TransformerBasicHead 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
drop_path_func Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
towhee-io/towhee/towhee/models/multiscale_vision_transformers/mvit.py
code served (permissive licence) · get_code("63080b2b0157a638")
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, 3) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

# Create a small tensor for testing
# Shape: (batch_size=2, channels=4, height=3, width=3) - 4D tensor
x = torch.randn(2, 4, 3, 3, dtype=torch.float32)

# Define arguments for drop_path_func
ARGS = {
    "x": x,
    "drop_prob": 0.5,
    "training": 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 Tensor, ndim 4, dtype family float, shape (2, 4, 3, 3) — shape (2, 4, 3, 3) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
find_most_h_w Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
towhee-io/towhee/towhee/models/multiscale_vision_transformers/mvit.py
code served (permissive licence) · get_code("fa1b9bbe882fd839")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple, ndim 1, dtype family int; 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 all_layer_matrices to be an iterable of tensors
# It accesses .shape[-2] and .shape[-1] for each tensor
# So we need a list of tensors with at least 2 dimensions

all_layer_matrices = [
    torch.randn(2, 4, 3, 5),  # shape[-2]=3, shape[-1]=5
    torch.randn(2, 4, 3, 5),  # shape[-2]=3, shape[-1]=5
    torch.randn(2, 4, 3, 5),  # shape[-2]=3, shape[-1]=5
]

ARGS = {
    "all_layer_matrices": all_layer_matrices
}
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, ndim 1, dtype family int — a tuple output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
round_width Ran
ran, honoured the contract we drafted
towhee-io/towhee/towhee/models/multiscale_vision_transformers/mvit.py
code served (permissive licence) · get_code("c828b94ed536888e")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned int, ndim 0, dtype family int, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np

torch.manual_seed(0)

# Analyze the function:
# - width: numeric (int or float) - used in arithmetic operations
# - multiplier: numeric - used in arithmetic, checked with "if not multiplier"
# - min_width: numeric, default=1 - used in max() and "or" operator
# - divisor: numeric, default=1 - used in arithmetic operations
# All parameters are simple numeric types

ARGS = {
    "width": 64,
    "multiplier": 2.0,
    "min_width": 1,
    "divisor": 8,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type int, ndim 0, dtype family int, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
Add Not yet run
unverified (harvested, no recorded run)
towhee-io/towhee/towhee/models/multiscale_vision_transformers/mvit.py
code served (permissive licence) · get_code("e085e89664c8c8f1")
How it ran

no invocation recorded.

Clone Not yet run
unverified (harvested, no recorded run)
towhee-io/towhee/towhee/models/multiscale_vision_transformers/mvit.py
code served (permissive licence) · get_code("c8f04d0354d412d8")
How it ran

no invocation recorded.

Conv3d Not yet run
unverified (harvested, no recorded run)
towhee-io/towhee/towhee/models/multiscale_vision_transformers/mvit.py
code served (permissive licence) · get_code("f51d56342db748dc")
How it ran

no invocation recorded.

IndexSelect Not yet run
unverified (harvested, no recorded run)
towhee-io/towhee/towhee/models/multiscale_vision_transformers/mvit.py
code served (permissive licence) · get_code("c6b33d8045bad24a")
How it ran

no invocation recorded.

MViT Not yet run
unverified (harvested, no recorded run)
towhee-io/towhee/towhee/models/multiscale_vision_transformers/mvit.py
code served (permissive licence) · get_code("b3cb3600d1ec619e")
How it ran

no invocation recorded.

MultiScaleAttention Not yet run
unverified (harvested, no recorded run)
towhee-io/towhee/towhee/models/multiscale_vision_transformers/mvit.py
code served (permissive licence) · get_code("d0c301eed0a9217c")
How it ran

no invocation recorded.

MultiScaleBlock Not yet run
unverified (harvested, no recorded run)
towhee-io/towhee/towhee/models/multiscale_vision_transformers/mvit.py
code served (permissive licence) · get_code("2e7ddef56b034315")
How it ran

no invocation recorded.

_init_vit_weights Not yet run
unverified (harvested, no recorded run)
rohanshad/cmr_transformer/arch/mvit.py
pointer only (licence: NOASSERTION) · get_code("31c2f4da4c4a0948")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, rohanshad/cmr_transformer (NOASSERTION). The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

align_scale Not yet run
unverified (harvested, no recorded run)
towhee-io/towhee/towhee/models/multiscale_vision_transformers/mvit.py
code served (permissive licence) · get_code("4038555957e35d15")
How it ran

no invocation recorded.

compute_rollout_attention Not yet run
unverified (harvested, no recorded run)
towhee-io/towhee/towhee/models/multiscale_vision_transformers/mvit.py
code served (permissive licence) · get_code("59e53e1981813f80")
How it ran

no invocation recorded.

init_net_weights Not yet run
unverified (harvested, no recorded run)
rohanshad/cmr_transformer/arch/mvit.py
pointer only (licence: NOASSERTION) · get_code("081229a28d5f0e17")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, rohanshad/cmr_transformer (NOASSERTION). The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

resize_last_dim_to_most Not yet run
unverified (harvested, no recorded run)
towhee-io/towhee/towhee/models/multiscale_vision_transformers/mvit.py
code served (permissive licence) · get_code("a6b157934033010d")
How it ran

no invocation recorded.

set_attributes Not yet run
unverified (harvested, no recorded run)
rohanshad/cmr_transformer/arch/mvit.py
pointer only (licence: NOASSERTION) · get_code("f69f7538b6980470")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, rohanshad/cmr_transformer (NOASSERTION). The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

Also present in other papers' code

Of 26 samples lifted from this paper's linked repositories, 26 carry a function identity and 0 do not. Of the 26 distinct functions with an identity, 3 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 3 later) and 23 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
align_scale
brick of this paper's assembly: helper
1 other paper
1 later
2403.05856 (2024-03)
POV: Prompt-Oriented View-Agnostic Learning for Egocentric Hand-Object Interaction in the Multi-View World
find_most_h_w
brick of this paper's assembly: helper
1 other paper
1 later
2403.05856 (2024-03)
POV: Prompt-Oriented View-Agnostic Learning for Egocentric Hand-Object Interaction in the Multi-View World
resize_last_dim_to_most
brick of this paper's assembly: helper
1 other paper
1 later
2403.05856 (2024-03)
POV: Prompt-Oriented View-Agnostic Learning for Egocentric Hand-Object Interaction in the Multi-View World

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

Repositories linked to this paper

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

Abstract

We present Multiscale Vision Transformers (MViT) for video and image recognition, by connecting the seminal idea of multiscale feature hierarchies with transformer models. Multiscale Transformers have several channel-resolution scale stages. Starting from the input resolution and a small channel dimension, the stages hierarchically expand the channel capacity while reducing the spatial resolution. This creates a multiscale pyramid of features with early layers operating at high spatial resolution to model simple low-level visual information, and deeper layers at spatially coarse, but complex, high-dimensional features. We evaluate this fundamental architectural prior for modeling the dense nature of visual signals for a variety of video recognition tasks where it outperforms concurrent vision transformers that rely on large scale external pre-training and are 5-10× more costly in computation and parameters. We further remove the temporal dimension and apply our model for image classification where it outperforms prior work on vision transformers. Code is available at: https: //github.com/facebookresearch/SlowFast.

For agents

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

get_harvested_code_for_paper("2104.11227")
get_code_for_paper("2104.11227")
have("2104.11227")

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

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

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

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

Connect an agent — have() is free.