arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2603.29494cs.CV
收藏

VecAttention: 向量级稀疏注意力用于加速长上下文推理

VecAttention: Vector-wise Sparse Attention for Accelerating Long Context Inference

SCS, Peking University(北京大学计算机科学技术学院);Key Lab of HCST (PKU), MOE(高可信软件技术教育部重点实验室(北京大学));Fudan University(复旦大学);Alibaba Group(阿里巴巴集团);Shanghai Jiao Tong University(上海交通大学)

Anmin Liu, Ruixuan Yang, Huiqiang Jiang, Bin Lin, Minmin Sun, Yong Li, Chen Zhang, Tao Xie

AI总结:

本文提出VecAttention,一种向量级稀疏注意力框架,通过动态选择信息向量提升视频模型的精度与效率,实测在视频理解和生成任务中比全注意力快2.65倍,比现有稀疏注意力方法快1.83倍且精度相当。

摘要:

长上下文视频理解和生成对基于Transformer的视频模型构成显著计算挑战,因自注意力的二次复杂性。尽管现有稀疏注意力方法采用粗粒度模式提高效率,但通常导致冗余计算和次优性能。为解决此问题,本文提出VecAttention,一种新颖的向量级稀疏注意力框架,实现视频模型的优越精度-效率权衡。我们观察到视频注意力图表现出强垂直向量稀疏模式,并进一步证明该垂直向量模式在精度-稀疏度权衡上优于现有粗粒度稀疏模式。基于此观察,VecAttention通过轻量级重要向量选择动态选择并处理仅信息性垂直向量,最小化内存访问开销并优化向量稀疏注意力内核。全面评估显示,VecAttention在视频理解(VideoMME、LongVideoBench和VCRBench)和生成(VBench)任务中,相比全注意力快2.65倍,相比现有稀疏注意力方法快1.83倍,精度与全注意力相当。我们的代码可在https://github.com/anminliu/VecAttention获取。

英文摘要:

Long-context video understanding and generation pose a significant computational challenge for Transformer-based video models due to the quadratic complexity of self-attention. While existing sparse attention methods employ coarse-grained patterns to improve efficiency, they typically incur redundant computation and suboptimal performance. To address this issue, in this paper, we propose \textbf{VecAttention}, a novel framework of vector-wise sparse attention that achieves superior accuracy-efficiency trade-offs for video models. We observe that video attention maps exhibit a strong vertical-vector sparse pattern, and further demonstrate that this vertical-vector pattern offers consistently better accuracy-sparsity trade-offs compared with existing coarse-grained sparse patterns. Based on this observation, VecAttention dynamically selects and processes only informative vertical vectors through a lightweight important-vector selection that minimizes memory access overhead and an optimized kernel of vector sparse attention. Comprehensive evaluations on video understanding (VideoMME, LongVideoBench, and VCRBench) and generation (VBench) tasks show that VecAttention delivers a 2.65$\times$ speedup over full attention and a 1.83$\times$ speedup over state-of-the-art sparse attention methods, with comparable accuracy to full attention. Our code is available at https://github.com/anminliu/VecAttention.

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

↑