TesseraKV Aligns KV Paging with Co-Retrieval, Boosting Agent Success by 27.74 Points
Summary:TesseraKV’s author team recasts KV paging as a co-retrieval problem rather than combining a page-grouping heuristic with a separate page-ranking heuristic. For a given attention head, keys whose logits tend to move together under the decoding-query distribution are grouped using a covariance-weighted geometry, while a spread-aware estimator scores the aggregate attention mass expected from each page. Because decoding queries are unavailable when the cache is built, the method estimates this geom
Core Takeaway
The TesseraKV author team unifies two decisions that are often handled separately in KV paging: how keys are grouped into pages and how those pages are scored. Instead of asking whether one key is important in isolation, the method asks whether a set of keys is likely to be retrieved together under the decoding-query distribution. At matched KV budgets, the paper reports better long-context and agentic generation quality than prior KV-retrieval methods. On Claw-Eval, overall success reaches 70.32 versus 42.58 for the previous state of the art, a 27.74-point gain.
The central contribution is not merely a higher retrieval hit rate. It is a single objective connecting page construction with page ranking: covariance structure determines which keys should live together, while the page score estimates how much attention quality those keys collectively provide. The current preprint abstract does not disclose code status, end-to-end latency, throughput, variance, or a complete ablation study. TesseraKV should therefore be treated as a promising inference-systems result awaiting engineering validation, not as a ready replacement for existing KV-management approaches.
From Dense Attention to Selective KV Reads
For one layer and attention head, let q be the query and k_i the cached key. The attention logit is:
z_i(q) = q^T k_i / sqrt(d_h)
Standard self-attention then computes:
o(q) = Σ_i softmax_i(z) v_i
As context or an agent trajectory grows, the KV cache expands with it. For T cached tokens, L layers, H_kv KV heads, head dimension d_h, and b bytes per element, the K/V storage alone is approximately:
M_KV ≈ L × T × 2 × H_kv × d_h × b
If decoding retrieves only r pages of p tokens each, an idealized read volume becomes:
M_read ≈ L × r × p × 2 × H_kv × d_h × b
This is the appeal of KV paging: the complete cache can remain in slower memory, while each decoding step transfers only the pages needed by the current query. The equation, however, excludes page tables, indexes, scoring, scatter-gather operations, PCIe transfers, and kernel-launch overhead. Small pages improve retrieval precision but increase control-plane work; large pages improve transfer efficiency but waste bandwidth on irrelevant tokens.
How Co-Retrieval Unifies Grouping and Scoring
1. Covariance-weighted geometry for page construction
Let the decoding-query distribution be Q. A simple expression for the relationship between two keys is the covariance of their attention logits:
C_ij = Cov_(q~Q)[z_i(q), z_j(q)]
In the linear-attention form, this becomes C_ij = a_i^T Σ_Q a_j, where a_i = k_i / sqrt(d_h). If two logits tend to rise and fall together as the query changes, they are more likely to be accessed together and are therefore better candidates for the same page.
Unlike heuristics based on token adjacency, semantic similarity, or the importance of an individual key, this partitioning rule reflects query-conditioned co-occurrence. The paper describes a covariance-weighted geometry for deriving page boundaries, potentially allowing different attention heads to organize keys differently.
Positive covariance alone does not guarantee that both keys receive substantial softmax mass. Two keys may move together while one consistently dominates the other. This is precisely why page construction still needs a separate quality estimator within the same co-retrieval framework.
2. Spread-aware scoring for aggregate attention mass
For a page P, the more direct objective is to estimate its total attention contribution:
m_P(q) = Σ_(i∈P) exp(z_i(q)) / Σ_j exp(z_j(q))
Ranking pages only by their largest logit favors pages containing one peak key and may discard pages where many moderate-weight keys jointly carry useful context. The abstract calls the proposed estimator spread-aware, which can be interpreted as accounting for the distribution and dispersion of logits inside the page rather than chasing a single maximum. Its exact closed form, sampling procedure, and approximation error require the full paper.
Page construction and scoring now form a consistent loop. Covariance structure identifies keys that should appear together, and spread-aware scoring determines whether that group is worth transferring. This is more principled than combining a heuristic partition with an unrelated page-ranking function.
Estimating Decoding Geometry Before Cache Construction
The cache is normally built after prefill, but the queries that will drive decoding do not exist yet. TesseraKV studies two available signals:
- Prefill queries are useful but task-dependent. They describe the current prompt distribution and may not cover later tool calls, planning steps, or multi-turn instructions.
- Query samples derived from the downstream instruction substantially improve the co-retrieval structure relevant to partitioning. This suggests that cache construction benefits from representative samples of future queries rather than only historical context queries.
This creates several deployment constraints. First, a generic serving system cannot assume that the downstream instruction is known when the cache is constructed. Second, an agent trajectory changes the query distribution as tools return new evidence, so a static page layout can become stale. Third, repeatedly recomputing covariance, repartitioning keys, and rebuilding page tables may cost more than the decoding-side savings.
A practical implementation should support incremental key insertion, bounded page merging or splitting, and periodic geometry refreshes rather than assuming one fixed query distribution for the entire conversation.
How to Read the Evaluation
The reported Claw-Eval overall success rate is 70.32, compared with 42.58 for the previous state of the art, an absolute gain of 27.74 percentage points. Comparing generation quality under a matched KV budget is fairer than simply showing a larger context window or cache capacity. It indicates that better page organization may allow a fixed cache budget to preserve more useful long-range information.
A matched KV budget, however, does not imply matched system efficiency. Page size, index memory, scoring overhead, cross-layer or cross-head sharing, random-access behavior, and CPU-offload traffic can materially change throughput and tail latency. Agent success rates can also be sensitive to tool execution, sampling randomness, and task composition.
Before accepting the 27.74-point gain as a general result, readers should verify:
- The full model list, context lengths, task mix, number of samples, and confidence intervals;
- The definition of the KV budget, page granularity, retained windows, and baseline settings;
- Whether prior KV-retrieval baselines were reproduced from official implementations and given comparable tuning effort;
- Per-token generation time, end-to-end throughput, HBM and PCIe bytes, and p50/p99 latency;
- True attention-mass recall, quality regressions from incorrect pages, and full-attention fallback rates;
- Whether NoPE and RoPE models received comparable tuning and whether CPU-offload time is included end to end.
The abstract does not disclose code or licensing status, and no independent reproduction is available from the supplied material. The result is attractive paper evidence, not yet a production performance guarantee.
Key Engineering Trade-offs
| Design dimension | Potential benefit | Main cost or risk | | --- | --- | --- | | Page size | Larger pages amortize page-table, index, and gather overhead | More irrelevant tokens are transferred, and page scores become coarser | | Page scoring | Only the Top-k pages need to be fetched each step | Exact full scoring can erase memory-bandwidth savings; approximate and incremental scoring are required | | Covariance geometry | Page boundaries follow actual joint-retrieval behavior | Full covariance and clustering may scale poorly, requiring blocked, sampled, or low-rank approximations | | Head granularity | Each head can adapt to its own query preferences | Page tables and geometry state expand; sharing pages across heads may reduce quality | | RoPE compatibility | Positional rotations can be incorporated into query geometry | Naive clustering may damage relative-position structure; cross-position pages and position metadata need validation | | CPU offloading | Only selected KV pages cross PCIe, reducing transfer volume | Scoring latency, PCIe contention, and incorrect fetches can offset gains; prefetch and pipelining are needed | | Static pages | Simpler implementation and stable page tables | Pages degrade as the query distribution drifts, while dynamic rebuilding adds overhead |
NoPE models avoid explicit relative-position rotations, making co-retrieval geometry easier to derive directly from keys and query samples. With RoPE, the effective key-query inner product changes under positional rotation, so any page clustering must preserve the relevant positional semantics. The paper reports RoPE results, but the abstract is insufficient to determine the exact implementation or its generalization limits.
Deployment Playbook
- Build a full-attention oracle. For sampled queries and heads, record the truly high-weight keys and measure the attention mass covered by the selected TesseraKV pages. A high page-hit rate with weak attention recall points to omitted softmax mass, nearby-token dependencies, or missing attention sinks.
- Start with a hybrid policy. Retain a recent-token window, instruction tokens, and known attention-sink pages. Keep a fallback path to broader retrieval when page confidence is low, preventing one incorrect fetch from severing a long-range dependency.
- Integrate selection with the serving scheduler. Page lookup, CPU-to-GPU transfer, and kernel execution should overlap with continuous batching and the next-token computation rather than execute serially at every decoding step.
- Pipeline CPU offloading. Aligned or fixed-size pages are better suited to DMA and pinned memory. Double buffering can overlap step
ncomputation with stepn+1page transfer. Track effective PCIe bandwidth and the ratio of wasted overfetch. - Tune NoPE and RoPE separately. Do not assume the same page size and Top-k settings work for both. In particular, test whether pages spanning distant positions preserve RoPE-relative dependencies.
- Evaluate systems metrics, not success rate alone. Track task quality, bytes read per token, attention-mass recall, page-hit and fallback rates, tokens per second, p50/p99 latency, page-table memory, and CPU RAM consumption.
- Target stable query distributions first. Fixed tool chains, repeated task templates, and long tool-output traces are more likely to benefit from prefetching and co-retrieval. Highly open-ended sessions with sharply shifting instructions need dynamic page maintenance.
Bottom Line
TesseraKV’s main contribution is to turn KV paging from two disconnected heuristics into a unified objective: pages should be organized around keys that are likely to be retrieved together. Covariance-weighted geometry answers which keys should share a page, while spread-aware scoring estimates whether that group collectively deserves to be read. The two decisions are connected through the decoding-query distribution.
The Claw-Eval result of 70.32 versus 42.58 suggests that this approach can materially improve long-running agent execution under a fixed KV budget. Production value, however, depends on selection overhead, RoPE compatibility, adaptation to changing trajectories, and CPU-offload tail latency. Until the code is available and the results are reproduced with complete system benchmarks, TesseraKV is best viewed as a strong candidate for the next generation of KV-cache management rather than a proven default replacement.
— END —Source: ArXiv AI (cs.AI) (2026-12-01)
Tags: #KV Cache #KV Paging #Attention Retrieval #Long-Context Inference #Agentic Inference
Editorial & Fact-Checking Note: This article is compiled from primary research, official release documentation, and source papers by the ZICQ Newsroom pipeline with automated entity verification and human editorial review. If you notice any technical inaccuracy, please submit a correction via our corrections policy or email our editorial desk directly.
Community Comments