Paper Reading Notes · arXiv:2609.02737 · KAIST AI × Google DeepMind

Language Models Can Control
Their Own Attention

Let the model "say out loud" in its chain-of-thought where it wants to look: under the Declarative Attention (DA) protocol the model declares its attention span with parseable tags, and the inference engine skips most KV-cache reads accordingly — zero training, zero auxiliary scorers, attention cost down by up to 52.0% across 15 long-context tasks for a 1–3pp accuracy drop.
Authors: Namgyu Ho*, Huzama Ahmad*, Woosung Koh*, Se-Young Yun (KAIST AI; * equal contribution) Tal Schuster, Cicero Nogueira dos Santos (Google DeepMind) Paper: arXiv:2609.02737 (2026-09-02, v1)
Long-Context InferenceSparse AttentionKV Cache Chain-of-ThoughtvLLMZero-shot
01 · Overview

Overview: DA in one figure

This paper answers a deceptively simple question: if the model already "knows" which part of the context it should attend to, why not let it say so? Existing sparse-attention methods sit outside the model and "guess" which tokens matter using proxy scores. DA instead hands the choice of attention span to the model itself — during its chain-of-thought the model declares "where I will look next" using three tags, <global> / <focus> / <local>, the engine parses those declarations exactly like tool calls, and then reads only the corresponding KV-cache blocks.

The whole mechanism is condensed in Figure 1: top left is the assembled prompt (a system instruction + a long context split into 12 "magic chunk" segments + the question + the DA instruction); on the right is the model's response, which freely alternates between the three modes; the attention-mask matrix at the bottom shows that the KV positions actually read at each decoding step (solid) are far fewer than the full context (dashed regions are skipped).

Figure 1: Declarative Attention overview — prompt structure, three-mode model response, and the segment-level attention mask
Figure 1:Declarative Attention (DA) lets a model control its own attention span. (Prompt) A system instruction, long context information divided into segments that we refer to as "magic chunks", the user's question, and the DA instruction. (Model Response) The model freely alternates between three modes: <global> navigates the full context, <focus> reasons upon the named chunk, and <local> reasons upon the information accumulated in the response so far. (Declarative Attention Mask) A segment-level attention mask is derived from the model response text based on the DA syntax. DA needs no auxiliary scorer and runs on off-the-shelf models with no training. How to read it: the figure uses a real 25,466-token prompt. The model first navigates globally with R1 (<global>), locating Magic Chunk 1 as the one containing the SFT section; then R2 (<focus>) reads only that one segment and extracts the fact "15K math answers + 1.5K conversations"; finally R3 (<local>) ignores the context entirely and does the arithmetic within its own response to get 16,500. The three rows of the mask matrix correspond to these steps: the global step reads all of A, B1…B12, C, D, R1 (0% reduction); the focus step reads only A, B1, C, D and the response so far (3,435 prompt tokens, 86.5% reduction); the local step reads none of the context segments (1,124 prompt tokens, 95.6% reduction). The scaffolding (system instruction A, question C, DA instruction D) stays visible in every mode.

💡 Click any image to view the original 300-DPI version; click again or press Esc to close.

Attention cost · Gemma-4-31B
−52.0%attended tokens per response: 13.43M → 6.45M
Attention cost · Qwen-3.6-27B
−31.1%22.54M → 15.52M
Accuracy cost
−1.27pp / −2.75ppGemma: 87.01%→85.74%; Qwen: 85.31%→82.56%
Roofline decode wall-time
0.71× / 0.77×theoretical estimate on a single B200 at MFU 40%, MBU 70%
One-sentence summary:DA turns "choosing where to attend" from something inferred inside the network (an O(N) scan at every step) into text the model declares explicitly (O(1) to parse) — the attention mask is read straight out of the model's own words. Zero training, zero-shot; all of the savings come from the mask itself, and the accuracy gap narrows as models scale. The authors stress repeatedly that these numbers are a lower bound, not a ceiling.
02 · Background

Background: why long-context decoding is expensive

Every generated token requires reading the entire KV cache

Transformer decoding attends over all previous tokens at every step. Even if the user asks about one detail inside a million-token conversation, the global-attention layers must stream the entire context's KV cache from HBM for every single token of the reply. The paper gives a visceral number: Qwen-3.5-397B-A17B at a 1M-token context loads about 15 GB of KV cache per sequence per step — comparable to the bandwidth needed to load the model's entire 17B active parameters. And this read is not amortized by batching: every sequence carries its own KV cache and must be read per-sequence.

Attention is naturally sparse — but which tokens matter is unknown in advance

In contrast to this exhaustive reading, abundant empirical work shows attention mass is concentrated on a tiny fraction of the context (Child et al. 2019; Zhang et al. 2023; Tang et al. 2024), with sparse patterns drifting at every step. The catch: the true attention scores are only known after computing the full attention matrix — "pick the important tokens first, then compute attention" is a chicken-and-egg problem. The paper points out the soft spots of both existing escape routes:

Reframe: doesn't the model itself already know?

The paper's entry point is elegant. Prior work shows that a language model's hidden states already encode information about future tokens (Pal et al. 2023; Wu et al. 2024), and CoT prompting surfaces that latent computation as interpretable text (Wei et al. 2022). If CoT already exposes "what to think" as text, why not also expose "where to look" as text?

The only prior attempt in this direction, Self-Selected Attention Span (Jin et al. 2024), required per-task fine-tuning, hand-designed context partitioning and annotation syntax, and was validated only up to 2K-token contexts. This paper shows that on 2026-era models, the same behavior can be elicited zero-shot with one fixed task-agnostic prompt — covering 15 long-context tasks, two model families, and contexts up to 244K tokens, with no parameter updates.

Key distinction: external selection vs. internal declaration.Prior methods (including lightweight scans) approximate the attention mask from outside the model with proxy signals, paying an O(N) selection cost every step. DA has the model declare its attention span inside its generated text, and parsing the declaration costs O(1). The O(N) full-context read survives only in the explicitly declared global phases — it is no longer a fixed per-step tax.
03 · Method

Method: the Declarative Attention protocol

Three attention modes

DA splits generation into contiguous spans with a stable attention scope, each declared by a predefined tag. The division of labor:

The three modes of Declarative Attention (paper Section 2)
ModeContext-segment visibilityRole in the protocol
<global> (default)all segmentsNavigate: survey the whole context, decide which segment to focus next, briefly say why (not the place to reason out the answer itself)
<focus magic_chunks="K">only the named segmentExtract: copy the needed values (names, numbers, dates…) verbatim from the named segment
<local>no segment at allSynthesize: plan and compose using only the question + extracted values + the response so far

In every mode, three things stay visible: the question, the DA instruction, and the model's own response so far. The only difference between modes is how much of the long-context segment region is visible. A complete worked example from the paper (when did Acme go public):

<global>
I need the founding year and the IPO year. The company history in Magic Chunk 2 should state the founding.
</global>
<focus magic_chunks="2">"Acme Corp was founded in 2003 in San Jose."</focus>
<global>
The IPO year is still missing. Magic Chunk 7 covers Acme's financial milestones.
</global>
<focus magic_chunks="7">"Acme Corp went public on the NYSE in 2011."</focus>
<local>2011 - 2003 = 8 years.</local>
<answer>8 years</answer>

Note the <local> span: while the model subtracts the two years, the context is completely invisible — it can only use the values it previously "copied down". DA does not prescribe how, when, or how often to use each mode — ordering and repetition are entirely the model's choice; the protocol only supplies the syntax and zero-shot guidance.

Context delivery: "magic chunks" as simulated tool calls

To <focus>, the model must be able to "name" regions of the context, so the long context is first cut into addressable segments. The paper aligns with the boundaries the model saw in training at two levels:

Decode-time intervention: the DA state machine

A DA state machine runs beside the inference engine, starting in the default global state and streaming the model's output: on the closing bracket of an opening tag (<focus magic_chunks="K"> or <local>) it switches modes; on the matching closing tag it returns to global. Note the <global> tag itself triggers no state transition — global is simply the default state between declarations; the tag is pure prompt scaffolding that helps the model organize its reasoning into spans with a declared scope.

The three soft requirements in the zero-shot prompt (Appendix F) reveal the authors' observations about failure modes: (1) use at least one <focus> — "skipping focus and guessing" is the most common failure; (2) end with a <local> as a commitment step, so the model doesn't collect a pile of values and forget which question it was answering; (3) inside <local>, don't try to "recall" content you never focused on — that is guessing; if a value is needed, go back to <global> and re-locate it.

Scope and trade-off:DA only touches global-attention layers — Gemma-4's SWA layers and Qwen-3.5/3.6's GDN layers already have per-step cost independent of context length, so the mask neither can nor needs to manage them. The protocol's essential trade is more decode steps in exchange for lower per-step attention cost — whether that wins depends on the deployment shape, which is the subject of Section 4. One more restriction: all experiments run with thinking mode disabled, because early experiments found the model could not follow the DA protocol inside thinking tags (Section 8 discusses mitigations).
04 · System

System: vLLM integration and the roofline ledger

Block-aligned in-place masking, FlashAttention untouched

vLLM stores the KV cache in fixed-size blocks (typically 16–32 tokens) and its attention kernels read whole blocks — a mask that dropped individual scattered tokens would not save a single byte of memory traffic. So the DA state machine applies its mask at block granularity: retained token ranges are rounded outward to block boundaries, guaranteeing that any token the model declared is never dropped. The cost is at most one extra block at each end of every retained range (a few dozen tokens, negligible against a 2048-token segment). The result is an ordinary block list, and existing kernels (FlashAttention, Triton paged-attention) run as-is — they just read less. Same lineage as Native Sparse Attention's block-sparse principle.

The engineering surface is thin: the DA state machine is implemented as a hook on vLLM's attention metadata builder, rewriting the request's KV-cache block table at every decode step so the kernel sees only retained blocks. No kernel is modified; the scheduler is untouched.Qwen-3.6's global layers run FlashAttention and Gemma-4's hybrid attention runs a Triton paged-attention kernel — both backends share the same block-table rewrite logic.

The three regions that stay visible in any mode (Appendix B): (1) the attention anchor — the first 16 tokens of the prompt, occupied by a fixed short system instruction so the context never enters the sink; (2) the local window — from the question to the end of the prompt, so the model always knows what it is answering; (3) the generated response. <focus> additionally retains the named segment; <local> keeps only the three.

When does DA pay off? Roofline wall-time answers

DA trades 15–35% more decode steps for a lower per-step attention cost. In which deployment shape is that a net win? The paper keeps its books with roofline wall-time: every operation is billed at its own hardware ceiling, and the cost of a response is the sum over all decode steps. The quantity depends only on the hardware target, not on runtime choices like batch size:

$$T_{\text{roofline}} = \frac{\text{work}}{R \times u}$$

where work is the FLOPs of compute-bound operations or the bytes of memory-bound ones, $R$ is peak FLOPS or peak bandwidth, and $u$ is the achieved utilization. At large batch, the two operation classes separate:

$$T_{\text{FFN}} = \frac{\text{FLOPs}}{\text{Peak FLOPS} \times \text{MFU}}, \qquad T_{\text{attn}} = \frac{\text{KV bytes}}{\text{Peak BW} \times \text{MBU}}$$

The structural asymmetry: FFN weight loading is amortized across the batch — at large batch it becomes compute-bound and its wall time grows only with decode-step count; attention KV reads are per-sequence, always memory-bound, and their wall time grows with both context length and step count. So in an optimized large-batch, long-context deployment, the attention term dwarfs the FFN term — in the Qwen-3.5-397B-A17B example at 1M context, one step reads 15.4 GB of attention state (~2.7 ms) while the 17B-active-parameter matmul needs only 34 GFLOPs (~0.019 ms), a gap of about 145× (120–255× across reasonable MFU/MBU variation — the conclusion does not hinge on the exact values). DA's per-step savings land exactly where decoding cost concentrates.

Positioning:production deployments are already moving to prefill/decode disaggregation (decode pools provisioned for HBM bandwidth alone), and under that shape the roofline decomposition is realistic rather than idealized. DA targets precisely the disaggregated, large-batch, long-context decode pool — the 0.71×/0.77× wall-time estimates below rest on that premise and do not apply to low-concurrency small deployments.
05 · Experiments & Main Results

Experimental setup and main results

Models, tasks, and the three-arm comparison

Six models from two families: Gemma-4-{31B, 12B, E4B} and Qwen-3.6-27B, Qwen-3.5-{9B, 4B}, natively 256K input (128K for E4B). The headline comparison uses the two largest models. The benchmark suite covers 15 long-context sources grouped into two categories: single-span retrieval/reasoning (needle-in-a-haystack, single-doc QA, …) and multi-span reasoning (multi-doc QA, dialogue history, long-dependency QA, …), with contexts from the 6K scale up to code repositories averaging 1M tokens:

Table 1: the 15 long-context benchmark sources, grouped into single-span retrieval/reasoning and multi-span reasoning
Table 1:The benchmark suite spans 15 long-context sources, from short documents to million-token code repositories. We group the sources into two categories, single-span retrieval/reasoning and multi-span reasoning, drawing on synthetic and original QA from RULER, LongBench v1/v2, LooGLE, and ZeroScrolls. 11 of the 15 sources use original QA; the other 4 use Gemini-3-Flash-generated synthetic QA (to improve annotation quality or extend task coverage). Context lengths vary enormously — RULER needle stacks run 9–11.5K, while LBv2/code_repo averages 1071K. Each source samples at most 128 examples with a fixed seed; over-long samples (>244K) are dropped; all three methods see identical samples per model, keeping the comparison fair.

The three arms share the same final-answer format (an <answer> tag) and are graded by the same LLM judge, which cleanly isolates two factors:

Grading: the LLM judge and its validation

Free-form answers cannot be exact-matched, so the paper first has Gemini-3-Flash write strict accept/reject rubrics per question, then uses Qwen-3.5-4B with thinking on as the judge. Is the judge trustworthy? Appendix D.2 validates it on a stratified sample of 2,993 responses — per-item agreement with the frontier judge Gemini-3.1-Pro is 98.53% (κ=0.940), per-cell accuracy correlation Pearson r=0.992, and disagreements are symmetric (McNemar p=0.65):

Figure 7: scatter of per-cell accuracy, local judge vs frontier judge — points sit on the diagonal
Figure 7:Agreement between local and frontier LLM judges. Per-sample accuracies from the local Qwen-3.5-4B judge closely match those from the frontier Gemini-3.1-Pro judge across 15 long-context QA sources, two backbone models, and three inference methods. X axis Gemini-3.1-Pro, y axis Qwen-3.5-4B; each point is one accuracy cell of the "15 sources × 2 backbones × 3 methods" grid. Every point hugs the diagonal, so the small local judge can safely grade the entire main experiment — this is the credibility keystone of the whole evaluation.
Table 9: per-benchmark accuracy comparison between the local judge and the frontier judge
Table 9:Judge agreement between local judge (Qwen-3.5-4B) and frontier judge (Gemini-3.1-Pro). Per-benchmark accuracies (%) from the two judges on a stratified validation sample of 2993 responses. Benchmark by benchmark, the two judges' accuracies mostly differ by less than ±1pp; the largest disagreements are only −3.27pp (shortdep_cloze) and +4.23pp (niah_single_2); overall 85.67% vs 85.80% — nearly identical. Weighted kappa 0.940 supports letting the local judge grade the full main experiment.

Main result: half the attention, a bit over one point of accuracy

Results across all 15 tasks are summarized in Table 2. Two headline numbers: on Gemma-4-31B, attention reads drop 52.0% (13.43M → 6.45M tokens/response) for a 1.27pp accuracy drop; on Qwen-3.6-27B, 31.1% (22.54M → 15.52M) for a 2.75pp drop.

Table 2: main results — accuracy and attended tokens for Vanilla/DAnm/DA across 15 tasks
Table 2:DA reduces attention cost with a 1–3pp average accuracy drop. Across 15 long-context tasks, DA reduces total average attended tokens by 52.0% on Gemma-4-31B and 31.1% on Qwen-3.6-27B, with average accuracy drops of 1.27pp and 2.75pp respectively. DAnm represents the DA ablation without custom attention masking. The table splits into single-span and multi-span blocks; each cell reports accuracy and attended tokens for the three arms (background colors mark best/median/worst reads). Highlights: Gemma matches or beats vanilla on 7 of 15 tasks (longdep_qa +3.1pp), Qwen on 5 (code_repo +5.6pp); the largest absolute savings come from the longest-context tasks — code_repo saves 41.8M (Gemma) / 52.0M (Qwen), dialogue_history 22.1M / 39.1M. Weak spots: multi-span categories drop more than single-span on average (Gemma 2.28pp vs 0.78pp; Qwen 3.59pp vs 2.34pp), and on five sources (e.g. qmsum) Qwen's read total actually exceeds vanilla — its longer generations offset the per-step savings.

But the averages hide the mechanistic story. Figure 2 decomposes the three arms into accuracy / decode steps / attended tokens, each normalized to that model's vanilla:

Figure 2: relative accuracy, relative decode steps, and relative attended tokens for the three arms
Figure 2:DA's efficiency comes from attention masking rather than shorter generation. Accuracy, decode steps, and attended tokens for Vanilla, DA, and DAnm on the two headline models, each normalized to that model's vanilla. (a) The three arms are nearly tied on accuracy (DA drops 1–3pp). (b) DA and DAnm both run about 15–35% more decode steps than vanilla (Gemma 135%; Qwen 131% / 128%, 116%) — a byproduct of the zero-shot protocol making the model "navigate out loud". (c) Despite more steps, DA reads far less than vanilla (Gemma 48%, Qwen 69%); the unmasked DAnm reads more (166%, 129%) because every extra step pays full attention. The conclusion is unambiguous: all the efficiency comes from the mask, not from shorter generation.

The two-factor ledger (vs. DAnm): the chunked prompt format alone is nearly free — on Gemma, DAnm accuracy exactly ties vanilla (87.01% vs 87.01%); on Qwen it trails by just 0.69pp. But DAnm's attention reads exceed vanilla by 66.2% / 28.8%. Adding the mask cuts reads by 71.1% (Gemma) and 46.5% (Qwen) relative to DAnm, flipping "66.2% above vanilla" into "52.0% below". On accuracy, the drop relative to DAnm (−1.27pp / −2.06pp) makes up most of DA's total cost — in other words, the mask is the source of all the efficiency and of most of the accuracy cost, while the format is almost free.

Main result in one line:chunked format ≈ free; mask = half the reads for 1–2pp of accuracy. On RULER-style retrieval the models are all at ceiling (96–100%) — the real test is multi-span reasoning and ultra-long contexts, which the next two sections unpack.
06 · Scaling

Scaling: bigger models get more accurate, longer contexts save more

Model scale: the accuracy gap narrows monotonically

DA makes two compound demands of the model: follow the protocol (parseable tags, valid chunk references, coherent mode sequencing) and answer correctly under restricted information — both draw on general capability. Figure 3 shows relative accuracy rising monotonically with scale in both families: Gemma climbs from 29% at E4B to 99% at 31B; Qwen from 64% at 3.5-4B to 97% at 3.6-27B. The smallest model, Gemma-4-E4B, collapses to 29%, and the direct cause is protocol failure — its <focus> parse success rate is only 58% (99% at 31B; see Section 7, Figure 6): it "can't use the tool", not "uses it and answers wrong".

Figure 3: relative accuracy and relative attended tokens across six models
Figure 3:DA accuracy scales favorably with backbone size. Metrics are normalized to each model's vanilla baseline and the x-axis is total parameters. (a) Relative accuracy climbs with parameters: E4B→12B→31B gives 29%→91%→99%; Qwen 4B→9B→27B gives 64%→89%→97% — DA's payoff needs the backbone to clear a capability threshold. (b) Relative attention reads show no clear scale trend: Gemma sits at 46–48% across sizes, Qwen at 50–69% — because the per-step masking saving itself is roughly scale-independent (per-step attention ratio ≈0.5 for five of six models; the smallest E4B is 0.65); total differences come from each model's own generation lengths. The one outlier, Gemma-4-12B (183%), is a decode-length artifact: ~6% of its DA responses failed to terminate within the 8K generation budget and inflated the total; excluding them drops it back to 98%. Qwen-3.5-4B shows a milder version of the same effect (50%→38%), and its vanilla arm has the non-termination issue too — a small-model trait, not a DA problem.

Context length: accuracy holds, absolute savings balloon

Pooling the 15 sources into context-length bins (Gemma-4-31B, Figure 4): relative accuracy tracks vanilla to 32K (within ~1pp), then declines gently to about 96% at the longest bin. The key control: the unmasked DAnm curve shows no such decline — the long-context accuracy cost comes from the mask, not from the chunked format. Absolute read savings, meanwhile, grow steeply with context: about 1M tokens/response saved at short contexts, about 21M at the longest bin (64–256K). The mask saves a roughly constant fraction (~50%) per step, so absolute savings scale ∝ context length — the biggest gains land exactly where decoding is most expensive.

Figure 4: relative accuracy and absolute attended-token delta, binned by context length
Figure 4:DA holds accuracy near vanilla while its absolute token saving grows with context length. All 15 sources are pooled and binned by context length on Gemma-4-31B. (a) Relative accuracy: DA (solid) nearly coincides with vanilla up to 32K and slides to ~96% at the longest bin; DAnm (dashed) shows no decline — the long-context accuracy cost is attributable to the mask. (b) Absolute reads vs. vanilla: DA grows from about −1M at short bins to about −21M at the longest (negative = saved), while DAnm's overhead grows in the opposite direction (positive = extra reads).

Figure 10 shows the same data as a ratio: within every context bin, DA reads only 50–64% of vanilla, an almost constant fraction — the composition "constant fractional saving × ever-growing total" explains why the absolute value scales linearly with length.

Figure 10: relative attended-token ratio is nearly constant across context lengths
Figure 10:DA's per-step masking saves a roughly constant fraction of tokens across context length. The same Gemma-4-31B pooling as Figure 4b, normalized to vanilla rather than shown as an absolute delta. DA (lower line) holds steady at 50–64% of vanilla in every bin; DAnm (upper line) stays above vanilla. Read together with the absolute view of Figure 4b: the saving is a stable fraction times a length-growing total, so the longer the context, the bigger DA's absolute win.

On Qwen: same per-step savings, more reliance on global mode

The corresponding results for Qwen-3.6-27B (Appendix E) reveal an interesting family difference — mechanically the per-step savings are comparable, but at long contexts Qwen spends more tokens inside the unmasked <global> mode, so its total saving shrinks:

Figure 8: relative accuracy and relative attended tokens by context length on Qwen
Figure 8:On Qwen, DA's long-context accuracy and token savings erode more than on Gemma. Counterpart to Figure 4, on Qwen-3.6-27B. Qwen's long-context accuracy dips a bit more than Gemma's (about 92% at the longest bin), and its token savings shrink at the long end (the DA curve drifts back toward vanilla while DAnm shoots far above it). The cause is not mask failure but mode mix — see Figure 9.
Figure 9: Qwen's mode shares and per-mode savings
Figure 9:Qwen matches Gemma's per-token savings but shifts more into global mode at long context. Counterpart to Figure 5, on Qwen-3.6-27B. (a) Qwen's global-mode token share grows to ~55% at the longest bin (Gemma ~45%); (b) but its per-token savings match Gemma: focus/local save 74–98% / 87–99% respectively. In other words, the masking mechanism is equally good in both families; the difference is the size of the self-chosen "navigation overhead" — a zero-shot strategy difference the authors believe post-training can optimize (Section 8).
The double meaning of scaling:along the model-size axis, DA's accuracy cost converges (29%→99%) — on large models it is nearly a free lunch; along the context-length axis, DA's absolute savings amplify (−1M→−21M). Both axes happen to be the directions the industry is scaling — the paper's strongest argument for DA's prospects.
07 · Efficiency & Analysis

The efficiency ledger and mode-level analysis

Roofline wall-time: 0.71× / 0.77×

Converting attention savings into theoretical decode wall-time on a single B200 in bf16 at MFU 40% / MBU 70%, each decode step is billed as three terms: matmul (all projection/FFN/output-head matrix multiplies — compute-bound, growing only with step count), global memory (KV reads of the global-attention layers — the only term DA compresses), and local memory (the efficient layers' fixed per-step reads: Gemma's SWA KV cache, Qwen's GDN recurrent state — context-independent):

Table 3: decode wall-time decomposition under an optimized deployment
Table 3:Estimated decode wall-clock time on an optimized disaggregated inference setup. Per-response decode cost for each model and arm on a single B200 accelerator in bf16, summed over the generation and averaged across the 15 tasks, at MFU 40% for the compute-bound matmuls and MBU 70% for the memory-bound reads. Under vanilla, global-memory reads account for 73% of decode time (Gemma, 196.5/269.1 ms) and 86% (Qwen, 263.8/306.2 ms) — that is DA's lever. Under DA: global reads 1100 GB→528 GB (Gemma), 1477 GB→1017 GB (Qwen), and total wall-time drops to 0.71× and 0.77×. Note matmul and local memory actually rise slightly (35%/31% more steps) but are swamped by the global-read reduction. The two families "leak" differently: Qwen's GDN state is only 78.45 MB (5% of DA attention time), so savings pass through almost losslessly; Gemma's SWA floor spans 50 layers at 838.9 MB (42%), capping the total saving.

Every input to this ledger is auditable. The two models' constants (Table 4) come straight from public configurations; the two arm-dependent quantities — decode-step count $D$ and attended-token total $A$ (Table 5) — are measured from the generated responses:

Table 4: per-model constants for the wall-time decomposition
Table 4:Per-model constants for the wall-time decomposition. Active params P, global attention layers L_global, KV bytes per token b_kv, fixed per-step local read s_local, and the local mechanism, each following the published configuration in bf16. KV bytes per token $b_{\text{kv}}$ follows $2 \times L_{\text{global}} \times n_{\text{kv}} \times d_{\text{head}} \times 2$ (the leading 2 counts K and V, the trailing 2 is bf16 bytes). Gemma-4-31B: 10 global layers, 81,920 B/token; Qwen-3.6-27B: 16 global layers, 65,536 B/token.
Table 5: measured decode-step counts and attended-token totals
Table 5:Trace inputs (macro-averaged over the 15 tasks). Decode-step count D and attended-token total A, measured directly from the generated responses of each arm. Gemma: vanilla 332 steps / 13.43M tokens → DA 448 steps / 6.45M (+35% steps, −52% reads); Qwen: 573 / 22.54M → 752 / 15.52M (+31% steps, −31% reads). Plugging these two measured values into the three-term formula yields Table 3.

Walk the full derivation for vanilla Gemma-4-31B (Appendix C.8):

$$T_{\text{matmul}} = \frac{2 \times 31\times 10^{9} \times 332}{2.25\,\text{PFLOPS} \times 0.40} \approx 22.9\,\text{ms}$$
$$T_{\text{global}} = \frac{13.43\times 10^{6} \times 81{,}920\,\text{B}}{8\,\text{TB/s} \times 0.70} \approx 196.5\,\text{ms}$$
$$T_{\text{local}} = \frac{332 \times 838.9\,\text{MB}}{8\,\text{TB/s} \times 0.70} \approx 49.7\,\text{ms}$$

Summing the three: 269.1 ms; substituting the DA arm's $D{=}448$, $A{=}6.45\text{M}$ gives 192.3 ms. The authors are refreshingly explicit: this is a theoretical ceiling at the stated utilizations, not a measured wall time — it excludes prefill (handled by a different pool in disaggregated serving), excludes trivia like normalization/rotary embeddings, and bills reads at token granularity (a real block-aligned kernel reads a few percent more on the global term).

Mode-level analysis: where the money goes and where it's saved

Which modes do DA's own generated tokens live in? On Gemma-4-31B, <global> holds only ~27% of generated tokens while <focus> + <local> hold 73% — and the latter two are the cheap modes, reading on average only ~12% and ~6% of a vanilla step per token:

Figure 5: token share by mode and per-token attention savings
Figure 5:DA spends most tokens in cheap modes, with larger savings at longer contexts. Results on Gemma-4-31B. (a) Token share by mode across context-length buckets; <focus> and <local> account for about 73% of generated tokens, and <global>'s share rises at the longest contexts. (b) Per-token attention saved relative to vanilla. (a) The global share rises with context length to ~45% at the longest bin, capping the total saving there; (b) focus saves 76→98% per step and local 88→99%, with savings growing as context lengthens — focus's growth is especially steep. DA's payoff naturally amplifies with long-context and long-range tasks. Global steps account for over 80% of DA's attention reads and are the obvious optimization target (e.g. an in-context index instead of a full survey).

Protocol adherence: where the capability threshold sits

DA's reliability hinges on the model emitting parseable control tokens. Figure 6 tracks two metrics: the <focus> parse success rate (focus calls that parse to a valid chunk reference) climbs with scale in both families — 58% (E4B) → 99% (31B), 89% (Qwen-4B) → 99% (27B) — while focus attempts per response hover in a narrow 1.37–1.85 band independent of scale: strong models win by parsing more reliably, not by calling less. The attempt count itself is a zero-shot artifact — the model chooses how to use the protocol, not the task-optimal amount.

Figure 6: focus parse success rate and focus attempts per response
Figure 6:DA focus adherence improves with model size. (a) Focus success rate, the fraction of focus calls that parse to a valid chunk reference, rises toward 100% as the backbone grows in both families; the smallest model (Gemma-4-E4B, 58%) is the clear outlier, consistent with its accuracy collapse in Figure 3. (b) Focus attempts per response show no clear trend with model size. (a) E4B's 58% corroborates the 29% accuracy collapse of Figure 3 — the small model's collapse is mostly "can't keep up with the protocol", not "can't reason"; (b) attempts sit at 1.4–1.9 across the board, so scale improves adherence quality, not usage frequency.

Honest failures: two structural mismatches across six sources

The paper doesn't hide its failures (Appendix D.4). Beyond the 15 main benchmarks there are six source types DA handles poorly, which the authors group into two structural mismatches with the three-mode decomposition (rather than mechanism weaknesses) — and note: even on these six, DA's per-step attention still falls 39–67%:

Table 10: the six failure sources for DA on Gemma-4-31B, grouped by two failure modes
Table 10:DA failure cases on Gemma-4-31B. The six sources where DA fails to preserve accuracy or fails to reduce attended tokens, grouped by the two structural failure modes. The cost is either accuracy (cluster 1: 84.2→58.8% mean) or attended-token inflation (cluster 2: 17.8→21.2 M/sample), even though per-step attention still falls on every source. Cluster 1: evidence shattered by segmentation.cwe needs a global count across all segments and structured_data's tables get sliced apart — <focus> only sees the named segment, so the information never arrives and accuracy collapses from 84.21 to 58.84 (even though reads still fall). Cluster 2: output length scales with the document.fwe word-frequency enumeration, summ_screen_fd per-segment summaries, book_sum_sort full-document ordering, in_context_learning per-example reasoning — the output unit stretches with the document, and decode-step count balloons the total (17.84M→21.20M). The authors' fixes: for cluster 1, structure-aware segmentation (keep tables intact) and map-reduce-style per-segment scanning with scaffold accumulation; for cluster 2, route long outputs into <focus> to keep per-step cost bounded, or simply teach both decomposition strategies via SFT/RLVR.
Why aren't these six in the main benchmark?They either come with prompts that explicitly forbid intermediate reasoning ("answer only, output nothing else" — which directly neutralizes the zero-shot scaffolding DA depends on) or belong to the structural mismatches above. The filtering is disclosed (Appendix D.4), and we consider the transparency adequate — but readers extrapolating the "52% saving" should remember: tasks whose output scales with the document are outside the coverage.
08 · Discussion

Discussion, limitations, and commentary

How much room does DA still have in the 2026 architecture landscape?

A natural objection: everyone is aggressively compressing the KV cache (MLA, token merging, indexer-based sparse attention) — will global-attention reads even remain the dominant decode cost? The paper runs an architecture census as of August 2026, starting with KV bytes per context token:

Table 6: KV bytes per context token across architectures as of August 2026, distinguishing stored bytes from O(N) reads
Table 6:KV bytes per context token, as of August 2026. Stored bytes are what a context token occupies across the global attention layers, and the O(N) read is what one decode step must read per context token. For full-attention models the stored bytes equal the per-step read, spanning a huge 13.8–254.0 KB/token (MiniMax-M2.7 tops the chart with 62 full-attention layers + GQA with 8 kv heads); indexer-based sparse designs split the two apart by 6.6–33× — each step only O(N)-scans the index keys (0.35–2.77 KB/token) plus a fixed top-k read. MiniMax-M3 is the exception (20.7 KB): 3 of its 60 layers remain full attention. The table also defines DA's addressable market: any architecture where the O(N) read remains the dominant term has leverage for a declarative mask.

Pushing the same roofline decomposition to a 1M-token context (Table 7): in the full-attention group (Qwen-3.6-27B, Gemma-4-31B, Qwen3.8-Max, Kimi-K3, MiniMax-M3) attention accounts for 94.11–99.37% of a single decode step; even the indexer group with built-in sparsity (DeepSeek-V4-Pro/Flash, GLM-5.3-Flash) sits at 56.49–97.50% — in every row attention is the leading term, and the models with built-in sparsity are precisely those where it leads least, suggesting DA-style intervention does not conflict with architectural evolution.

Table 7: roofline single-step decode decomposition per model at a 1M-token context
Table 7:Roofline decode decomposition at a 1M-token context. One decode step on a single B200 at MFU 40% and MBU 70%, with each model charged at the KV dtype its vendor's serving recipe specifies. At 1M context the global read routinely runs into tens of milliseconds while matmul costs 0.014–0.232 ms — two to three orders of magnitude apart. The indented rows are the bf16 counterfactual "without the vendor recipe" (Qwen3.8-Max, Kimi-K3); switching precision does not change the grouping. Conclusion: at 1M context, attention reads remain the dominant decode cost, so DA's declared savings land on real money.

That "dominant share", however, depends strongly on context length (Table 8): the same models at 244K (the effective cap of this paper's experiments) drop to 79.6–97.5% (full-attention) and 24–90% (indexer); by 128K three indexer rows already fall below 50%. The MFU/MBU values barely matter (sweeping the reported 40–60% / 60–85% ranges moves 1M-context shares by mostly under 3 points) — context length is the decisive variable, which is why the paper elevates the 1M claim to title-level. The authors also place a bet: window lengths have historically kept growing as per-token cost falls, 1M is already the frontier standard, and aggregate attention cost is not going away.

Table 8: attention share versus context length and versus utilization assumptions
Table 8:Attention share against context length and against the utilization assumptions. The left block holds MFU and MBU fixed and varies N, and the right block holds N at 1M and takes the two corners of the reported utilization ranges. Left block — fixed utilization, varying context: 1M → 244K → 128K, every model's share steps down, the indexer group fastest (e.g. DeepSeek-V4-Pro 66.55%→32.68%→20.30%). Right block — fixed 1M, sweeping the utilization corners: the full-attention group barely moves; the indexer group's largest swing is 14.4 points (DeepSeek-V4-Pro). The table shows the "attention dominates" conclusion is robust to utilization and sensitive to context length.

Agentic settings: retrieval does not solve the problem DA solves

One might argue: agents fetch context incrementally through tool calls, so there is no "long context" problem left. The paper's rebuttal is crisp: retrieval decides what enters the context; DA decides what gets looked at once it's in — two orthogonal decisions. Retrieval can even make things worse: every tool result stays in the context for the whole episode, though it is usually relevant only to the steps that issued it. As turns accumulate, agentic contexts land squarely in the regime where DA saves most (long context + per-step local reads). And agentic settings come with natural segments (tool calls, user turns, retrieved passages) — no need for this paper's artificial "magic chunks".

DA is "System 2" sparse attention

The paper gives DA a memorable framing: existing sparse methods infer the mask from internal activations every step — "System 1"; DA has the model decide where to look with explicit reasoning — "System 2". Three practical corollaries: (1) the strategy can be changed with one instruction, no retraining; (2) it improves automatically with model scale, protocol unchanged; (3) it can be optimized with RL exactly like System-2 reasoning itself (rewarding accuracy and attention efficiency together). One by-product the authors emphasize repeatedly — the attention plan is auditable by construction: the tokens that drive KV reads are the same tokens a human can read, two sides of the same coin for CoT supervision in AI safety. Compared with the closest prior work SSAS (per-task training, 2K context, two tasks), DA shows the behavior generalizes zero-shot with one fixed prompt across 15 tasks and 244K contexts.

Composition with modern inference stack

Limitations (self-stated) and our commentary

Commentary:what makes this paper compelling is not the 52% number but the clean combination of three things — (1) zero-shot elicitation pushing SSAS-style behavior from "fine-tune per task" to "one fixed prompt", direct evidence of where 2026 models are; (2) the DAnm ablation separating "format" from "mask" cleanly, with a reproducible conclusion (format is free; the mask supplies both the savings and most of the cost); (3) roofline-grade honesty about efficiency claims: the 0.71×/0.77× is repeatedly labeled a theoretical ceiling, and failures get their own table. Reservations: the multi-span and Qwen long-context accuracy/verbosity issues are real; MBU 70% is optimistic (the authors admit their own low-batch kernels reach ~57%); and the six excluded sources mean the numbers don't extrapolate to tasks whose output scales with the document. Overall, "let the model declare its own attention" is a new axis orthogonal to architectural sparsification, scaling positively with both model size and context length — the zero-shot results are a floor, and post-training (protocol-as-tool-call, RL with attention in the reward) likely leaves substantial headroom.
Glossary

Glossary

Hover any dotted-underlined abbreviation in the text, or come back here any time.

Reading glossary (abbreviations with dotted underlines are hoverable in the text)
Abbr.Full nameOne-line explanation
DADeclarative AttentionThe paper's protocol: the model declares attention spans with tags in its chain-of-thought; the engine masks the KV cache accordingly
DAnmDA-no-maskAblation arm: the full DA prompt without attention masking, isolating the mask's contribution
KV cacheKey-Value CacheCached key/value tensors of prior tokens; read at every decode step — the bandwidth bottleneck of long-context decoding
CoTChain-of-ThoughtPrompting the model to write reasoning steps before answering; DA adds "where to look" to the same chain
magic chunkDA's name for a context segment (~2048 tokens), delivered as a simulated tool-call transcript
SWASliding Window AttentionAttends only within a recent fixed window; used by Gemma-4's efficient layers (window 1024)
GDNGated DeltaNetA linear-attention variant with fixed-size per-step state; used by Qwen-3.5/3.6's efficient layers
MFU / MBUModel FLOPs / Bandwidth UtilizationAchieved fraction of peak FLOPS/bandwidth; the roofline ledger uses 40% for FFN and 70% for memory reads
roofline wall-timeWall time billed at each operation's own hardware ceiling; depends only on hardware, not batch configuration
GQA / MLAGrouped-Query / Multi-head Latent AttentionTwo KV-compression attention families: shared kv heads / low-rank latent caching — fewer bytes per token, same read structure
MoEMixture of ExpertsSparse expert layers; only routed experts are loaded, so the FFN is compute-bound at large batch
NIAHNeedle In A HaystackRetrieval task family; the RULER niah_* series — models mostly max it out in this paper
RULER / LBv1 / LBv2 / LooGLE / ZSFive long-context benchmarks (RULER, LongBench v1/v2, LooGLE, ZeroScrolls) supplying the paper's 15 sources
DSADeepSeek Sparse AttentionPer-step top-k reads scored by a lightweight indexer (since V3.2); complements DA's global steps
QSA / MSAQwen / MiniMax Sparse AttentionEach vendor's block-sparse selection mechanism (per-layer indexer / dedicated indexer branch)
SSASSelf-Selected Attention SpanPrior work: per-task fine-tuning for self-selected attention spans at 2K context; DA shows the same behavior is elicitable zero-shot
NSANative Sparse AttentionTrainable block-sparse attention; DA's block-aligned mask shares its block-sparse principle
vLLMThe open-source inference engine (PagedAttention); DA integrates via its metadata-builder hook without touching kernels
attention sinkThe phenomenon of attention piling weight on the first few tokens; DA parks a fixed system instruction there (first 16 tokens)
prefill / decodeThe two inference phases: prefill processes the input in parallel once; decode generates token by token; production systems usually disaggregate them
compactioncontext compressionSummarizing/pruning history to shrink context; destructive, needs re-prefill to recover; DA's reversible mask enables "reversible compression"
SFT / RLVRSupervised Fine-Tuning / RL with Verifiable RewardsTwo post-training tools; the authors suggest using them to teach better DA mode-selection policies