SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2206.13559 · NeurIPS · 2022

ST-Adapter: Parameter-Efficient Image-to-Video Transfer Learning

Hongsheng Li, Xiatian Zhu, Junting Pan, Ziyi Lin, Jing Shao

arXiv · PDF · Open in the Atlas

Code that ran

10 of 10 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; 0 honoured the contract we drafted, 0 violated it and 3 have no contract verdict; 7 failures of our instrument; 0 no recorded run), measured 2026-11-23; 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/2206.13559.json · badge: /api/ran/2206.13559.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
linziyi96/st-adapter canonical (classifier label)
classifier basis not recorded on the link
10 ran · 0 no recorded run
FunctionStatusWhere it lives
convert_to_one_hot Ran
ran; our contract draft was wrong, not the code
linziyi96/st-adapter/video_dataset/mixup.py
pointer only (licence: MIT); the stored copy get_code serves, from facebookresearch/mvit, is pointer only (licence: Apache-2.0) · get_code("547be2babaca4859")
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 facebookresearch/mvit, and Apache-2.0, as GitHub detects it on that repository, is in the permissive set, but a licence decision keeps the body a pointer: its licence file names an outside party, so it may cover vendored code rather than the repository owner's files (recorded as pointer:licence_names_third_party_corporation). 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.

crop_boxes Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
linziyi96/st-adapter/video_dataset/transform.py
pointer only (licence: MIT); the stored copy get_code serves, from CAMMA-public/SurgVLP, is pointer only (licence: NONE) · get_code("157585dc6ae8a498")
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 CAMMA-public/SurgVLP, 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.

load_model Ran
ran on a synthesized input
linziyi96/st-adapter/utils.py
code served (permissive licence) · get_code("319881416fb3b9dc")
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 os
import torch
import torch.nn as nn
import tempfile
import shutil

torch.manual_seed(0)

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

# Create a minimal model
class MinimalModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear1 = nn.Linear(4, 3)
        self.linear2 = nn.Linear(3, 2)
    
    def forward(self, x):
        x = self.linear1(x)
        x = self.linear2(x)
        return x

model_without_ddp = MinimalModel()

# Create optimizer
optimizer = torch.optim.Adam(model_without_ddp.parameters(), lr=0.001)

# Create learning rate scheduler
lr_sched = torch.optim.lr_scheduler.StepLR(optimizer, step_size=1)

# Create loss scaler (simple stand-in)
class LossScaler:
    def __init__(self):
        self.scale = 1.0
    
    def load_state_dict(self, state_dict):
        self.scale = state_dict.get('scale', 1.0)
    
    def state_dict(self):
        return {'scale': self.scale}

loss_scaler = LossScaler()

# Create a valid checkpoint file
checkpoint = {
    'model': model_without_ddp.state_dict(),
    'optimizer': optimizer.state_dict(),
    'lr_sched': lr_sched.state_dict(),
    'loss_scaler': loss_scaler.state_dict(),
    'next_epoch': 5
}
ckpt_path = os.path.join(temp_dir, 'checkpoint-5.pth')
torch.save(checkpoint, ckpt_path)

# Create args object
class Args:
    def __init__(self):
        self.resume = None
        self.auto_resume = False
        self.save_dir = temp_dir
        self.pretrain = None

args = Args()

ARGS = {
    'args': args,
    'model_without_ddp': model_without_ddp,
    'optimizer': optimizer,
    'lr_sched': lr_sched,
    'loss_scaler': loss_scaler
}
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
mixup_target Ran
ran; our contract draft was wrong, not the code
linziyi96/st-adapter/video_dataset/mixup.py
pointer only (licence: MIT); the stored copy get_code serves, from facebookresearch/mvit, is pointer only (licence: Apache-2.0) · get_code("fd3e5fd51b6d7296")
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 facebookresearch/mvit, and Apache-2.0, as GitHub detects it on that repository, is in the permissive set, but a licence decision keeps the body a pointer: its licence file names an outside party, so it may cover vendored code rather than the repository owner's files (recorded as pointer:licence_names_third_party_corporation). 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.

rand_bbox Ran
ran; our contract draft was wrong, not the code
linziyi96/st-adapter/video_dataset/mixup.py
code served (permissive licence) · get_code("830c7d87b9bb8311")
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 2, 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 numpy as np

np.random.seed(0)

ARGS = {
    'img_shape': (1, 3, 32, 64),
    'lam': 0.4,
    'margin': 0.1,
    'count': 2,
}
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 tuple, ndim 2, 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
random_crop Ran
ran on a synthesized input
linziyi96/st-adapter/video_dataset/transform.py
code served (permissive licence) · get_code("64ce021674e30869")
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 numpy as np

torch.manual_seed(0)

# Create a small batch of images: 2 frames, 3 channels, 8 height, 6 width
images = torch.randn(2, 3, 8, 6)

# Crop size (smaller than both height and width)
size = 4

# Create bounding boxes: 2 boxes, 4 coordinates each (x1, y1, x2, y2)
boxes = np.array([
    [1.0, 2.0, 4.0, 5.0],
    [2.0, 1.0, 5.0, 4.0]
], dtype=np.float32)

ARGS = {
    "images": images,
    "size": size,
    "boxes": boxes
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type 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
random_short_side_scale_jitter Ran
ran on a synthesized input
linziyi96/st-adapter/video_dataset/transform.py
code served (permissive licence) · get_code("472299265598d14e")
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 numpy as np
import math

torch.manual_seed(0)

# Create a small batch of images: (num_frames, channels, height, width)
# Using distinct dimensions: 2 frames, 3 channels, 8 height, 12 width
images = torch.randn(2, 3, 8, 12)

# Define min and max sizes for scaling
min_size = 4
max_size = 16

# Create optional boxes: (num_boxes, 4)
# Using 2 boxes with 4 coordinates each
boxes = np.array([[1.0, 2.0, 3.0, 4.0], [5.0, 6.0, 7.0, 8.0]], dtype=np.float32)

# Other parameters
inverse_uniform_sampling = False
interpolation = 'bilinear'

ARGS = {
    'images': images,
    'min_size': min_size,
    'max_size': max_size,
    'boxes': boxes,
    'inverse_uniform_sampling': inverse_uniform_sampling,
    'interpolation': interpolation
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type 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
shear_x Ran
ran; our contract draft was wrong, not the code
linziyi96/st-adapter/video_dataset/rand_augment.py
code served (permissive licence) · get_code("e866e1196986f728")
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 Image. 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 random
import PIL
from PIL import Image, ImageEnhance, ImageOps

# Create a simple PIL Image object
img = Image.new('RGB', (100, 100), color='red')

# Define ARGS dict with all parameters for shear_x
ARGS = {
    'img': img,
    'factor': 0.5,
    'resample': Image.BILINEAR,
    'fillcolor': (255, 255, 255)
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Image — a Image output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Image output the recorded ndim 3 and dtype family int 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
shear_y Ran
ran; our contract draft was wrong, not the code
linziyi96/st-adapter/video_dataset/rand_augment.py
code served (permissive licence) · get_code("7b2503c99c9447fb")
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 Image. 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 random
import PIL
from PIL import Image, ImageEnhance, ImageOps

# Create a simple PIL Image for testing
img = Image.new('RGB', (100, 100), color='red')

# Define ARGS dict with all parameters for shear_y function
ARGS = {
    'img': img,
    'factor': 0.5,
    'resample': Image.BILINEAR,
    'fillcolor': (255, 255, 255)
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Image — a Image output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Image output the recorded ndim 3 and dtype family int 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
translate_x_rel Ran
ran; our contract draft was wrong, not the code
linziyi96/st-adapter/video_dataset/rand_augment.py
code served (permissive licence) · get_code("323759f906fbb394")
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 Image. 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 random
import PIL
from PIL import Image
import numpy as np

# Create a small PIL Image object for testing
# The function uses img.size[0] and img.transform()
test_img = Image.new('RGB', (100, 80), color='red')

# Define ARGS dict with all parameters for translate_x_rel
ARGS = {
    'img': test_img,
    'pct': 0.2,
    'resample': Image.BILINEAR,
    'fillcolor': (255, 255, 255)
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Image — a Image output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Image output the recorded ndim 3 and dtype family int 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

Also present in other papers' code

Of 10 samples lifted from this paper's linked repositories, 10 carry a function identity and 0 do not. Of the 10 distinct functions with an identity, 7 are also present in other papers whose code we hold (5 with at least one paper dated earlier, 0 the same month, 7 later) and 3 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
shear_x 27 other papers
5 dated earlier, 20 later, 2 same year, order not determinable
1811.12814 (2018-11)
Graph-Based Global Reasoning Networks
2109.03508 (2021-09)
RepNAS: Searching for Efficient Re-parameterizing Blocks
2109.06165 (2021-09)
CDTrans: Cross-domain Transformer for Unsupervised Domain Adaptation
and 24 more not named here
shear_y 27 other papers
5 dated earlier, 20 later, 2 same year, order not determinable
1811.12814 (2018-11)
Graph-Based Global Reasoning Networks
2109.03508 (2021-09)
RepNAS: Searching for Efficient Re-parameterizing Blocks
2109.06165 (2021-09)
CDTrans: Cross-domain Transformer for Unsupervised Domain Adaptation
and 24 more not named here
translate_x_rel 26 other papers
5 dated earlier, 19 later, 2 same year, order not determinable
1811.12814 (2018-11)
Graph-Based Global Reasoning Networks
2109.03508 (2021-09)
RepNAS: Searching for Efficient Re-parameterizing Blocks
2109.06165 (2021-09)
CDTrans: Cross-domain Transformer for Unsupervised Domain Adaptation
and 23 more not named here
rand_bbox 14 other papers
2 dated earlier, 12 later
2109.03508 (2021-09)
RepNAS: Searching for Efficient Re-parameterizing Blocks
2111.06377 (2021-11)
Masked Autoencoders Are Scalable Vision Learners
2212.00776 (2022-12)
ResFormer: Scaling ViTs with Multi-Resolution Training
and 11 more not named here
crop_boxes 4 other papers
1 dated earlier, 2 later, 1 same year, order not determinable
Shi_Multi-Modal_Multi-Action_Video_Recognition_ICCV_2021_paper (2021 (year only))
Multi-Modal Multi-Action Video Recognition
136640364 (2022 (year only))
Continual 3D Convolutional Neural Networks for Real-time Processing of Videos
2210.00788 (2022-10)
Towards a Unified View on Visual Parameter-Efficient Transfer Learning
and 1 more not named here
convert_to_one_hot 3 other papers
3 later
2302.04869 (2023-02)
Reversible Vision Transformers
2306.07703 (2023-06)
E2E-LOAD: End-to-End Long-form Online Action Detection
2402.11301 (2024-02)
ReViT: Enhancing Vision Transformers Feature Diversity with Attention Residual Connections
mixup_target 2 other papers
2 later
2302.04869 (2023-02)
Reversible Vision Transformers
2402.11301 (2024-02)
ReViT: Enhancing Vision Transformers Feature Diversity with Attention Residual Connections

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

Capitalizing on large pre-trained models for various downstream tasks of interest have recently emerged with promising performance. Due to the ever-growing model size, the standard full fine-tuning based task adaptation strategy becomes prohibitively costly in terms of model training and storage. This has led to a new research direction in parameter-efficient transfer learning. However, existing attempts typically focus on downstream tasks from the same modality (e.g., image understanding) of the pre-trained model. This creates a limit because in some specific modalities, (e.g., video understanding) such a strong pre-trained model with sufficient knowledge is less or not available. In this work, we investigate such a novel cross-modality transfer learning setting, namely parameter-efficient image-to-video transfer learning. To solve this problem, we propose a new Spatio-Temporal Adapter (ST-Adapter) for parameter-efficient fine-tuning per video task. With a built-in spatio-temporal reasoning capability in a compact design, ST-Adapter enables a pre-trained image model without temporal knowledge to reason about dynamic video content at a small (∼8%) per-task parameter cost, requiring approximately 20 times fewer updated parameters compared to previous work. Extensive experiments on video action recognition tasks show that our ST-Adapter can match or even outperform the strong full fine-tuning strategy and state-of-theart video models, whilst enjoying the advantage of parameter efficiency. Code and model are available at https://github.com/linziyi96/st-adapter * Equal contribution 36th Conference on Neural Information Processing Systems (NeurIPS 2022).

For agents

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

get_harvested_code_for_paper("2206.13559")
get_code_for_paper("2206.13559")
have("2206.13559")

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

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

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

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

Connect an agent — have() is free.