SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2112.07658 · 2021

AdaViT: Adaptive Tokens for Efficient Vision Transformer

arXiv · PDF · Open in the Atlas

Code that ran

6 of 7 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; 3 failures of our instrument; 1 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/2112.07658.json · badge: /api/ran/2112.07658.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
NVlabs/A-ViT canonical (classifier label)
classifier basis not recorded on the link
6 ran · 1 no recorded run
FunctionStatusWhere it lives
build_transform Ran
ran; our contract draft was wrong, not the code
NVlabs/A-ViT/datasets.py
pointer only (licence: Apache-2.0) · get_code("3bc74137ab36aa79")
How it ran

The body of this sample is withheld: Apache-2.0, as GitHub detects it on this paper's repository, NVlabs/A-ViT, is in the permissive set, but a licence decision keeps the body a pointer: the reason for that decision is not recorded with 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.

checkpoint_filter_fn Ran
ran; our contract draft was wrong, not the code
NVlabs/A-ViT/timm/models/act_vision_transformer.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from leaplabthu/inline, is pointer only (licence: NONE) · get_code("5dac11fdc41c896b")
How it ran

The body of this sample is withheld: Apache-2.0, as GitHub detects it on this paper's repository, NVlabs/A-ViT, is in the permissive set, but a licence decision keeps the body a pointer: the reason for that decision is not recorded with 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.

get_distribution_target Ran
ran on a synthesized input
NVlabs/A-ViT/utils.py
pointer only (licence: Apache-2.0) · get_code("8ddac231bdda7f9a")
How it ran

The body of this sample is withheld: Apache-2.0, as GitHub detects it on this paper's repository, NVlabs/A-ViT, is in the permissive set, but a licence decision keeps the body a pointer: the reason for that decision is not recorded with 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.

h_to_p Ran
ran on a synthesized input
NVlabs/A-ViT/utils.py
pointer only (licence: Apache-2.0) · get_code("ff1f438bcfd75b97")
How it ran

The body of this sample is withheld: Apache-2.0, as GitHub detects it on this paper's repository, NVlabs/A-ViT, is in the permissive set, but a licence decision keeps the body a pointer: the reason for that decision is not recorded with 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.

hconcat_resize_min Ran
ran on a synthesized input
NVlabs/A-ViT/engine_act.py
pointer only (licence: Apache-2.0) · get_code("7108baaddd2eb47e")
How it ran

The body of this sample is withheld: Apache-2.0, as GitHub detects it on this paper's repository, NVlabs/A-ViT, is in the permissive set, but a licence decision keeps the body a pointer: the reason for that decision is not recorded with 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.

resize_pos_embed Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
NVlabs/A-ViT/timm/models/act_vision_transformer.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from leaplabthu/inline, is pointer only (licence: NONE) · get_code("1dbef2d4da4ee10f")
How it ran

The body of this sample is withheld: Apache-2.0, as GitHub detects it on this paper's repository, NVlabs/A-ViT, is in the permissive set, but a licence decision keeps the body a pointer: the reason for that decision is not recorded with 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.

build_dataset Not yet run
unverified (harvested, no recorded run)
NVlabs/A-ViT/datasets.py
pointer only (licence: Apache-2.0) · get_code("9153241c4331eb1a")
How it ran

The body of this sample is withheld: Apache-2.0, as GitHub detects it on this paper's repository, NVlabs/A-ViT, is in the permissive set, but a licence decision keeps the body a pointer: the reason for that decision is not recorded with 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. No invocation recorded.

Also present in other papers' code

Of 7 samples lifted from this paper's linked repositories, 7 carry a function identity and 0 do not. Of the 7 distinct functions with an identity, 4 are also present in other papers whose code we hold (3 with at least one paper dated earlier, 0 the same month, 4 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
build_transform 37 other papers
7 dated earlier, 30 later
2104.05707 (2021-04)
LocalViT: Analyzing Locality in Vision Transformers
2104.13840 (2021-04)
Twins: Revisiting the Design of Spatial Attention in Vision Transformers
2106.00515 (2021-06)
KVT: k-NN Attention for Boosting Vision Transformers
and 34 more not named here
checkpoint_filter_fn 37 other papers
1 dated earlier, 36 later · 1 only as an assembly brick
2105.12723 (2021-05)
Nested Hierarchical Transformer: Towards Accurate, Data-Efficient and Interpretable Visual Understanding
2202.07800 (2022-02)
Not All Patches are What You Need: Expediting Vision Transformers via Token Reorganizations
and 34 more not named here
build_dataset 25 other papers
4 dated earlier, 21 later
2104.05707 (2021-04)
LocalViT: Analyzing Locality in Vision Transformers
2106.00515 (2021-06)
KVT: k-NN Attention for Boosting Vision Transformers
2106.01401 (2021-06)
Container: Context Aggregation Network
and 22 more not named here
resize_pos_embed 14 other papers
14 later
2203.05962 (2022-03)
Anti-Oversmoothing in Deep Vision Transformers via the Fourier Domain Analysis: From Theory to Practice
2203.12614 (2022-03)
Unsupervised Salient Object Detection with Spectral Cluster Voting
2204.07683 (2022-04)
Safe Self-Refinement for Transformer-based Domain Adaptation
and 11 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

We introduce A-ViT, a method that adaptively adjusts the inference cost of vision transformer (ViT) for images of different complexity. A-ViT achieves this by automatically reducing the number of tokens in vision transformers that are processed in the network as inference proceeds. We reformulate Adaptive Computation Time (ACT) for this task, extending halting to discard redundant spatial tokens. The appealing architectural properties of vision transformers enables our adaptive token reduction mechanism to speed up inference without modifying the network architecture or inference hardware. We demonstrate that A-ViT requires no extra parameters or sub-network for halting, as we base the learning of adaptive halting on the original network parameters. We further introduce distributional prior regularization that stabilizes training compared to prior ACT approaches. On the image classification task (ImageNet1K), we show that our proposed A-ViT yields high efficacy in filtering informative spatial features and cutting down on the overall compute. The proposed method improves the throughput of DeiT-Tiny by 62% and DeiT-Small by 38% with only 0.3% accuracy drop, outperforming prior art by a large margin. Project page at https://a-vit.github.io/

For agents

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

get_harvested_code_for_paper("2112.07658")
get_code_for_paper("2112.07658")
have("2112.07658")

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

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

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

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

Connect an agent — have() is free.