SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2212.00776 · 2022

ResFormer: Scaling ViTs with Multi-Resolution Training

arXiv · PDF · Open in the Atlas

Code that ran

6 of 6 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; 1 honoured the contract we drafted, 0 violated it and 2 have no contract verdict; 3 failures of our instrument; 0 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/2212.00776.json · badge: /api/ran/2212.00776.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
ruitian12/resformer canonical (classifier label)
classifier basis not recorded on the link
6 ran · 0 no recorded run
FunctionStatusWhere it lives
adjust_learning_rate Ran
ran, honoured the contract we drafted
ruitian12/resformer/image_classification/utils.py
pointer only (licence: MIT); the stored copy get_code serves, from quandao10/slct, is pointer only (licence: NONE) · get_code("bd3578806ecf5ac2")
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 quandao10/slct, 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.

build_transform Ran
ran on a synthesized input
ruitian12/resformer/image_classification/datasets.py
code served (permissive licence) · get_code("0b4de2aa27a5231b")
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 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
from torchvision import transforms
from torchvision.transforms.functional import InterpolationMode

torch.manual_seed(0)

class Args:
    def __init__(self):
        self.input_size = [224, 196, 168]  # Sorted descending, > 32
        self.multi_res = False
        self.sep_aug = False
        self.color_jitter = 0.4
        self.aa = 'none'
        self.train_interpolation = 'bicubic'
        self.reprob = 0.25
        self.remode = 'pixel'
        self.recount = 1

ARGS = {
    'is_train': True,
    'args': Args()
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
timm, torch, torchvision — 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 float — 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
img_from_base64 Ran
ran on a synthesized input
ruitian12/resformer/image_classification/datasets.py
code served (permissive licence) · get_code("78ae1a4b51b5b7e6")
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.

from PIL import Image
import base64
import io
import numpy as np

# Create a small RGB image and encode it to base64
img = Image.new('RGB', (4, 3), color=(255, 0, 0))
img_bytes = io.BytesIO()
img.save(img_bytes, format='PNG')
img_bytes.seek(0)
imagestring = base64.b64encode(img_bytes.read()).decode('utf-8')

ARGS = {
    'imagestring': imagestring,
    'color': True
}
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
mixup_target Ran
ran; our contract draft was wrong, not the code
ruitian12/resformer/image_classification/mix.py
pointer only (licence: MIT); the stored copy get_code serves, from terrypei/efficientvmamba, is pointer only (licence: NONE) · get_code("8733e0d87f232d11")
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 terrypei/efficientvmamba, 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.

one_hot Ran
ran; our contract draft was wrong, not the code
ruitian12/resformer/image_classification/mix.py
code served (permissive licence) · get_code("4728dc2025227bba")
How it ran

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

import torch

torch.manual_seed(0)

# Create a small input tensor with class indices
# Shape: (2,) - batch of 2 samples with class indices
x = torch.tensor([0, 2], dtype=torch.long)

# Number of classes
num_classes = 4

# On value for one-hot encoding
on_value = 1.0

# Off value for one-hot encoding
off_value = 0.0

# Device - use CPU only
device = 'cpu'

ARGS = {
    'x': x,
    'num_classes': num_classes,
    'on_value': on_value,
    'off_value': off_value,
    'device': device
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 2, dtype family float, shape (2, 4) — shape (2, 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: none by the harness; any seed is in the setup block
rand_bbox Ran
ran; our contract draft was wrong, not the code
ruitian12/resformer/image_classification/mix.py
pointer only (licence: MIT); the stored copy get_code serves, from terrypei/efficientvmamba, is pointer only (licence: NONE) · get_code("3913c620f6926f42")
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 terrypei/efficientvmamba, 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.

Also present in other papers' code

Of 6 samples lifted from this paper's linked repositories, 6 carry a function identity and 0 do not. Of the 6 distinct functions with an identity, 4 are also present in other papers whose code we hold (4 with at least one paper dated earlier, 1 the same month, 4 later) and 2 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
adjust_learning_rate 23 other papers
3 dated earlier, 20 later
2105.12723 (2021-05)
Nested Hierarchical Transformer: Towards Accurate, Data-Efficient and Interpretable Visual Understanding
2204.09435 (2022-04)
Hephaestus: A large scale multitask dataset towards InSAR understanding
2206.07699 (2022-06)
Write and Paint: Generative Vision-Language Models are Unified Modal Learners
and 20 more not named here
rand_bbox 14 other papers
3 dated earlier, 11 later
2109.03508 (2021-09)
RepNAS: Searching for Efficient Re-parameterizing Blocks
2111.06377 (2021-11)
Masked Autoencoders Are Scalable Vision Learners
2206.13559 (2022-06)
ST-Adapter: Parameter-Efficient Image-to-Video Transfer Learning
and 11 more not named here
one_hot 12 other papers
2 dated earlier, 1 the same month, 9 later · 1 only as an assembly brick
1710.09412 (2017-10)
mixup: BEYOND EMPIRICAL RISK MINIMIZATION
2109.03508 (2021-09)
RepNAS: Searching for Efficient Re-parameterizing Blocks
2212.03640 (2022-12)
Fine-tuned CLIP Models are Efficient Video Learners
and 9 more not named here
mixup_target 7 other papers
1 dated earlier, 6 later
2109.03508 (2021-09)
RepNAS: Searching for Efficient Re-parameterizing Blocks
2301.03580 (2023-01)
Designing BERT for Convolutional Networks: Sparse and Hierarchical Masked Modeling
2305.02507 (2023-05)
Stimulative Training++: Go Beyond The Performance Limits of Residual Networks
and 4 more not named here

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

Vision Transformers (ViTs) have achieved overwhelming success, yet they suffer from vulnerable resolution scalability, i.e., the performance drops drastically when presented with input resolutions that are unseen during training. We introduce, ResFormer, a framework that is built upon the seminal idea of multi-resolution training for improved performance on a wide spectrum of, mostly unseen, testing resolutions. In particular, ResFormer operates on replicated images of different resolutions and enforces a scale consistency loss to engage interactive information across different scales. More importantly, to alternate among varying resolutions effectively, especially novel ones in testing, we propose a global-local positional embedding strategy that changes smoothly conditioned on input sizes. We conduct extensive experiments for image classification on ImageNet. The results provide strong quantitative evidence that ResFormer has promising scaling abilities towards a wide range of resolutions. For instance, ResFormer-B-MR achieves a Top-1 accuracy of 75.86% and 81.72% when evaluated on relatively low and high resolutions respectively (i.e., 96 and 640), which are 48% and 7.49% better than DeiT-B. We also demonstrate, moreover, ResFormer is flexible and can be easily extended to semantic segmentation, object detection and video action recognition. Code is available at https://github.com/ruitian12/resformer.

For agents

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

get_harvested_code_for_paper("2212.00776")
get_code_for_paper("2212.00776")
have("2212.00776")

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

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

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

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

Connect an agent — have() is free.