2 min readfrom Machine Learning

Language Models Can Control Their Own Attention [R]

Our take

Recent research introduces Declarative Attention (DA), a transformative approach to how language models manage context. Current models inefficiently scan vast amounts of data, even for focused queries. DA empowers models to *declare* where they need to attend—globally, locally, or to a specific region—significantly reducing the tokens processed during inference. Experiments with models like Gemma and Qwen show substantial reductions in attended tokens (up to 52.0%) with minimal accuracy impact.

The recent paper introducing Declarative Attention (DA) represents a significant step toward addressing a persistent bottleneck in large language model (LLM) performance: the quadratic computational cost of attention. As LLMs grapple with increasingly long contexts – vital for tasks like summarizing lengthy documents or maintaining coherent conversations – the need to efficiently process vast amounts of information becomes paramount. Current approaches often involve scanning the entire key-value (KV) cache, a process that scales unfavorably with context length. Prior attempts to mitigate this, like proxy scoring, still incur a substantial computational burden. This work, however, takes a refreshingly intrinsic approach, asking a simple but profound question: can the model itself guide its attention? It’s a concept that resonates with how humans process information – we don’t consciously review every detail when recalling a past conversation; we selectively focus on the relevant parts. The approach of leveraging pre-selected tokens via lightweight proxy scores is discussed in AIStats 2027 Questions, highlighting ongoing efforts to optimize these pre-selection processes, and the potential vulnerabilities in even the most advanced models is brought to light in GPT-6 reportedly jailbroken within 24 hours using an extended Task-in-Prompt (TIP) attack.

DA’s core innovation lies in its "declarative" nature. Rather than relying on external mechanisms to determine relevance, the model is prompted to explicitly declare where it needs to attend during generation, partitioning the process into global, focus, and local modes. This allows the inference engine to selectively skip large portions of the KV cache, dramatically reducing computational overhead. The reported results – a 52.0% to 31.1% reduction in attended tokens with modest accuracy drops that shrink with model scale – are compelling. While the paper focuses on zero-shot evaluation with models like Gemma-4-31B and Qwen-3.6-27B, the potential for further improvements through training-based methods is particularly exciting. The framework’s ability to unlock a new axis of sparse attention suggests a pathway toward building more efficient and scalable LLMs, potentially alleviating hardware constraints and enabling broader accessibility. The challenges faced by researchers in ensuring rigorous evaluation, as exemplified by the issues raised in [UPDATE - EIC confirmed ghost reviewer]How to get rejected by IEEE T-PAMI with 'Excellent' scores?]( /post/update-eic-confirmed-ghost-reviewer-how-to-get-rejected-by-i-cmtsmfn1907b7rgeddg5ocb9o), underscores the need for careful scrutiny and validation of these new approaches.

The broader significance of DA extends beyond simply optimizing inference speed. It represents a shift in how we think about attention mechanisms, moving away from brute-force scanning towards more intelligent and adaptive strategies. This approach aligns with the broader trend of incorporating more cognitive principles into LLM design, seeking to emulate the selective and context-aware processing that characterizes human intelligence. The ability for models to explicitly declare their attention needs also opens up new avenues for interpretability. Understanding *why* a model focuses on certain parts of the context could provide valuable insights into its reasoning process and help to debug biases or errors. Moreover, the modularity of DA – its partitioning into distinct attention modes – could facilitate the development of more specialized and efficient architectures tailored to specific tasks.

Looking ahead, the key question is whether DA can be effectively integrated into training pipelines. While the paper demonstrates impressive results with zero-shot inference, the potential for further gains through training-based methods is substantial. The development of robust training techniques that encourage models to learn effective declarative attention strategies will be crucial for realizing the full potential of this approach. Furthermore, exploring how DA interacts with other sparsity techniques and architectural innovations promises to unlock even greater efficiency and scalability in the future of LLMs. It’s a development to watch closely, as it points toward a future where AI can process vast amounts of information with remarkable efficiency and precision.

Abstract

Language models spend most of their attention on a small fraction of context, yet they read the entire KV cache to find the few tokens that matter. If the user asks about a previous detail in a 1M-token conversation, global attention layers must scan the full context to generate each token of the reply. A prominent approach mitigates this cost by pre-selecting relevant tokens via lightweight proxy scores, but this extrinsic scoring still incurs O(N) per step. We take an intrinsic approach motivated by the simple question: wouldn't the model already know which parts of the context are relevant? To this end, we introduce Declarative Attention (DA), a protocol that elicits the model to declare where it needs to attend within its chain-of-thought, partitioning generation into three modes: <global> (full context), <focus> (a specific region), and <local> (recent output only). The inference engine parses these declarations like tool calls and skips most of the KV cache read. Under zero-shot evaluation across 15 long-context tasks, DA on off-the-shelf models (Gemma-4-31B, Qwen-3.6-27B) significantly reduces total attended tokens during decoding (52.0%, 31.1%) with modest accuracy drops (1.27pp, 2.75pp) that shrink with model scale. DA unlocks a new axis of sparse attention, with further potential under training-based methods that future work can explore.
Subjects:
Computation and Language (cs.CL); Artificial Intelligence (cs.AI); Machine Learning (cs.LG)
Cite as:
arXiv:2609.02737 [cs.CL]

(or arXiv:2609.02737v1 [cs.CL] for this version)

https://doi.org/10.48550/arXiv.2609.02737
Focus to learn more

submitted by /u/eigenlaplace
[link] [comments]

Read on the original site

Open the publisher's page for the full experience

View original article