arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2412.01818cs.CVcs.AI
收藏

超越文本-视觉注意力:利用视觉线索在 VLM 中实现有效的 Token 剪枝

Beyond Text-Visual Attention: Exploiting Visual Cues for Effective Token Pruning in VLMs

National Key Laboratory for Multimedia Information Processing, School of Computer Science, Peking University(国家多媒体信息处理重点实验室,计算机科学学院,北京大学);ByteDance(字节跳动);Intel Labs China(英特尔中国实验室);CUHK MMLab(香港中文大学MMLab)

Qizhe Zhang, Aosong Cheng, Ming Lu, Renrui Zhang, Zhiyong Zhuo, Jiajun Cao, Shaobo Guo, Qi She, Shanghang Zhang

AI总结:

针对 LVLM 视觉 token 计算开销问题,本文提出无需训练的即插即用方法 VisPruner,通过视觉注意力与相似性去重保留重要且多样的 token,在大幅降低 FLOPs 和延迟的同时优于现有方法。

摘要:

大型视觉语言模型(LVLM)通常包含远多于文本 token 的视觉 token,从而造成相当大的计算负担。近期已有研究尝试通过在语言模型内部尽早剪枝视觉 token 来解决这一问题。大多数现有工作使用文本与视觉 token 之间的注意力分数来评估视觉 token 的重要性。然而,在本研究中,我们首先分析了语言模型中的文本-视觉注意力,并发现该分数并不是 token 剪枝的理想指标。基于这一分析,我们提出 VisPruner,这是一种即插即用方法,利用视觉线索在 LVLM 中实现更有效的 token 剪枝。具体而言,我们首先使用视觉注意力选择数量有限的显著 token;随后,根据剩余 token 之间的相似性移除重复 token。通过在最初选择的重要 token 之外保留多样化 token,我们最大限度地保留输入图像的视觉信息。实验结果表明,VisPruner 在多种 VLM 架构和不同缩减比例下均能保持强劲性能,并显著优于现有的基于文本-视觉注意力的方法。值得注意的是,VisPruner 无需任何训练,即可将 LLaVA-1.5-7B 的 FLOPs 降低 91%,将推理延迟降低 75%,同时保持相当的性能。我们的代码可在 https://github.com/Theia-4869/VisPruner 获取。

英文摘要:

Large vision-language models (LVLMs) generally contain significantly more visual tokens than their textual counterparts, resulting in a considerable computational burden. Recent efforts have been made to tackle this issue by pruning visual tokens early within the language model. Most existing works use attention scores between text and visual tokens to assess the importance of visual tokens. However, in this study, we first analyze the text-visual attention in the language model and find that this score is not an ideal indicator for token pruning. Based on the analysis, We propose VisPruner, a plug-and-play method that utilizes visual cues for more effective token pruning in LVLMs. Specifically, we first use visual attention to select a limited number of significant tokens. Then, we remove duplicate tokens from the remaining ones based on their similarity. By retaining diverse tokens alongside the initially selected important tokens, we maximally preserve the visual information of the input image. Experimental results demonstrate that our VisPruner sustains strong performance across various VLM architectures and reduction ratios, significantly outperforming existing methods based on text-visual attention. Notably, without any training, VisPruner can reduce the FLOPs of LLaVA-1.5-7B by 91% and inference latency by 75%, while maintaining comparable performance. Our code is available at https://github.com/Theia-4869/VisPruner.

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

↑