All models

Refiner (Refiner_ViT)

Small vision transformer whose attention maps are expanded and convolved before they aggregate tokens.

Image classification · 625 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 (22 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

Parameters
25M
Operations
625
Framework
PyTorch
Recurrent
No
Published
2021
Cited by
67 (as of 16 November 2026)
Authors
Daquan Zhou, Yujun Shi, Bingyi Kang and others
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
m19797
Graph hash
453251cc794d096c9341408d7c761b407c7a1eb6e523922d3ddec4d33818e51e
Skeleton hash
2f3da6ab961438edc85b128fefcb9c0a00f5d5f72627ea7680f33017cb91e81a
Architecture hash
4f4b4e9e018ef99023117e15031747b242b9d83b7c437e3e65e92d92510da8c4
Diagram SHA-256
617725d3d4b17732b104f69f9802ba803837e720cccee55c3b0438ead64623c1
TorchLens version
2.36.0
Renderer
graphviz 2.43.0+pyvips 3.2.0+libvips 8.18.7+render-opts@06c1f0d3
Check
Forward pass replayed in PyTorch

What it is

Refiner is a scheme for directly refining the self-attention maps of vision transformers (ViTs), and Refiner-ViT is the image classifier built with it. The paper is motivated by over-smoothing, in which global self-attention makes different tokens more and more similar as the model goes deeper.

Refiner changes the attention maps in three steps. Attention expansion linearly projects the multi-head attention maps to a higher-dimensional space spanned by a larger number of maps. This increases the number of attention heads implicitly without reducing the embedding dimension per head. Head-wise spatial convolution is then applied to the expanded maps, and a second linear projection reduces the number of maps to the original one. The paper shows that aggregating features with a convolved attention map is equivalent to aggregating them locally with learnable kernels and then globally with self-attention, and names the operation distributed local attention.

This model is Refiner-ViT-S, the small configuration, with 12 heads, 16 layers and an embedding dimension of 384 at 224 resolution. The paper reports 83.6% accuracy on ImageNet for it with 25M parameters, 3.7% above the DeiT-S baseline. The models are trained on ImageNet-1k from scratch without an auxiliary dataset.

Key idea. Refiner refines the self-attention maps of vision transformers directly, expanding them to a higher-dimensional space and applying convolutions that add local patterns.

  • Refiner
  • Refiner-ViT
  • Refined Vision Transformer
  • vision transformer
  • self-attention refinement
  • attention expansion
  • distributed local attention
  • over-smoothing
  • ImageNet classification

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

Cite the paper

@misc{zhou2021refinerrefiningselfattentionvision,
      title={Refiner: Refining Self-attention for Vision Transformers}, 
      author={Daquan Zhou and Yujun Shi and Bingyi Kang and Weihao Yu and Zihang Jiang and Yuan Li and Xiaojie Jin and Qibin Hou and Jiashi Feng},
      year={2021},
      eprint={2106.03714},
      archivePrefix={arXiv},
      primaryClass={cs.CV},
      url={https://arxiv.org/abs/2106.03714}, 
}