FAS-KV: Efficient KV Cache Eviction via a Single-Direction Projection

FAS-KV approximates future attention with a single shared direction in key space, enabling efficient KV cache eviction via one projection.
Long-context inference is bottlenecked by KV cache memory and compute, making eviction critical. FAS-KV finds that cumulative future attention can be accurately approximated by a single linear direction in key space, shared across inputs within each model, layer, and KV head after correcting RoPE rotation. It learns this direction offline; at inference, one projection per cached key yields importance scores for eviction, with no future queries or attention matrix access. FAS-KV achieves best or near-best eviction performance on LongBench, RULER, and Needle-in-a-Haystack with low scoring overhead and FlashAttention compatibility.
Long-context inference is under dual pressure from KV cache memory and computation. As context windows continue to expand, how to compress the cache without sacrificing performance has become a key challenge. A recent paper proposes FAS-KV, which discovers that future attention shares a single linear direction in key space, enabling efficient scoring and eviction of cached tokens with just one projection. The method achieves leading or near-leading results across multiple long-context benchmarks and is compatible with FlashAttention, offering a new approach to KV cache eviction.
Future Attention Can Be Approximated as a Single Direction in Key Space
The research team found through analysis that cumulative future attention can be accurately approximated by a single linear direction in key space. After correcting for the rotation induced by RoPE (Rotary Position Embedding), this direction exhibits a dominant shared component across inputs within each model, each layer, and each KV head. This means that although attention distributions vary across different input sequences, the overall trend of future attention has a learnable common direction. This finding lays the foundation for lightweight scoring: a single projection in key space suffices to estimate the importance of cached tokens, without computing future queries or accessing attention matrices at inference time.
RoPE (Rotary Position Embedding) is the position encoding scheme widely adopted by current mainstream large models, injecting positional information by applying position-dependent rotations to query and key vectors. Specifically, for a vector at position (m), RoPE divides it into several two-dimensional subspaces, each rotated by an angle (m\theta_i). This rotation makes attention scores naturally depend on the relative positions of queries and keys. However, the rotation also means that the directions of key vectors are systematically changed across positions; directly applying a linear projection to key vectors would mix in position-dependent rotational components, thereby interfering with the estimation of the "future attention direction." FAS-KV first corrects for the rotation induced by RoPE before analysis, essentially transforming key vectors back into a position-independent reference frame so that the shared linear direction remains consistent across positions and inputs. This correction step is a key prerequisite for the method to hold, and it also explains why simple key-vector projection may not be effective in other approaches.
FAS-KV's Offline Learning and Online Scoring Mechanism
Based on the above findings, FAS-KV learns a shared future attention direction in an offline stage. At inference time, for each cached token, it suffices to project its key vector onto this direction to obtain an importance score, which determines which tokens to evict. Since the scoring process does not depend on future queries and requires no access to the attention matrix, the computational overhead is extremely low, and it is compatible with efficient attention implementations such as FlashAttention. This design allows FAS-KV to be integrated into existing inference pipelines at a small additional cost.

KV Cache (Key-Value Cache) is a core mechanism in autoregressive inference: when generating each new token, the model needs to perform attention computation with the keys and values of all previous tokens. To avoid redundant computation, previously computed key-value pairs are stored in the cache. As context windows expand from thousands to hundreds of thousands or even millions of tokens, the memory footprint of the KV cache grows linearly, becoming one of the main bottlenecks in long-context inference. The idea behind eviction strategies is to retain the tokens most important for subsequent generation and discard less important ones, thereby maintaining performance under limited memory. Existing methods typically rely on historical attention scores, recency, or heuristic rules for scoring, but historical attention does not always reflect future needs. FAS-KV's starting point is precisely to use "future attention" rather than "past attention" to guide eviction, while offline learning of the shared direction avoids actually computing future queries at inference time, thereby balancing accuracy and efficiency.
Experimental Results: LongBench, RULER, and Needle-in-a-Haystack
The research team evaluated FAS-KV on three long-context benchmarks: LongBench, RULER, and Needle-in-a-Haystack. The results show that FAS-KV achieves the best or near-best performance among cache eviction methods while maintaining low scoring overhead. This indicates that the shared future attention direction hypothesis is effective in practice, and the lightweight nature of projection scoring does not harm the model's performance on long-context tasks. You may not have noticed that these tests cover a variety of long-context scenarios, including multi-task understanding, complex reasoning, and long-document retrieval, and FAS-KV demonstrates competitiveness across all of them.
LongBench, RULER, and Needle-in-a-Haystack are three complementary types of benchmarks for evaluating long-context capabilities. LongBench covers multi-task long-text understanding, including question answering, summarization, code completion, etc., focusing on the model's comprehensive performance on real long documents; RULER is manually constructed and systematically varies context length and task difficulty to probe the boundaries of the model's effective context window, including complex reasoning tasks such as multi-hop tracing and aggregation; Needle-in-a-Haystack embeds a key piece of information (the "needle") in a long text and requires the model to accurately retrieve and reproduce it among a large amount of irrelevant content, primarily testing long-distance retrieval ability. The three correspond to the three dimensions of "comprehensive understanding," "complex reasoning," and "precise retrieval," respectively, and no single benchmark alone is sufficient to demonstrate the merits of a cache eviction method. FAS-KV achieves the best or near-best results on all three, indicating that its shared-direction hypothesis is not only applicable to a single type of attention pattern but generalizes across tasks.
Compatibility and Efficiency Advantages
Another advantage of FAS-KV lies in its compatibility with FlashAttention. Since no attention matrix access is required at inference time, the method can be seamlessly integrated into inference stacks using FlashAttention, avoiding additional memory access introduced by cache eviction. Moreover, offline learning is completed once, and online scoring involves only a simple vector-vector projection with low computational complexity, making it suitable for practical deployment. Compared with eviction strategies that require future queries or complex scoring, FAS-KV has a clear efficiency advantage.
FlashAttention is an IO-aware efficient attention implementation that uses tiled computation and online softmax reduction to avoid writing the full attention matrix to high-bandwidth memory (HBM), thereby greatly reducing memory access overhead and improving speed. Its key characteristic is that the attention matrix is never explicitly materialized. This property imposes constraints on cache eviction methods: any scoring strategy that relies on reading or modifying the attention matrix is difficult to coexist with FlashAttention, because the matrix simply does not exist in memory. FAS-KV scores by applying only a single projection to cached key vectors, never touching the attention matrix throughout, and can therefore be seamlessly embedded into FlashAttention's computation flow. This is also the technical essence of its "compatibility advantage"—not a simple engineering adaptation, but a scoring mechanism designed to avoid the intermediate products that FlashAttention omits.
Conclusion and Outlook
By revealing the shared-direction property of future attention in key space, FAS-KV proposes a lightweight and effective KV cache eviction method. Its performance on multiple benchmarks validates the effectiveness of the method, while also offering efficiency and compatibility. In the future, this idea may be extended to broader attention mechanism optimization, providing a new avenue for accelerating long-context inference. As demand for long-context applications grows, such shared-direction-based methods are expected to become an important direction for KV cache management.
One-line Summary
FAS-KV discovers that future attention can be approximated by a single shared direction in key space, enabling efficient KV cache eviction with one projection.
Paragraph Summary
Long-context inference is limited by the memory and computational overhead of KV caches, making cache eviction a key issue. FAS-KV's analysis reveals that cumulative future attention can be accurately approximated as a single linear direction in key space, and after correcting for RoPE rotation, this direction is shared across inputs within each model, layer, and KV head. Based on this, the method learns the shared direction offline and, at inference time, only needs to project each cached token's key vector once to obtain an importance score and decide on eviction, without computing future queries or accessing attention matrices. On the three benchmarks LongBench, RULER, and Needle-in-a-Haystack, FAS-KV achieves the best or near-best eviction performance while maintaining low scoring overhead, and it is compatible with FlashAttention, allowing low-cost integration into existing inference pipelines.
Related articles

Jensen Huang Testifies Before Congress: Key Takeaways on Chip Export Controls
NVIDIA CEO Jensen Huang faces questioning from the U.S. House Foreign Affairs Committee on AI chip export controls, commercial interests, and national security.

Tencent WorkBuddy in Practice: Building an AI Automated Testing Workbench with SKILL Capabilities
Based on Bilibili creator Baili Yang's sharing, this article analyzes how Tencent WorkBuddy AI agent desktop workbench can be used for automated testing: the shift from AI-assisted to AI-led, the relationship among large models, agents, and SKILL capabilities, zero-configuration installation and permission control, and practical ideas for building a personal AI automated testing workbench.

Adding Authentication to Remix SaaS Apps: A Practical Guide to WorkOS AuthKit
Based on the official WorkOS AuthKit guide, this article covers the full approach to integrating authentication in Remix or React Router SaaS apps, including session management, protected routes, multi-tenant organizations, enterprise SSO, and SCIM sync, and analyzes its engineering value for SaaS teams.