arXiv:2605.08374cs.AI2026-05被引 2

让大模型记忆具备因果链追踪能力,提升复杂任务学习效果

MemQ: Integrating Q-Learning into Self-Evolving Memory Agents over Provenance DAGs

论文配图:MemQ: Integrating Q-Learning into Self-Evolving Memory Agents over Provenance DAGs
图 1 · 摘自论文原文
  • 用TD(λ)信用传播机制,按记忆依赖图反向分配贡献值
  • 多步任务最高提升5.7个百分点,单步任务提升0.77个百分点
  • 适合需要长期记忆推理的复杂智能体,如代码生成与多步决策

情景记忆使大模型智能体能够积累并检索经验,但现有方法将每条记忆独立处理,未考虑记忆间依赖链对后续记忆生成的影响。本文提出MemQ,将TD(λ)资格迹应用于记忆的Q值,通过记录新记忆创建时所调用的记忆依赖图(provenance DAG),反向传播信用。信用权重随图深度d按(γλ)^d衰减,以结构距离替代时间距离。我们将该设置形式化为外源上下文马尔可夫决策过程(Exogenous-Context MDP),其因子化转移将外部任务流与内部记忆存储解耦。在六个基准测试中——涵盖操作系统交互、函数调用、代码生成、多模态推理、具身推理和专家级问答——MemQ在泛化评估与运行时学习中均取得最高成功率,多步任务中提升最大(最高+5.7个百分点),单步分类任务中提升最小(+0.77个百分点),因单步更新已足够。我们进一步分析了γ与λ在EC-MDP结构下的交互,为参数选择与未来研究提供理论指导。代码已开源:https://github.com/jwliao-ai/MemQ。

原文摘要 · Abstract (English)

Episodic memory allows LLM agents to accumulate and retrieve experience, but current methods treat each memory independently, i.e., evaluating retrieval quality in isolation without accounting for the dependency chains through which memories enable the creation of future memories. We introduce MemQ, which applies TD($λ$) eligibility traces to memory Q-values, propagating credit backward through a provenance DAG that records which memories were retrieved when each new memory was created. Credit weight decays as $(γλ)^d$ with DAG depth $d$, replacing temporal distance with structural proximity. We formalize the setting as an Exogenous-Context MDP, whose factored transition decouples the exogenous task stream from the endogenous memory store. Across six benchmarks, spanning OS interaction, function calling, code generation, multimodal reasoning, embodied reasoning, and expert-level QA, MemQ achieves the highest success rate on all six in generalization evaluation and runtime learning, with gains largest on multi-step tasks that produce deep and relevant provenance chains (up to +5.7~pp) and smallest on single-step classification (+0.77~pp) where single-step updates already suffice. We further study how $γ$ and $λ$ interact with the EC-MDP structure, providing principled guidance for parameter selection and future research. Code is available at https://github.com/jwliao-ai/MemQ.

记忆增强强化学习大模型推理因果链

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