All models

pit_b_distilled_224

ViT with CNN-style pooling: three spatial scales, fewer FLOPs, better accuracy than ViT.

Image classification · 405 operations Checked

100%

Showing the top corner; full diagram not loaded yetShowing a small copy; full diagram not loaded yetLarge diagram, not loaded yet

Open SVG

Loading diagram (23 KB)

Open in a new tab

Click or tap a spot to read it up close. Scroll or drag inside the diagram to move through it. Zoom with + and − or Ctrl and scroll. Press 0 for the whole graph. Swipe inside the diagram to move through it. Use + and − to zoom.

At a glance

Family
PiT
Parameters
74.8M
Operations
405
Framework
PyTorch
Recurrent
No
Published
ICCV (arXiv 2021)
Cited by
620 (as of 9 October 2026)
Authors
Byeongho Heo, Sangdoo Yun, Dongyoon Han and others
License
Apache-2.0
Checked
Passed: the trace was replayed operation by operation and matched the model's own output for this input.

Files

The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.

Details
Stable ID
m8183
Graph hash
2a8aaebed97a4ea5206de540d89637d595bf34470d6260b2348ebffe938a7739
Skeleton hash
400404001da8a900d37f01f5b3ad988eaa40a21d420f3f4f27512e29c417d465
Architecture hash
e94b6d13035ff1f6d8b10fe3b3804cedaeb4714e49e0ad3d3d8f2754fb189fdb
Diagram SHA-256
00eac135645fa6d626a8c72e5562294d5ac5d1d939e3e353fba01b0fefc144d3
TorchLens version
2.35.3
Renderer
graphviz 2.43.0+pyvips 3.2.0+libvips 8.18.7+render-opts@06c1f0d3
Check
Forward pass replayed in PyTorch

How this diagram was made

timm.create_model('pit_b_distilled_224', pretrained=False)

What it is

Base size, distilled: trained with an additional distillation token and a distillation loss from a RegNetY-16GF teacher.

About this model's family

PiT, the Pooling-based Vision Transformer, borrows one habit from convolutional networks that the original ViT ignored: shrinking the spatial size while widening the channels as depth grows. The authors first checked the premise on ResNet-50 and found that the ResNet-style schedule beats a flat ViT-style one in model capability, generalization and final performance. They then built the same idea into ViT and showed that a transformer gains from it too.

The pooling layer reshapes the spatial tokens into a 3D tensor, reduces the spatial size and raises the channel count with a depth-wise convolution, and flattens them again for the next transformer block. The class token, which has no spatial position, is passed through an extra fully connected layer so its width keeps pace with the spatial tokens. Two such pooling layers give every PiT three spatial scales. To start with more tokens than ViT, the patch embedding keeps a 16 pixel patch but strides by 8.

An attention analysis shows what pooling does inside: PiT spreads attention wider in shallow layers and concentrates it in deep ones. At each size the PiT has fewer FLOPs and faster throughput than the ViT of the same name, and still scores higher on ImageNet. The paper defines four scales: tiny, extra small, small and base. The distilled members follow the DeiT recipe, adding a distillation token and learning from a RegNetY-16GF teacher. Pooling also buys robustness: on an occlusion test that blanks out the centre of each image, PiT drops about 5% where ResNet-50 drops about 15%.

Key idea. A pooling layer for vision transformers, built on a depth-wise convolution, that gives ViT a CNN-style schedule of shrinking spatial size and growing channels. The resulting PiT outperforms ViT on image classification, object detection and robustness evaluation.

  • pit
  • Pooling-based Vision Transformer
  • pooling vision transformer
  • pit_ti_224
  • pit_xs_224
  • pit_s_224
  • pit_b_224
  • pit distilled
  • naver
  • vit with pooling
  • image classification
  • timm

AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.

Cite the paper

@misc{heo2021rethinkingspatialdimensionsvision,
      title={Rethinking Spatial Dimensions of Vision Transformers}, 
      author={Byeongho Heo and Sangdoo Yun and Dongyoon Han and Sanghyuk Chun and Junsuk Choe and Seong Joon Oh},
      year={2021},
      eprint={2103.16302},
      archivePrefix={arXiv},
      primaryClass={cs.CV},
      url={https://arxiv.org/abs/2103.16302}, 
}