SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2203.12119 · ECCV · 2022

Visual Prompt Tuning

Serge Belongie, Ser-Nam Lim, Bharath Hariharan, Luming Tang, Menglin Jia, Claire Cardie, Bor-Chun Chen

arXiv · PDF · Open in the Atlas

Code that ran

18 of 27 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (12 of them constructed an object rather than computing a result; 1 honoured the contract we drafted, 1 violated it and 14 have no contract verdict; 2 failures of our instrument; 9 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/2203.12119.json · badge: /api/ran/2203.12119.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
heekhero/DTL community
Papers with Code archive
7 ran · 4 no recorded run
Yiming-M/CLIP-EBC community
Papers with Code archive
6 ran · 4 no recorded run
wgcban/apt community
Papers with Code archive
2 ran · 1 no recorded run
unites-lab/vpns community
Papers with Code archive
1 ran · 0 no recorded run
TooTouch/VPT community
Papers with Code archive
1 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
Attention Ran
ran on a synthesized input · constructed an object; no result was computed
wgcban/apt/modeling_VPT.py
pointer only (licence: NOASSERTION) · get_code("bc0e89d4bae92c5f")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, wgcban/apt (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.

Block Ran
ran on a synthesized input
wgcban/apt/modeling_VPT.py
pointer only (licence: NOASSERTION) · get_code("a6526ff13db3ed18")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, wgcban/apt (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.

ConvNormActivation Ran
ran on a synthesized input · constructed an object; no result was computed
Yiming-M/CLIP-EBC/models/encoder/vit.py
code served (permissive licence) · get_code("3208de787e3ca751")
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, ConvNormActivation: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn
from typing import Tuple

torch.manual_seed(0)

ARGS = {
    'in_channels': 3,
    'out_channels': 64,
    'kernel_size': 3,
    'stride': 1,
    'padding': None,
    'groups': 1,
    'norm_layer': nn.BatchNorm2d,
    'activation_layer': nn.ReLU,
    'dilation': 1,
    'inplace': True,
    'bias': None,
    'conv_layer': nn.Conv2d,
}
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 ConvNormActivation — 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 ConvNormActivation output the recorded ndim 1 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
ConvStemConfig Ran
ran on a synthesized input · constructed an object; no result was computed
Yiming-M/CLIP-EBC/models/encoder/vit.py
code served (permissive licence) · get_code("a1aa4bfcabd828f1")
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, ConvStemConfig: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn
from typing import Callable

torch.manual_seed(0)

ARGS = {
    "out_channels": 64,
    "kernel_size": 3,
    "stride": 2,
    "norm_layer": nn.BatchNorm2d,
    "activation_layer": nn.ReLU,
}
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 ConvStemConfig — 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 ConvStemConfig output the recorded ndim 1 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
EncoderBlock Ran
ran on a synthesized input · constructed an object; no result was computed
Yiming-M/CLIP-EBC/models/encoder/vit.py
code served (permissive licence) · get_code("c6bf5366cd01303c")
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, EncoderBlock: 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)

# First, define the helper function and classes that are referenced
def _log_api_usage_once(obj):
    pass

class MLP(torch.nn.Sequential):
    def __init__(self, in_channels: int, hidden_channels: list, norm_layer=None, activation_layer=torch.nn.ReLU, inplace=None, bias: bool=True, dropout: float=0.0):
        params = {} if inplace is None else {'inplace': inplace}
        layers = []
        in_dim = in_channels
        for hidden_dim in hidden_channels[:-1]:
            layers.append(torch.nn.Linear(in_dim, hidden_dim, bias=bias))
            if norm_layer is not None:
                layers.append(norm_layer(hidden_dim))
            layers.append(activation_layer(**params))
            layers.append(torch.nn.Dropout(dropout, **params))
            in_dim = hidden_dim
        layers.append(torch.nn.Linear(in_dim, hidden_channels[-1], bias=bias))
        layers.append(torch.nn.Dropout(dropout, **params))
        super().__init__(*layers)
        _log_api_usage_once(self)

class MLPBlock(MLP):
    _version = 2

    def __init__(self, in_dim: int, mlp_dim: int, dropout: float):
        super().__init__(in_dim, [mlp_dim, in_dim], activation_layer=nn.GELU, inplace=None, dropout=dropout)
        for m in self.modules():
            if isinstance(m, nn.Linear):
                nn.init.xavier_uniform_(m.weight)
                if m.bias is not None:
                    nn.init.normal_(m.bias, std=1e-06)

    def _load_from_state_dict(self, state_dict, prefix, local_metadata, strict, missing_keys, unexpected_keys, error_msgs):
        version = local_metadata.get('version', None)
        if version is None or version < 2:
            for i in range(2):
                for type in ['weight', 'bias']:
                    old_key = f'{prefix}linear_{i + 1}.{type}'
                    new_key = f'{prefix}{3 * i}.{type}'
                    if old_key in state_dict:
                        state_dict[new_key] = state_dict.pop(old_key)
        super()._load_from_state_dict(state_dict, prefix, local_metadata, strict, missing_keys, unexpected_keys, error_msgs)

# Now define EncoderBlock with minimal implementation based on typical transformer encoder patterns
class EncoderBlock(nn.Module):
    def __init__(self, num_heads: int, hidden_dim: int, mlp_dim: int, dropout: float, attention_dropout: float, norm_layer=nn.LayerNorm):
        super().__init__()
        self.num_heads = num_heads
        self.hidden_dim = hidden_dim
        self.mlp_dim = mlp_dim
        self.dropout = dropout
        self.attention_dropout = attention_dropout
        self.norm_layer = norm_layer
        
        # Multi-head attention
        self.self_attention = nn.MultiheadAttention(
            hidden_dim,
            num_heads,
            dropout=attention_dropout,
            batch_first=True
        )
        
        # Layer norms
        self.norm1 = norm_layer(hidden_dim)
        self.norm2 = norm_layer(hidden_dim)
        
        # MLP block
        self.mlp = MLPBlock(hidden_dim, mlp_dim, dropout)
        
        # Dropout
        self.dropout_layer = nn.Dropout(dropout)
    
    def forward(self, x):
        # Self-attention block with residual connection
        x_norm = self.norm1(x)
        attn_out, _ = self.self_attention(x_norm, x_norm, x_norm)
        x = x + self.dropout_layer(attn_out)
        
        # MLP block with residual connection
        x_norm = self.norm2(x)
        mlp_out = self.mlp(x_norm)
        x = x + self.dropout_layer(mlp_out)
        
        return x

# Create arguments for EncoderBlock
ARGS = {
    'num_heads': 4,
    'hidden_dim': 16,
    'mlp_dim': 32,
    'dropout': 0.1,
    'attention_dropout': 0.1,
    'norm_layer': nn.LayerNorm,
}
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 EncoderBlock — 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 EncoderBlock 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
ExpansiveVisualPrompt Ran
ran on a synthesized input · constructed an object; no result was computed
unites-lab/vpns/visual_prompt.py
code served (permissive licence) · get_code("05a71e461d5e0fe7")
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, ExpansiveVisualPrompt: 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 args object with required attributes
class Args:
    def __init__(self, output_size, input_size):
        self.output_size = output_size
        self.input_size = input_size

# Create a simple normalize function that returns the input as-is
def simple_normalize(x):
    return x

# Define arguments for ExpansiveVisualPrompt
ARGS = {
    'args': Args(output_size=8, input_size=4),
    'normalize': simple_normalize
}
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 ExpansiveVisualPrompt — 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 ExpansiveVisualPrompt 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
LoRALayer Ran
ran on a synthesized input · constructed an object; no result was computed
heekhero/DTL/classification/models/swin_transformer.py
pointer only (licence: NONE) · get_code("5b0e9bae29a51df8")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, heekhero/DTL when it was checked. 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.

MLP Ran
ran on a synthesized input · constructed an object; no result was computed
Yiming-M/CLIP-EBC/models/encoder/vit.py
code served (permissive licence) · get_code("4eb8553e435c726a")
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

torch.manual_seed(0)

ARGS = {
    'in_channels': 16,
    'hidden_channels': [32, 64, 8],
    'norm_layer': nn.BatchNorm1d,
    'activation_layer': nn.ReLU,
    'inplace': True,
    'bias': True,
    'dropout': 0.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 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 1 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
MLPBlock Ran
ran on a synthesized input · constructed an object; no result was computed
Yiming-M/CLIP-EBC/models/encoder/vit.py
code served (permissive licence) · get_code("8d3ecda0f4496893")
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 torch
import torch.nn as nn

torch.manual_seed(0)

ARGS = {
    'in_dim': 8,
    '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
torch — 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 1 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
Mlp Ran
ran on a synthesized input · constructed an object; no result was computed
heekhero/DTL/classification/models/swin_transformer.py
pointer only (licence: NONE) · get_code("22e33235319249df")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, heekhero/DTL when it was checked. 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
heekhero/DTL/classification/models/swin_transformer.py
pointer only (licence: NONE) · get_code("641bf19387f9e143")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, heekhero/DTL when it was checked. 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.

PatchMerging Ran
ran on a synthesized input · constructed an object; no result was computed
heekhero/DTL/classification/models/swin_transformer.py
pointer only (licence: NONE) · get_code("dce20c2c623e0f35")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, heekhero/DTL when it was checked. 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.

VPT Ran
ran on a synthesized input
TooTouch/VPT/models/vpt.py
code served (permissive licence) · get_code("3c7693b669414501")
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 torch.nn as nn
from unittest.mock import Mock, MagicMock
import math
from functools import reduce
from operator import mul

# Mock the timm.create_model to avoid downloading pretrained weights
def mock_create_model(modelname, num_classes=1000, pretrained=False):
    """Create a minimal mock Vision Transformer for testing"""
    model = Mock(spec=nn.Module)
    
    # Set up basic attributes
    model.embed_dim = 4
    model.num_classes = num_classes
    
    # Mock patch_embed
    patch_embed = Mock()
    patch_embed.patch_size = (16, 16)
    model.patch_embed = patch_embed
    
    # Mock position embedding
    model._pos_embed = Mock(side_effect=lambda x: x)
    
    # Mock norm_pre
    model.norm_pre = Mock(side_effect=lambda x: x)
    
    # Mock norm
    model.norm = Mock(side_effect=lambda x: x)
    
    # Create mock blocks
    num_blocks = 2
    blocks = nn.ModuleList([nn.Identity() for _ in range(num_blocks)])
    model.blocks = blocks
    
    # Mock forward_head
    model.forward_head = Mock(side_effect=lambda x: x[:, 0])
    
    # Mock named_parameters to return some parameters
    def mock_named_params():
        return [
            ('head.weight', nn.Parameter(torch.randn(num_classes, 4))),
            ('head.bias', nn.Parameter(torch.randn(num_classes))),
            ('patch_embed.weight', nn.Parameter(torch.randn(4, 3, 16, 16))),
        ]
    
    model.named_parameters = mock_named_params
    
    return model

# Patch timm.create_model
import sys
timm_mock = MagicMock()
timm_mock.create_model = mock_create_model
sys.modules['timm'] = timm_mock

# Now import the VPT class
from timm import create_model
from functools import reduce
from operator import mul
import math
import torch
import torch.nn as nn

class VPT(nn.Module):

    def __init__(self, modelname: str, num_classes: int, pretrained: bool=True, prompt_tokens: int=5, prompt_dropout: float=0.0, prompt_type: str='shallow'):
        super().__init__()
        self.encoder = create_model(modelname, num_classes=num_classes, pretrained=pretrained)
        for n, p in self.encoder.named_parameters():
            if 'head' not in n:
                p.requires_grad = False
        self.prompt_tokens = prompt_tokens
        self.prompt_dropout = nn.Dropout(prompt_dropout)
        self.prompt_dim = self.encoder.embed_dim
        self.prompt_type = prompt_type
        assert self.prompt_type in ['shallow', 'deep'], "prompt type should be 'shallow' or 'deep'."
        val = math.sqrt(6.0 / float(3 * reduce(mul, self.encoder.patch_embed.patch_size, 1) + self.prompt_dim))
        self.prompt_embeddings = nn.Parameter(torch.zeros(1, self.prompt_tokens, self.prompt_dim))
        nn.init.uniform_(self.prompt_embeddings.data, -val, val)
        if self.prompt_type == 'deep':
            self.total_d_layer = len(self.encoder.blocks)
            self.deep_prompt_embeddings = nn.Parameter(torch.zeros(self.total_d_layer - 1, self.prompt_tokens, self.prompt_dim))
            nn.init.uniform_(self.deep_prompt_embeddings.data, -val, val)

    def train(self, mode=True):
        if mode:
            self.encoder.eval()
            self.prompt_dropout.train()
        else:
            for module in self.children():
                module.train(mode)

    def incorporate_prompt(self, x, prompt_embeddings, n_prompt: int=0):
        B = x.shape[0]
        x = torch.cat((x[:, :1, :], self.prompt_dropout(prompt_embeddings.expand(B, -1, -1)), x[:, 1 + n_prompt:, :]), dim=1)
        return x

    def forward_deep_prompt(self, embedding_output):
        B = embedding_output.shape[0]

    def forward_features(self, x):
        x = self.encoder.patch_embed(x)
        x = self.encoder._pos_embed(x)
        x = self.encoder.norm_pre(x)
        x = self.incorporate_prompt(x, self.prompt_embeddings)
        if self.prompt_type == 'deep':
            x = self.encoder.blocks[0](x)
            for i in range(1, self.total_d_layer):
                x = self.incorporate_prompt(x, self.deep_prompt_embeddings[i - 1], self.prompt_tokens)
                x = self.encoder.blocks[i](x)
        else:
            x = self.encoder.blocks(x)
        x = self.encoder.norm(x)
        return x

    def forward(self, x):
        x = self.forward_features(x)
        x = self.encoder.forward_head(x)
        return x


INIT_ARGS = {
    'modelname': 'vit_base_patch16_224',
    'num_classes': 10,
    'pretrained': False,
    'prompt_tokens': 5,
    'prompt_dropout': 0.1,
    'prompt_type': 'shallow'
}

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

if __name__ == '__main__':
    model = VPT(**INIT_ARGS)
    output = model(**ARGS)
    print(f"Output shape: {output.shape}")
    print("Test passed!")
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
Imports
timm, 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)
WindowAttention Ran
ran on a synthesized input · constructed an object; no result was computed
heekhero/DTL/classification/models/swin_transformer.py
pointer only (licence: NONE) · get_code("0762b0fd2462f471")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, heekhero/DTL when it was checked. 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.

_make_ntuple Ran
ran, violated the contract we drafted
Yiming-M/CLIP-EBC/models/encoder/vit.py
code served (permissive licence) · get_code("b7edf42d365259f4")
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
from itertools import repeat
from collections.abc import Iterable
from typing import Any, Tuple

torch.manual_seed(0)

ARGS = {
    "x": [1, 2, 3],
    "n": 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
swish Ran
ran, honoured the contract we drafted
this paper's copy was not recorded; identical code first harvested from zhoujiahuan1991/aaai2025-svp
pointer only; the stored copy get_code serves, from zhoujiahuan1991/aaai2025-svp, is pointer only (licence: NONE) · get_code("5f094438dfb16a0d")
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.

window_partition Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
heekhero/DTL/classification/models/swin_transformer.py
pointer only (licence: NONE) · get_code("993ae96666b00cb5")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, heekhero/DTL when it was checked. 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.

window_reverse Ran
ran; our contract draft was wrong, not the code
heekhero/DTL/classification/models/swin_transformer.py
pointer only (licence: NONE) · get_code("609922bd93c75117")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, heekhero/DTL when it was checked. 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.

BasicLayer Not yet run
unverified (harvested, no recorded run)
heekhero/DTL/classification/models/swin_transformer.py
pointer only (licence: NONE) · get_code("5d05f06f1874a08e")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, heekhero/DTL when it was checked. 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.

Conv2dNormActivation Not yet run
unverified (harvested, no recorded run)
Yiming-M/CLIP-EBC/models/encoder/vit.py
code served (permissive licence) · get_code("c5e62920f023fc96")
How it ran

no invocation recorded.

Encoder Not yet run
unverified (harvested, no recorded run)
Yiming-M/CLIP-EBC/models/encoder/vit.py
code served (permissive licence) · get_code("0fe366661e030443")
How it ran

no invocation recorded.

PromptedVisionTransformer Not yet run
unverified (harvested, no recorded run)
wgcban/apt/modeling_VPT.py
pointer only (licence: NOASSERTION) · get_code("b2323593bea9d7f5")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, wgcban/apt (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.

SwinTransformer Not yet run
unverified (harvested, no recorded run)
heekhero/DTL/classification/models/swin_transformer.py
pointer only (licence: NONE) · get_code("8ffa2914d7fefefa")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, heekhero/DTL when it was checked. 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.

SwinTransformerBlock Not yet run
unverified (harvested, no recorded run)
heekhero/DTL/classification/models/swin_transformer.py
pointer only (licence: NONE) · get_code("a619548a5271517f")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, heekhero/DTL when it was checked. 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.

VisionTransformer Not yet run
unverified (harvested, no recorded run)
Yiming-M/CLIP-EBC/models/encoder/vit.py
code served (permissive licence) · get_code("232688cf9e59bf54")
How it ran

no invocation recorded.

_log_api_usage_once Not yet run
unverified (harvested, no recorded run)
Yiming-M/CLIP-EBC/models/encoder/vit.py
code served (permissive licence) · get_code("10e31764ca79cdcd")
How it ran

no invocation recorded.

write Not yet run
unverified (harvested, no recorded run)
heekhero/DTL/classification/models/swin_transformer.py
pointer only (licence: NONE) · get_code("f38e7de3675b6095")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, heekhero/DTL when it was checked. 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 27 samples lifted from this paper's linked repositories, 27 carry a function identity and 0 do not. Of the 27 distinct functions with an identity, 7 are also present in other papers whose code we hold (4 with at least one paper dated earlier, 0 the same month, 7 later) and 20 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
window_partition
brick of this paper's assembly: helper
31 other papers
1 dated earlier, 30 later
2111.11418 (2021-11)
MetaFormer Is Actually What You Need for Vision
2204.03645 (2022-04)
DaViT: Dual Attention Vision Transformers
2210.04135 (2022-10)
VoLTA: Vision-Language Transformer with Weakly-Supervised Local-Feature Alignment
and 28 more not named here
_log_api_usage_once
brick of this paper's assembly: helper
8 other papers
7 dated earlier, 1 later · 1 only as an assembly brick
1512.03385 (2015-12)
Deep Residual Learning for Image Recognition
1603.09382 (2016-03)
Deep Networks with Stochastic Depth
1905.11946 (2019-05)
EfficientNet: Rethinking Model Scaling for Convolutional Neural Networks
and 5 more not named here
window_reverse
brick of this paper's assembly: helper
6 other papers
6 later
2210.08823 (2022-10)
Scaling &amp; Shifting Your Features: A New Baseline for Efficient Model Tuning
Guo_Improving_Robustness_of_Vision_Transformers_by_Reducing_Sensitivity_To_Patch_CVPR_2023_paper (2023 (year only))
Improving Robustness of Vision Transformers by Reducing Sensitivity to Patch Corruptions
2307.11342 (2023-07)
Tuning Pre-trained Model via Moment Probing
and 3 more not named here
ConvStemConfig
brick of this paper's assembly: helper
2 other papers
1 dated earlier, 1 later
2010.11929 (2020-10)
An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
2503.17716 (2025-03)
EMPLACE: Self-Supervised Urban Scene Change Detection
MLPBlock
brick of this paper's assembly: model
2 other papers
1 dated earlier, 1 later
2010.11929 (2020-10)
An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
2503.17716 (2025-03)
EMPLACE: Self-Supervised Urban Scene Change Detection
Mlp
brick of this paper's assembly: model
1 other paper
1 later
2210.10716 (2022-10)
CroCo: Self-Supervised Pre-training for 3D Vision Tasks by Cross-View Completion
swish
brick of this paper's assembly: helper
1 other paper
1 later
2412.08947 (2024-12)
Selective Visual Prompting in Vision Mamba

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

The current modus operandi in adapting pre-trained models involves updating all the backbone parameters, i.e., full fine-tuning. This paper introduces Visual Prompt Tuning (VPT) as an efficient and effective alternative to full fine-tuning for large-scale Transformer models in vision. Taking inspiration from recent advances in efficiently tuning large language models, VPT introduces only a small amount (less than 1% of model parameters) of trainable parameters in the input space while keeping the model backbone frozen. Via extensive experiments on a wide variety of downstream recognition tasks, we show that VPT achieves significant performance gains compared to other parameter efficient tuning protocols. Most importantly, VPT even outperforms full fine-tuning in many cases across model capacities and training data scales, while reducing per-task storage cost. Code is available at github.com/kmnp/vpt. * Equal contribution. 1 As pointed out in [5], all state-of-the-art models in contemporary NLP are now powered by a few Transformer-based models (e.g., BERT [13], T5 [49], BART [34], ) This also applies to vision-language field recently, i.e., CLIP [48].

For agents

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

get_harvested_code_for_paper("2203.12119")
get_code_for_paper("2203.12119")
have("2203.12119")

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

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

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

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

Connect an agent — have() is free.