LatentRemedy: Efficient Remedy For Non-Prefix KV Cache Reuse in Multi-Agent Systems
Zhiwei Chen, Zhongtao Rao, Waikit Xiu, Yuxiang Zhang, Shuting Cui, Jian Chen, Tianxiang Zhao
Abstract
Non-prefix KV cache reuse is a promising approach for improving inference efficiency in multi-agent systems as agents share the same context blocks. However, when agents have conflicting tasks, directly reusing non-prefix KV caches across agents can severely degrade model performance, causing up to a 90% drop. Existing remedies, including selective recomputation and offset-based calibration, recover a limited fraction of this loss. We argue that the problem lies not only in contaminated KV representations but also in the agent's difficulty interpreting reused context under its own instructions. To this end, we introduce LatentRemedy, which uses a few task-conditioned latent tokens to help the target agent leverage reused context without recomputing the shared block. Specifically, we use an MLP to map the last hidden state of the target prefix into a small number of latent tokens, which are placed after the reused KV block to interact with the shared context. To guide subsequent predictions toward the target task, we train the MLP through full-prefill distillation. Experiments show that LatentRemedy consistently outperforms existing reuse baselines on conflicting tasks while maintaining TTFT close to direct reuse as cache size grows. Code and data are available at https://github.com/chenzhwsysu57/kvreuse.
Create a lesson
Metadata
- Categories
- cs.CL, cs.AI
- Comments
- 22 pages with multiple figures
Related papers
Evolve Together, Fall into Place: How Social Scaffolding Shapes Self-Evolving Multi-Agent Systems
Shared title terminologycs.CLSeojin Hwang, Youngmin Choi, Hwanhee Lee
PRISMATIC : Prescription Risk Inspection System for Multi-Agent Treatment Interaction in Clinical Decision-Making
Shared title terminologycs.CLZiyang Ling, Shuyu Lu, Ziyi Chen
BRIDGE: Selective Boundary Repair with Dependency Graph Evidence in Multi-Agent Systems
Shared title terminologycs.CLEncheng Su, Pengze Li, Ziheng Hua et al.
Same Context, Different Agents: A Behavioral Study of Semantic Layers, Multi-Agent Orchestration and Memory Compaction in Data Agents
Shared title terminologycs.CLZhivar Sourati, Marianne Menglin Liu, Zheng Wang et al.
From Agents to Edges: Paired Optimization for Multi-Agent Collaboration
Shared title terminologycs.CLFeng Lin, Xiaotian Yu, Yifan Yang et al.
Sports Agent: A Self-Evolving System for Conversational Data Analytics
Shared title terminologycs.CLChao Chen, Fuqi Lin, Ze Chen et al.