ATTUNER: Recomputation-Free
Agentic Context KV Reuse

Xinghao Chen1,2,3† Junnan Dong3† Cai Ke3 Chak Tou Leong2 Haocheng Sun3
Keyu Chen3 Siyu An3 Ruizhi Qiao3 Xing Sun3 Wenjie Li2 Xiaoyu Shen1‡

1EIT-NLP Lab, Eastern Institute of Technology, Ningbo

2The Hong Kong Polytechnic University 3Tencent Youtu Lab

† Equal contribution ‡ Corresponding author

Demo

BigCodeBench/Qwen3-4B
Three terminals · synchronized · 1×

ATTUNER: Learning to Read a Frozen Cache

ATTUNER adapts online queries while preserving independently constructed artifact KV, learning to read the cache without rewriting it.

Three approaches to reusable artifact caching: inference-time correction, cache-side training, and query-side adaptation with frozen artifact KV.
Three approaches to reusable artifact caching. Inference-time adaptation repairs cached states or adjusts attention; cache-side training modifies cache construction. ATTUNER adapts online queries while preserving artifact KV.

Query Adaptation with Fixed Artifact KV

Queries are computed for online tokens, while cached keys and values remain available for direct reuse. ATTUNER augments the frozen query projection in every Transformer layer with a low-rank update. Stored artifact KV remains unchanged; online states and newly produced KV evolve under the adapted computation.

Paper inference workflow: offline artifact prefill and CPU memory storage, followed by KV loading and assembly, online prefill, and decoding.
Inference workflow of ATTUNER. Artifact KV is prepared once and reused unchanged. Warm-cache TTFT includes KV loading and assembly, online prefill, and first-token selection, excluding offline cache construction.

Learning from Full-Context Behavior

We distill Full-context answering behavior into the PIC student. Both branches receive the same input and condition on the same response prefix, but the teacher uses full prefill while the student reuses independently cached artifact KV. Only query adapters are updated; the backbone and cached artifact KV remain frozen.

The paper training diagram: a frozen Full-context teacher supervises a PIC student through output-distribution KL, updating only query adapters.
Training ATTUNER. A frozen Full-context teacher supervises the PIC student’s output distributions. At deployment, the trained updates are merged into the query projections, requiring no Full-context teacher.

Main Results

ATTUNER recovers quality within and beyond the training tasks.

A single adapter improves the use of skills, documents, and memories while preserving their original cached KV. Average in-domain scores improve over PIC by 5.13 and 7.77 points on Qwen3-4B and Qwen3-8B, reducing the gaps to Full to 1.61 and 0.51 points. The benefits also extend to TheoremQA and CHAMP, neither of which is included in adapter training.

In-domain quality and efficiency. BigCodeBench (BCB), MuSiQue (MSQ), and PersonaMem-v2 (PMem). Original paper Table 12, including all comparison methods and both model sizes.

Scores in %. TTFT is median warm-cache latency in ms, measured at batch size 1 without concurrent GPU workloads. Bold and underlined values retain the paper’s rankings. Select a table to view it at full size. Read the paper ↗

ATTUNER recovers quality at near-PIC latency.

With query updates merged into the projection weights, ATTUNER’s geometric-mean in-domain TTFT is only 1.8% and 0.5% higher than PIC on Qwen3-4B and Qwen3-8B, preserving 1.79× and 2.45× speedups over Full. ATTUNER requires neither online token selection nor artifact-token recomputation.

Original paper quality–efficiency plot on Qwen3-4B, comparing in-domain and out-of-domain task quality against speedup over Full.
Quality–efficiency trade-off. Quality versus speedup on Qwen3-4B. Shaded regions indicate lower quality and speed than ATTUNER.

These results highlight query-side adaptation as an effective path toward high-quality, efficient cache reuse: learning to read the cache rather than rewriting it.

Evidence and Analysis

Understanding quality loss, recovery, and learned cache reading.

Quality loss persists even when relevant artifacts are provided.

PIC is more sensitive to distractors than Full. Removing irrelevant candidates still leaves substantial gaps on multi-artifact tasks, and position alignment does not consistently close them. These observations motivate improving how the model reads independently cached context.

Original paper bar charts on Qwen3-4B: increasing distractors reduces PIC quality more sharply than Full; quality gaps remain on relevant-only multi-artifact tasks. Diamonds show TTFT speedup.
Task quality and TTFT speedup on Qwen3-4B. Left: increasing distractors while retaining relevant artifacts. Right: only task-annotated relevant artifacts are provided.

Restoring routing recovers quality with cached values.

The routing oracle replaces online attention weights with a Full reference while retaining PIC’s artifact KV. In this MuSiQue example, output cosine similarity to Full increases from 0.898 to 0.984. Paired task evaluations also recover approximately Full performance. This diagnostic uses Full-reference attention; ATTUNER learns cache reading without requiring that reference at deployment.

Four original paper heatmaps for one MuSiQue example: cached-value, attention-weight, and attention-output similarity between Full and PIC, followed by output similarity between Full and the routing oracle. Restoring routing increases output alignment without replacing artifact KV.
Routing recovery with unchanged artifact KV. Full–PIC similarity for cached values, artifact attention, and attention outputs; the final panel compares Full and oracle outputs.

Query adaptation improves attention-output alignment.

On 128 examples per dataset, learned queries bring attention outputs closer to Full across many intermediate layers, at both prompt and answer positions. Mean answer-position cosine similarity rises from 0.903 to 0.927 on MuSiQue and from 0.932 to 0.949 on BigCodeBench, despite training only on output distributions. Recovery is not uniform across layers.

Four original cosine-similarity plots comparing attention outputs before and after ATTUNER training on Qwen3-4B. First two panels show online prompt positions for MuSiQue and BigCodeBench; last two show teacher-forced answer positions.
Attention outputs before and after training. First pair: online prompt positions. Second pair: teacher-forced answer positions. Each pair shows MuSiQue followed by BigCodeBench.

More data progressively closes the quality gap.

Limited training data already enables substantial recovery. Additional examples bring performance closer to the paired Full references.

Original Qwen3-4B training-data scale plot: MuSiQue F1 and BigCodeBench pass@1 improve as training examples increase; dashed and dotted lines show the corresponding Full baselines.
Training-data scale on Qwen3-4B. Zero examples denotes PIC. Lines mark paired Full references. BigCodeBench varies both data volume and composition.

The gains reflect adaptation to PIC.

Two 18-layer windows both recover quality on 128 MuSiQue test examples; their difference is inconclusive. The same full-layer adapter improves PIC on every task below, while its effect under Full is mixed.

Original paper Table 3. Layer-range controls on MuSiQue: PIC F1 is 49.00, versus 65.14 for L16–33 and 63.34 for L18–35. Under the same full-layer adapter, gains are larger for PIC than Full on BigCodeBench, MuSiQue, PersonaMem-v2, and CHAMP.
Adapter controls on Qwen3-4B. Top: layer ranges trained on 1,024 MuSiQue examples. Bottom: the same L0–35 adapter under Full and PIC. The panels use different training and evaluation sets.

BibTeX

If Attuner is useful for your research, please cite our paper.

BibTeX
@misc{chen2026attunerrecomputationfreekvcache,
  title={ATTUNER: Recomputation-Free Agentic Context KV Reuse},
  author={Xinghao Chen and Junnan Dong and Cai Ke
    and Chak Tou Leong and Haocheng Sun and Keyu Chen
    and Siyu An and Ruizhi Qiao and Xing Sun
    and Wenjie Li and Xiaoyu Shen},
  year={2026},
  eprint={2609.36722},
  archivePrefix={arXiv},
  primaryClass={cs.CL},
  url={https://arxiv.org/abs/2609.36722}
}