Learning to Merge Tokens in Vision Transformers
Cedric Renggli, Andr\'e Susano Pinto, Neil Houlsby, Basil Mustafa,, Joan Puigcerver, Carlos Riquelme

TL;DR
This paper introduces PatchMerger, a simple module for vision transformers that reduces computational costs by merging tokens between layers, achieving speedups without sacrificing performance.
Contribution
The paper proposes PatchMerger, a novel token-merging module that decreases processing complexity in vision transformers while maintaining accuracy after fine-tuning.
Findings
Significant speedup across various model sizes.
Maintains original performance after fine-tuning.
Effective token reduction method for vision transformers.
Abstract
Transformers are widely applied to solve natural language understanding and computer vision tasks. While scaling up these architectures leads to improved performance, it often comes at the expense of much higher computational costs. In order for large-scale models to remain practical in real-world systems, there is a need for reducing their computational overhead. In this work, we present the PatchMerger, a simple module that reduces the number of patches or tokens the network has to process by merging them between two consecutive intermediate layers. We show that the PatchMerger achieves a significant speedup across various model sizes while matching the original performance both upstream and downstream after fine-tuning.
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Code & Models
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsMultimodal Machine Learning Applications · Advanced Neural Network Applications · Domain Adaptation and Few-Shot Learning
MethodsPatch Merger Module
