SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2402.00033 · AAAI · 2024

LF-ViT: Reducing Spatial Redundancy in Vision Transformer for Efficient Image Recognition

Yun Cheng, Jie Liu, Zhijun Li, Youbing Hu, Anqi Lu, Zhiqiang Cao, Dawei Wei

arXiv · PDF · Open in the Atlas

Code that ran

11 of 18 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; 7 failures of our instrument; 7 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/2402.00033.json · badge: /api/ran/2402.00033.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
edgeai1/lf-vit canonical (classifier label)
classifier basis: census
7 ran · 5 no recorded run
edgeai1/LF-ViT community
Papers with Code archive
4 ran · 2 no recorded run
FunctionStatusWhere it lives
Attention Ran
ran on a synthesized input
edgeai1/LF-ViT/deit/models_deit.py
pointer only (licence: NONE) · get_code("52f85fff66a980a4")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, edgeai1/LF-ViT 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.

Block Ran
ran on a synthesized input
edgeai1/LF-ViT/deit/models_deit.py
pointer only (licence: NONE) · get_code("a1b6bdfb470d9562")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, edgeai1/LF-ViT 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.

MultiResoPatchEmbed Ran
ran on a synthesized input
edgeai1/LF-ViT/deit/models_deit.py
pointer only (licence: NONE) · get_code("3d1ff83d44a53af8")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, edgeai1/LF-ViT 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.

accuracy Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
edgeai1/lf-vit/utils.py
pointer only (licence: NONE) · get_code("11a9344aa6b3aaf2")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, edgeai1/lf-vit 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.

batch_index_select Ran
ran; our contract draft was wrong, not the code
edgeai1/lf-vit/utils.py
pointer only (licence: NONE) · get_code("908619be92da9903")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, edgeai1/lf-vit 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; our contract draft was wrong, not the code
edgeai1/lf-vit/deit/datasets.py
pointer only (licence: NONE) · get_code("3bc74137ab36aa79")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, edgeai1/lf-vit 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.

dynamic_evaluate Ran
ran; our contract draft was wrong, not the code
edgeai1/lf-vit/dynamic_inference.py
pointer only (licence: NONE) · get_code("8f49cc1ffec8b4b7")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, edgeai1/lf-vit 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.

generate Ran
ran; our contract draft was wrong, not the code
edgeai1/LF-ViT/deit/models_deit.py
pointer only (licence: NONE) · get_code("dd836cf662c768c1")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, edgeai1/LF-ViT 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_index Ran
ran; our contract draft was wrong, not the code
edgeai1/lf-vit/utils.py
pointer only (licence: NONE) · get_code("92d94f28ebc2079a")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, edgeai1/lf-vit 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_keep_indices Ran
ran, honoured the contract we drafted
edgeai1/lf-vit/visualize.py
pointer only (licence: NONE) · get_code("37f5e48a5790ef05")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, edgeai1/lf-vit 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_transform Ran
ran; our contract draft was wrong, not the code
edgeai1/lf-vit/visualize.py
pointer only (licence: NONE) · get_code("7d65fb83e43743c6")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, edgeai1/lf-vit 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.

LFVisionTransformer Not yet run
unverified (harvested, no recorded run)
edgeai1/LF-ViT/deit/models_deit.py
pointer only (licence: NONE) · get_code("e36d348c0df870e0")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, edgeai1/LF-ViT 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. No invocation recorded.

block_information Not yet run
unverified (harvested, no recorded run)
edgeai1/LF-ViT/deit/models_deit.py
pointer only (licence: NONE) · get_code("f51a8394b17320e2")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, edgeai1/LF-ViT 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. No invocation recorded.

build_dataset Not yet run
unverified (harvested, no recorded run)
edgeai1/lf-vit/deit/datasets.py
pointer only (licence: NONE) · get_code("72c99ead58ffc65e")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, edgeai1/lf-vit 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. No invocation recorded.

build_dataset2 Not yet run
unverified (harvested, no recorded run)
edgeai1/lf-vit/deit/datasets.py
pointer only (licence: NONE) · get_code("b6679d5755485cf9")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, edgeai1/lf-vit 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. No invocation recorded.

evaluate_throughput Not yet run
unverified (harvested, no recorded run)
edgeai1/lf-vit/dynamic_inference.py
pointer only (licence: NONE) · get_code("ca075d52aba3771f")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, edgeai1/lf-vit 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. No invocation recorded.

gen_masked_tokens Not yet run
unverified (harvested, no recorded run)
edgeai1/lf-vit/visualize.py
pointer only (licence: NONE) · get_code("b0434ead3a6e4aea")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, edgeai1/lf-vit 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. No invocation recorded.

generate_logits Not yet run
unverified (harvested, no recorded run)
edgeai1/lf-vit/dynamic_inference.py
pointer only (licence: NONE) · get_code("1219d9ea900f99e7")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, edgeai1/lf-vit 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. No invocation recorded.

Also present in other papers' code

Of 18 samples lifted from this paper's linked repositories, 18 carry a function identity and 0 do not. Of the 18 distinct functions with an identity, 10 are also present in other papers whose code we hold (10 with at least one paper dated earlier, 2 the same month, 3 later) and 8 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
30 dated earlier, 1 the same month, 5 later, 1 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
batch_index_select
brick of this paper's assembly: helper
10 other papers
7 dated earlier, 1 the same month, 2 later · 1 only as an assembly brick
2106.02034 (2021-06)
DynamicViT: Efficient Vision Transformers with Dynamic Token Sparsification
2202.06258 (2022-02)
Flowformer: Linearizing Transformers with Conservation Flows
aaai_25860 (2023 (year only))
CF-ViT: A General Coarse-to-Fine Method for Vision Transformer
and 7 more not named here
Attention
brick of this paper's assembly: model
7 other papers
4 dated earlier, 3 later · 5 only as an assembly brick
2010.11929 (2020-10)
An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
2301.08243 (2023-01)
Self-Supervised Learning from Images with a Joint-Embedding Predictive Architecture
2306.09347 (2023-06)
Segment Any Point Cloud Sequences by Distilling Vision Foundation Models
and 4 more not named here
dynamic_evaluate 5 other papers
5 dated earlier
2010.05300 (2020-10)
Glance and Focus: a Dynamic Approach to Reducing Spatial Redundancy in Image Classification
2105.15075 (2021-05)
Not All Images are Worth 16x16 Words: Dynamic Transformers for Efficient Image Recognition
2201.03014 (2022-01)
Glance and Focus Networks for Dynamic Visual Recognition
and 2 more not named here
accuracy 1 other paper
1 dated earlier
aaai_25860 (2023 (year only))
CF-ViT: A General Coarse-to-Fine Method for Vision Transformer
build_dataset2 1 other paper
1 dated earlier
2108.01390 (2021-08)
Evo-ViT: Slow-Fast Token Evolution for Dynamic Vision Transformer
gen_masked_tokens 1 other paper
1 dated earlier
aaai_25860 (2023 (year only))
CF-ViT: A General Coarse-to-Fine Method for Vision Transformer
get_index 1 other paper
1 dated earlier
aaai_25860 (2023 (year only))
CF-ViT: A General Coarse-to-Fine Method for Vision Transformer
get_keep_indices 1 other paper
1 dated earlier
aaai_25860 (2023 (year only))
CF-ViT: A General Coarse-to-Fine Method for Vision Transformer
get_transform 1 other paper
1 dated earlier
aaai_25860 (2023 (year only))
CF-ViT: A General Coarse-to-Fine Method for Vision Transformer

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

The Vision Transformer (ViT) excels in accuracy when handling high-resolution images, yet it confronts the challenge of significant spatial redundancy, leading to increased computational and memory requirements. To address this, we present the Localization and Focus Vision Transformer (LF-ViT). This model operates by strategically curtailing computational demands without impinging on performance. In the Localization phase, a reduced-resolution image is processed; if a definitive prediction remains elusive, our pioneering Neighborhood Global Class Attention (NGCA) mechanism is triggered, effectively identifying and spotlighting class-discriminative regions based on initial findings. Subsequently, in the Focus phase, this designated region is used from the original image to enhance recognition. Uniquely, LF-ViT employs consistent parameters across both phases, ensuring seamless end-to-end optimization. Our empirical tests affirm LF-ViT's prowess: it remarkably decreases Deit-S's FLOPs by 63% and concurrently amplifies throughput twofold. Code of this project is at https://github.com/edgeai1/LF-ViT.git.

For agents

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

get_harvested_code_for_paper("2402.00033")
get_code_for_paper("2402.00033")
have("2402.00033")

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

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

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

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

Connect an agent — have() is free.