修复记忆错误时只回滚必要部分,既纠错又保留有效信息。
From Faulty Memories to Corrected Actions: Dependency-Guided Rollback Repair for Memory-Augmented Agents

- 构建记忆-动作依赖图,精准定位故障影响范围。
- 在150个测试用例中实现85.3%的恢复率,优于现有方法。
- 适合需长期记忆且对错误容忍度低的智能体系统。
持久化记忆使语言模型智能体能在会话间复用信息,但也导致错误持久化:污染、过时或误标的信息会持续影响推理、工具使用、回答及后续记忆写入。现有防御手段多为检测或删除可疑记忆,或修正当前响应。但删除源头无法清除已传播的结论、行为和衍生记忆;重置存储或重放完整轨迹则破坏良性状态并重复冗余计算。为此,我们提出后失败记忆恢复:给定失败执行与诊断出的故障记忆,恢复答案与持久状态的同时保留未受影响的工作。我们的依赖引导回滚修复方法基于运行时溯源构建带类型的记忆-动作图,追踪显式下游依赖,保留具有独立可信支持的候选项,禁用无支持的记忆状态,并仅选择性重播与答案相关的受影响计算。我们在一个涵盖三个工具使用领域、四种记忆故障类型的150例受控基准上评估该方法,并在基于LongMemEval-V2改编的50例轨迹压力测试中验证。在受控基准上,恢复率达85.3%,优于最佳对比方法的77.3%,完全移除诊断出的故障记忆,完整保留良性记忆,且仅需选择性重播,LLM调用成本适中。在适配子集上,恢复率达68.0%,高于次优方法的54.0%,同时获得最高声明无效化F1(0.669 vs 0.603)。结果表明,该方法在修复故障记忆状态的同时,实现了良好的恢复-成本权衡,虽非始终更优的轨迹重建,但显著提升了记忆修复效率。
原文摘要 · Abstract (English)
Persistent memory lets language-model agents reuse information across sessions, but it also makes errors durable: a poisoned, stale, or misattributed record can alter reasoning, tool use, answers, and subsequent memory writes. Existing defenses mainly detect or delete suspicious memories, or revise the current response. Deleting the source leaves already propagated claims, actions, and derived memories active, whereas resetting the store or replaying the full trace destroys benign state and repeats unnecessary computation. We therefore formulate \textbf{post-failure memory recovery: } \textit{given a failed execution and diagnosed faulty memories, recover both the answer and persistent state while retaining unaffected work.} Our \textbf{dependency-guided rollback repair} builds a typed memory-to-action graph from runtime provenance, traces explicit downstream dependencies, preserves candidates with independent trusted support, deactivates unsupported memory state, and selectively replays only answer-relevant affected computation. We evaluate this approach on a 150-case controlled benchmark spanning three tool-use domains and four memory failure types, and on a 50-case trajectory-derived stress test adapted from LongMemEval-V2. On the controlled benchmark, it achieves 85.3\% recovery versus 77.3\% for the best competing recovery method, removes all diagnosed faulty memories, preserves all benign memories, and requires only selective replay with modest LLM-call cost. On the adapted subset, it reaches 68.0\% recovery versus 54.0\% for the next best method, while also achieving the highest claim invalidation F1, 0.669 versus 0.603. Overall, the results do not imply uniformly better trace reconstruction, but show that dependency-guided rollback repair provides a strong recovery--cost trade-off while repairing faulty memory state and preserving benign memory.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。