arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2602.03152cs.CL
收藏

FASA: 基于频率的稀疏注意力

FASA: Frequency-aware Sparse Attention

AMAP, Alibaba Group(阿里巴巴集团AMAP);UCSD(加州大学圣迭戈分校);UIUC(伊利诺伊大学香槟分校);Texas A&M University(德克萨斯农工大学)

Yifei Wang, Yueqi Wang, Zhenrui Yue, Huimin Zeng, Yong Wang, Ismini Lourentzou, Zhengzhong Tu, Xiangxiang Chu, Julian McAuley

AI总结:

FASA通过动态预测令牌重要性,实现基于频率块的稀疏注意力机制,在长上下文任务中表现出色,达到接近全缓存性能且显著提升效率。

摘要:

大型语言模型(LLMs)在处理长输入时面临一个关键瓶颈:键值(KV)缓存的高昂内存开销。为了解决这一瓶颈,令牌修剪范式利用注意力稀疏性,选择性地保留一小部分关键令牌。然而,现有方法存在不足,静态方法可能造成不可逆的信息损失,动态策略则采用启发式方法,无法充分捕捉令牌重要性与查询的依赖关系。我们提出FASA,一种新的框架,通过动态预测令牌重要性实现查询感知的令牌淘汰。FASA源于对RoPE的新见解:在频率块(FC)层面发现功能性稀疏性。我们的关键发现是,一小部分“主导”FC始终与完整的注意力头具有高度上下文一致性。这为识别显著令牌提供了稳健且计算自由的代理。基于这一见解,FASA首先利用主导FC识别关键令牌,然后仅在该修剪子集上执行聚焦注意力计算。在一系列长上下文任务中,从序列建模到复杂CoT推理,FASA在所有令牌淘汰基线中均表现优异,并在受限预算下展现出卓越的鲁棒性。值得注意的是,在LongBench-V1上,当仅保留256个令牌时,FASA达到接近完整KV性能的99.9%;在AIME24上,使用仅18.9%的缓存实现2.56倍的加速。

英文摘要:

The deployment of Large Language Models (LLMs) faces a critical bottleneck when handling lengthy inputs: the prohibitive memory footprint of the Key Value (KV) cache. To address this bottleneck, the token pruning paradigm leverages attention sparsity to selectively retain a small, critical subset of tokens. However, existing approaches fall short, with static methods risking irreversible information loss and dynamic strategies employing heuristics that insufficiently capture the query-dependent nature of token importance. We propose FASA, a novel framework that achieves query-aware token eviction by dynamically predicting token importance. FASA stems from a novel insight into RoPE: the discovery of functional sparsity at the frequency-chunk (FC) level. Our key finding is that a small, identifiable subset of "dominant" FCs consistently exhibits high contextual agreement with the full attention head. This provides a robust and computationally free proxy for identifying salient tokens. Building on this insight, FASA first identifies a critical set of tokens using dominant FCs, and then performs focused attention computation solely on this pruned subset. Across a spectrum of long-context tasks, from sequence modeling to complex CoT reasoning, FASA consistently outperforms all token-eviction baselines and achieves near-oracle accuracy, demonstrating remarkable robustness even under constraint budgets. Notably, on LongBench-V1, FASA reaches nearly 100\% of full-KV performance when only keeping 256 tokens, and achieves 2.56$\times$ speedup using just 18.9\% of the cache on AIME24.

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

↑