SPOT:视觉Transformer中基于Token相关性的注意力动态稀疏化方法
SPOT: Sparsification with Attention Dynamics via Token Relevance in Vision Transformers
AI总结:
针对ViT计算量随token数二次增长的问题,提出轻量可插拔的SPOT稀疏化框架,基于跨层token注意力动态识别冗余token,最高提升40%效率且不损失精度。
摘要:
尽管视觉Transformer(ViT)在各类任务中表现出色,但其计算需求极高,计算量随处理的token数量呈二次方增长。能够反映token交互分布的紧凑注意力表征,可在注意力计算前引导对低显著性token的早期识别与削减。基于此,我们提出基于token相关性的注意力动态稀疏化框架SPOT,该框架利用跨层的token嵌入、交互与注意力动态推断token重要性,实现更具上下文感知能力、可解释性更强的相关性检测流程。SPOT为token稀疏化提供依据,推动冗余token的剔除,在不损失性能的前提下提升计算效率。SPOT采用计算轻量的预测器,可嵌入各类ViT架构,学习推导跨层的、针对特定输入的有效token优先级排序。其通用设计支持适配不同资源约束的多档性能水平。实证评估表明,与标准ViT相比,该方法最高可实现40%的效率提升,同时保持甚至提升准确率。代码与模型可在https://github.com/odedsc/SPOT获取。
英文摘要:
While Vision Transformers (ViT) have demonstrated remarkable performance across diverse tasks, their computational demands are substantial, scaling quadratically with the number of processed tokens. Compact attention representations, reflecting token interaction distributions, can guide early detection and reduction of less salient tokens prior to attention computation. Motivated by this, we present SParsification with attentiOn dynamics via Token relevance (SPOT), a framework for early detection of redundant tokens within ViTs that leverages token embeddings, interactions, and attention dynamics across layers to infer token importance, resulting in a more context-aware and interpretable relevance detection process. SPOT informs token sparsification and facilitates the elimination of such tokens, improving computational efficiency without sacrificing performance. SPOT employs computationally lightweight predictors that can be plugged into various ViT architectures and learn to derive effective input-specific token prioritization across layers. Its versatile design supports a range of performance levels adaptable to varying resource constraints. Empirical evaluations demonstrate significant efficiency gains of up to 40% compared to standard ViTs, while maintaining or even improving accuracy. Code and models are available at https://github.com/odedsc/SPOT .
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。