arXiv:2608.02515cs.CLcs.LG2026-08被引 1

让大模型在长期运行中保持记忆连续性,即使上下文更换也能持续使用历史信息。

LiveMem: Maintaining Memory State Continuity in Long-Running LLM Inference

论文配图:LiveMem: Maintaining Memory State Continuity in Long-Running LLM Inference
图 1 · 摘自论文原文
  • 引入内置记忆机制,主路径用固定窗口注意力,额外维护持久记忆状态。
  • 在LongMemEval测试中,即使证据已移出当前上下文,仍能正确回答基于记忆的问题。
  • 适合需要长期记忆的智能助手、对话系统等持续交互场景使用。

长期运行的助手和智能体处理交互流时,历史数据终将超出上下文长度。现有上下文保留、摘要与检索方法虽可访问部分历史,但无法在上下文变化时维持完整的状态连续性。本文提出‘上下文更替下的状态连续性’概念:通过容量固定的内存状态,使计算过程在生命周期内持续进行,不受活跃上下文影响。我们提出内在记忆方法LiveMem,为预训练全注意力大模型增加记忆状态,在主注意力路径保持有限的键值(KV)窗口的同时,持续保存完整生命周期的历史信息。上下文更替、记忆维护、面向记忆的微调以及状态感知服务共同使记忆状态在原始令牌释放后依然起关键作用。实验表明,LiveMem在多项评估中表现领先,且在LongMemEval上验证了其能在支持证据被移除后仍基于记忆作答;证据距离分析显示有效信息可超越活跃窗口持续存在。因此,状态连续性成为大模型持续推理中一个独立且互补的新抽象。

原文摘要 · Abstract (English)

Long-running assistants and agents consume interaction streams that eventually outgrow the context. Existing context retention, summarization, and retrieval preserve access to selected history, but do not provide a persistent state over the full lifecycle when working context changes. We formulate this missing inference capability as \emph{state continuity under context turnover}: carrying computation forward through a fixed-capacity memory state whose lifetime is independent of the active context. We introduce an intrinsic memory method, \textbf{LiveMem}, which augments a pretrained full-attention LLM with a memory state that preserves the historical information over the whole lifecycle while the main attention path retains a bounded KV window. Context turnover and memory state maintaining, memory-oriented post-training, and state-aware serving jointly make this memory state load bearing after its originating tokens are released. Our experiments show that LiveMem achieves leading overall performance among evaluated systems and other intrinsic memory methods. Experiments on LongMemEval show that LiveMem is able to answer the question based on the memory state, even when the supporting evidence has been removed from the current context, and evidence-distance analysis shows that useful information persists beyond the active window. LiveMem thus establishes state continuity as a distinct and complementary abstraction for continual LLM inference.

大模型长期记忆持续推理注意力机制

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。