Papers › Towards Robust Vision Transformer

Towards Robust Vision Transformer

17 May 2021CVPR 2022 1arXiv:2105.07926archive 2025-07-28

Xiaofeng Mao, Gege Qi, Yuefeng Chen, Xiaodan Li, Ranjie Duan, Shaokai Ye, Yuan He, Hui Xue

Recent advances on Vision Transformer (ViT) and its improved variants have shown that self-attention-based networks surpass traditional Convolutional Neural Networks (CNNs) in most vision tasks. However, existing ViTs focus on the standard accuracy and computation cost, lacking the investigation of the intrinsic influence on model robustness and generalization. In this work, we conduct systematic evaluation on components of ViTs in terms of their impact on robustness to adversarial examples, common corruptions and distribution shifts. We find some components can be harmful to robustness. By using and combining robust components as building blocks of ViTs, we propose Robust Vision Transformer (RVT), which is a new vision transformer and has superior performance with strong robustness. We further propose two new plug-and-play techniques called position-aware attention scaling and patch-wise augmentation to augment our RVT, which we abbreviate as RVT*. The experimental results on ImageNet and six robustness benchmarks show the advanced robustness and generalization ability of RVT compared with previous ViTs and state-of-the-art CNNs. Furthermore, RVT-S* also achieves Top-1 rank on multiple robustness leaderboards including ImageNet-C and ImageNet-Sketch. The code will be available at \url{https://github.com/alibaba/easyrobust}.

PaperPDFConference PDFCode

In Syntology View this paper on Syntology: its repositories, every harvested function with whether it ran, its licence and the call to fetch it.

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

Code

alibaba/easyrobust officialmentioned in papermentioned on GitHubpytorch report
vtddggg/Robust-Vision-Transformer officialmentioned in papermentioned 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

Domain GeneralizationImage ClassificationRobust Design

Results from the paper archive 2025-07-28

TaskDatasetModelMetricValueRank at snapshotLeaderboardReport
Domain Generalization ImageNet-A RVT-B* Top-1 accuracy % 28.5 #28 of 39 Archive leaderboard report
Domain Generalization ImageNet-A RVT-S* Top-1 accuracy % 25.7 #29 of 39 Archive leaderboard report
Domain Generalization ImageNet-A RVT-Ti* Top-1 accuracy % 14.4 #30 of 39 Archive leaderboard report
Domain Generalization ImageNet-C RVT-B* mean Corruption Error (mCE) 46.8 #24 of 47 Archive leaderboard report
Domain Generalization ImageNet-C RVT-S* mean Corruption Error (mCE) 49.4 #26 of 47 Archive leaderboard report
Domain Generalization ImageNet-C RVT-Ti* mean Corruption Error (mCE) 57.0 #33 of 47 Archive leaderboard report
Domain Generalization ImageNet-R RVT-B* Top-1 Error Rate 51.3 #26 of 39 Archive leaderboard report
Domain Generalization ImageNet-R RVT-S* Top-1 Error Rate 52.3 #28 of 39 Archive leaderboard report
Domain Generalization ImageNet-R RVT-Ti* Top-1 Error Rate 56.1 #31 of 39 Archive leaderboard report
Image Classification ImageNet RVT-B* GFLOPs 17.7 #516 of 1060 Archive leaderboard report
Image Classification ImageNet RVT-B* Number of params 91.8M #516 of 1060 Archive leaderboard report
Image Classification ImageNet RVT-B* Top 1 Accuracy 82.7% #516 of 1060 Archive leaderboard report
Image Classification ImageNet RVT-S* GFLOPs 4.7 #597 of 1060 Archive leaderboard report
Image Classification ImageNet RVT-S* Number of params 23.3M #597 of 1060 Archive leaderboard report
Image Classification ImageNet RVT-S* Top 1 Accuracy 81.9% #597 of 1060 Archive leaderboard report
Image Classification ImageNet RVT-Ti* GFLOPs 1.3 #770 of 1060 Archive leaderboard report
Image Classification ImageNet RVT-Ti* Number of params 10.9M #770 of 1060 Archive leaderboard report
Image Classification ImageNet RVT-Ti* Top 1 Accuracy 79.2% #770 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

Absolute Position EncodingsAdamAttentionBPEConvolutionDense ConnectionsDropoutLabel SmoothingLayer NormalizationLinear LayerMulti-Head AttentionPosition-Wise Feed-Forward LayerResidual ConnectionSoftmaxTransformerVision 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