Papers › Rethinking Spatial Dimensions of Vision Transformers

Rethinking Spatial Dimensions of Vision Transformers

30 Mar 2021ICCV 2021 10arXiv:2103.16302archive 2025-07-28

Byeongho Heo, Sangdoo Yun, Dongyoon Han, Sanghyuk Chun, Junsuk Choe, Seong Joon Oh

Vision Transformer (ViT) extends the application range of transformers from language processing to computer vision tasks as being an alternative architecture against the existing convolutional neural networks (CNN). Since the transformer-based architecture has been innovative for computer vision modeling, the design convention towards an effective architecture has been less studied yet. From the successful design principles of CNN, we investigate the role of spatial dimension conversion and its effectiveness on transformer-based architecture. We particularly attend to the dimension reduction principle of CNNs; as the depth increases, a conventional CNN increases channel dimension and decreases spatial dimensions. We empirically show that such a spatial dimension reduction is beneficial to a transformer architecture as well, and propose a novel Pooling-based Vision Transformer (PiT) upon the original ViT model. We show that PiT achieves the improved model capability and generalization performance against ViT. Throughout the extensive experiments, we further show PiT outperforms the baseline on several tasks such as image classification, object detection, and robustness evaluation. Source codes and ImageNet models are available at https://github.com/naver-ai/pit

PaperPDFConference PDFCodeCode Syntology ran

In Syntology View this paper on Syntology: its repositories, every harvested function with whether it ran, its licence and the call to fetch it.

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

Code

Syntology Ran 10 of 20 code samples harvested from 5 repositories linked to this paper; 10 have no recorded run. Of those that ran: 2 ran · honoured contract; 8 ran with no contract checked.

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

naver-ai/pit officialmentioned in papermentioned on GitHubpytorch report
rwightman/pytorch-image-models mentioned in papermentioned on GitHubpytorch report
IMvision12/keras-vision-models mentioned on GitHubpytorch report
ahmedelmahy/myownvit mentioned on GitHubpytorch report
conceptofmind/PiT-flax mentioned on GitHubjax report
hatimwen/paddle_pit mentioned on GitHubpaddle report
naver-ai/pflayer mentioned on GitHubpytorch report
ttt496/vit-pytorch mentioned on GitHubpytorch 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

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

2ran · honoured contract
8ran
10unverified

Licence: 0 of the 20 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 5 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.

PoolingTransformer naver-ai/pit/pit.py official repository unverified Apache-2.0 (permissive) · 5bffd5e28b70b242 · report
Transformer naver-ai/pit/pit.py official repository unverified Apache-2.0 (permissive) · 87fd352d6ad6c2d7 · report
conv_head_pooling naver-ai/pit/pit.py official repository unverified Apache-2.0 (permissive) · 6e37ff319742476c · report
Attention ahmedelmahy/myownvit/vit_pytorch/pit.py community (archive-listed) ran · metamorphic tier: deterministic MIT (permissive) · 208dc760722cfcfa · report
DepthWiseConv2d ahmedelmahy/myownvit/vit_pytorch/pit.py community (archive-listed) ran fingerprinted MIT (permissive) · b69c80fb1e5cf629 · report
EffLayer naver-ai/pflayer/pit_pf.py community (archive-listed) ran Apache-2.0 (permissive) · f7fb77ac6df06842 · report
PiT ahmedelmahy/myownvit/vit_pytorch/pit.py community (archive-listed) ran · metamorphic tier: deterministic fingerprinted MIT (permissive) · caf68598442aada3 · report
PiT ttt496/vit-pytorch/vit_pytorch/pit.py community (archive-listed) ran MIT (permissive) · 6211052f6649e259 · report
Pool ahmedelmahy/myownvit/vit_pytorch/pit.py community (archive-listed) ran · metamorphic tier: deterministic MIT (permissive) · c79e0963e1847801 · report
Transformer ahmedelmahy/myownvit/vit_pytorch/pit.py community (archive-listed) ran · metamorphic tier: deterministic MIT (permissive) · 4d312a2f86b14d9c · report
cast_tuple ahmedelmahy/myownvit/vit_pytorch/pit.py community (archive-listed) ran · honoured contract fingerprinted MIT (permissive) · 5c1da0fe7a052b06 · report
conv_embedding naver-ai/pflayer/pit_pf.py community (archive-listed) ran fingerprinted Apache-2.0 (permissive) · 3a3ce506fe421f4b · report
conv_output_size ahmedelmahy/myownvit/vit_pytorch/pit.py community (archive-listed) ran · honoured contract fingerprinted MIT (permissive) · cc07f242a3837d36 · report
Attention conceptofmind/PiT-flax/pit.py community (archive-listed) unverified MIT (permissive) · 285deef776e40994 · report
DepthWiseConv2d conceptofmind/PiT-flax/pit.py community (archive-listed) unverified MIT (permissive) · 5be8ba6da0864b0d · report
PiT conceptofmind/PiT-flax/pit.py community (archive-listed) unverified MIT (permissive) · c8b68f995be04853 · report
Pool conceptofmind/PiT-flax/pit.py community (archive-listed) unverified MIT (permissive) · c3afc53a158bdfd4 · report
PoolingTransformer naver-ai/pflayer/pit_pf.py community (archive-listed) unverified Apache-2.0 (permissive) · 7edb1435932874d2 · report
Transformer naver-ai/pflayer/pit_pf.py community (archive-listed) unverified Apache-2.0 (permissive) · e1427b6eba7bf4f3 · report
Transformer conceptofmind/PiT-flax/pit.py community (archive-listed) unverified MIT (permissive) · b8a78469cccd6045 · report

Tasks

Dimensionality ReductionImage ClassificationObject Detectionimage-classificationobject-detection

Results from the paper archive 2025-07-28

TaskDatasetModelMetricValueRank at snapshotLeaderboardReport
Image Classification ImageNet PiT-B GFLOPs 12.5 #370 of 1060 Archive leaderboard report
Image Classification ImageNet PiT-B Number of params 73.8M #370 of 1060 Archive leaderboard report
Image Classification ImageNet PiT-B Top 1 Accuracy 84% #370 of 1060 Archive leaderboard report
Image Classification ImageNet PiT-S GFLOPs 2.9 #598 of 1060 Archive leaderboard report
Image Classification ImageNet PiT-S Number of params 23.5M #598 of 1060 Archive leaderboard report
Image Classification ImageNet PiT-S Top 1 Accuracy 81.9% #598 of 1060 Archive leaderboard report
Image Classification ImageNet PiT-XS GFLOPs 1.4 #782 of 1060 Archive leaderboard report
Image Classification ImageNet PiT-XS Number of params 10.6M #782 of 1060 Archive leaderboard report
Image Classification ImageNet PiT-XS Top 1 Accuracy 79.1% #782 of 1060 Archive leaderboard report
Image Classification ImageNet PiT-Ti GFLOPs 0.7 #976 of 1060 Archive leaderboard report
Image Classification ImageNet PiT-Ti Number of params 4.9M #976 of 1060 Archive leaderboard report
Image Classification ImageNet PiT-Ti Top 1 Accuracy 74.6% #976 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

Absolute Position EncodingsAdamAttentionBPEDense ConnectionsDropoutLabel SmoothingLayer NormalizationLinear LayerMulti-Head AttentionPosition-Wise Feed-Forward LayerResidual ConnectionSoftmaxTransformerVision Transformer

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