MLP Can Be a Good Transformer Learner
Authors:
- 16 June 2024
- conference paper
- Published by Institute of Electrical and Electronics Engineers (IEEE)
- p. 19489-19498
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.Keywords
All Related Versions
Funding Information
- Australian Research Council (ARC) Discovery program (DP240100181)
This publication has 20 references indexed in Scilit:
- Joint Token Pruning and Squeezing Towards More Aggressive Compression of Vision Transformers2023
- Deep Frequency Filtering for Domain Generalization2023
- TinyMIM: An Empirical Study of Distilling MIM Pre-trained Models2023
- EfficientViT: Memory Efficient Vision Transformer with Cascaded Group Attention2023
- Improving Vision Transformers by Revisiting High-Frequency Components2022
- Patch Slimming for Efficient Vision Transformers2022
- MetaFormer is Actually What You Need for Vision2022
- Scene Parsing through ADE20K Dataset2017
- ImageNet: A large-scale hierarchical image database2009
- Measuring Information TransferPhysical Review Letters, 2000