Reinforcement Learning-based Token Pruning in Vision Transformers: A Markov Game Approach
Chenglong Lu, Shen Liang, Xuewei Wang, Wei Wang
TL;DR
This work tackles the high computational cost of Vision Transformers by learning a data-adaptive token pruning policy using reinforcement learning. It formulates token pruning as a sequential decision process and deploys MAPPO-based pruning layers after each Transformer block, coordinated through a Markov Game to preserve inter-layer dependencies. Key contributions include a MAPPO token-pruning architecture with per-token agents, a curated reward design balancing efficiency and accuracy, and a Markov Game trajectory that captures cross-layer dynamics; the method achieves up to 44% faster inference on ImageNet-1k with only about 0.4% accuracy loss (reducible to ~0.1% with fine-tuning). The approach demonstrates superior efficiency–accuracy trade-offs compared with state-of-the-art token pruning methods, highlighting the practical potential of RL-driven adaptivity in ViTs.
Abstract
Vision Transformers (ViTs) have computational costs scaling quadratically with the number of tokens, calling for effective token pruning policies. Most existing policies are handcrafted, lacking adaptivity to varying inputs. Moreover, they fail to consider the sequential nature of token pruning across multiple layers. In this work, for the first time (as far as we know), we exploit Reinforcement Learning (RL) to data-adaptively learn a pruning policy. Formulating token pruning as a sequential decision-making problem, we model it as a Markov Game and utilize Multi-Agent Proximal Policy Optimization (MAPPO) where each agent makes an individualized pruning decision for a single token. We also develop reward functions that enable simultaneous collaboration and competition of these agents to balance efficiency and accuracy. On the well-known ImageNet-1k dataset, our method improves the inference speed by up to 44% while incurring only a negligible accuracy drop of 0.4%. The source code is available at https://github.com/daashuai/rl4evit.
