A Shared Future-Attention Direction in Key Space for KV Cache Eviction

Hikaru Shijo, Yutaka YoshihamaarXiv 2026

TL;DR

When Large Language Models (LLMs) read long documents, their short-term memory—the KV cache—bloats until it chokes your GPU. To decide which tokens to keep and which to throw away without slowing everything down, this paper discovers a hidden geometric shortcut: across completely different texts, a single linear direction in "key space" reliably predicts which past tokens future words will care about. Using a quick dot product per token, their method (FAS-KV) trims 70% of the memory cache while maintaining near-full accuracy and barely registering on the latency clock.

What Problem Does This Paper Address?

As an LLM generates text, it stores the "Key" and "Value" vectors of every preceding token in a Key-Value (KV) cache so it doesn't have to recompute them. The catch? That cache grows linearly with context length, rapidly eating up GPU memory and bandwidth.

To shrink the cache, eviction algorithms try to toss out unimportant tokens. Traditionally, you judge a token's importance by looking at historical attention scores—seeing which words previous tokens paid attention to. Unfortunately, modern high-speed kernels like FlashAttention fuse operations precisely so they never have to materialize the giant attention matrix in memory. Extracting attention scores breaks that optimization. Other "attention-free" workarounds try to model distributions of future queries on the fly, which preserves accuracy but introduces heavy computational lag. We need a way to predict which tokens future queries will need, using only the cached vectors themselves, at lightning speed.

Methods

The authors propose FAS-KV, an eviction method built on a clean mathematical decomposition: a past token’s direct contribution to future outputs equals its cumulative future attention multiplied by the length ($L_2$ norm) of its value vector. The value norm is sitting right there in the cache, so the real trick is predicting future attention.

  1. Offline Calibration & RoPE Alignment: Using a small calibration set of documents, the authors let the model generate text to observe actual ("oracle") future attention. For each layer and KV head, they fit a linear vector in key space that predicts centered log-attention. Crucially, modern LLMs use Rotary Positional Embeddings (RoPE), which rotate key vectors depending on where they sit in the sequence. The authors undo the rotation at each document's eviction boundary—mapping the fitted directions into a shared "canonical" coordinate frame—and average them into one master vector per KV head.
  2. Runtime Scoring: At inference time, FAS-KV takes that single offline vector, rotates it once to match the current sequence length, and takes a single inner product with each cached key. Add that score to the log of the token's value norm, permanently protect the first 4 "sink" tokens, and keep the Top-$K$ winners. No attention matrices, no future queries required.
  3. Selective Span Propagation (SSP): Because subword tokenizers chop single words or entities into pieces, naive eviction might keep half a word and delete the rest. SSP is an optional post-processing step applied at a few sensitive layers that shares the highest score among all subwords belonging to the same lexical span.

Datasets

  • Offline Calibration: Conducted once per model using 192 prose documents (and WikiText for preliminary analysis), plus one short synthetic retrieval sample to select layers for SSP. No downstream test data is used.
  • Evaluation Benchmarks: Tested across standard long-context and retrieval suites: LongBench, LongBench-V2 (challenging multiple-choice), RULER (tested at 4K and 16K lengths), Needle-in-a-Haystack (up to 128K tokens), and AIME24 / AIME25 (for repeated decoding-time compression). No new benchmarks were introduced.

Key Insights and Ideas

  • Future attention is surprisingly linear: For a single future query, centered log-attention is exact linear projection in key space (centering cancels out the messy softmax denominator). Even more remarkably, when you average across dozens of diverse future queries, a single linear direction still captures nearly all the variance ($R^2 = 0.97$, Spearman $\rho = 0.99$ within samples).
  • One universal direction rules across inputs—once you un-spin RoPE: Initially, a direction learned on a 4K-token document fails to transfer well to a 10K-token document because RoPE twists the coordinate space at different boundaries. Once aligned to the eviction boundary, a single rank-1 direction explains 86% of the variance across completely different tasks and texts!
Boundary alignment reveals a shared predictive direction across tasks
  • Keys and Values play complementary roles: Neither key projection nor value magnitude is enough on its own. Value norms excel on certain retrieval tasks, while the shared key direction dominates on others (like common word extraction). Combining both prevents catastrophic drops under heavy compression.

Key Results

Evaluated across Llama-3 (1B, 8B) and Qwen3 (1.7B, 8B) families, FAS-KV hits a sweet spot on the accuracy-efficiency Pareto frontier:

Figure 1: Accuracy–efficiency trade-off for Qwen3-8B after evicting 70% of the context tokens from the KV cache. The vertical axis reports mean LongBench score; the horizontal axis reports prefill overhead over 50 re- peated runs of one natural 24K-token context on an NVIDIA H200 GPU (batch size 1). FAS-KV maintains near-full-cache performance with low scoring overhead.
  • Accuracy under heavy compression: On Qwen3-8B and Llama-3.1-8B, FAS-KV evicts 70% of the KV cache while matching or slightly exceeding full-cache LongBench averages. On LongBench-V2 (Qwen3-8B at 70% eviction), FAS-KV + SSP scores 34.19%, beating all eviction baselines and even edging out the uncompressed Full KV baseline (33.40%).
  • Retrieval robustness: On Needle-in-a-Haystack at 70% compression, FAS-KV retrieves 35/36 needles up to 32K tokens on Qwen3-8B and 61/63 up to 128K tokens on Llama-3.1-8B. Adding SSP boosts RULER-4K scores by 3.61 points at 70% eviction.
  • Negligible overhead & real speedups: On a 24K-token prefill (H200 GPU), Expected Attention adds 209.2 ms of overhead, whereas FAS-KV adds just 15.5 ms (16.5 ms with SSP) and cuts time-to-first-answer-token by more than half. On a 16GB consumer GPU (RTX 5070 Ti) running Qwen3-1.7B with batch size 4 at 32K context, Full KV crashes (Out of Memory), while FAS-KV + SSP cruises at 53.6 tokens/sec.

Limitations and Future Work

  • Checkpoint-specific calibration: FAS-KV isn't purely zero-shot; every new model checkpoint requires an offline calibration pass using oracle future attention.
  • Static geometry: Because it relies on a single shared vector per KV head, it cannot adapt dynamically to input-specific quirks or residuals at runtime.
  • Untested territories: Generalization beyond RoPE-based architectures and downstream cross-lingual evaluations remain untested. Furthermore, SSP relies on tokenizer-defined word boundaries, which hasn't been stress-tested on code or unstructured syntax, and repeated eviction during generation was only tested on math reasoning (AIME) rather than general multi-turn chat or streaming workloads.

Summary updated

BibTeX
@misc{shijo2026shared,
  author = {Hikaru Shijo and Yutaka Yoshihama},
  title = {{A Shared Future-Attention Direction in Key Space for KV Cache Eviction}},
  year = {2026},
  eprint = {2611.40486},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.40486},
}
Figure