Instruct: Identify the main and secondary category of Arxiv papers based on the titles and abstracts
Query: How Do Vision Transformers Work?   The success of multi-head self-attentions (MSAs) for computer vision is now
indisputable. However, little is known about how MSAs work. We present
fundamental explanations to help better understand the nature of MSAs. In
particular, we demonstrate the following properties of MSAs and Vision
Transformers (ViTs): (1) MSAs improve not only accuracy but also generalization
by flattening the loss landscapes. Such improvement is primarily attributable
to their data specificity, not long-range dependency. On the other hand, ViTs
suffer from non-convex losses. Large datasets and loss landscape smoothing
methods alleviate this problem; (2) MSAs and Convs exhibit opposite behaviors.
For example, MSAs are low-pass filters, but Convs are high-pass filters.
Therefore, MSAs and Convs are complementary; (3) Multi-stage neural networks
behave like a series connection of small individual models. In addition, MSAs
at the end of a stage play a key role in prediction. Based on these insights,
we propose AlterNet, a model in which Conv blocks at the end of a stage are
replaced with MSA blocks. AlterNet outperforms CNNs not only in large data
regimes but also in small data regimes. The code is available at
https://github.com/xxxnell/how-do-vits-work.

14
The categories of this paper are: math-ph
24
The categories of this paper are: dg-ga
15
The categories of this paper are: nucl-ex
9
The categories of this paper are: nlin
22
The categories of this paper are: chao-dyn
4
The categories of this paper are: cond-mat
0
The categories of this paper are: hep-ph
7
The categories of this paper are: hep-th
11
The categories of this paper are: hep-lat
27
The categories of this paper are: comp-gas
26
The categories of this paper are: bayes-an
18
The categories of this paper are: econ
35
The categories of this paper are: mtrl-th
3
The categories of this paper are: physics
19
The categories of this paper are: eess
25
The categories of this paper are: patt-sol