Reproduce “MemDecay: Region-Aware KV Cache Eviction for Efficient LLM Agent Inference” on OpenResearch
Run Claude Code, Codex or any coding agent as a research agent: literature, hypotheses and experiments on your laptop, cluster or cloud GPUs.
Universal app for Apple silicon and Intel. Requires macOS 11 or later.
About this paper
Venkatesha Matam, Keon Kim
MemDecay introduces a training-free, region-aware KV cache eviction policy for LLM agents, leveraging semantic prompt regions and attention-triggered decay to manage memory efficiently. The system effectively preserves critical system instructions and adapts to specific workload characteristics through an empirical calibration protocol, demonstrating improved recall over recency-based methods in long contexts.
Key insights
- Empirical calibration reveals significant variations in token attention half-lives across semantic regions, with `system` instructions being an order of magnitude more persistent than `scratchpad` content.
- The `retrieval` region, initially assumed to decay quickly, was empirically found to be a long-lived movable region, validating the necessity of workload-specific calibration.
- The current formulation of the attention importance term in the retention score has minimal impact on rescuing older tokens, indicating a need for magnitude normalization rather than just weighting.
Summary by alphaXiv.
Tip: change arxiv.org to autoarxiv.org in any arXiv abstract link to open the paper here.