Papers › Going deeper with Image Transformers

Going deeper with Image Transformers

31 Mar 2021ICCV 2021 10arXiv:2103.17239archive 2025-07-28

Hugo Touvron, Matthieu Cord, Alexandre Sablayrolles, Gabriel Synnaeve, Hervé Jégou

Transformers have been recently adapted for large scale image classification, achieving high scores shaking up the long supremacy of convolutional neural networks. However the optimization of image transformers has been little studied so far. In this work, we build and optimize deeper transformer networks for image classification. In particular, we investigate the interplay of architecture and optimization of such dedicated transformers. We make two transformers architecture changes that significantly improve the accuracy of deep transformers. This leads us to produce models whose performance does not saturate early with more depth, for instance we obtain 86.5% top-1 accuracy on Imagenet when training with no external data, we thus attain the current SOTA with less FLOPs and parameters. Moreover, our best model establishes the new state of the art on Imagenet with Reassessed labels and Imagenet-V2 / match frequency, in the setting with no additional training data. We share our code and models.

PaperPDFConference PDFCodeCode Syntology ran

In Syntology 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.17239")

Code

Syntology Ran 5 of 11 code samples harvested from 4 repositories linked to this paper; 6 have no recorded run. Of those that ran: 2 ran · violated contract; 2 ran · our draft was wrong; 1 ran · fixture could not drive it.

By repository: community (archive-listed): 9 samples from 4 repositories, 3 ran; 2 identical to code first harvested elsewhere. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

21 repositories listed; official and paper-mentioned ones first.

rwightman/pytorch-image-models officialmentioned in papermentioned on GitHubpytorch report
facebookresearch/deit officialmentioned in paperpytorch report
CPones/Paddle_CaiT mentioned on GitHubpaddleApache-2.0 report
DarshanDeshpande/jax-models mentioned on GitHubjax report
IMvision12/keras-vision-models mentioned on GitHubpytorch report
ahmedelmahy/myownvit mentioned on GitHubpytorch report
conceptofmind/CaiT-Flax mentioned on GitHubjax report
holdfire/CLS mentioned on GitHubpytorch report
holdfire/FAS mentioned on GitHubpytorch report
jaketae/res-mlp mentioned on GitHubpytorch report
liuxingwt/CLS mentioned on GitHubpytorch report
lucidrains/vit-pytorch mentioned on GitHubpytorch report
sayakpaul/cait-tf mentioned on GitHubtfApache-2.0 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

11 samples harvested; 5 ran; 0 honoured the contract we drafted; 6 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

2ran · violated contract
2ran · our draft was wrong
1ran · fixture could not drive it
6unverified

Licence: 2 of the 11 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 4 repositories linked to this paper, official or community; each sample names its own and says which. Some samples are identical code Syntology first harvested from another repository; for those, this paper's copy is not located and its licence is not recorded. “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.

dropout_layers conceptofmind/CaiT-Flax/cait.py community (archive-listed) ran · our draft was wrong fingerprinted MIT (permissive) · 7794eb689431c216 · report
window_partition DarshanDeshpande/jax-models/jax_models/models/swin_transformer.py community (archive-listed) ran · fixture could not drive it fingerprinted Apache-2.0 (permissive) · 07b1c6d8d9489187 · report
window_reverse DarshanDeshpande/jax-models/jax_models/models/swin_transformer.py community (archive-listed) ran · our draft was wrong Apache-2.0 (permissive) · 0859cb39e97935ba · report
conv_transpose sayakpaul/cait-tf/utils/helpers.py community (archive-listed) unverified Apache-2.0 (permissive) · e218ba48c9d2c190 · report
get_args CPones/Paddle_CaiT/CaiT/infer.py community (archive-listed) unverified Apache-2.0 (permissive) · 5fe12143b1680470 · report
get_config CPones/Paddle_CaiT/CaiT/config.py community (archive-listed) unverified Apache-2.0 (permissive) · 160fd4002bd2e51b · report
get_exclude_from_weight_decay_fn CPones/Paddle_CaiT/CaiT/utils.py community (archive-listed) unverified Apache-2.0 (permissive) · 7cdb59fd6a14bd54 · report
mlp sayakpaul/cait-tf/cait/models.py community (archive-listed) unverified Apache-2.0 (permissive) · ae83452001c08f2a · report
update_config CPones/Paddle_CaiT/CaiT/config.py community (archive-listed) unverified Apache-2.0 (permissive) · ee77e3fcb05ad040 · report
exists identical code first harvested elsewhere ran · violated contract licence of this copy not recorded · aa5486a3650902d8 · report
pair identical code first harvested elsewhere ran · violated contract fingerprinted licence of this copy not recorded · 6ba8cee9f5daea41 · report

Tasks

Image ClassificationTransfer Learningimage-classification

Results from the paper archive 2025-07-28

TaskDatasetModelMetricValueRank at snapshotLeaderboardReport
Image Classification CIFAR-10 CaiT-M-36 U 224 Percentage correct 99.4 #5 of 265 Archive leaderboard report
Image Classification CIFAR-100 CaiT-M-36 U 224 Percentage correct 93.1 #10 of 211 Archive leaderboard report
Image Classification Flowers-102 CaiT-M-36 U 224 Accuracy 99.1 #16 of 52 Archive leaderboard report
Image Classification ImageNet CaiT-M-48-448 GFLOPs 377.3 #140 of 1060 Archive leaderboard report
Image Classification ImageNet CaiT-M-48-448 Number of params 438M #140 of 1060 Archive leaderboard report
Image Classification ImageNet CaiT-M-48-448 Top 1 Accuracy 86.5% #140 of 1060 Archive leaderboard report
Image Classification ImageNet CAIT-M36-448 GFLOPs 247.8 #162 of 1060 Archive leaderboard report
Image Classification ImageNet CAIT-M36-448 Number of params 271M #162 of 1060 Archive leaderboard report
Image Classification ImageNet CAIT-M36-448 Top 1 Accuracy 86.3% #162 of 1060 Archive leaderboard report
Image Classification ImageNet CAIT-M-36 GFLOPs 173.3 #174 of 1060 Archive leaderboard report
Image Classification ImageNet CAIT-M-36 Number of params 270.9M #174 of 1060 Archive leaderboard report
Image Classification ImageNet CAIT-M-36 Top 1 Accuracy 86.1% #174 of 1060 Archive leaderboard report
Image Classification ImageNet CAIT-M-24 GFLOPs 116.1 #196 of 1060 Archive leaderboard report
Image Classification ImageNet CAIT-M-24 Number of params 185.9M #196 of 1060 Archive leaderboard report
Image Classification ImageNet CAIT-M-24 Top 1 Accuracy 85.8% #196 of 1060 Archive leaderboard report
Image Classification ImageNet CAIT-S-36 GFLOPs 48 #234 of 1060 Archive leaderboard report
Image Classification ImageNet CAIT-S-36 Number of params 68.2M #234 of 1060 Archive leaderboard report
Image Classification ImageNet CAIT-S-36 Top 1 Accuracy 85.4% #234 of 1060 Archive leaderboard report
Image Classification ImageNet CAIT-S-48 GFLOPs 63.8 #241 of 1060 Archive leaderboard report
Image Classification ImageNet CAIT-S-48 Number of params 89.5M #241 of 1060 Archive leaderboard report
Image Classification ImageNet CAIT-S-48 Top 1 Accuracy 85.3% #241 of 1060 Archive leaderboard report
Image Classification ImageNet CAIT-S-24 GFLOPs 32.2 #257 of 1060 Archive leaderboard report
Image Classification ImageNet CAIT-S-24 Number of params 46.9M #257 of 1060 Archive leaderboard report
Image Classification ImageNet CAIT-S-24 Top 1 Accuracy 85.1% #257 of 1060 Archive leaderboard report
Image Classification ImageNet CAIT-XS-36 GFLOPs 28.8 #285 of 1060 Archive leaderboard report
Image Classification ImageNet CAIT-XS-36 Number of params 38.6M #285 of 1060 Archive leaderboard report
Image Classification ImageNet CAIT-XS-36 Top 1 Accuracy 84.8% #285 of 1060 Archive leaderboard report
Image Classification ImageNet CAIT-XS-24 GFLOPs 19.3 #354 of 1060 Archive leaderboard report
Image Classification ImageNet CAIT-XS-24 Number of params 26.6M #354 of 1060 Archive leaderboard report
Image Classification ImageNet CAIT-XS-24 Top 1 Accuracy 84.1% #354 of 1060 Archive leaderboard report
Image Classification ImageNet CAIT-XXS-36 GFLOPs 14.3 #559 of 1060 Archive leaderboard report
Image Classification ImageNet CAIT-XXS-36 Number of params 17.3M #559 of 1060 Archive leaderboard report
Image Classification ImageNet CAIT-XXS-36 Top 1 Accuracy 82.2% #559 of 1060 Archive leaderboard report
Image Classification ImageNet CAIT-XXS-24 GFLOPs 9.6 #674 of 1060 Archive leaderboard report
Image Classification ImageNet CAIT-XXS-24 Number of params 12M #674 of 1060 Archive leaderboard report
Image Classification ImageNet CAIT-XXS-24 Top 1 Accuracy 80.9% #674 of 1060 Archive leaderboard report
Image Classification ImageNet ReaL CAIT-M36-448 Accuracy 90.2% #19 of 57 Archive leaderboard report
Image Classification ImageNet V2 CAIT-M36-448 Top 1 Accuracy 76.7 #16 of 33 Archive leaderboard report
Image Classification Stanford Cars CaiT-M-36 U 224 Accuracy 94.2 #5 of 24 Archive leaderboard report
Image Classification iNaturalist 2018 CaiT-M-36 U 224 Top-1 Accuracy 78% #22 of 60 Archive leaderboard report
Image Classification iNaturalist 2019 CaiT-M-36 U 224 Top-1 Accuracy 81.8 #10 of 22 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

Introduced by this paper: Class Attention, LayerScale

AttentionCaiTClass AttentionDeiTDense ConnectionsFeedforward NetworkLayer NormalizationLayerScaleLinear LayerMulti-Head AttentionResidual ConnectionSoftmax

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