Query Visibility Impacts KV-Cache Compression Performance Rankings

Daming Luo, Christy Liang, Junyu Xuan· July 15, 2026 View original

Summary

A new audit reveals that how KV-cache compression methods are evaluated—specifically, whether the query is visible during compression—significantly alters their performance rankings. Query-agnostic compression, crucial for cache reuse, often shows different results than query-aware evaluations.

The effectiveness of KV-cache compression methods, vital for reducing memory in large language models, is heavily influenced by the evaluation protocol. Researchers conducted an audit comparing six published compression techniques under two scenarios: query-aware (where the query is known during compression) and query-agnostic (where compression happens before the query is seen). The study found that the rankings of these methods change considerably when evaluated in a query-agnostic manner, which is more representative of real-world deployment where a compressed cache is reused for multiple queries. For instance, methods like SnapKV, which perform well in query-aware settings, underperform trivial baselines when the query is hidden during compression. KeyDiff was identified as the only audited method that consistently outperformed trivial baselines in the query-agnostic protocol. The performance drop between the two protocols correlated with how much each method's scoring signal relied on query visibility, highlighting a critical distinction for practical applications.

Why it matters

For professionals deploying LLMs, understanding the true performance of KV-cache compression under realistic, query-agnostic conditions is crucial for selecting efficient and effective memory management strategies.

How to implement this in your domain

  1. 1Re-evaluate current KV-cache compression strategies using a query-agnostic protocol to assess real-world performance.
  2. 2Prioritize compression methods like KeyDiff that demonstrate robust performance in query-agnostic settings.
  3. 3Design LLM deployment architectures that account for the economic benefits of KV-cache reuse, ensuring compression happens before queries.
  4. 4Consider the trade-offs between compression ratio and performance impact under different query visibility conditions.

Who benefits

AI/ML DevelopmentCloud ComputingData CentersSoftware Engineering

Key takeaways

  • KV-cache compression method rankings change significantly based on query visibility during evaluation.
  • Query-agnostic compression is critical for real-world LLM deployment and cache reuse.
  • Many methods underperform trivial baselines in query-agnostic scenarios, unlike query-aware tests.
  • KeyDiff showed consistent outperformance in the more realistic query-agnostic protocol.

Original post by Daming Luo, Christy Liang, Junyu Xuan

"arXiv:2607.11942v1 Announce Type: new Abstract: KV-cache compression methods are predominantly evaluated with the query appended to the context before compression -- a query-aware protocol. Yet the economic case for a compressed KV cache is reuse: compress a document once, answer…"

View on X

Originally posted by Daming Luo, Christy Liang, Junyu Xuan on X · view source

Want to go deeper?

Turn these trends into skills with Learnijoy's hands-on AI & tech courses.

Explore courses