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

用于块稀疏注意力的不确定性门控选择

Uncertainty-gated selection for block-sparse attention

Thomas Rossi

AI总结:

研究针对块稀疏注意力截断短视问题,提出信息价值路由器,通过测量 top-k 截断决定性程度调整保留集。该方法与主干无关,可堆叠现有方法。实验表明其在多个模型上提升召回率,保留准确率,且减少运行时间。

摘要:

块稀疏注意力通过对关键块进行逐查询的 top-k 选择来扩展长上下文语言模型,取代了 O(N^2) 的 softmax。但这种截断是短视的,当第 k 个和第 k+1 个块的分数相近时,选择器会在不花费额外预算的情况下做出决定,导致携带答案证据的被丢弃块在下游无法恢复。我们提出了一种信息价值路由器,为每个查询测量 top-k 截断的决定性程度,并为差距最小的查询将保留集加倍。该规则与主干无关,可与现有块评分方法(如 Quest)堆叠。在 LongBench-v2 中等数据集上,基于 Quest 的路由器配对召回率达到 0.75,而 top-k 为 0.47,比 SSA 风格基线提高了 28 个百分点(McNemar p<0.01),在相同上下文下与密集模型的差距在 2 个百分点以内。这种提升在三种架构的四个模型上都能重现。在 128K 时,路由器在 Qwen2.5-7B-1M 和 Qwen3.6 上分别保留了 0.81 和 0.89 的密集模型准确率,而融合的选择加内核管道的运行时间分别为密集模型的 0.62 倍和 0.80 倍。

英文摘要:

Block-sparse attention scales long-context language models by replacing the O(N^2) softmax with a per-query top-k selection over key blocks. This cutoff is myopic: when the k-th and (k+1)-th blocks are nearly tied in score, the selector commits without spending extra budget, and a dropped block carrying answer evidence is unrecoverable downstream. We propose a value-of-information router that measures, for each query, how decisively the top-k cut was made, and doubles the kept set for the queries where that gap is smallest; the rule is backbone-agnostic and stacks with existing block-scoring methods such as Quest. On LongBench-v2 medium at n=215 (the entire dataset subset), router-on-Quest reaches paired recall 0.75 vs. top-k 0.47 -- +28 pp over the SSA-style baseline (McNemar p<0.01) -- and lands within 2 pp of dense on RULER NIAH multikey at the same context. The lift reproduces on four models from three architectures (Qwen2.5, Mistral-Nemo, Qwen3.6). At 128K, the router preserves 0.81 and 0.89 of dense accuracy on Qwen2.5-7B-1M and Qwen3.6 (vs. SSA-style top-k at 0.09 on the former) while the fused selection-plus-kernel pipeline runs at 0.62x and 0.80x dense wall time.

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

↑