Papers › Fast Vision Transformers with HiLo Attention

Fast Vision Transformers with HiLo Attention

26 May 2022arXiv:2205.13213archive 2025-07-28

Zizheng Pan, Jianfei Cai, Bohan Zhuang

Vision Transformers (ViTs) have triggered the most recent and significant breakthroughs in computer vision. Their efficient designs are mostly guided by the indirect metric of computational complexity, i.e., FLOPs, which however has a clear gap with the direct metric such as throughput. Thus, we propose to use the direct speed evaluation on the target platform as the design principle for efficient ViTs. Particularly, we introduce LITv2, a simple and effective ViT which performs favourably against the existing state-of-the-art methods across a spectrum of different model sizes with faster speed. At the core of LITv2 is a novel self-attention mechanism, which we dub HiLo. HiLo is inspired by the insight that high frequencies in an image capture local fine details and low frequencies focus on global structures, whereas a multi-head self-attention layer neglects the characteristic of different frequencies. Therefore, we propose to disentangle the high/low frequency patterns in an attention layer by separating the heads into two groups, where one group encodes high frequencies via self-attention within each local window, and another group encodes low frequencies by performing global attention between the average-pooled low-frequency keys and values from each window and each query position in the input feature map. Benefiting from the efficient design for both groups, we show that HiLo is superior to the existing attention mechanisms by comprehensively benchmarking FLOPs, speed and memory consumption on GPUs and CPUs. For example, HiLo is 1.4x faster than spatial reduction attention and 1.6x faster than local window attention on CPUs. Powered by HiLo, LITv2 serves as a strong backbone for mainstream vision tasks including image classification, dense detection and segmentation. Code is available at https://github.com/ziplab/LITv2.

PaperPDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2205.13213")

Code

Syntology Ran 2 of 13 code samples harvested from 3 repositories linked to this paper; 11 have no recorded run. Of those that ran: 1 ran · our draft was wrong; 1 ran with no contract checked.

By repository: official repository: 1 sample from 1 repository, 1 ran; community (archive-listed): 12 samples from 2 repositories, 1 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

zip-group/litv2 officialmentioned in papermentioned on GitHubpytorchApache-2.0 report
ziplab/litv2 officialmentioned in papermentioned on GitHubpytorchApache-2.0 report
MonashAI/LIT mentioned on GitHubpytorch report
Westlake-AI/openmixup mentioned on GitHubpytorch report
zhuang-group/lit mentioned on GitHubpytorchApache-2.0 report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

13 samples harvested; 2 ran; 0 honoured the contract we drafted; 11 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

1ran · our draft was wrong
1ran
11unverified

Licence: 0 of the 13 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from 3 repositories linked to this paper, official or community; each sample names its own and says which. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

flops_to_string ziplab/LITv2/classification/models/litv2.py official repository ran · our draft was wrong fingerprinted Apache-2.0 (permissive) · d9590a53c9850a4d · report
RelPosAttention MonashAI/LIT/classification/code_for_lit_s_m_b/models/attentions.py community (archive-listed) ran · metamorphic tier: deterministic Apache-2.0 (permissive) · a4a70588d1c2a75e · report
bboxes_iou zhuang-group/lit/classification/code_for_lit_s_m_b/mm_modules/utils.py community (archive-listed) unverified Apache-2.0 (permissive) · 4673440c036f73eb · report
build_model zhuang-group/lit/classification/code_for_lit_s_m_b/models/build.py community (archive-listed) unverified Apache-2.0 (permissive) · 45732831d1539a53 · report
build_scheduler zhuang-group/lit/classification/code_for_lit_s_m_b/lr_scheduler.py community (archive-listed) unverified Apache-2.0 (permissive) · c02cc4e0b5720211 · report
conv_flops zhuang-group/lit/classification/code_for_lit_s_m_b/models/attentions.py community (archive-listed) unverified Apache-2.0 (permissive) · 25517cf1e6458c39 · report
create_logger zhuang-group/lit/classification/code_for_lit_s_m_b/logger.py community (archive-listed) unverified Apache-2.0 (permissive) · 80450600f7f09b0a · report
get_config zhuang-group/lit/classification/code_for_lit_s_m_b/config.py community (archive-listed) unverified Apache-2.0 (permissive) · 02a9e80c2bb81815 · report
matrix_iou zhuang-group/lit/classification/code_for_lit_s_m_b/mm_modules/utils.py community (archive-listed) unverified Apache-2.0 (permissive) · f1f823695040297a · report
postprocess zhuang-group/lit/classification/code_for_lit_s_m_b/mm_modules/utils.py community (archive-listed) unverified Apache-2.0 (permissive) · 9b8d355984e33a51 · report
reduce_loss_dict zhuang-group/lit/classification/code_for_lit_s_m_b/mm_modules/distributed_util.py community (archive-listed) unverified Apache-2.0 (permissive) · 9b8aa876c71b0665 · report
scatter_gather zhuang-group/lit/classification/code_for_lit_s_m_b/mm_modules/distributed_util.py community (archive-listed) unverified Apache-2.0 (permissive) · a98b48e2e2be4ce8 · report
vis zhuang-group/lit/classification/code_for_lit_s_m_b/mm_modules/vis_utils.py community (archive-listed) unverified Apache-2.0 (permissive) · 29413e543e79fad8 · report

Tasks

BenchmarkingEfficient ViTsImage ClassificationObject DetectionSemantic Segmentationimage-classification

Results from the paper archive 2025-07-28

TaskDatasetModelMetricValueRank at snapshotLeaderboardReport
Image Classification ImageNet LITv2-B|384 GFLOPs 39.7 #300 of 1060 Archive leaderboard report
Image Classification ImageNet LITv2-B|384 Number of params 87M #300 of 1060 Archive leaderboard report
Image Classification ImageNet LITv2-B|384 Top 1 Accuracy 84.7% #300 of 1060 Archive leaderboard report
Image Classification ImageNet LITv2-B GFLOPs 13.2 #406 of 1060 Archive leaderboard report
Image Classification ImageNet LITv2-B Top 1 Accuracy 83.6% #406 of 1060 Archive leaderboard report
Image Classification ImageNet LITv2-M GFLOPs 7.5 #444 of 1060 Archive leaderboard report
Image Classification ImageNet LITv2-M Number of params 49M #444 of 1060 Archive leaderboard report
Image Classification ImageNet LITv2-M Top 1 Accuracy 83.3% #444 of 1060 Archive leaderboard report
Image Classification ImageNet LITv2-S GFLOPs 3.7 #587 of 1060 Archive leaderboard report
Image Classification ImageNet LITv2-S Number of params 28M #587 of 1060 Archive leaderboard report
Image Classification ImageNet LITv2-S Top 1 Accuracy 82% #587 of 1060 Archive leaderboard report

Ranks are positions in the archive's leaderboards as they stood at the 2025-07-28 snapshot. Results published since then are not among these rows, so a rank here is not a current standing.

Methods

SPEED

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections