Our new X account is live! Follow @wizwand_team for updates
WorkDL logo mark

Improving Vision Transformers by Revisiting High-frequency Components

About

The transformer models have shown promising effectiveness in dealing with various vision tasks. However, compared with training Convolutional Neural Network (CNN) models, training Vision Transformer (ViT) models is more difficult and relies on the large-scale training set. To explain this observation we make a hypothesis that \textit{ViT models are less effective in capturing the high-frequency components of images than CNN models}, and verify it by a frequency analysis. Inspired by this finding, we first investigate the effects of existing techniques for improving ViT models from a new frequency perspective, and find that the success of some techniques (e.g., RandAugment) can be attributed to the better usage of the high-frequency components. Then, to compensate for this insufficient ability of ViT models, we propose HAT, which directly augments high-frequency components of images via adversarial training. We show that HAT can consistently boost the performance of various ViT models (e.g., +1.2% for ViT-B, +0.5% for Swin-B), and especially enhance the advanced model VOLO-D5 to 87.3% that only uses ImageNet-1K data, and the superiority can also be maintained on out-of-distribution data and transferred to downstream tasks. The code is available at: https://github.com/jiawangbai/HAT.

Jiawang Bai, Li Yuan, Shu-Tao Xia, Shuicheng Yan, Zhifeng Li, Wei Liu• 2022

Related benchmarks

TaskDatasetResultRank
Semantic segmentationADE20K (val)
mIoU48.9
2731
Object DetectionCOCO 2017 (val)--
2454
Instance SegmentationCOCO 2017 (val)--
1144
Image ClassificationImageNet-1k (val)
Top-1 Accuracy84.3
840
Image ClassificationImageNet A
Top-1 Acc54.5
553
Image ClassificationImageNet V2
Top-1 Acc71.3
487
Image ClassificationImageNet-Sketch
Top-1 Accuracy45.7
360
Image ClassificationImageNet 1k (test)
Top-1 Accuracy80.9
359
Image ClassificationImageNet (val)
Top-1 Accuracy82.2
188
Image ClassificationImageNet Real (val)
Top-1 Acc90.7
181
Showing 10 of 16 rows

Other info

Code

Follow for update