Papers › MaxViT: Multi-Axis Vision Transformer

MaxViT: Multi-Axis Vision Transformer

4 Apr 2022arXiv:2204.01697archive 2025-07-28

Zhengzhong Tu, Hossein Talebi, Han Zhang, Feng Yang, Peyman Milanfar, Alan Bovik, Yinxiao Li

Transformers have recently gained significant attention in the computer vision community. However, the lack of scalability of self-attention mechanisms with respect to image size has limited their wide adoption in state-of-the-art vision backbones. In this paper we introduce an efficient and scalable attention model we call multi-axis attention, which consists of two aspects: blocked local and dilated global attention. These design choices allow global-local spatial interactions on arbitrary input resolutions with only linear complexity. We also present a new architectural element by effectively blending our proposed attention model with convolutions, and accordingly propose a simple hierarchical vision backbone, dubbed MaxViT, by simply repeating the basic building block over multiple stages. Notably, MaxViT is able to ''see'' globally throughout the entire network, even in earlier, high-resolution stages. We demonstrate the effectiveness of our model on a broad spectrum of vision tasks. On image classification, MaxViT achieves state-of-the-art performance under various settings: without extra data, MaxViT attains 86.5% ImageNet-1K top-1 accuracy; with ImageNet-21K pre-training, our model achieves 88.7% top-1 accuracy. For downstream tasks, MaxViT as a backbone delivers favorable performance on object detection as well as visual aesthetic assessment. We also show that our proposed model expresses strong generative modeling capability on ImageNet, demonstrating the superior potential of MaxViT blocks as a universal vision module. The source code and trained models will be available at https://github.com/google-research/maxvit.

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="2204.01697")

Code

Syntology Ran 33 of 53 code samples harvested from 7 repositories linked to this paper; 20 have no recorded run. Of those that ran: 2 ran · honoured contract; 2 ran · our draft was wrong; 11 ran · fixture could not drive it; 18 ran with no contract checked.

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

15 repositories listed; official and paper-mentioned ones first.

google-research/maxvit officialmentioned in papermentioned on GitHubtf report
ChristophReich1996/MaxViT mentioned on GitHubpytorchMIT report
RooKichenn/pytorch-MaxViT mentioned on GitHubpytorch report
google-research/maxim mentioned on GitHubjax report
hankyul2/maxvit-pytorch mentioned on GitHubpytorch report
lucidrains/imagen-pytorch mentioned on GitHubpytorchMIT report
lucidrains/vit-pytorch mentioned on GitHubpytorch report
qwopqwop200/MaxVIT-pytorch mentioned on GitHubpytorchMIT 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

53 samples harvested; 33 ran; 2 honoured the contract we drafted; 20 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.

2ran · honoured contract
2ran · our draft was wrong
11ran · fixture could not drive it
18ran
20unverified

Licence: 9 of the 53 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 7 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.

Attention google-research/maxvit/maxvit/models/maxvit.py official repository ran · metamorphic tier: deterministic Apache-2.0 (permissive) · 2bc733f08e821139 · report
BatchNormalization google-research/maxvit/maxvit/models/maxvit.py official repository ran Apache-2.0 (permissive) · e2718d640d43e769 · report
TrailDense google-research/maxvit/maxvit/models/maxvit.py official repository ran · metamorphic tier: deterministic Apache-2.0 (permissive) · 839c67588aa822e2 · report
float32_softmax google-research/maxvit/maxvit/models/maxvit.py official repository ran · honoured contract fingerprinted Apache-2.0 (permissive) · 5ecfa57092a8cecc · report
FFN google-research/maxvit/maxvit/models/maxvit.py official repository unverified Apache-2.0 (permissive) · f50211588bf5be8b · report
MBConvBlock google-research/maxvit/maxvit/models/maxvit.py official repository unverified Apache-2.0 (permissive) · 2d7a9595c2215efd · report
MaxViTBlock google-research/maxvit/maxvit/models/maxvit.py official repository unverified Apache-2.0 (permissive) · c99919623d98cd27 · report
SE google-research/maxvit/maxvit/models/maxvit.py official repository unverified Apache-2.0 (permissive) · ee80113a460390fe · report
TpuBatchNormalization google-research/maxvit/maxvit/models/maxvit.py official repository unverified Apache-2.0 (permissive) · d237bfe09ec44cfd · report
config_batch_norm google-research/maxvit/maxvit/models/maxvit.py official repository unverified Apache-2.0 (permissive) · 20213f171bc1c7e9 · report
create_config_from_dict google-research/maxvit/maxvit/models/maxvit.py official repository unverified Apache-2.0 (permissive) · 256b0e25fa8d8cee · report
Attention lucidrains/vit-pytorch/vit_pytorch/max_vit.py community (archive-listed) ran MIT (permissive) · 0ff4fe4361d49089 · report
Attention2d hankyul2/maxvit-pytorch/maxvit.py community (archive-listed) ran · metamorphic tier: deterministic no licence file found · pointer only · d227ba24d7d8d855 · report
BlockGatingUnit google-research/maxim/maxim/models/maxim.py community (archive-listed) ran · metamorphic tier: deterministic Apache-2.0 (permissive) · d8da107e27ecbe28 · report
BlockGmlpLayer google-research/maxim/maxim/models/maxim.py community (archive-listed) ran · metamorphic tier: deterministic Apache-2.0 (permissive) · 325b31d5363dae7d · report
Dropsample lucidrains/vit-pytorch/vit_pytorch/max_vit.py community (archive-listed) ran fingerprinted MIT (permissive) · b3be1bfa6f51c051 · report
FeedForward lucidrains/vit-pytorch/vit_pytorch/max_vit.py community (archive-listed) ran · metamorphic tier: invariant MIT (permissive) · 32bd4f3abdceaefe · report
GridGatingUnit google-research/maxim/maxim/models/maxim.py community (archive-listed) ran · metamorphic tier: deterministic Apache-2.0 (permissive) · 86d6d05360b6903b · report
LayerScale2d hankyul2/maxvit-pytorch/maxvit.py community (archive-listed) ran · metamorphic tier: deterministic fingerprinted no licence file found · pointer only · 8fa30deee34804c0 · report
MBConv lucidrains/vit-pytorch/vit_pytorch/max_vit.py community (archive-listed) ran · our draft was wrong MIT (permissive) · 6b918699878401db · report
MBConvResidual lucidrains/vit-pytorch/vit_pytorch/max_vit.py community (archive-listed) ran fingerprinted MIT (permissive) · f4987984f431cfd0 · report
MaxViT lucidrains/vit-pytorch/vit_pytorch/max_vit.py community (archive-listed) ran MIT (permissive) · 7e1c7833684c337a · report
MaxxVitTransformerCfg hankyul2/maxvit-pytorch/maxvit.py community (archive-listed) ran · metamorphic tier: deterministic no licence file found · pointer only · 08082022ac2c6e65 · report
RelativeSelfAttention towhee-io/towhee/towhee/models/max_vit/max_vit.py community (archive-listed) ran Apache-2.0 (permissive) · c72be25671079b1b · report
Residual lucidrains/vit-pytorch/vit_pytorch/max_vit.py community (archive-listed) ran fingerprinted MIT (permissive) · 636a208dabc2a711 · report
SqueezeExcitation lucidrains/vit-pytorch/vit_pytorch/max_vit.py community (archive-listed) ran MIT (permissive) · b15b0232b5e08a9c · report
block_images_einops google-research/maxim/maxim/models/maxim.py community (archive-listed) ran · fixture could not drive it Apache-2.0 (permissive) · 8a67f23552a44d61 · report
drop_path qwopqwop200/MaxVIT-pytorch/MaxVIT.py community (archive-listed) ran · fixture could not drive it MIT (permissive) · 971ae8d2d8313e30 · report
gelu_ignore_parameters towhee-io/towhee/towhee/models/max_vit/max_vit.py community (archive-listed) ran Apache-2.0 (permissive) · 48de7cab87cd24fa · report
get_rel_pos_cls hankyul2/maxvit-pytorch/maxvit.py community (archive-listed) ran · our draft was wrong no licence file found · pointer only · 9d7347fa5b820e84 · report
get_relative_position_index towhee-io/towhee/towhee/models/max_vit/max_vit.py community (archive-listed) ran · honoured contract fingerprinted Apache-2.0 (permissive) · 2e62acbb2e8ec0a9 · report
grid_partition towhee-io/towhee/towhee/models/max_vit/max_vit.py community (archive-listed) ran · fixture could not drive it Apache-2.0 (permissive) · 702e2dca4d951046 · report
grid_partition_nchw hankyul2/maxvit-pytorch/maxvit.py community (archive-listed) ran · fixture could not drive it no licence file found · pointer only · f41c6472d974b50b · report
grid_reverse towhee-io/towhee/towhee/models/max_vit/max_vit.py community (archive-listed) ran · fixture could not drive it Apache-2.0 (permissive) · 3b95c931d4a4355d · report
grid_reverse_nchw hankyul2/maxvit-pytorch/maxvit.py community (archive-listed) ran · fixture could not drive it no licence file found · pointer only · 80cee5fcd8a9952b · report
unblock_images_einops google-research/maxim/maxim/models/maxim.py community (archive-listed) ran · fixture could not drive it Apache-2.0 (permissive) · 627ea4c76565d927 · report
window_partition towhee-io/towhee/towhee/models/max_vit/max_vit.py community (archive-listed) ran · fixture could not drive it Apache-2.0 (permissive) · ab7995b8493f8bd3 · report
window_partition_nchw hankyul2/maxvit-pytorch/maxvit.py community (archive-listed) ran · fixture could not drive it no licence file found · pointer only · ae8a9a667b5d42f9 · report
window_reverse towhee-io/towhee/towhee/models/max_vit/max_vit.py community (archive-listed) ran · fixture could not drive it Apache-2.0 (permissive) · 10fe1fb26b9e9e9d · report
window_reverse_nchw hankyul2/maxvit-pytorch/maxvit.py community (archive-listed) ran · fixture could not drive it no licence file found · pointer only · c72f01470606b887 · report
GridGmlpLayer google-research/maxim/maxim/models/maxim.py community (archive-listed) unverified Apache-2.0 (permissive) · bcddd7996b51db67 · report
MBConv towhee-io/towhee/towhee/models/max_vit/max_vit.py community (archive-listed) unverified Apache-2.0 (permissive) · 2df10618a97ad3c5 · report
MaxViT towhee-io/towhee/towhee/models/max_vit/max_vit.py community (archive-listed) unverified Apache-2.0 (permissive) · f6a21a6318030b5d · report
MaxViTBlock towhee-io/towhee/towhee/models/max_vit/max_vit.py community (archive-listed) unverified Apache-2.0 (permissive) · 04bab611e8e60c1e · report
MaxViTStage towhee-io/towhee/towhee/models/max_vit/max_vit.py community (archive-listed) unverified Apache-2.0 (permissive) · 1aad85bb6748a80a · report
MaxViTTransformerBlock towhee-io/towhee/towhee/models/max_vit/max_vit.py community (archive-listed) unverified Apache-2.0 (permissive) · da9db733c947bc49 · report
PartitionAttention2d hankyul2/maxvit-pytorch/maxvit.py community (archive-listed) unverified no licence file found · pointer only · 641d6f2b8dbc0745 · report
ResidualSplitHeadMultiAxisGmlpLayer google-research/maxim/maxim/models/maxim.py community (archive-listed) unverified Apache-2.0 (permissive) · e7fa9568a4a28913 · report
block qwopqwop200/MaxVIT-pytorch/MaxVIT.py community (archive-listed) unverified MIT (permissive) · 5d26f1a66e6a15e4 · report
grid_partition ChristophReich1996/MaxViT/maxvit/maxvit.py community (archive-listed) unverified MIT (permissive) · bbc5501012bdee68 · report
unblock qwopqwop200/MaxVIT-pytorch/MaxVIT.py community (archive-listed) unverified MIT (permissive) · 6eaf2972dbdcacc3 · report
window_partition ChristophReich1996/MaxViT/maxvit/maxvit.py community (archive-listed) unverified MIT (permissive) · 20f2f90659c203e1 · report
window_reverse ChristophReich1996/MaxViT/maxvit/maxvit.py community (archive-listed) unverified MIT (permissive) · cd52f54038e59852 · report

Tasks

Image ClassificationObject Detectionimage-classificationobject-detection

Results from the paper archive 2025-07-28

TaskDatasetModelMetricValueRank at snapshotLeaderboardReport
Image Classification ImageNet MaxViT-XL (512res, JFT) Top 1 Accuracy 89.53% #17 of 1060 Archive leaderboard report
Image Classification ImageNet MaxViT-L (512res, JFT) Top 1 Accuracy 89.41% #20 of 1060 Archive leaderboard report
Image Classification ImageNet MaxViT-XL (384res, JFT) Top 1 Accuracy 89.36% #21 of 1060 Archive leaderboard report
Image Classification ImageNet MaxViT-L (384res, JFT) Top 1 Accuracy 89.12% #24 of 1060 Archive leaderboard report
Image Classification ImageNet MaxViT-B (512res, JFT) Top 1 Accuracy 88.82% #29 of 1060 Archive leaderboard report
Image Classification ImageNet MaxViT-XL (512res, 21K) Top 1 Accuracy 88.7% #32 of 1060 Archive leaderboard report
Image Classification ImageNet MaxViT-B (384res, JFT) Top 1 Accuracy 88.69% #33 of 1060 Archive leaderboard report
Image Classification ImageNet MaxViT-XL (384res, 21K) Top 1 Accuracy 88.51% #41 of 1060 Archive leaderboard report
Image Classification ImageNet MaxViT-L (512res, 21K) Top 1 Accuracy 88.46% #46 of 1060 Archive leaderboard report
Image Classification ImageNet MaxViT-B (512res, 21K) Top 1 Accuracy 88.38% #49 of 1060 Archive leaderboard report
Image Classification ImageNet MaxViT-L (384res, 21K) Top 1 Accuracy 88.32% #53 of 1060 Archive leaderboard report
Image Classification ImageNet MaxViT-B (512res) Top 1 Accuracy 86.7% #127 of 1060 Archive leaderboard report
Image Classification ImageNet MaxViT-L (384res) Top 1 Accuracy 86.4% #144 of 1060 Archive leaderboard report
Image Classification ImageNet MaxViT-B (384res) Top 1 Accuracy 86.34% #153 of 1060 Archive leaderboard report
Image Classification ImageNet MaxViT-S (512res) Top 1 Accuracy 86.19% #171 of 1060 Archive leaderboard report
Image Classification ImageNet MaxViT-T (384res) Top 1 Accuracy 85.72% #203 of 1060 Archive leaderboard report
Image Classification ImageNet MaxViT-L (224res) GFLOPs 43.9 #252 of 1060 Archive leaderboard report
Image Classification ImageNet MaxViT-L (224res) Number of params 212M #252 of 1060 Archive leaderboard report
Image Classification ImageNet MaxViT-L (224res) Top 1 Accuracy 85.17% #252 of 1060 Archive leaderboard report
Image Classification ImageNet MaxViT-B (224res) GFLOPs 23.4 #272 of 1060 Archive leaderboard report
Image Classification ImageNet MaxViT-B (224res) Number of params 120M #272 of 1060 Archive leaderboard report
Image Classification ImageNet MaxViT-B (224res) Top 1 Accuracy 84.94% #272 of 1060 Archive leaderboard report
Image Classification ImageNet MaxViT-S (224res) GFLOPs 11.7 #315 of 1060 Archive leaderboard report
Image Classification ImageNet MaxViT-S (224res) Number of params 69M #315 of 1060 Archive leaderboard report
Image Classification ImageNet MaxViT-S (224res) Top 1 Accuracy 84.45% #315 of 1060 Archive leaderboard report
Image Classification ImageNet MaxViT-T (224res) GFLOPs 5.6 #404 of 1060 Archive leaderboard report
Image Classification ImageNet MaxViT-T (224res) Number of params 31M #404 of 1060 Archive leaderboard report
Image Classification ImageNet MaxViT-T (224res) Top 1 Accuracy 83.62% #404 of 1060 Archive leaderboard report
Object Detection COCO 2017 MaxViT-B AP 53.4 #1 of 24 Archive leaderboard report
Object Detection COCO 2017 MaxViT-B AP50 72.9 #1 of 24 Archive leaderboard report
Object Detection COCO 2017 MaxViT-B AP75 58.1 #1 of 24 Archive leaderboard report
Object Detection COCO 2017 MaxViT-B APM 45.7 #1 of 24 Archive leaderboard report
Object Detection COCO 2017 MaxViT-B APM50 70.3 #1 of 24 Archive leaderboard report
Object Detection COCO 2017 MaxViT-B APM75 50 #1 of 24 Archive leaderboard report
Object Detection COCO 2017 MaxViT-S AP 53.1 #2 of 24 Archive leaderboard report
Object Detection COCO 2017 MaxViT-S AP50 72.5 #2 of 24 Archive leaderboard report
Object Detection COCO 2017 MaxViT-S AP75 58.1 #2 of 24 Archive leaderboard report
Object Detection COCO 2017 MaxViT-S APM 45.4 #2 of 24 Archive leaderboard report
Object Detection COCO 2017 MaxViT-S APM50 69.8 #2 of 24 Archive leaderboard report
Object Detection COCO 2017 MaxViT-S APM75 49.5 #2 of 24 Archive leaderboard report
Object Detection COCO 2017 MaxViT-T AP 52.1 #3 of 24 Archive leaderboard report
Object Detection COCO 2017 MaxViT-T AP50 71.9 #3 of 24 Archive leaderboard report
Object Detection COCO 2017 MaxViT-T AP75 56.8 #3 of 24 Archive leaderboard report
Object Detection COCO 2017 MaxViT-T APM 44.6 #3 of 24 Archive leaderboard report
Object Detection COCO 2017 MaxViT-T APM50 69.1 #3 of 24 Archive leaderboard report
Object Detection COCO 2017 MaxViT-T APM75 48.4 #3 of 24 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.

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