TL;DR
KVUse optimizes LLM-based recommender systems by replacing natural-language user profiles with reusable Key-Value (KV) caches. By training lightweight LoRA "writers" to produce position-independent KV caches, the system eliminates redundant prefill computation, boosting downstream scoring throughput by up to 4.5x without sacrificing recommendation quality.
What Problem Does This Paper Address?
Modern "agentic" recommenders maintain natural-language profiles for users, which are updated as new interactions occur. However, serving these models is incredibly expensive. In a typical setup, every time the system needs to score a candidate item, it must "prefill" the entire user profile text into the LLM prompt.
As shown in Figure 4 (Table 1), the downstream scoring path is prefill-heavy, with prefilling accounting for roughly 86% of the engine's work. Standard optimizations like prefix caching fail here because the user profile is often preceded by different instructions or followed by different candidate items, breaking the requirement for identical prefixes. The authors identify this repeated re-computation of the same user profile KV cache as the primary bottleneck in scaling LLM recommenders.
Methods
The authors propose KVUse, a system that treats user memory as a storage of KV caches rather than raw text.
- Reusable-KV Writers: Instead of using a standard LLM to generate profile text, KVUse employs a small LoRA adapter (the "writer"). This writer is trained via self-distillation to produce KV caches that remain accurate even when "spliced" into new positions or different prompt contexts.
- Position-Independent Caching (PIC): To handle the fact that a profile might appear at different token indices in different prompts, KVUse mathematically re-rotates the Rotary Position Embeddings (RoPE) in the cached keys to match their new positions.
- Self-Distillation Training: The system uses a "teacher" model (vanilla LLM with full prefill) to train a "student" model (LLM using reused KV). The loss function minimizes the KL divergence between their next-token distributions, ensuring the reused KV caches don't degrade the model's reasoning.
- KV Scheduler: To prevent the overhead of moving large KV tensors from host memory to the GPU, the authors designed a scheduler that asynchronously uploads the KV cache for the next batch while the GPU is busy computing the current one.
Datasets
The researchers evaluated KVUse using the InstructRec benchmark across four diverse domains:
- Amazon Books (Main dataset)
- Goodreads
- Amazon Movies & TV
- Yelp
These datasets vary significantly in size and density, as detailed in Figure 5 (Table 2).
Key Insights and Ideas
- Attention Sparsity is the Enabler: By analyzing attention heatmaps (Figure 3), the authors found that while tokens within a profile attend heavily to each other, "cross-chunk" attention (e.g., a profile attending to system instructions) is relatively sparse. This suggests that KV caches can be computed somewhat independently and still function well when combined.
- Context Error vs. Position Error: Simply reusing a KV cache causes errors because the keys encode the original position and the tokens haven't "seen" the new surrounding context. KVUse solves the position error with math (re-rotation) and the context error through the trained LoRA writer.
- Hiding Latency: The KV scheduler effectively makes the data transfer "free" by overlapping it with computation, a crucial step for maintaining low latency in production environments.
Key Results
- Massive Throughput Gains: Under saturated load, KVUse increased the throughput of the downstream scoring path by 4.0x–4.5x and the profile update path by 1.4x–1.9x.
- Preserved Quality: There was no statistically significant difference in ranking quality (NDCG@10) between KVUse and the "gold standard" full prefill method.
- High Fidelity: Using an LLM judge (Gemini-3-Flash), the authors found that 94.4% of the profiles generated via KVUse were equivalent to or had only minor differences from those generated by full prefill.
- Superiority over Training-Free Methods: KVUse significantly outperformed existing training-free repair methods like CacheBlend and EPIC, which failed to recover the ranking quality lost during native KV reuse.
Limitations and Future Work
- Storage Overhead: KV caches are much larger than text. While text takes a few bytes per token, a Llama-3-8B KV cache takes ~128 KiB per token in bfloat16. The authors suggest KV quantization or compression as a future research direction.
- Domain Specificity: Currently, the LoRA writers must be trained for each specific dataset. Developing "universal" writers that generalize across domains is a goal for future work.
- Batching Requirements: The KV upload hiding mechanism requires knowing the next batch in advance, which is easier for offline/near-line jobs than for strictly real-time, unpredictable online requests.
Summary updated