SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2312.10376 · 2023

STA-VPT: SpatioTemporally Aligned Visual Prompt Tuning

arXiv · PDF · Open in the Atlas

Code that ran

14 of 14 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 5 honoured the contract we drafted, 2 violated it and 0 have no contract verdict; 7 failures of our instrument; 0 no recorded run); 2 of them were also run on the host, not in the jail, by the peer-agreement lane that set their level, measured 2026-11-23; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2312.10376.json · badge: /api/ran/2312.10376.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
tommy-xq/sa2vp canonical (classifier label)
classifier basis: census
10 ran · 0 no recorded run
copy not recorded community
not in the paper's declared repositories
4 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.

swish Ran
ran; our contract draft was wrong, not the code
this paper's copy was not recorded; identical code first harvested from jeonsworld/ViT-pytorch
pointer only · get_code("0f786c407fb1ee4c")
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.

cosine_scheduler Ran
ran, honoured the contract we drafted
tommy-xq/sa2vp/utils.py
pointer only (licence: MIT); the stored copy get_code serves, from boyazeng/understand_bias, is pointer only (licence: NONE) · get_code("b700fb0a3496b255")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from boyazeng/understand_bias, and GitHub detected no licence in that repository 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.

cosine_scheduler_epoch Ran
ran, honoured the contract we drafted
tommy-xq/sa2vp/utils.py
code served (permissive licence) · get_code("7468079f7c4e2b5e")
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 ndarray, ndim 1, dtype family float, shape (500,) 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 math
import numpy as np

# Construct arguments for cosine_scheduler_epoch function
ARGS = {
    'base_value': 0.1,
    'final_value': 0.0001,
    'epochs': 10,
    'niter_per_ep': 50,
    'warmup_epochs': 2,
    'start_warmup_value': 1e-06,
    'warmup_steps': -1
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 1, dtype family float, shape (500,) — shape (500,) 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_best_lrwd Ran
ran, honoured the contract we drafted
tommy-xq/sa2vp/vpt_main/tune_vtab.py
pointer only (licence: MIT); the stored copy get_code serves, from runtsang/VFPT, is pointer only (licence: NOASSERTION) · get_code("3e009472c0d2fa50")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from runtsang/VFPT, and GitHub could not classify the licence of that repository (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.

get_loss_scale_for_deepspeed Ran
ran, honoured the contract we drafted
tommy-xq/sa2vp/engine_for_train.py
pointer only (licence: MIT); the stored copy get_code serves, from kangsankim07/videoicl, is pointer only (licence: NONE) · get_code("29416043c7035e7c")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from kangsankim07/videoicl, and GitHub detected no licence in that repository 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.

get_num_layer_for_vit Ran
ran, honoured the contract we drafted
tommy-xq/sa2vp/optim_factory.py
code served (permissive licence) · get_code("a3448702d6025ce6")
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 torch.nn as nn

torch.manual_seed(0)

# The function takes two parameters:
# 1. var_name: a string representing a variable name
# 2. num_max_layer: an integer representing the maximum number of layers

# Based on the function body, var_name is checked against various patterns
# and num_max_layer is used as a fallback return value

ARGS = {
    'var_name': 'blocks.5.weight',
    'num_max_layer': 12
}
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 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
get_parameter_groups Ran
ran; our contract draft was wrong, not the code
tommy-xq/sa2vp/optim_factory.py
pointer only (licence: MIT); the stored copy get_code serves, from boyazeng/understand_bias, is pointer only (licence: NONE) · get_code("0ef0019514eaaa09")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from boyazeng/understand_bias, and GitHub detected no licence in that repository 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.

has_file_allowed_extension Ran
ran, violated the contract we drafted
tommy-xq/sa2vp/dataset_folder.py
pointer only (licence: MIT); the stored copy get_code serves, from dlyuangod/vit-1.58b, is pointer only (licence: NONE) · get_code("18ae3e6ef2cf02ec")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from dlyuangod/vit-1.58b, and GitHub detected no licence in that repository 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.

is_image_file Ran
ran, violated the contract we drafted
tommy-xq/sa2vp/dataset_folder.py
pointer only (licence: MIT); the stored copy get_code serves, from dlyuangod/vit-1.58b, is pointer only (licence: NONE) · get_code("8ac50ae8773b9431")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from dlyuangod/vit-1.58b, and GitHub detected no licence in that repository 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_dataset Ran
ran; our contract draft was wrong, not the code
tommy-xq/sa2vp/dataset_folder.py
code served (permissive licence) · get_code("fb6aea1653b20bba")
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 list, 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 os
import os.path
import tempfile
from typing import Tuple, Dict, Optional, Callable, List

# Create a temporary directory structure for testing
temp_dir = tempfile.mkdtemp()

# Create class subdirectories and some dummy files
class_names = ["cat", "dog"]
for class_name in class_names:
    class_dir = os.path.join(temp_dir, class_name)
    os.makedirs(class_dir, exist_ok=True)
    # Create some dummy files with various extensions
    for i in range(2):
        with open(os.path.join(class_dir, f"image_{i}.jpg"), "w") as f:
            f.write("dummy")
        with open(os.path.join(class_dir, f"image_{i}.png"), "w") as f:
            f.write("dummy")
        with open(os.path.join(class_dir, f"other_{i}.txt"), "w") as f:
            f.write("dummy")

# Define the arguments
directory = temp_dir
class_to_idx = {"cat": 0, "dog": 1}
extensions = (".jpg", ".png")
is_valid_file = None

ARGS = {
    "directory": directory,
    "class_to_idx": class_to_idx,
    "extensions": extensions,
    "is_valid_file": is_valid_file,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 2, dtype family float — a list 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
train_class_batch Ran
ran; our contract draft was wrong, not the code
tommy-xq/sa2vp/engine_for_train.py
code served (permissive licence) · get_code("d15b621dd834bc4f")
How it ran

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

import torch
import torch.nn as nn

torch.manual_seed(0)

# Define a simple model that returns outputs and prompt when called
class SimpleModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 3)
    
    def forward(self, samples):
        outputs = self.linear(samples)
        prompt = self.linear(samples)
        return outputs, prompt

# Create model instance
model = SimpleModel()

# Create small tensors
samples = torch.randn(2, 4)  # batch size 2, feature dim 4
target = torch.randn(2, 3)   # batch size 2, output dim 3

# Define criterion (loss function)
criterion = nn.MSELoss()

ARGS = {
    "model": model,
    "samples": samples,
    "target": target,
    "criterion": criterion
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple — a tuple output has no array shape of its own; none is stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
window_partition 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 mv-lab/swin2sr
pointer only · get_code("f9fd6241d935f07b")
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_reverse Ran
ran; our contract draft was wrong, not the code
this paper's copy was not recorded; identical code first harvested from mv-lab/swin2sr
pointer only · get_code("fb32094c6dbece71")
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.

Also present in other papers' code

Of 14 samples lifted from this paper's linked repositories, 14 carry a function identity and 0 do not. Of the 14 distinct functions with an identity, 14 are also present in other papers whose code we hold (12 with at least one paper dated earlier, 5 the same month, 14 later) and 0 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_reverse 227 other papers
130 dated earlier, 10 the same month, 78 later, 9 same year, order not determinable · 34 only as an assembly brick
1608.03983 (2016-08)
SGDR: Stochastic Gradient Descent with Warm Restarts
1711.10925 (2017-11)
Deep Image Prior
2003.13678 (2020-03)
Designing Network Design Spaces
and 224 more not named here
window_partition 223 other papers
128 dated earlier, 10 the same month, 76 later, 9 same year, order not determinable · 32 only as an assembly brick
1706.03762 (2017-06)
Attention Is All You Need
1711.10925 (2017-11)
Deep Image Prior
2003.13678 (2020-03)
Designing Network Design Spaces
and 220 more not named here
swish 206 other papers
167 dated earlier, 3 the same month, 36 later · 44 only as an assembly brick
1408.5882 (2014-08)
Convolutional Neural Networks for Sentence Classification
1805.12114 (2018-05)
Deep Reinforcement Learning in a Handful of Trials using Probabilistic Dynamics Models
1809.01357 (2018-09)
Zero Shot Learning for Code Education: Rubric Sampling with Deep Learning Inference
and 203 more not named here
np2th 35 other papers
29 dated earlier, 6 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
cosine_scheduler 26 other papers
14 dated earlier, 1 the same month, 9 later, 2 same year, order not determinable
1905.02244 (2019-05)
Searching for MobileNetV3
136810051 (2022 (year only))
AMixer: Adaptive Weight Mixing for Self-Attention Free Vision Transformers
136860514 (2022 (year only))
SLIP: Self-supervision meets Language-Image Pre-training
and 23 more not named here
get_parameter_groups 18 other papers
12 dated earlier, 5 later, 1 same year, order not determinable
1905.02244 (2019-05)
Searching for MobileNetV3
136810051 (2022 (year only))
AMixer: Adaptive Weight Mixing for Self-Attention Free Vision Transformers
136860514 (2022 (year only))
SLIP: Self-supervision meets Language-Image Pre-training
and 15 more not named here
get_loss_scale_for_deepspeed 15 other papers
7 dated earlier, 1 the same month, 7 later
2203.14415 (2022-03)
Mugs: A Multi-Granular Self-Supervised Learning Framework
2211.09120 (2022-11)
AdaMAE: Adaptive Masking for Efficient Spatiotemporal Learning with Masked Autoencoders
2212.10368 (2022-12)
Masked Event Modeling: Self-Supervised Pretraining for Event Cameras
and 12 more not named here
is_image_file 12 other papers
5 dated earlier, 6 later, 1 same year, order not determinable
2203.14415 (2022-03)
Mugs: A Multi-Granular Self-Supervised Learning Framework
2204.08381 (2022-04)
Multiple-environment Self-adaptive Network for Aerial-view Geo-localization
2205.03892 (2022-05)
ConvMAE: Masked Convolution Meets Masked Autoencoders
and 9 more not named here
has_file_allowed_extension 10 other papers
5 dated earlier, 4 later, 1 same year, order not determinable
2203.14415 (2022-03)
Mugs: A Multi-Granular Self-Supervised Learning Framework
2204.08381 (2022-04)
Multiple-environment Self-adaptive Network for Aerial-view Geo-localization
2205.03892 (2022-05)
ConvMAE: Masked Convolution Meets Masked Autoencoders
and 7 more not named here
get_num_layer_for_vit 8 other papers
6 dated earlier, 2 later
136860514 (2022 (year only))
SLIP: Self-supervision meets Language-Image Pre-training
2209.03917 (2022-09)
Exploring Target Representations for Masked Autoencoders
2211.09120 (2022-11)
AdaMAE: Adaptive Masking for Efficient Spatiotemporal Learning with Masked Autoencoders
and 5 more not named here
make_dataset 6 other papers
3 dated earlier, 2 later, 1 same year, order not determinable
2205.03892 (2022-05)
ConvMAE: Masked Convolution Meets Masked Autoencoders
2208.07049 (2022-08)
Self-Supervised Vision Transformers for Malware Detection
aaai_25604 (2023 (year only))
One-for-All: Proposal Masked Cross-Class Anomaly Detection
and 3 more not named here
find_best_lrwd 5 other papers
2 dated earlier, 3 later
2212.03220 (2022-12)
Visual Query Tuning: Towards Effective Usage of Intermediate Representations for Parameter and Memory Efficient Transfer Learning
2307.13770 (2023-07)
(d) Ours (c) Prompt tuning
aaai_28243 (2024 (year only))
SA 2 VP: Spatially Aligned-and-Adapted Visual Prompt
and 2 more not named here
cosine_scheduler_epoch 1 other paper
1 later
aaai_28243 (2024 (year only))
SA 2 VP: Spatially Aligned-and-Adapted Visual Prompt
train_class_batch 1 other paper
1 later
aaai_28243 (2024 (year only))
SA 2 VP: Spatially Aligned-and-Adapted Visual Prompt

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

Repositories linked to this paper

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

Abstract

Typical methods for visual prompt tuning follow the sequential modeling paradigm originating from NLP, learning a sequence of unordered parameterized tokens as visual prompts, which are then prefixed to the flattened image representation for model adaptation. While such a sequential prompting paradigm has exhibited great promise, it presents two potential limitations. First, the learned visual prompts, presented in an unordered sequential form, are unable to capture the underlying spatial relations in the input image which are crucial for effective image encoding. Second, all prompt tokens serve the same role by performing uniform prompting for all image tokens without distinction, lacking fine-grained prompting capability\---i.e., individualized prompting for different visual tokens to capture region-specific semantic patterns. In this work, we introduce the \mymodel model (\emph{STA-VPT}), a novel visual prompting paradigm, which learns a two-dimensional prompt token map for image prompting or a three-dimensional token volume for video prompting, ensuring spatial (or spatiotemporal) alignment with the input image token map (or video token volume). This alignment enables the visual prompts to preserve the spatial (or spatiotemporal) structure, thereby learning the underlying relations within the visual input. Furthermore, each prompt token serves as a specialized prompting expert and is designated to exclusively prompt for the spatially (or spatiotemporally) corresponding visual tokens. Consequently, our \emph{STA-VPT} is capable of performing individualized prompting for different spatiotemporal regions, potentially improving the prompting performance through fine-grained allocation of prompting capacity, in line with mixture of experts (MoE) principles.

For agents

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

get_harvested_code_for_paper("2312.10376")
get_code_for_paper("2312.10376")
have("2312.10376")

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

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

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

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

Connect an agent — have() is free.