NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

ProphetKV: User-Query-Driven Selective Recomputation for Efficient KV Cache Reuse in Retrieval-Augmented Generation

Shihao Wang, Jiahao Chen, Yanqi Pan, Hao Huang, Yichen Hao, Xiangyu Zou, Wen Xia, Chongyang Qiu, Wentao Zhang, PengFei Wang

Retrieval-Augmented Generation (RAG) has become the standard architecture for enabling Large Language Models (LLMs) to answer questions using massive external datasets. However, as context windows expand from tens of thousands to over a million tokens, systems hit a severe computational bottleneck during the prefill stage. Because the computational complexity of the attention mechanism scales quadratically ($O(N^2)$), processing these massive prompts results in painfully slow "Time-to-First-Token" (TTFT) latency.

To mitigate this, recent approaches attempt to reuse pre-calculated Key-Value (KV) caches of retrieved documents. While promising, this introduces a new challenge: because documents are cached in isolation, they lack the cross-attention context of the other documents and the user's specific query.

The "Crowding-Out" Effect in Current Methods

To bridge the gap between isolated document caches, existing solutions recompute a small subset of "important" tokens to restore cross-attention. However, these methods suffer from a fatal flaw identified as the "crowding-out effect."

Current techniques select tokens based on global importance metrics, such as "attention sinks" or generic saliency. In practice, these globally "loud" tokens saturate the limited recomputation budget. As a result, they displace the specific, "quiet" tokens that actually contain the information necessary to answer the user's unique query, severely degrading inference accuracy.

ProphetKV: The User Query as a "Prophet"

To solve this, researchers introduce ProphetKV, a training-free framework that dynamically prioritizes tokens based on their semantic relevance to the user query. By treating the query as a "prophet" that predicts which parts of the context will be needed, ProphetKV ensures the recomputation budget is spent only on bridging the informational gap between the retrieved context and the prompt.

The ProphetKV architecture operates through a specialized pipeline:

  1. User-Query-Guided Selection: Instead of searching for globally salient tokens, ProphetKV performs a lightweight "query pass." It calculates the attention weights directly from the user query to the precomputed document caches, identifying tokens that are semantically relevant to the specific task.
  2. Dual-Stage Recomputation with Layer Fusing:
  3. Stage I: The model performs a highly efficient pass across all layers to collect query-aware importance signals.
  4. Stage II: Unlike prior works that rely on a single early layer to guess token importance, ProphetKV fuses these signals across all layers. This prevents critical evidence that only becomes salient in deeper layers (e.g., Layer 40) from being discarded.
  5. Selective Recomputation: Once the high-utility tokens are identified, only this small subset is recomputed across all layers to restore high-fidelity cross-attention.

Key Insights

The success of ProphetKV relies on the "Prophet" Property: the tokens the query attends to during the initial pass heavily overlap with the tokens the model attends to during the actual decoding phase. This makes the query a highly reliable predictor of token utility.

Furthermore, ProphetKV bypasses the traditional "selection deadlock." Previously, determining which tokens were important in deep layers required a full prefill. ProphetKV avoids this because query-to-context attention can be computed for all layers upfront without recomputing the entire context. Ultimately, the paper proves that reconstructing the entire attention map is inefficient; in RAG, most retrieved text is noise relative to a specific question. Efficiency is achieved by ignoring this noise, even if it is globally salient.

Evaluation and Results

The researchers evaluated ProphetKV across three major LLM families (Llama 3.1-8B, Qwen 2.5-14B, and Qwen 3-14B) using two rigorous benchmarks: RULER (for retrieval-intensive stress testing up to 16K tokens) and LongBench (for long-context reasoning). Documents were partitioned into 512-token segments to simulate real-world RAG fragmentation.

The results demonstrate massive efficiency and accuracy gains:

  • Accuracy Recovery: With only a 20% recomputation ratio, ProphetKV retains 96%–101% of the accuracy of a full prefill.
  • State-of-the-Art Performance: ProphetKV achieved accuracy improvements of 8.8%–24.9% on RULER and 18.6%–50.9% on LongBench compared to leading methods like CacheBlend, EPIC, and KVShare.
  • Speed and Overhead: The framework delivers up to a 5× speedup in TTFT for 16K context lengths. The new Stage I scoring mechanism is remarkably lightweight, accounting for only about 1% of the total prefill time.

Limitations and Future Directions

While highly effective algorithmically, ProphetKV currently requires integration into production-grade inference engines (like vLLM or SGLang) with custom CUDA kernels to realize its full hardware acceleration potential. Additionally, the method assumes the retrieved documents actually contain the answer; if the retrieval stage returns irrelevant "garbage," the query-attention signal becomes less reliable. Future work may explore combining ProphetKV with query expansion or rewriting techniques to better capture indirectly useful evidence within the context.

Summary updated

BibTeX
@inproceedings{wang2026prophetkv,
  author = {Shihao Wang and Jiahao Chen and Yanqi Pan and Hao Huang and Yichen Hao and Xiangyu Zou and Wen Xia and Chongyang Qiu and Wentao Zhang and PengFei Wang},
  title = {{ProphetKV: User-Query-Driven Selective Recomputation for Efficient KV Cache Reuse in Retrieval-Augmented Generation}},
  booktitle = {International Conference on Machine Learning},
  year = {2026},
  url = {https://openreview.net/forum?id=SwGwmKIgUb},
}
Figure