Lune

AAAI2022Top-tier venue

Sparse MLP for Image Recognition: Is Self-Attention Really Necessary?

Chuanxin Tang, Yucheng Zhao, Guangting Wang, Chong Luo, Wenxuan Xie, Wenjun Zeng

Abstract

Transformers have sprung up in the field of computer vision. In this work, we explore whether the core self-attention module in Transformer 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 significantly 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-1K dataset, the proposed sMLPNet achieves 81.9% top-1 accuracy with only 24M parameters, which is much better than most CNNs and vision Transformers 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. The code and models are publicly available at https://github.com/microsoft/SPACH.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

12 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • MLP-Mixer: An all-MLP Architecture for Vision cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
  • MLP-Mixer: An all-MLP Architecture for Vision cites RandAugment: Practical Automated Data Augmentation with a Reduced Search Space
  • MLP-Mixer: An all-MLP Architecture for Vision cites Pyramid Vision Transformer: A Versatile Backbone for Dense Prediction without Convolutions
  • Focal Modulation Networks cites MLP-Mixer: An all-MLP Architecture for Vision
  • Focal Modulation Networks cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
  • Focal Modulation Networks cites RandAugment: Practical Automated Data Augmentation with a Reduced Search Space
  • Focal Modulation Networks cites Pyramid Vision Transformer: A Versatile Backbone for Dense Prediction without Convolutions
  • Sequencer: Deep LSTM for Image Classification cites MLP-Mixer: An all-MLP Architecture for Vision
  • Sequencer: Deep LSTM for Image Classification cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
  • Sequencer: Deep LSTM for Image Classification cites RandAugment: Practical Automated Data Augmentation with a Reduced Search Space
  • Sequencer: Deep LSTM for Image Classification cites Pyramid Vision Transformer: A Versatile Backbone for Dense Prediction without Convolutions
  • Rolling-Unet: Revitalizing MLP's Ability to Efficiently Extract Long-Distance Dependencies for Medical Image Segmentation cites MLP-Mixer: An all-MLP Architecture for Vision
  • Rolling-Unet: Revitalizing MLP's Ability to Efficiently Extract Long-Distance Dependencies for Medical Image Segmentation cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
  • Adaptive Frequency Filters As Efficient Global Token Mixers cites MLP-Mixer: An all-MLP Architecture for Vision
  • Adaptive Frequency Filters As Efficient Global Token Mixers cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
  • Adaptive Frequency Filters As Efficient Global Token Mixers cites Twins: Revisiting the Design of Spatial Attention in Vision Transformers
  • Pyramid Vision Transformer: A Versatile Backbone for Dense Prediction without Convolutions cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
  • Twins: Revisiting the Design of Spatial Attention in Vision Transformers cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
  • Twins: Revisiting the Design of Spatial Attention in Vision Transformers cites Pyramid Vision Transformer: A Versatile Backbone for Dense Prediction without Convolutions
  • Understanding The Robustness in Vision Transformers cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
  • Understanding The Robustness in Vision Transformers cites Pyramid Vision Transformer: A Versatile Backbone for Dense Prediction without Convolutions
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers12

  1. Focal Modulation NetworksJianwei Yang, Chunyuan Li, Xiyang Dai, Jianfeng GaoNeurIPS 2022 · 494 citations
  2. Understanding The Robustness in Vision TransformersDaquan Zhou, Zhiding Yu, Enze Xie, Chaowei Xiao et al.ICML 2022 · 242 citations
  3. Rolling-Unet: Revitalizing MLP's Ability to Efficiently Extract Long-Distance Dependencies for Medical Image SegmentationYutong Liu, Haijiang Zhu, Mengting Liu, Huaiyuan Yu et al.AAAI 2024 · 136 citations
  4. Sequencer: Deep LSTM for Image ClassificationYuki Tatsunami, Masato TakiNeurIPS 2022 · 124 citations
  5. Adaptive Frequency Filters As Efficient Global Token MixersZhipeng Huang, Zhizheng Zhang, Cuiling Lan, Zheng-Jun Zha et al.ICCV 2023 · 96 citations

Builds on10

  1. An Image is Worth 16x16 Words: Transformers for Image Recognition at ScaleAlexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn et al.ICLR 2021 · 21,477 citations
  2. Pyramid Vision Transformer: A Versatile Backbone for Dense Prediction without ConvolutionsWenhai Wang, Enze Xie, Xiang Li, Deng-Ping Fan et al.ICCV 2021 · 4,909 citations
  3. RandAugment: Practical Automated Data Augmentation with a Reduced Search SpaceEkin Dogus Cubuk, Barret Zoph, Jonathon Shlens, Quoc LeNeurIPS 2020 · 4,453 citations
  4. MLP-Mixer: An all-MLP Architecture for VisionIlya O. Tolstikhin, Neil Houlsby, Alexander Kolesnikov, Lucas Beyer et al.NeurIPS 2021 · 3,862 citations
  5. Twins: Revisiting the Design of Spatial Attention in Vision TransformersXiangxiang Chu, Zhi Tian, Yuqing Wang, Bo Zhang et al.NeurIPS 2021 · 1,388 citations

Related papers

  1. MetaFormer is Actually What You Need for VisionWeihao Yu, Mi Luo, Pan Zhou, Chenyang Si et al.CVPR 2022 · 1,114 citations
  2. When Shift Operation Meets Vision Transformer: An Extremely Simple Alternative to Attention MechanismGuangting Wang, Yucheng Zhao, Chuanxin Tang, Chong Luo et al.AAAI 2022 · 92 citations
  3. AS-MLP: An Axial Shifted MLP Architecture for VisionDongze Lian, Zehao Yu, Xing Sun, Shenghua GaoICLR 2022 · 217 citations
  4. Pay Attention to MLPsHanxiao Liu, Zihang Dai, David R. So, Quoc V. LeNeurIPS 2021 · 912 citations
  5. Vision Transformer with Sparse Scan PriorYuguang Zhang, Qihang Fan, Huaibo HuangACM MM 2025 · 2 citations
Dusk over the sea between two cliffs drawn in fine vertical lines