SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2103.15691 · ICCV · 2021

ViViT: A Video Vision Transformer

Mostafa Dehghani, Georg Heigold, Cordelia Schmid, Anurag Arnab, Chen Sun, Mario Lučić, Mlp Head, Factorised L×

arXiv · PDF · Open in the Atlas

Code that ran

14 of 21 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 12 have no contract verdict; 1 failure of our instrument; 7 no recorded run); 1 of them was also run on the host, not in the jail, by the peer-agreement lane that set its level, 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/2103.15691.json · badge: /api/ran/2103.15691.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
SforAiDl/vformer community
Papers with Code archive
4 ran · 2 no recorded run
drv-agwl/ViViT-pytorch community
Papers with Code archive
4 ran · 1 no recorded run
KSonPham/ViVit-a-Pytorch-implementation community
Papers with Code archive
3 ran · 4 no recorded run
rishikksh20/ViViT-pytorch community
Papers with Code archive
2 ran · 0 no recorded run
copy not recorded community
not in the paper's declared repositories
1 ran · 0 no recorded run
FunctionStatusWhere it lives
np2th Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
this paper's copy was not recorded; identical code first harvested from jeonsworld/ViT-pytorch
pointer only · get_code("7d8eaf5537f699e4")
How it ran

The body of this sample is withheld: this paper's copy of the code was not recorded (its link names no repository or source path), so no licence was read for it. 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.

Attention Ran
ran on a synthesized input · constructed an object; no result was computed
KSonPham/ViVit-a-Pytorch-implementation/models/modeling.py
code served (permissive licence) · get_code("9650a9a4002b76d8")
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, Attention: 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 math
import torch
import torch.nn as nn
from torch.nn import CrossEntropyLoss, Dropout, Softmax, Linear, LayerNorm

torch.manual_seed(0)

class Config:
    def __init__(self):
        self.hidden_size = 8
        self.transformer = {
            'num_heads': 2,
            'attention_dropout_rate': 0.1
        }

config = Config()
vis = False
hidden_states = torch.randn(2, 4, 8)

ARGS = {
    'config': config,
    'vis': vis
}
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 Attention — 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 Attention 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
BaseClassificationModel Ran
ran on a synthesized input · constructed an object; no result was computed
SforAiDl/vformer/vformer/models/classification/vivit.py
code served (permissive licence) · get_code("f7522b96704eba2a")
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, BaseClassificationModel: 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 = {
    'img_size': 224,
    'patch_size': 16,
    'in_channels': 3,
    'pool': 'cls'
}
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 BaseClassificationModel — 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 BaseClassificationModel 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
Embeddings3D Ran
ran on a synthesized input · constructed an object; no result was computed
KSonPham/ViVit-a-Pytorch-implementation/models/modeling.py
code served (permissive licence) · get_code("4a0e3dfe29d9f024")
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, Embeddings3D: 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)

# Create a minimal config class that provides the required attributes
class MinimalConfig:
    def __init__(self):
        self.patches = {'size': (2, 2, 2)}
        self.hidden_size = 4
        self.transformer = {'dropout_rate': 0.1}

config = MinimalConfig()

# Define ARGS with all parameters for Embeddings3D.__init__
ARGS = {
    'config': config,
    'img_size': 4,
    'num_frame': 4,
    'in_channels': 3,
    'temporal': 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 Embeddings3D — 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 Embeddings3D 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
FDATransformerEncoder Ran
ran on a synthesized input · constructed an object; no result was computed
drv-agwl/ViViT-pytorch/models.py
code served (permissive licence) · get_code("74f97add2ae8db6e")
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, FDATransformerEncoder: 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': 64,
    'depth': 2,
    'heads': 8,
    'dim_head': 8,
    'mlp_dim': 256,
    'nt': 4,
    'nh': 3,
    'nw': 3,
    'dropout': 0.1,
}
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 FDATransformerEncoder — 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 FDATransformerEncoder 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
FDAttention Ran
ran on a synthesized input · constructed an object; no result was computed
drv-agwl/ViViT-pytorch/models.py
code served (permissive licence) · get_code("f4f644381533aebd")
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, FDAttention: 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)

# FDAttention expects:
# - dim: feature dimension
# - nt: number of temporal frames
# - nh: number of spatial height blocks
# - nw: number of spatial width blocks
# - heads: number of attention heads (must be even for the .chunk(2, dim=1) operation)
# - dim_head: dimension per head
# - dropout: dropout probability

# The forward pass processes input of shape (b, n, d) where:
# n = nt * nh * nw (sequence length combining temporal and spatial dimensions)
# d = dim (feature dimension)

# Let's construct valid arguments:
# - dim = 64 (feature dimension)
# - nt = 2 (temporal frames)
# - nh = 2 (spatial height blocks)
# - nw = 3 (spatial width blocks)
# - heads = 8 (must be even, will be chunked into 4+4)
# - dim_head = 8 (so inner_dim = 8*8 = 64)
# - dropout = 0.1

dim = 64
nt = 2
nh = 2
nw = 3
heads = 8
dim_head = 8
dropout = 0.1

# Create input tensor of shape (batch=2, n=nt*nh*nw=12, d=64)
batch_size = 2
n = nt * nh * nw  # 2 * 2 * 3 = 12
x = torch.randn(batch_size, n, dim)

ARGS = {
    'dim': dim,
    'nt': nt,
    'nh': nh,
    'nw': nw,
    'heads': heads,
    'dim_head': dim_head,
    'dropout': dropout,
}
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 FDAttention — 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 FDAttention 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
FSATransformerEncoder Ran
ran on a synthesized input · constructed an object; no result was computed
drv-agwl/ViViT-pytorch/models.py
code served (permissive licence) · get_code("fc843fa02ae99869")
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, FSATransformerEncoder: 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": 64,
    "depth": 2,
    "heads": 4,
    "dim_head": 16,
    "mlp_dim": 128,
    "nt": 2,
    "nh": 3,
    "nw": 4,
    "dropout": 0.1,
}
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 FSATransformerEncoder — 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 FSATransformerEncoder 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
FSAttention Ran
ran on a synthesized input · constructed an object; no result was computed
drv-agwl/ViViT-pytorch/models.py
code served (permissive licence) · get_code("2261806fbb78432d")
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, FSAttention: 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, repeat

torch.manual_seed(0)

ARGS = {
    "dim": 64,
    "heads": 8,
    "dim_head": 8,
    "dropout": 0.1,
}
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 FSAttention — 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 FSAttention 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
MLPDecoder Ran
ran on a synthesized input · constructed an object; no result was computed
SforAiDl/vformer/vformer/models/classification/vivit.py
code served (permissive licence) · get_code("f04db9370cd8032a")
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, MLPDecoder: 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)

# Examine MLPDecoder.__init__ to see what parameters it takes:
# - config: int or tuple or list, defaults to (1024,)
# - n_classes: int, defaults to 10

# The config parameter is used to construct layers
# n_classes is used as the final output dimension

ARGS = {
    "config": (512, 256),
    "n_classes": 10
}
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 MLPDecoder — 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 MLPDecoder 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
KSonPham/ViVit-a-Pytorch-implementation/models/modeling.py
code served (permissive licence) · get_code("35965045e79a53f5")
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 CrossEntropyLoss, Dropout, Softmax, Linear, LayerNorm

torch.manual_seed(0)

class Config:
    def __init__(self):
        self.hidden_size = 4
        self.transformer = {
            'mlp_dim': 8,
            'dropout_rate': 0.1
        }

config = Config()

ARGS = {
    'config': config
}
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
Registry Ran
ran on a synthesized input · constructed an object; no result was computed
SforAiDl/vformer/vformer/models/classification/vivit.py
code served (permissive licence) · get_code("20fb836cf685bd0e")
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, Registry: 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)

# Define ARGS with the single parameter for Registry.__init__
ARGS = {
    "name": "model_registry"
}
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 Registry — 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 Registry 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
Transformer Ran
ran on a synthesized input
rishikksh20/ViViT-pytorch/vivit.py
code served (permissive licence) · get_code("acb104726aac5d2f")
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, shape (2, 3, 4) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
from torch import nn, einsum
from einops import rearrange, repeat

class Attention(nn.Module):

    def __init__(self, dim, heads=8, dim_head=64, dropout=0.0):
        super().__init__()
        inner_dim = dim_head * heads
        project_out = not (heads == 1 and dim_head == dim)
        self.heads = heads
        self.scale = dim_head ** (-0.5)
        self.to_qkv = nn.Linear(dim, inner_dim * 3, bias=False)
        self.to_out = nn.Sequential(nn.Linear(inner_dim, dim), nn.Dropout(dropout)) if project_out else nn.Identity()

    def forward(self, x):
        b, n, _, h = (*x.shape, self.heads)
        qkv = self.to_qkv(x).chunk(3, dim=-1)
        q, k, v = map(lambda t: rearrange(t, 'b n (h d) -> b h n d', h=h), qkv)
        dots = einsum('b h i d, b h j d -> b h i j', q, k) * self.scale
        attn = dots.softmax(dim=-1)
        out = einsum('b h i j, b h j d -> b h i d', attn, v)
        out = rearrange(out, 'b h n d -> b n (h d)')
        out = self.to_out(out)
        return out

class FeedForward(nn.Module):

    def __init__(self, dim, hidden_dim, dropout=0.0):
        super().__init__()
        self.net = nn.Sequential(nn.Linear(dim, hidden_dim), nn.GELU(), nn.Dropout(dropout), nn.Linear(hidden_dim, dim), nn.Dropout(dropout))

    def forward(self, x):
        return self.net(x)

class PreNorm(nn.Module):

    def __init__(self, dim, fn):
        super().__init__()
        self.norm = nn.LayerNorm(dim)
        self.fn = fn

    def forward(self, x, **kwargs):
        return self.fn(self.norm(x), **kwargs)

class Transformer(nn.Module):

    def __init__(self, dim, depth, heads, dim_head, mlp_dim, dropout=0.0):
        super().__init__()
        self.layers = nn.ModuleList([])
        self.norm = nn.LayerNorm(dim)
        for _ in range(depth):
            self.layers.append(nn.ModuleList([PreNorm(dim, Attention(dim, heads=heads, dim_head=dim_head, dropout=dropout)), PreNorm(dim, FeedForward(dim, mlp_dim, dropout=dropout))]))

    def forward(self, x):
        for attn, ff in self.layers:
            x = attn(x) + x
            x = ff(x) + x
        return self.norm(x)

INIT_ARGS = {
    'dim': 4,
    'depth': 2,
    'heads': 2,
    'dim_head': 2,
    'mlp_dim': 8,
    'dropout': 0.0
}

ARGS = {
    'x': torch.randn(2, 3, 4)
}

if __name__ == '__main__':
    model = Transformer(**INIT_ARGS)
    output = model(**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
einops, 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, shape (2, 3, 4) — shape (2, 3, 4) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
ViViT Ran
ran on a synthesized input
rishikksh20/ViViT-pytorch/vivit.py
code served (permissive licence) · get_code("2aecd388beda0ef3")
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 2, 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 numpy as np
from torch import nn

INIT_ARGS = {
    'image_size': 8,
    'patch_size': 2,
    'num_classes': 5,
    'num_frames': 3,
    'dim': 4,
    'depth': 2,
    'heads': 2,
    'pool': 'cls',
    'in_channels': 3,
    'dim_head': 4,
    'dropout': 0.0,
    'emb_dropout': 0.0,
    'scale_dim': 2
}

ARGS = {
    'x': torch.randn(2, 3, 3, 8, 8)  # (batch, time, channels, height, width)
}
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
Imports
einops, 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 2, 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)
pair Ran
ran, honoured the contract we drafted
SforAiDl/vformer/vformer/models/classification/vivit.py
code served (permissive licence) · get_code("7deb3c28da2b4c81")
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 'pair' takes a parameter 't' which can be either:
# - a tuple of ints
# - an int
# and returns it as a tuple of two elements

# Test case 1: passing an int
ARGS = {
    't': 5
}
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
Block Not yet run
unverified (harvested, no recorded run)
KSonPham/ViVit-a-Pytorch-implementation/models/modeling.py
code served (permissive licence) · get_code("3aeaa3af2d538769")
How it ran

no invocation recorded.

Encoder Not yet run
unverified (harvested, no recorded run)
KSonPham/ViVit-a-Pytorch-implementation/models/modeling.py
code served (permissive licence) · get_code("a13ffe0da0765ccb")
How it ran

no invocation recorded.

MyViViT Not yet run
unverified (harvested, no recorded run)
KSonPham/ViVit-a-Pytorch-implementation/models/modeling.py
code served (permissive licence) · get_code("f3febe06012a3d59")
How it ran

no invocation recorded.

Transformer Not yet run
unverified (harvested, no recorded run)
KSonPham/ViVit-a-Pytorch-implementation/models/modeling.py
code served (permissive licence) · get_code("085322a052a6aa56")
How it ran

no invocation recorded.

VanillaEncoder Not yet run
unverified (harvested, no recorded run)
SforAiDl/vformer/vformer/models/classification/vivit.py
code served (permissive licence) · get_code("a639c271341e65f0")
How it ran

no invocation recorded.

ViViTBackbone Not yet run
unverified (harvested, no recorded run)
drv-agwl/ViViT-pytorch/models.py
code served (permissive licence) · get_code("893bed9821ea5367")
How it ran

no invocation recorded.

ViViTModel2 Not yet run
unverified (harvested, no recorded run)
SforAiDl/vformer/vformer/models/classification/vivit.py
code served (permissive licence) · get_code("e4a0f20e13c6ea01")
How it ran

no invocation recorded.

Also present in other papers' code

Of 21 samples lifted from this paper's linked repositories, 21 carry a function identity and 0 do not. Of the 21 distinct functions with an identity, 8 are also present in other papers whose code we hold (6 with at least one paper dated earlier, 8 the same month, 7 later) and 13 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
pair
brick of this paper's assembly: helper
90 other papers
2 dated earlier, 1 the same month, 86 later, 1 undated · 8 only as an assembly brick
2004.13649 (2020-04)
Image Augmentation Is All You Need: Regularizing Deep Reinforcement Learning from Pixels
2010.11929 (2020-10)
An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
2103.17239 (2021-03)
Going deeper with Image Transformers
and 87 more not named here
np2th
brick of this paper's assembly: helper
35 other papers
2 dated earlier, 2 the same month, 31 later · 5 only as an assembly brick
2010.11929 (2020-10)
An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
2102.04306 (2021-02)
TransUNet: Transformers Make Strong Encoders for Medical Image Segmentation
2103.07976 (2021-03)
TransFG: A Transformer Architecture for Fine-grained Recognition
and 32 more not named here
Mlp
brick of this paper's assembly: model
4 other papers
1 dated earlier, 1 the same month, 2 later · 2 only as an assembly brick
2010.11929 (2020-10)
An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
2103.12091 (2021-03)
Transformer-Based Attention Networks for Continuous Pixel-Wise Prediction
2501.18936 (2025-01)
Revisit Visual Prompt Tuning: The Expressiveness of Prompt Experts
and 1 more not named here
Attention
brick of this paper's assembly: model
3 other papers
1 dated earlier, 1 the same month, 1 later · 1 only as an assembly brick
2010.11929 (2020-10)
An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
2103.12091 (2021-03)
Transformer-Based Attention Networks for Continuous Pixel-Wise Prediction
2501.18936 (2025-01)
Revisit Visual Prompt Tuning: The Expressiveness of Prompt Experts
Block
brick of this paper's assembly: model
3 other papers
1 dated earlier, 1 the same month, 1 later · 1 only as an assembly brick
2010.11929 (2020-10)
An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
2103.12091 (2021-03)
Transformer-Based Attention Networks for Continuous Pixel-Wise Prediction
2510.16446 (2025-10)
VIPAMIN: Visual Prompt Initialization via Embedding Selection and Subspace Expansion
Encoder
brick of this paper's assembly: model
3 other papers
1 dated earlier, 1 the same month, 1 later
2010.11929 (2020-10)
An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
2103.12091 (2021-03)
Transformer-Based Attention Networks for Continuous Pixel-Wise Prediction
2203.08243 (2022-03)
Unified Visual Transformer Compression
Transformer
brick of this paper's assembly: model
2 other papers
1 the same month, 1 later
2103.14899 (2021-03)
CrossViT: Cross-Attention Multi-Scale Vision Transformer for Image Classification
2301.04944 (2023-01)
ViTs for SITS: Vision Transformers for Satellite Image Time Series
Registry
brick of this paper's assembly: helper
1 other paper
1 the same month · 1 only as an assembly brick
2103.13413 (2021-03)
Vision Transformers for Dense Prediction

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 pure-transformer based models for video classification, drawing upon the recent success of such models in image classification. Our model extracts spatiotemporal tokens from the input video, which are then encoded by a series of transformer layers. In order to handle the long sequences of tokens encountered in video, we propose several, efficient variants of our model which factorise the spatial-and temporal-dimensions of the input. Although transformer-based models are known to only be effective when large training datasets are available, we show how we can effectively regularise the model during training and leverage pretrained image models to be able to train on comparatively small datasets. We conduct thorough ablation studies, and achieve state-of-the-art results on multiple video classification benchmarks including Kinetics 400 and 600, Epic Kitchens, Something-Something v2 and Moments in Time, outperforming prior methods based on deep 3D convolutional networks.

For agents

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

get_harvested_code_for_paper("2103.15691")
get_code_for_paper("2103.15691")
have("2103.15691")

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

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

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

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

Connect an agent — have() is free.