paper-with-me

홈 › Papers

When Shift Operation Meets Vision Transformer: An Extremely Simple Alternative to Attention Mechanism

2022-01-26 · Guangting Wang, Yucheng Zhao, Chuanxin Tang, Chong Luo, Wenjun Zeng

Attention mechanism has been widely believed as the key to success of vision transformers (ViTs), since it provides a flexible and powerful way to model spatial relationships. However, is the attention mechanism truly an indispensable part of ViT? Can it be replaced by some other alternatives? To demystify the role of attention mechanism, we simplify it into an extremely simple case: ZERO FLOP and ZERO parameter. Concretely, we revisit the shift operation. It does not contain any parameter or arithmetic calculation. The only operation is to exchange a small portion of the channels between neighboring features. Based on this simple operation, we construct a new backbone network, namely ShiftViT, where the attention layers in ViT are substituted by shift operations. Surprisingly, ShiftViT works quite well in several mainstream tasks, e.g., classification, detection, and segmentation. The performance is on par with or even better than the strong baseline Swin Transformer. These results suggest that the attention mechanism might not be the vital factor that makes ViT successful. It can be even replaced by a zero-parameter operation. We should pay more attentions to the remaining parts of ViT in the future work. Code is available at github.com/microsoft/SPACH.

📄 PDF Abstract BibTeX arXiv:2201.10801

Code (2)

microsoft/SPACH 공식 구현 pytorch
keras-team/keras-io/blob/master/examples/vision/shiftvit.py tf

Tasks

Image ClassificationObject DetectionSemantic Segmentation

Methods 이 논문이 사용한 방법론

Attention 설명 없음
Linear Layer A Linear Layer is a projection $\mathbf{XW + b}$.
Softmax The Softmax output function transforms a previous layer's output into a vector of probabilities. It is commonly used for multiclass classification. Given an input vector $x$…
Stochastic Depth Stochastic Depth aims to shrink the depth of a network during training, while keeping it unchanged during testing. This is achieved by randomly dropping entire…
Dense Connections Dense Connections, or Fully Connected Connections, are a type of layer in a deep neural network that use a linear operation where every input is connected to every output…
Position-Wise Feed-Forward Layer 설명 없음
Adam 설명 없음
Multi-Head Attention 설명 없음

Similar Papers 제목 키워드 기반

HiViT: Hierarchical Vision Transformer Meets Masked Image Modeling

2022-05-30 · Xiaosong Zhang, Yunjie Tian, Wei Huang, Qixiang Ye 외

Recently, masked image modeling (MIM) has offered a new methodology of self-supervised pre-training of vision transformers. A key idea of efficient implementation is to discard the masked image patches (or tokens) throug…

Transfer Learning

Swin-Free: Achieving Better Cross-Window Attention and Efficiency with Size-varying Window

2023-06-23 · Jinkyu Koo, John Yang, Le An, Gwenaelle Cunha Sergio 외

Transformer models have shown great potential in computer vision, following their success in language tasks. Swin Transformer is one of them that outperforms convolution-based architectures in terms of accuracy, while im…

When Adversarial Training Meets Vision Transformers: Recipes from Training to Architecture

2022-10-14 · Yichuan Mo, Dongxian Wu, Yifei Wang, Yiwen Guo 외

Vision Transformers (ViTs) have recently achieved competitive performance in broad vision tasks. Unfortunately, on popular threat models, naturally trained ViTs are shown to provide no more adversarial robustness than co…

Adversarial Robustness

Degenerate Swin to Win: Plain Window-based Transformer without Sophisticated Operations

2022-11-25 · Tan Yu, Ping Li

The formidable accomplishment of Transformers in natural language processing has motivated the researchers in the computer vision community to build Vision Transformers. Compared with the Convolution Neural Networks (CNN…

object-detectionObject DetectionSemantic Segmentation

Token Shift Transformer for Video Classification

2021-08-05 · Hao Zhang, Yanbin Hao, Chong-Wah Ngo

Transformer achieves remarkable successes in understanding 1 and 2-dimensional signals (e.g., NLP and Image Content Understanding). As a potential alternative to convolutional neural networks, it shares merits of strong …

ClassificationComputational EfficiencyVideo ClassificationVideo Understanding