Papers › AutoFormer: Searching Transformers for Visual Recognition

AutoFormer: Searching Transformers for Visual Recognition

1 Jul 2021ICCV 2021 10arXiv:2107.00651archive 2025-07-28

Minghao Chen, Houwen Peng, Jianlong Fu, Haibin Ling

Recently, pure transformer-based models have shown great potentials for vision tasks such as image classification and detection. However, the design of transformer networks is challenging. It has been observed that the depth, embedding dimension, and number of heads can largely affect the performance of vision transformers. Previous models configure these dimensions based upon manual crafting. In this work, we propose a new one-shot architecture search framework, namely AutoFormer, dedicated to vision transformer search. AutoFormer entangles the weights of different blocks in the same layers during supernet training. Benefiting from the strategy, the trained supernet allows thousands of subnets to be very well-trained. Specifically, the performance of these subnets with weights inherited from the supernet is comparable to those retrained from scratch. Besides, the searched models, which we refer to AutoFormers, surpass the recent state-of-the-arts such as ViT and DeiT. In particular, AutoFormer-tiny/small/base achieve 74.7%/81.7%/82.4% top-1 accuracy on ImageNet with 5.7M/22.9M/53.7M parameters, respectively. Lastly, we verify the transferability of AutoFormer by providing the performance on downstream benchmarks and distillation experiments. Code and models are available at https://github.com/microsoft/AutoML.

PaperPDFConference PDFCode

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

Code

microsoft/AutoML officialmentioned in papermentioned on GitHubpytorch report
microsoft/cream 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

Not run by Syntology. Nothing on this page verifies that the listed code works.

Tasks

AutoMLFine-Grained Image ClassificationImage Classificationimage-classification

Results from the paper archive 2025-07-28

TaskDatasetModelMetricValueRank at snapshotLeaderboardReport
Fine-Grained Image Classification Oxford 102 Flowers AutoFormer-S | 384 Top 1 Accuracy 98.8 #23 of 25 Archive leaderboard report
Fine-Grained Image Classification Oxford-IIIT Pet Dataset AutoFormer-S | 384 Accuracy 94.9% #10 of 15 Archive leaderboard report
Fine-Grained Image Classification Stanford Cars AutoFormer-S | 384 Accuracy 93.4% #63 of 83 Archive leaderboard report
Image Classification CIFAR-10 AutoFormer-S | 384 Percentage correct 99.1 #18 of 265 Archive leaderboard report
Image Classification ImageNet AutoFormer-base GFLOPs 11 #539 of 1060 Archive leaderboard report
Image Classification ImageNet AutoFormer-base Number of params 54M #539 of 1060 Archive leaderboard report
Image Classification ImageNet AutoFormer-base Top 1 Accuracy 82.4% #539 of 1060 Archive leaderboard report
Image Classification ImageNet AutoFormer-small GFLOPs 5.1 #617 of 1060 Archive leaderboard report
Image Classification ImageNet AutoFormer-small Number of params 22.9M #617 of 1060 Archive leaderboard report
Image Classification ImageNet AutoFormer-small Top 1 Accuracy 81.7% #617 of 1060 Archive leaderboard report
Image Classification ImageNet AutoFormer-tiny GFLOPs 1.3 #971 of 1060 Archive leaderboard report
Image Classification ImageNet AutoFormer-tiny Number of params 5.7M #971 of 1060 Archive leaderboard report
Image Classification ImageNet AutoFormer-tiny Top 1 Accuracy 74.7% #971 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

AttentionAttention DropoutDeiTDense ConnectionsDropoutFeedforward NetworkLayer NormalizationLinear LayerMulti-Head AttentionResidual ConnectionSoftmaxVision 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