MLP Can Be a Good Transformer Learner

Sihao Lin, Pumeng Lyu, Dongrui Liu, Tao Tang, Xiaodan Liang +2 more
2/9/2026

No official code found. Best implementation: sihaoevery/lambda_vit (24 stars, last commit 2024-04-09).

Abstract

Self-attention mechanism is the key of the Transformer but often criticized for its computation demands. Previous token pruning works motivate their methods from the view of computation redundancy but still need to load the full network and require same memory costs. This paper introduces a novel strategy that simplifies vision transformers and reduces computational load through the selective removal of non-essential attention layers, guided by entropy considerations. We identify that regarding the attention layer in bottom blocks, their subsequent MLP layers, i.e. two feed-forward layers, can elicit the same entropy quantity. Meanwhile, the accompanied MLPs are under-exploited since they exhibit smaller feature entropy compared to those MLPs in the top blocks. Therefore, we propose to integrate the uninformative attention layers into their subsequent counterparts by degenerating them into identical mapping, yielding only MLP in certain transformer blocks. Experimental results on ImageNet-1k show that the proposed method can remove 40% attention layer of DeiT-B, improving throughput and memory bound without performance compromise.

View on arXivView PDF

Code Implementations(1)

244Shell, PythonApr 8, 20242 years agoNOASSERTION

Similar Papers

Cite this paper

@article{lin2026good,
  title  = {MLP Can Be a Good Transformer Learner},
  author = {Sihao Lin and Pumeng Lyu and Dongrui Liu and Tao Tang and Xiaodan Liang and Andy Song and Xiaojun Chang},
  year   = {2026},
  eprint = {2404.05657},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/pdf/2404.05657},
  journal = {CVPR 2024 2024}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2404.05657.svg)](https://codeofpaper.com/paper/2404.05657)

Discussion