SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2205.13213 · NeurIPS · 2022

Fast Vision Transformers with HiLo Attention

Bohan Zhuang, Zizheng Pan, Jianfei Cai, Avg Pool Concat

arXiv · PDF · Open in the Atlas

Code that ran

11 of 13 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (1 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 7 have no contract verdict; 4 failures of our instrument; 2 no recorded run), measured 2026-11-24; 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/2205.13213.json · badge: /api/ran/2205.13213.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
zhuang-group/lit canonical (classifier label)
classifier basis not recorded on the link
9 ran · 2 no recorded run
ziplab/LITv2 canonical (classifier label)
classifier basis: classifier_2025
1 ran · 0 no recorded run
MonashAI/LIT community
Papers with Code archive
1 ran · 0 no recorded run
FunctionStatusWhere it lives
RelPosAttention Ran
ran on a synthesized input · constructed an object; no result was computed
MonashAI/LIT/classification/code_for_lit_s_m_b/models/attentions.py
code served (permissive licence) · get_code("a4a70588d1c2a75e")
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 an instance of its own class, RelPosAttention: the run constructed the object and did not call it, so no result was computed. 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
from timm.models.layers import DropPath, to_2tuple, trunc_normal_

torch.manual_seed(0)

ARGS = {
    'dim': 8,
    'input_resolution': (2, 3),
    'num_heads': 2,
    'qkv_bias': True,
    'qk_scale': None,
    'attn_drop': 0.0,
    'proj_drop': 0.0
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
timm, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type RelPosAttention — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a RelPosAttention output the recorded ndim 0 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
bboxes_iou Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
zhuang-group/lit/classification/code_for_lit_s_m_b/mm_modules/utils.py
code served (permissive licence) · get_code("4673440c036f73eb")
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, 3) as a later run recorded it. The image it ran in was 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 two sets of bounding boxes in xyxy format
# bboxes_a: (N, 4) where N=2
# bboxes_b: (K, 4) where K=3
bboxes_a = torch.tensor([
    [10.0, 20.0, 50.0, 60.0],
    [100.0, 150.0, 200.0, 250.0]
], dtype=torch.float32)

bboxes_b = torch.tensor([
    [15.0, 25.0, 55.0, 65.0],
    [100.0, 150.0, 210.0, 260.0],
    [500.0, 500.0, 600.0, 600.0]
], dtype=torch.float32)

ARGS = {
    "bboxes_a": bboxes_a,
    "bboxes_b": bboxes_b,
    "xyxy": True
}
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, 3) — shape (2, 3) 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
build_scheduler Ran
ran; our contract draft was wrong, not the code
zhuang-group/lit/classification/code_for_lit_s_m_b/lr_scheduler.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from ghrua/seqpe, is pointer only (licence: NONE) · get_code("c02cc4e0b5720211")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from ghrua/seqpe, 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.

conv_flops Ran
ran on a synthesized input
zhuang-group/lit/classification/code_for_lit_s_m_b/models/attentions.py
code served (permissive licence) · get_code("25517cf1e6458c39")
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 int, ndim 0, dtype family int, shape () as a later run recorded it. The image it ran in was 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 math

def conv_flops(k, c_in, c_out, stride, padding, resolution, bias=True, dialation=1):
    batch_size = 1
    output_dims = math.floor((resolution + 2 * padding - dialation * (k - 1) - 1) / stride + 1)
    kernel_dims = k
    in_channels = c_in
    out_channels = c_out
    groups = 1
    filters_per_channel = out_channels // groups
    conv_per_position_flops = int(kernel_dims ** 2) * in_channels * filters_per_channel
    active_elements_count = batch_size * int(output_dims ** 2)
    overall_conv_flops = conv_per_position_flops * active_elements_count
    bias_flops = 0
    if bias is not None:
        bias_flops = out_channels * active_elements_count
    overall_flops = overall_conv_flops + bias_flops
    return int(overall_flops)

ARGS = {
    "k": 3,
    "c_in": 16,
    "c_out": 32,
    "stride": 1,
    "padding": 1,
    "resolution": 28,
    "bias": True,
    "dialation": 1
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type int, ndim 0, dtype family int, shape () — shape () 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
create_logger Ran
ran; our contract draft was wrong, not the code
zhuang-group/lit/classification/code_for_lit_s_m_b/logger.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from ghrua/seqpe, is pointer only (licence: NONE) · get_code("80450600f7f09b0a")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from ghrua/seqpe, 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.

flops_to_string Ran
ran; our contract draft was wrong, not the code
ziplab/LITv2/classification/models/litv2.py
code served (permissive licence) · get_code("d9590a53c9850a4d")
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 str. 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 numpy as np

# The function flops_to_string takes:
# - flops: a numeric value (int or float) representing floating point operations
# - units: a string specifying the unit ('G', 'M', 'K', or other)
# - precision: an integer specifying decimal precision for rounding

ARGS = {
    'flops': 1500000000,  # 1.5 billion FLOPs
    'units': 'G',
    'precision': 2
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 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
matrix_iou Ran
ran on a synthesized input
zhuang-group/lit/classification/code_for_lit_s_m_b/mm_modules/utils.py
code served (permissive licence) · get_code("f1f823695040297a")
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 ndarray, ndim 2, dtype family float, shape (2, 3) as a later run recorded it. The image it ran in was 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 numpy as np

# Create sample bounding boxes in format [x1, y1, x2, y2]
# 'a' will be shape (2, 4) - 2 boxes with 4 coordinates each
a = np.array([
    [10.0, 20.0, 50.0, 60.0],
    [30.0, 40.0, 70.0, 80.0]
], dtype=np.float32)

# 'b' will be shape (3, 4) - 3 boxes with 4 coordinates each
b = np.array([
    [15.0, 25.0, 55.0, 65.0],
    [35.0, 45.0, 75.0, 85.0],
    [5.0, 10.0, 40.0, 50.0]
], dtype=np.float32)

ARGS = {
    'a': a,
    'b': b
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 2, dtype family float, shape (2, 3) — shape (2, 3) 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
postprocess Ran
ran on a synthesized input
zhuang-group/lit/classification/code_for_lit_s_m_b/mm_modules/utils.py
code served (permissive licence) · get_code("9b8d355984e33a51")
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 list, 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
import torchvision

torch.manual_seed(0)

# Create a prediction tensor with shape (N, B, 4 + 1 + num_classes)
# N=2 (batch size), B=3 (number of boxes), 4 for box coords, 1 for objectness, 5 for class scores
num_classes = 5
N = 2  # batch size
B = 3  # number of boxes per image

# prediction shape: (N, B, 4 + 1 + num_classes)
# dimensions: xc, yc, w, h, objectness, class_scores (5 classes)
prediction = torch.randn(N, B, 4 + 1 + num_classes)

# Make sure values are in reasonable ranges
# Box coordinates (xc, yc, w, h) - keep them positive and reasonable
prediction[:, :, :4] = torch.abs(prediction[:, :, :4]) * 100 + 10
# Objectness score (0-1)
prediction[:, :, 4] = torch.sigmoid(prediction[:, :, 4])
# Class scores (0-1)
prediction[:, :, 5:] = torch.sigmoid(prediction[:, :, 5:])

ARGS = {
    "prediction": prediction,
    "num_classes": num_classes,
    "conf_thre": 0.7,
    "nms_thre": 0.45,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch, torchvision — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, dtype family float — a list 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
reduce_loss_dict Ran
ran on a synthesized input
zhuang-group/lit/classification/code_for_lit_s_m_b/mm_modules/distributed_util.py
code served (permissive licence) · get_code("9b8aa876c71b0665")
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 dict. 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

torch.manual_seed(0)

# The function expects a loss_dict with string keys and tensor values
# The tensors are stacked and reduced, so they should be scalar or 1D tensors
loss_dict = {
    "loss_classifier": torch.tensor(0.5),
    "loss_box": torch.tensor(0.3),
    "loss_objectness": torch.tensor(0.2),
}

ARGS = {
    "loss_dict": loss_dict,
}
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 dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 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
scatter_gather Ran
ran on a synthesized input
zhuang-group/lit/classification/code_for_lit_s_m_b/mm_modules/distributed_util.py
code served (permissive licence) · get_code("a98b48e2e2be4ce8")
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 list, ndim 1, dtype family float; no output shape is stated. 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 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
import pickle

torch.manual_seed(0)

# The scatter_gather function takes one parameter: data
# It should be serializable (can be pickled)
# The function will pickle it, encode it, and later unpickle it
# So we can pass any serializable Python object

# Let's create some test data that is serializable
test_data = {
    "tensor": torch.randn(2, 4),
    "list": [1, 2, 3],
    "string": "test",
    "number": 42
}

ARGS = {
    "data": test_data
}
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 list, ndim 1, dtype family float — a list 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
vis Ran
ran on a synthesized input
zhuang-group/lit/classification/code_for_lit_s_m_b/mm_modules/vis_utils.py
code served (permissive licence) · get_code("29413e543e79fad8")
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 ndarray, ndim 3, dtype family int, shape (100, 150, 3) as a later run recorded it. The image it ran in was 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
import numpy as np
import cv2

torch.manual_seed(0)

# Create a small dummy image (height=100, width=150, channels=3)
img = np.random.randint(0, 256, (100, 150, 3), dtype=np.uint8)

# Create boxes in format [x, y, width, height]
boxes = torch.FloatTensor([
    [10.0, 20.0, 30.0, 40.0],
    [60.0, 50.0, 25.0, 35.0]
])

# Create scores (confidence values)
scores = torch.FloatTensor([0.9, 0.7])

# Create class IDs
cls_ids = torch.LongTensor([0, 1])

# Create class names
class_names = ["cat", "dog", "bird"]

ARGS = {
    "img": img,
    "boxes": boxes,
    "scores": scores,
    "cls_ids": cls_ids,
    "conf": 0.5,
    "class_names": class_names,
    "color": None
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
cv2, numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 3, dtype family int, shape (100, 150, 3) — shape (100, 150, 3) 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
build_model Not yet run
unverified (harvested, no recorded run)
zhuang-group/lit/classification/code_for_lit_s_m_b/models/build.py
code served (permissive licence) · get_code("45732831d1539a53")
How it ran

no invocation recorded.

get_config Not yet run
unverified (harvested, no recorded run)
zhuang-group/lit/classification/code_for_lit_s_m_b/config.py
code served (permissive licence) · get_code("02a9e80c2bb81815")
How it ran

no invocation recorded.

Also present in other papers' code

Of 13 samples lifted from this paper's linked repositories, 13 carry a function identity and 0 do not. Of the 13 distinct functions with an identity, 11 are also present in other papers whose code we hold (3 with at least one paper dated earlier, 2 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
get_config 51 other papers
9 dated earlier, 1 the same month, 40 later, 1 same year, order not determinable
2103.14030 (2021-03)
Swin Transformer: Hierarchical Vision Transformer using Shifted Windows
2106.03650 (2021-06)
Shuffle Transformer: Rethinking Spatial Shuffle for Vision Transformer
2106.03746 (2021-06)
Efficient Training of Visual Transformers with Small Datasets
and 48 more not named here
create_logger 35 other papers
6 dated earlier, 1 the same month, 27 later, 1 same year, order not determinable
2104.13840 (2021-04)
Twins: Revisiting the Design of Spatial Attention in Vision Transformers
2106.03650 (2021-06)
Shuffle Transformer: Rethinking Spatial Shuffle for Vision Transformer
2106.03746 (2021-06)
Efficient Training of Visual Transformers with Small Datasets
and 32 more not named here
build_scheduler 13 other papers
6 dated earlier, 6 later, 1 same year, order not determinable
2106.03650 (2021-06)
Shuffle Transformer: Rethinking Spatial Shuffle for Vision Transformer
2106.03746 (2021-06)
Efficient Training of Visual Transformers with Small Datasets
2106.04263 (2021-06)
On the Connection between Local Attention and Dynamic Depth-wise Convolution
and 10 more not named here
bboxes_iou 2 other papers
1 later, 1 same year, order not determinable
aaai_20099 (2022 (year only))
Less is More: Pay Less Attention in Vision Transformers
aaai_25158 (2023 (year only))
TransVCL: Attention-Enhanced Video Copy Localization Network with Flexible Supervision
build_model 1 other paper
1 same year, order not determinable
aaai_20099 (2022 (year only))
Less is More: Pay Less Attention in Vision Transformers
conv_flops 1 other paper
1 same year, order not determinable
aaai_20099 (2022 (year only))
Less is More: Pay Less Attention in Vision Transformers
matrix_iou 1 other paper
1 same year, order not determinable
aaai_20099 (2022 (year only))
Less is More: Pay Less Attention in Vision Transformers
postprocess 1 other paper
1 same year, order not determinable
aaai_20099 (2022 (year only))
Less is More: Pay Less Attention in Vision Transformers
reduce_loss_dict 1 other paper
1 same year, order not determinable
aaai_20099 (2022 (year only))
Less is More: Pay Less Attention in Vision Transformers
scatter_gather 1 other paper
1 same year, order not determinable
aaai_20099 (2022 (year only))
Less is More: Pay Less Attention in Vision Transformers
vis 1 other paper
1 same year, order not determinable
aaai_20099 (2022 (year only))
Less is More: Pay Less Attention in Vision Transformers

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-24.

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 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.4× faster than spatial reduction attention and 1.6× 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.

For agents

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

get_harvested_code_for_paper("2205.13213")
get_code_for_paper("2205.13213")
have("2205.13213")

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

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

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

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

Connect an agent — have() is free.