SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2202.07800 · ICLR · 2022

Not All Patches are What You Need: Expediting Vision Transformers via Token Reorganizations

Yibing Song, Chongjian Ge, Youwei Liang, Jue Wang, Zhan Tong, Pengtao Xie

arXiv · PDF · Open in the Atlas

Code that ran

12 of 15 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 3 have no contract verdict; 8 failures of our instrument; 3 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/2202.07800.json · badge: /api/ran/2202.07800.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
youweiliang/evit canonical (classifier label)
classifier basis not recorded on the link
10 ran · 2 no recorded run
Retinal-Research/EVIT-UNET extension (classifier label)
classifier basis: classifier_2025
2 ran · 1 no recorded run
FunctionStatusWhere it lives
adjust_keep_rate Ran
ran, honoured the contract we drafted
youweiliang/evit/helpers.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from liuting20/sparse-tuning, is pointer only (licence: NONE) · get_code("66733f50aff69220")
How it ran

The body of this sample is withheld: Apache-2.0, as GitHub detects it on this paper's repository, youweiliang/evit, 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_transform Ran
ran; our contract draft was wrong, not the code
youweiliang/evit/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, youweiliang/evit, 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
youweiliang/evit/evit.py
pointer only (licence: Apache-2.0) · get_code("6d8a1f8a0697180f")
How it ran

The body of this sample is withheld: Apache-2.0, as GitHub detects it on this paper's repository, youweiliang/evit, 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.

drop_path Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
youweiliang/evit/evit.py
pointer only (licence: Apache-2.0) · get_code("39eace7e2822504f")
How it ran

The body of this sample is withheld: Apache-2.0, as GitHub detects it on this paper's repository, youweiliang/evit, 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_deeper_idx Ran
ran on a synthesized input
youweiliang/evit/visualize_mask.py
pointer only (licence: Apache-2.0) · get_code("efdf8b9d60927bcd")
How it ran

The body of this sample is withheld: Apache-2.0, as GitHub detects it on this paper's repository, youweiliang/evit, 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_real_idx Ran
ran on a synthesized input
youweiliang/evit/visualize_mask.py
pointer only (licence: Apache-2.0) · get_code("22f1fefd3b89cf1f")
How it ran

The body of this sample is withheld: Apache-2.0, as GitHub detects it on this paper's repository, youweiliang/evit, 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.

mask Ran
ran on a synthesized input
youweiliang/evit/visualize_mask.py
pointer only (licence: Apache-2.0) · get_code("5112560529a3d643")
How it ran

The body of this sample is withheld: Apache-2.0, as GitHub detects it on this paper's repository, youweiliang/evit, 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.

merge Ran
ran; our contract draft was wrong, not the code
Retinal-Research/EVIT-UNET/unet/eff_unet.py
code served (permissive licence) · get_code("5ce6e78745861c0e")
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) and returned Sequential. 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_chs': 16,
    'out_chs': 32,
    'act_layer': nn.ReLU
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Sequential — a Sequential output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Sequential 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
raw_reader Ran
ran; our contract draft was wrong, not the code
youweiliang/evit/folder2lmdb.py
pointer only (licence: Apache-2.0) · get_code("51738010a21f76a1")
How it ran

The body of this sample is withheld: Apache-2.0, as GitHub detects it on this paper's repository, youweiliang/evit, 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)
youweiliang/evit/evit.py
pointer only (licence: Apache-2.0) · get_code("191b2735955d18f4")
How it ran

The body of this sample is withheld: Apache-2.0, as GitHub detects it on this paper's repository, youweiliang/evit, 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.

speed_test Ran
ran; our contract draft was wrong, not the code
youweiliang/evit/helpers.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from liuting20/sparse-tuning, is pointer only (licence: NONE) · get_code("e294b62d47bcc26f")
How it ran

The body of this sample is withheld: Apache-2.0, as GitHub detects it on this paper's repository, youweiliang/evit, 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.

stem Ran
ran; our contract draft was wrong, not the code
Retinal-Research/EVIT-UNET/unet/eff_unet.py
code served (permissive licence) · get_code("560e3160f50add18")
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) and returned Sequential. 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_chs': 3,
    'out_chs': 64,
    'act_layer': nn.ReLU
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Sequential — a Sequential output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Sequential 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
dumps_pyarrow Not yet run
unverified (harvested, no recorded run)
youweiliang/evit/folder2lmdb.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from wangya22/I3SB, is pointer only (licence: NONE) · get_code("9e7bf674714e06d5")
How it ran

The body of this sample is withheld: Apache-2.0, as GitHub detects it on this paper's repository, youweiliang/evit, 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.

load_from Not yet run
unverified (harvested, no recorded run)
Retinal-Research/EVIT-UNET/train_unetKD.py
code served (permissive licence) · get_code("4ce559065d5b1b96")
How it ran

no invocation recorded.

loads_pyarrow Not yet run
unverified (harvested, no recorded run)
youweiliang/evit/folder2lmdb.py
pointer only (licence: Apache-2.0) · get_code("b4c154b6f0568b6b")
How it ran

The body of this sample is withheld: Apache-2.0, as GitHub detects it on this paper's repository, youweiliang/evit, 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 15 samples lifted from this paper's linked repositories, 15 carry a function identity and 0 do not. Of the 15 distinct functions with an identity, 10 are also present in other papers whose code we hold (5 with at least one paper dated earlier, 1 the same month, 10 later) and 5 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
drop_path 224 other papers
23 dated earlier, 2 the same month, 196 later, 2 same year, order not determinable, 1 undated · 38 only as an assembly brick
2003.12039 (2020-03)
RAFT: Recurrent All-Pairs Field Transforms for Optical Flow
2007.09384 (2020-07)
Multi-Scale Positive Sample Refinement for Few-Shot Object Detection
2010.11929 (2020-10)
An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
and 221 more not named here
build_transform 37 other papers
9 dated earlier, 26 later, 2 same year, order not determinable
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
2 dated earlier, 34 later, 1 same year, order not determinable · 1 only as an assembly brick
2105.12723 (2021-05)
Nested Hierarchical Transformer: Towards Accurate, Data-Efficient and Interpretable Visual Understanding
2112.07658 (2021-12)
AdaViT: Adaptive Tokens for Efficient Vision Transformer
and 34 more not named here
resize_pos_embed 20 other papers
1 dated earlier, 18 later, 1 same year, order not determinable · 1 only as an assembly brick
2105.12723 (2021-05)
Nested Hierarchical Transformer: Towards Accurate, Data-Efficient and Interpretable Visual Understanding
2203.13167 (2022-03)
Towards Exemplar-Free Continual Learning in Vision Transformers: an Account of Attention, Functional and Weight Regularization
and 17 more not named here
raw_reader 8 other papers
8 later
2209.04996 (2022-09)
Switchable Online Knowledge Distillation
2210.05958 (2022-10)
Bridging the Gap Between Vision Transformers and Convolutional Neural Networks on Small Datasets
2311.14097 (2023-11)
ACT-Diffusion: Efficient Adversarial Consistency Training for One-step Diffusion Models
and 5 more not named here
loads_pyarrow 6 other papers
2 dated earlier, 4 later
2110.07402 (2021-10)
Self-Supervised Learning by Estimating Twin Class Distributions
2111.15174 (2021-11)
CRIS: CLIP-Driven Referring Image Segmentation
2209.04996 (2022-09)
Switchable Online Knowledge Distillation
and 3 more not named here
dumps_pyarrow 4 other papers
4 later
2209.04996 (2022-09)
Switchable Online Knowledge Distillation
2210.05958 (2022-10)
Bridging the Gap Between Vision Transformers and Convolutional Neural Networks on Small Datasets
2403.06069 (2024-03)
Implicit Image-to-Image Schrodinger Bridge for Image Restoration
and 1 more not named here
adjust_keep_rate 3 other papers
3 later
2210.05958 (2022-10)
Bridging the Gap Between Vision Transformers and Convolutional Neural Networks on Small Datasets
2404.07713 (2024-04)
Progressive Semantic-Guided Vision Transformer for Zero-Shot Learning
2405.14700 (2024-05)
Sparse-Tuning: Adapting Vision Transformers with Efficient Fine-tuning and Inference
speed_test 3 other papers
3 later
2210.05958 (2022-10)
Bridging the Gap Between Vision Transformers and Convolutional Neural Networks on Small Datasets
2404.07713 (2024-04)
Progressive Semantic-Guided Vision Transformer for Zero-Shot Learning
2405.14700 (2024-05)
Sparse-Tuning: Adapting Vision Transformers with Efficient Fine-tuning and Inference
stem 1 other paper
1 later
2212.08059 (2022-12)
Rethinking Vision Transformers for MobileNet Size and Speed

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) take all the image patches as tokens and construct multi-head self-attention (MHSA) among them. Complete leverage of these image tokens brings redundant computations since not all the tokens are attentive in MHSA. Examples include that tokens containing semantically meaningless or distractive image backgrounds do not positively contribute to the ViT predictions. In this work, we propose to reorganize image tokens during the feed-forward process of ViT models, which is integrated into ViT during training. For each forward inference, we identify the attentive image tokens between MHSA and FFN (i.e., feed-forward network) modules, which is guided by the corresponding class token attention. Then, we reorganize image tokens by preserving attentive image tokens and fusing inattentive ones to expedite subsequent MHSA and FFN computations. To this end, our method EViT improves ViTs from two perspectives. First, under the same amount of input image tokens, our method reduces MHSA and FFN computation for efficient inference. For instance, the inference speed of DeiT-S is increased by 50% while its recognition accuracy is decreased by only 0.3% for ImageNet classification. Second, by maintaining the same computational cost, our method empowers ViTs to take more image tokens as input for recognition accuracy improvement, where the image tokens are from higher resolution images. An example is that we improve the recognition accuracy of DeiT-S by 1% for ImageNet classification at the same computational cost of a vanilla DeiT-S. Meanwhile, our method does not introduce more parameters to ViTs. Experiments on the standard benchmarks show the effectiveness of our method. The code is available at https://github.com/youweiliang/evit

For agents

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

get_harvested_code_for_paper("2202.07800")
get_code_for_paper("2202.07800")
have("2202.07800")

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

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

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

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

Connect an agent — have() is free.