大模型
website ·
Google DeepMind提出Declarative Attention:让模型在思维链中声明注意力范围
Google DeepMind提出Declarative Attention方法,让模型在思维链中声明需要关注的上下文区域,从而在解码时跳过大部分KV cache读取。在15个长上下文任务上,Gemma-4-31B和Qwen-3.6-27B的注意力token分别减少52.0%和31.1%。
AI推荐理由 该方法可显著降低长上下文推理时的计算开销,对提升推理效率和降低成本有直接帮助。
87
浏览 52,672
点赞 779
评论 24
转发 130
正文
来自Google DeepMind和同事的重磅论文。
(收藏它)
一个模型在生成的每个token上读取其整个KV缓存,尽管它最终只关注其中的一小部分。
换句话说,如果你询问一个100万token对话中的一个细节,全局注意力层会为每个token重新读取所有内容。
通常的解决方法是先用廉价的代理分数猜测相关token,这仍然每一步花费O(N)。声明式注意力则改为询问模型。
模型在其自身的思维链中声明它需要查看的位置。
这样,生成分为三种模式:全局读取完整上下文,焦点读取特定区域,局部只读取最近的输出。
推理引擎解析这些声明的方式与解析工具调用相同,并跳过大部分缓存读取。
在15个长上下文任务的零样本测试中,使用现成权重,解码期间关注的token在Gemma-4-31B上减少了52.0%,在Qwen-3.6-27B上减少了31.1%。
论文:[arxiv.org/abs/2609.02737](https://arxiv.org/abs/2609.02737)
与论文聊天:[academy.dair.ai/papers/languag…](https://academy.dair.ai/papers/language-models-can-control-their-own-attention-2609.02737)

查看原文(中文正文为 AI 翻译)
Banger paper from Google DeepMind and colleagues.
(bookmark it)
A model reads its entire KV cache on every generated token, even though it ends up attending to a tiny slice of it.
In other words, if you ask about one detail from a 1M-token conversation the global attention layers re-read all of it, per token.
The usual fix is to guess the relevant tokens first with cheap proxy scores, which still costs O(N) every step. Declarative Attention asks the model instead.
The model declares where it needs to look, inside its own chain-of-thought.
In this way, generation splits into three modes: global reads the full context, focus reads one specific region, and local reads only recent output.
The inference engine parses those declarations the same way it parses tool calls and skips most of the cache read.
On zero-shot on off-the-shelf weights across 15 long-context tasks, attended tokens during decoding drop 52.0% on Gemma-4-31B and 31.1% on Qwen-3.6-27B.
Paper: [arxiv.org/abs/2609.02737](https://arxiv.org/abs/2609.02737)
Chat with Paper: [academy.dair.ai/papers/languag…](https://academy.dair.ai/papers/language-models-can-control-their-own-attention-2609.02737)
