记忆型AI代理随时间累积风险,越用越不安全。
Remembering More, Risking More: Longitudinal Safety Risks in Memory-Equipped LLM Agents

- 通过快照测试和对照基线,追踪记忆随任务积累的潜在危害。
- 记忆暴露越久,违规率显著上升,且与任务顺序无关。
- 可提前检测风险,适合长期部署的AI系统安全评估。
记忆型大模型代理的安全评估通常只关注单任务内的安全性,如在对抗性提示或记忆污染下的表现。然而,在实际部署中,一个代理会经历多个独立任务,早期任务中积累的记忆可能影响后续无关任务的行为。这要求从时间维度跨任务评估:不仅看某一时点是否安全,更要看安全状况如何随记忆累积而变化。我们称此为时间记忆污染。为此提出触发-探测协议,对固定探针集在不同前缀长度的只读记忆快照上进行评估,并引入无记忆对照基线识别记忆引发的违规。在涵盖记录、备忘录、表格和邮件的三种场景下,测试八种记忆架构及类似OpenClaw的爪形代理,结果表明记忆型代理始终超过无记忆基线,违规率随暴露时长呈稳健上升趋势。顺序随机实验显示,影响主要来自累积内容而非出现顺序。此外,事件分解揭示风险可在生成前从检索状态中被检测到,高召回诊断监控器验证了这一点。结果表明,记忆安全应被视为需时间评估的纵向属性,而非单状态快照可捕捉的特性。
原文摘要 · Abstract (English)
Safety evaluations of memory-equipped LLM agents typically measure within-task safety: whether an agent completes a single scenario safely, often under adversarial conditions such as prompt injection or memory poisoning. In deployment, however, a single agent serves many independent tasks over a long horizon, and memory accumulated during earlier tasks can affect behavior on later, unrelated ones. Studying this regime requires evaluation along the temporal dimension across tasks: not whether an agent is safe at any single memory state, but how its safety profile changes as memory accumulates across many independent interactions. We call this failure mode temporal memory contamination. To isolate memory exposure from stream non-stationarity, we introduce a trigger-probe protocol that evaluates a fixed probe set against read-only memory snapshots at varying prefix lengths, together with a NullMemory counterfactual baseline for identifying memory-induced violations. We apply this protocol across three deployment scenarios spanning records, memos, forms, and email correspondence and eight memory architectures, and additionally on Claw-like AI agents, such as OpenClaw, using the platform's native memory mechanism. Memory-enabled agents consistently exceed the NullMemory baseline, and memory-induced violation rates show a robust upward trend with exposure length on both agent classes. Order-randomization experiments indicate that the effect is driven primarily by accumulated content rather than encounter order. Finally, a structural consequence of the event decomposition is that memory-induced risk is detectable from retrieval state before generation, which we confirm with a high-recall diagnostic monitor. Our results argue for treating memory safety as a longitudinal property that requires temporal evaluation, not a single-state property that can be captured by a snapshot.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。