Skip to yearly menu bar Skip to main content


MLP Can Be A Good Transformer Learner

Sihao Lin · Pumeng Lyu · Dongrui Liu · Tao Tang · Xiaodan Liang · Andy Song · Xiaojun Chang

Arch 4A-E Poster #308
[ ]
Fri 21 Jun 10:30 a.m. PDT — noon PDT
Oral presentation: Orals 5C Low-shot, self-supervised, semi-supervised learning
Fri 21 Jun 9 a.m. PDT — 10:30 a.m. PDT


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.

Live content is unavailable. Log in and register to view live content