Skip to main content
arXiv is now an independent nonprofit! Learn more
archive
Search Submit Donate Log in
Press Enter to search · Advanced search

Computer Science > Computation and Language

arXiv:2605.25475v1 (cs)
[Submitted on 25 May 2026 (this version), latest version 3 Jul 2026 (v2)]

Title:IndexMem: Learned KV-Cache Eviction with Latent Memory for Long-Context LLM Inference

Authors:Xintong Yang, Hao Gu, Binxing Xu, Lujun Li, Bei Liu, Jiacheng Liu, Qiyuan Zhu, Sirui Han, Yike Guo
View a PDF of the paper titled IndexMem: Learned KV-Cache Eviction with Latent Memory for Long-Context LLM Inference, by Xintong Yang and 8 other authors
View PDF HTML (experimental)
Abstract:Large Language Models (LLMs) are increasingly expected to operate over long contexts, yet standard softmax attention incurs a KV cache that grows linearly with sequence length, quickly becoming the bottleneck for long context inference. A practical remedy is to evict less important KV entries; however, existing eviction policies are largely heuristic and struggle to capture the rich, input-dependent distribution of token importance. In this work, we introduce a learnable indexer that predicts KV importance, enabling more accurate retention of critical tokens. Meanwhile, naively evicting tokens permanently discards their information, leading to irreversible forgetting and degraded retrieval over long ranges. To address this, we propose a lightweight latent memory module that compresses evicted tokens into a compact, online-updated state and provides residual readouts to compensate for the attention contributions lost through KV eviction. Collectively, our method enables accurate long-context inference under a bounded KV budget, delivering consistent improvements on RULER (4K/16K) across Qwen, Mistral, and Llama models (up to 25 points under aggressive eviction), markedly more stable Needle-in-a-Haystack retrieval, and superior LongBench scores and compression curves compared to existing eviction policies.
Subjects: Computation and Language (cs.CL); Artificial Intelligence (cs.AI)
Cite as: arXiv:2605.25475 [cs.CL]
  (or arXiv:2605.25475v1 [cs.CL] for this version)
  https://doi.org/10.48550/arXiv.2605.25475
arXiv-issued DOI via DataCite

Submission history

From: Hao Gu [view email]
[v1] Mon, 25 May 2026 06:29:43 UTC (1,041 KB)
[v2] Fri, 3 Jul 2026 06:53:32 UTC (1,037 KB)
Full-text links:

Access Paper:

    View a PDF of the paper titled IndexMem: Learned KV-Cache Eviction with Latent Memory for Long-Context LLM Inference, by Xintong Yang and 8 other authors
  • View PDF
  • HTML (experimental)
  • TeX Source
license icon view license

Current browse context:

cs.CL
< prev   |   next >
new | recent | 2026-05
Change to browse by:
cs
cs.AI

References & Citations

  • NASA ADS
  • Google Scholar
  • Semantic Scholar
Loading...

BibTeX formatted citation

Data provided by:

Bookmark

BibSonomy Reddit

Bibliographic and Citation Tools

Bibliographic Explorer (What is the Explorer?)
Connected Papers (What is Connected Papers?)
Litmaps (What is Litmaps?)
scite Smart Citations (What are Smart Citations?)

Code, Data and Media Associated with this Article

alphaXiv (What is alphaXiv?)
CatalyzeX Code Finder for Papers (What is CatalyzeX?)
DagsHub (What is DagsHub?)
Gotit.pub (What is GotitPub?)
Hugging Face (What is Huggingface?)
ScienceCast (What is ScienceCast?)

Demos

Replicate (What is Replicate?)
Hugging Face Spaces (What is Spaces?)
TXYZ.AI (What is TXYZ.AI?)

Recommenders and Search Tools

Influence Flower (What are Influence Flowers?)
CORE Recommender (What is CORE?)
  • Author
  • Venue
  • Institution
  • Topic

arXivLabs: experimental projects with community collaborators

arXivLabs is a framework that allows collaborators to develop and share new arXiv features directly on our website.

Both individuals and organizations that work with arXivLabs have embraced and accepted our values of openness, community, excellence, and user data privacy. arXiv is committed to these values and only works with partners that adhere to them.

Have an idea for a project that will add value for arXiv's community? Learn more about arXivLabs.

Which authors of this paper are endorsers? | Disable MathJax (What is MathJax?)
We gratefully acknowledge support from our major funders, member institutions, , and all contributors.
About · Help · Contact · Subscribe · Copyright · Privacy · Accessibility · Operational Status (opens in new tab)
Major funding support from
Simons Foundation Schmidt Sciences