Modelwire
Subscribe

Models learn to declare attention needs, cutting long-context inference cost

Researchers propose Declarative Attention, a technique that lets language models explicitly signal which context tokens matter before computing expensive full attention. Rather than scanning entire KV caches to find relevant tokens, the model declares its information needs upfront, reducing per-token computational cost from O(N) to something tractable. This addresses a real efficiency bottleneck in long-context inference where models waste cycles reading irrelevant history. The approach is conceptually elegant: if a model already knows what it needs, why force it to search blindly? Success here could reshape how production systems handle million-token contexts, making long-document reasoning faster without sacrificing quality.

Modelwire context

Explainer

The paper doesn't just optimize attention; it inverts the search problem. Instead of the model scanning all cached tokens to find what's relevant (the current cost), Declarative Attention assumes the model can predict its own information needs upfront and signal them. The efficiency gain depends entirely on how accurate that self-prediction is, which the summary leaves unexamined.

This connects directly to two threads from yesterday's coverage. The 'Scaled Idempotence' paper revealed that attention heads develop specialized geometric structures during training, suggesting some heads already exhibit near-deterministic behavior. If those heads are the ones declaring attention needs, the approach becomes more plausible. Separately, 'Graph Machine' tackled the same O(N) bottleneck using learned dynamic routing instead of full attention, achieving 2-4 tokens per head. Declarative Attention is a different bet on the same problem: instead of learning which tokens matter during inference, it asks the model to tell you upfront. Both assume sparsity is real; this one gambles that models can self-report it accurately.

If Declarative Attention maintains within 2% perplexity of standard attention on a held-out long-context benchmark (not the paper's own eval), and the declared token set overlaps >70% with what gradient-based attention importance scoring would identify, the approach is mechanically sound. If overlap is <50%, the model is declaring something other than genuine information need, and the efficiency gains are masking a reasoning quality trade-off.

Coverage we drew on

This analysis is generated by Modelwire’s editorial layer from our archive and the summary above. It is not a substitute for the original reporting. How we write it.

MentionsDeclarative Attention

MW

Modelwire Editorial

This synthesis and analysis was prepared by the Modelwire editorial team. We use advanced language models to read, ground, and connect the day’s most significant AI developments, providing original strategic context that helps practitioners and leaders stay ahead of the frontier.

Modelwire summarizes, we don’t republish. arXiv cs.LG originally reported this story as Language Models Can Control Their Own Attention”. The full content lives on arxiv.org. If you’re a publisher and want a different summarization policy for your work, see our takedown page.

Models learn to declare attention needs, cutting long-context inference cost · Modelwire