arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2409.18962cs.CVcs.AIcs.LG
收藏

探索视觉状态空间模型中的令牌剪枝

Exploring Token Pruning in Vision State Space Models

Northeastern University(东北大学);University of Georgia(佐治亚大学);Harvard University(哈佛大学)

Zheng Zhan, Zhenglun Kong, Yifan Gong, Yushu Wu, Zichong Meng, Hangyu Zheng, Xuan Shen, Stratis Ioannidis, Wei Niu, Pu Zhao, Yanzhi Wang

AI总结:

本文针对视觉状态空间模型提出专用令牌剪枝方法,通过剪枝感知的隐藏状态对齐和适配SSM的令牌重要性评估,在保持性能的同时显著降低计算量。

摘要:

状态空间模型(SSMs)相较于Transformer中的注意力模块具有保持线性计算复杂度的优势,并已作为一种新型强大的视觉基础模型应用于视觉任务。受视觉Transformer(ViTs)中最终预测仅基于最具信息量的令牌子集这一观察的启发,我们迈出了新的一步,通过基于令牌的剪枝来提升基于SSM的视觉模型的效率。然而,直接应用为ViTs设计的现有令牌剪枝技术即使经过大量微调也无法取得良好性能。为解决这一问题,我们重新审视了SSMs独特的计算特性,发现朴素应用会破坏顺序令牌位置。这一见解促使我们设计一种专门针对基于SSM的视觉模型的新型通用令牌剪枝方法。我们首先引入一种剪枝感知的隐藏状态对齐方法,以稳定剩余令牌的邻域,从而提升性能。此外,基于我们的详细分析,我们提出了一种适用于SSM模型的令牌重要性评估方法,以指导令牌剪枝。借助高效实现和实用加速方法,我们的方法带来了实际的速度提升。大量实验表明,我们的方法能够在不同任务中以对性能影响最小的方式显著减少计算量。值得注意的是,在剪枝后的PlainMamba-L3上,我们在ImageNet上达到了81.7%的准确率,同时FLOPs减少了41.6%。此外,我们的工作为未来研究理解基于SSM的视觉模型的行为提供了更深入的见解。

英文摘要:

State Space Models (SSMs) have the advantage of keeping linear computational complexity compared to attention modules in transformers, and have been applied to vision tasks as a new type of powerful vision foundation model. Inspired by the observations that the final prediction in vision transformers (ViTs) is only based on a subset of most informative tokens, we take the novel step of enhancing the efficiency of SSM-based vision models through token-based pruning. However, direct applications of existing token pruning techniques designed for ViTs fail to deliver good performance, even with extensive fine-tuning. To address this issue, we revisit the unique computational characteristics of SSMs and discover that naive application disrupts the sequential token positions. This insight motivates us to design a novel and general token pruning method specifically for SSM-based vision models. We first introduce a pruning-aware hidden state alignment method to stabilize the neighborhood of remaining tokens for performance enhancement. Besides, based on our detailed analysis, we propose a token importance evaluation method adapted for SSM models, to guide the token pruning. With efficient implementation and practical acceleration methods, our method brings actual speedup. Extensive experiments demonstrate that our approach can achieve significant computation reduction with minimal impact on performance across different tasks. Notably, we achieve 81.7\% accuracy on ImageNet with a 41.6\% reduction in the FLOPs for pruned PlainMamba-L3. Furthermore, our work provides deeper insights into understanding the behavior of SSM-based vision models for future research.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑