发现大模型代理的计划无法持久保留,依赖上下文存续而非内部记忆。
Plans Don't Persist: Why Context Management Is Load Bearing for LLM Agents
- 通过对比有无计划的运行轨迹,测量隐藏状态距离诊断信息衰减
- 计划信号在一步后下降4.1倍,热力图任务中下降12.4倍,表明计划未被持久存储
- 提出严格剥离法解决推理痕迹干扰,提升信号恢复率超150%
长周期代理依赖上下文管理:系统压缩、总结并丢弃旧标记以延续任务。这仅在被丢弃信息不再需要或已被内化时才安全。计划是典型压力场景:早期写出,多步使用,最早被丢弃。我们引入重放配对(replay pairing)诊断法,比较同一轨迹在有无计划历史下的隐藏状态余弦距离。在Llama-3.1-70B上,计划信号在计划后一步达0.453,随后单个动作-观察步骤下降4.1倍;HotpotQA任务下降12.4倍。这表明标准大模型代理无法将计划作为持久状态保留,而是依赖计划仍存在于上下文中。第L32层探测器可检测此衰减,但不证明其读取了计划内容本身。推理模型引入测量混淆:`<think>` 轨迹会重新推导计划内容,导致常规剥离法仍保留计划证据。我们称之为‘推理痕迹混淆’,并通过严格剥离法解决——仅移除剥离运行中的前序`<think>`块。该方法在样本内恢复+163%信号,样本外恢复+153%,对非推理模型(如Llama)影响微小(+4.8%)。在DeepSeek-R1-Distill-Llama-70B上,基于Llama训练的探测器迁移性能为AUROC 0.748(p=6e-4),而专用探针达到1.000,表明R1以不同隐藏状态方向编码计划信号。最后,压缩压力测试显示实际代价:简单丢弃计划使ALFWorld成功率下降34.7个百分点,而探测器引导的重新浮现未能恢复。贡献在于建立一套测量与压力测试框架,揭示关键信息可能仅存于上下文中而非持久存在。上下文管理至关重要,但仅保护计划不足以解决问题。
原文摘要 · Abstract (English)
Long-horizon agents depend on context management: systems compress, summarize, and evict old tokens so tasks can continue beyond finite windows. That is safe only when dropped information is no longer needed or has been internalized. Plans are the stress case: they are written early, used for many steps, and first to be evicted. We introduce replay pairing, a diagnostic that runs the same trajectory with and without the plan in history and measures hidden-state cosine distance. On Llama-3.1-70B, plan signal spikes to 0.453 one step after the plan, then falls 4.1x in a single action-observation step; HotpotQA falls 12.4x. This is evidence that standard LLM agents do not carry plans forward as persistent state, and instead depend on the plan remaining in context. A layer-L32 probe detects this decay as a diagnostic, not as proof that it reads plan content itself. Reasoning models add a measurement confound: their `<think>` traces re-derive plan content, so standard stripping leaves plan evidence in the stripped condition. We name this the reasoning-trace confound and fix it with strict stripping, which removes prior `<think>` blocks from the stripped run only. It recovers +163% of the step+1 signal in-sample and +153% held out, while not meaningfully changing non-reasoning Llama (+4.8%). On DeepSeek-R1-Distill-Llama-70B, a Llama-trained probe transfers at AUROC 0.748 (p=6e-4), while R1-specific probes reach 1.000, suggesting R1 encodes plan signal in a different hidden-state direction. Finally, a compression stress test shows the practical cost: naive plan eviction cuts ALFWorld success by 34.7pp, while probe-gated re-surfacing does not recover it. The contribution is a measurement and stress-test framework showing that agent-critical information can be context-resident rather than persistent. Context management is load bearing, but plan protection alone is not enough.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。