[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"doc-detail-85975-en":3,"doc-seo-85975-105":29,"detail-sidebar-cat-0-en-105":91},{"code":4,"msg":5,"data":6},0,"success",{"doc_id":7,"user_id":8,"nickname":9,"user_avatar":10,"doc_module":4,"category_id":11,"category_name":12,"doc_title":13,"doc_description":14,"doc_content":15,"file_id":16,"file_url":17,"file_type":18,"file_size":19,"view_count":11,"is_deleted":4,"is_public":20,"is_downloadable":20,"audit_status":20,"page_count":21,"language":22,"language_code":23,"site_id":24,"html_lang":23,"table_of_contents":25,"faqs":26,"seo_title":13,"seo_description":14,"update_tm":27,"read_time":28},85975,13056703019404,"Miles","https://ap-avatar.wpscdn.com/davatar_29158cc5080c5b710cf443261637dec0",8,"Research & Report","MemDecay: Region-Aware KV Cache Eviction for Efficient LLM Agent Inference","MemDecay delivers a training-free KV-cache eviction framework for long-horizon LLM agents whose traces accumulate system instructions, plans, user turns, tool outputs, retrieved documents, and intermediate reasoning. Existing eviction methods score tokens via attention or recency and apply uniform retention, ignoring the semantic region structure of orchestrated prompts. MemDecay labels tokens by prompt region, combines region-specific base priority with attention-derived importance, and applies region-specific temporal decay under a fixed cache budget, evicting the lowest-priority pages while protecting pinned instruction regions.","MemDecay: Region-Aware KV Cache Eviction for Efficient LLM Agent Inference  \nVenkatesha Matam  \nIndependent Researcher New York City, USA[matam.venkatesha@gmail.com](matam.venkatesha@gmail.com)  \nKeon Kim  \nIndependent Researcher New York City, USA [kwk236@gmail.com](kwk236@gmail.com)  \narXiv :2607 . 10582v 1 [ cs .LG] 12 Jul 2026  \nAbstract—Large language models (LLMs) are increasingly deployed as agents whose contexts accumulate system instructions, plans, user turns, tool outputs, retrieved documents, and intermediate reasoning over many steps. The key–value (KV) cache that supports autoregressive attention grows with this trace, and its memory footprint constrains long-horizon inference and serving. Existing KV-cache eviction policies score tokens with attention or recency signals and apply the same retention rule to the entire sequence, leaving the semantic structure of orchestrated agent prompts unused.  \nWe propose MemDecay, a training-free KV-cache eviction framework for long-horizon LLM agents. MemDecay assigns each token a region label supplied by the orchestration layer, combines region-specific base priorities with attention-derived importance, and applies region-specific temporal decay to each token’s retention priority. Under a fixed cache budget, MemDecay evicts the pages holding the lowest-priority tokens while protecting pinned instruction regions. Region labels align with contiguous prompt spans, so the policy maps onto page-granular cache layouts in existing serving stacks.  \nWe further describe a measurement protocol that estimates region-conditioned attention lifetimes from agent traces and uses them to calibrate decay rates. In a controlled study spanning two context lengths (roughly 450 and 1,700 tokens) and two model sizes (Qwen2.5-1.5B and 3B), measured lifetimes differ by an order of magnitude across regions in every setting (system halflives of 148 to 189 decode steps against 14 to 16 for scratchpad reasoning), and the ordering of the movable regions is robust to insertion order. The eviction study yields one clear win and one instructive loss. Pinning preserves system-region facts at the fullcache ceiling in every setting, no baseline preserves more than 13 of 24, and recency-based retention collapses entirely as contexts grow while the structural prior keeps working. On unpinned content, accumulated-attention retention strengthens with model scale and wins; an ablation shows the policy’s attention term cannot compensate at any tested weight, pointing to magnitude normalization of that term as the needed design change.  \nIndex Terms—KV cache, KV cache compression, cache eviction, large language models, LLM agents, agentic workflows, efficient LLM inference, LLM serving, memory management, long-context inference  \nI. INTRODUCTION  \nLarge language models (LLMs) are increasingly used in longhorizon agentic workflows that combine multi-turn interaction, retrieval, tool use, and iterative planning. Unlike single-pass long-context tasks, these systems accumulate a persistent  \nexecution trace composed of system instructions, safety constraints, evolving plans, user turns, retrieved evidence, tool interactions, and intermediate reasoning states. The trace is structured: its components serve different functional roles and should persist for different durations.  \nThis shift places new pressure on the key–value (KV) cache that supports autoregressive decoding. Because the KV cache grows with sequence length, long interaction traces translate into substantial memory overhead, increased bandwidth demand, and higher end-to-end latency [1], [2] . Prior work reduces this overhead through selective retention and compression, including policies that adapt eviction to stable differences in attention behavior across heads [3], [4] . Most of these approaches target generic long-context generation and score cached tokens with model-centric signals such as accumulated attention, attention sinks and recency windows, or i","cbCaicEyb4McHXLh","https://ap.wps.com/l/cbCaicEyb4McHXLh","pdf",300205,1,9,"English","en",105,"# Abstract\n# Introduction\n## Motivation: KV cache limits for agentic traces\n## Proposed approach: region-aware decay and eviction\n## Measurement and findings (overview)","[{\"question\":\"What problem does MemDecay address in LLM agent inference?\",\"answer\":\"Long-horizon agent traces grow the KV cache, increasing memory, bandwidth, and latency. Standard eviction rules treat all tokens uniformly and do not preserve the semantic roles needed over different time scales.\"},{\"question\":\"How does MemDecay decide which KV-cache pages to evict?\",\"answer\":\"Each token receives a region label from the orchestration layer, then MemDecay computes a composite retention score using region-specific base priority, attention-derived importance, and region-specific temporal decay. It evicts pages containing the lowest-priority tokens under a fixed cache budget while protecting pinned instruction regions.\"},{\"question\":\"What does the study show about attention lifetimes across regions?\",\"answer\":\"Region-conditioned attention lifetimes differ by about an order of magnitude across regions in every tested setting. The ordering of movable regions remains robust, and pinning preserves system-region facts while recency-only retention deteriorates as contexts grow.\"}]",1784207514,23,{"code":4,"msg":30,"data":31},"ok",{"site_id":24,"language":23,"slug":32,"title":13,"keywords":33,"description":14,"schema_data":34,"social_meta":86,"head_meta":88,"extra_data":90,"updated_unix":27},"memdecay-region-aware-kv-cache-eviction-for-efficient-llm-agent-inference","",{"@graph":35,"@context":85},[36,53,68],{"@type":37,"itemListElement":38},"BreadcrumbList",[39,43,47,50],{"item":40,"name":41,"@type":42,"position":20},"https://docshare.wps.com","Home","ListItem",{"item":44,"name":45,"@type":42,"position":46},"https://docshare.wps.com/document/","Document",2,{"item":48,"name":12,"@type":42,"position":49},"https://docshare.wps.com/document/research-report/",3,{"item":51,"name":13,"@type":42,"position":52},"https://docshare.wps.com/document/memdecay-region-aware-kv-cache-eviction-for-efficient-llm-agent-inference/85975/",4,{"url":51,"name":13,"@type":54,"author":55,"headline":13,"publisher":57,"fileFormat":60,"inLanguage":23,"description":14,"dateModified":61,"datePublished":62,"encodingFormat":60,"isAccessibleForFree":63,"interactionStatistic":64},"DigitalDocument",{"name":9,"@type":56},"Person",{"url":40,"name":58,"@type":59},"DocShare","Organization","application/pdf","2026-07-25","2026-07-16",true,{"@type":65,"interactionType":66,"userInteractionCount":11},"InteractionCounter",{"@type":67},"ViewAction",{"@type":69,"mainEntity":70},"FAQPage",[71,77,81],{"name":72,"@type":73,"acceptedAnswer":74},"What problem does MemDecay address in LLM agent inference?","Question",{"text":75,"@type":76},"Long-horizon agent traces grow the KV cache, increasing memory, bandwidth, and latency. Standard eviction rules treat all tokens uniformly and do not preserve the semantic roles needed over different time scales.","Answer",{"name":78,"@type":73,"acceptedAnswer":79},"How does MemDecay decide which KV-cache pages to evict?",{"text":80,"@type":76},"Each token receives a region label from the orchestration layer, then MemDecay computes a composite retention score using region-specific base priority, attention-derived importance, and region-specific temporal decay. It evicts pages containing the lowest-priority tokens under a fixed cache budget while protecting pinned instruction regions.",{"name":82,"@type":73,"acceptedAnswer":83},"What does the study show about attention lifetimes across regions?",{"text":84,"@type":76},"Region-conditioned attention lifetimes differ by about an order of magnitude across regions in every tested setting. The ordering of movable regions remains robust, and pinning preserves system-region facts while recency-only retention deteriorates as contexts grow.","https://schema.org",{"og:url":51,"og:type":87,"og:title":13,"og:site_name":58,"og:description":14},"article",{"robots":89,"canonical":51},"index,follow",{"doc_id":7,"site_id":24},{"code":4,"msg":5,"data":92},[93,97,101,105,110,115,120,123,127,130,134],{"id":20,"doc_module":4,"doc_module_name":45,"category_name":94,"show_sort_weight":95,"slug":96},"Story & Novel",90,"story-novel",{"id":46,"doc_module":4,"doc_module_name":45,"category_name":98,"show_sort_weight":99,"slug":100},"Literature",80,"literature",{"id":52,"doc_module":4,"doc_module_name":45,"category_name":102,"show_sort_weight":103,"slug":104},"Exam",70,"exam",{"id":106,"doc_module":4,"doc_module_name":45,"category_name":107,"show_sort_weight":108,"slug":109},5,"Comic",60,"comic",{"id":111,"doc_module":4,"doc_module_name":45,"category_name":112,"show_sort_weight":113,"slug":114},6,"Technology",50,"technology",{"id":116,"doc_module":4,"doc_module_name":45,"category_name":117,"show_sort_weight":118,"slug":119},7,"Healthcare",40,"healthcare",{"id":11,"doc_module":4,"doc_module_name":45,"category_name":12,"show_sort_weight":121,"slug":122},30,"research-report",{"id":21,"doc_module":4,"doc_module_name":45,"category_name":124,"show_sort_weight":125,"slug":126},"Religion & Spirituality",20,"religion-spirituality",{"id":125,"doc_module":4,"doc_module_name":45,"category_name":128,"show_sort_weight":125,"slug":129},"World Cup","world-cup",{"id":131,"doc_module":4,"doc_module_name":45,"category_name":132,"show_sort_weight":131,"slug":133},10,"Lifestyle","lifestyle",{"id":135,"doc_module":4,"doc_module_name":45,"category_name":136,"show_sort_weight":106,"slug":137},19,"General","general"]