ā€œSparse MLP for Image Recognition: Is Self-Attention Really Necessary?ā€, Chuanxin Tang, Yucheng Zhao, Guangting Wang, Chong Luo, Wenxuan Xie, Wenjun Zeng2021-09-12 (; backlinks; similar)⁠:

Transformers have sprung up in the field of computer vision. In this work, we explore whether the core self-attention module in ā€˜Attention Is All You Need’, Vaswani et al 2017 is the key to achieving excellent performance in image recognition.

To this end, we build an attention-free network called sMLPNet based on the existing MLP-based vision models. Specifically, we replace the MLP module in the token-mixing step with a novel sparse MLP (sMLP) module. For 2D image tokens, sMLP applies 1D MLP along the axial directions and the parameters are shared among rows or columns. By sparse connection and weight sharing, sMLP module reduces the number of model parameters and computational complexity, avoiding the common over-fitting problem that plagues the performance of MLP-like models.

When only trained on the ā€˜ImageNet Large Scale Visual Recognition Challenge’, Russakovsky et al 2014-1K dataset, the proposed sMLPNet achieves 81.9% top-1 accuracy with only 24M parameters, which is much better than most CNNs and ā€˜Vision Transformer: An Image is Worth 16Ɨ16 Words: Transformers for Image Recognition at Scale’, Dosovitskiy et al 2020 under the same model size constraint. When scaling up to 66M parameters, sMLPNet achieves 83.4% top-1 accuracy, which is on par with the state-of-the-art Swin Transformer.

The success of sMLPNet suggests that the self-attention mechanism is not necessarily a silver bullet in computer vision.

Code will be made publicly available.