计划不会持久:为什么上下文管理对LLM代理至关重要
Plans Don't Persist: Why Context Management Is Load Bearing for LLM Agents
AI总结:
本文通过重放配对诊断和压缩压力测试,证明标准LLM代理不将计划作为持久状态携带,而是依赖上下文中的计划,并揭示了推理模型的推理痕迹混淆问题。
摘要:
长时域代理依赖于上下文管理:系统压缩、总结和驱逐旧标记,以便任务可以在有限窗口之外继续。只有当被丢弃的信息不再需要或已被内化时,这才是安全的。计划是压力案例:它们被早期编写,用于许多步骤,并且首先被驱逐。我们引入了重放配对,这是一种诊断方法,它在历史记录中有和没有计划的情况下运行相同的轨迹,并测量隐藏状态的余弦距离。在Llama-3.1-70B上,计划信号在计划后一步达到0.453的峰值,然后在单个动作-观察步骤中下降4.1倍;HotpotQA下降12.4倍。这证明了标准LLM代理不将计划作为持久状态向前携带,而是依赖于计划保留在上下文中。层L32探针检测到这种衰减作为诊断,而不是证明它本身读取计划内容。推理模型增加了一个测量混淆:它们的`<think>`痕迹重新推导计划内容,因此标准剥离会在剥离条件下留下计划证据。我们将此命名为推理痕迹混淆,并通过严格剥离修复它,该剥离仅从剥离运行中移除先前的`<think>`块。它在样本内恢复了步骤+1信号的+163%,在样本外恢复了+153%,同时没有显著改变非推理Llama(+4.8%)。在DeepSeek-R1-Distill-Llama-70B上,Llama训练的探针以AUROC 0.748(p=6e-4)转移,而R1特定的探针达到1.000,表明R1以不同的隐藏状态方向编码计划信号。最后,压缩压力测试显示了实际成本:天真的计划驱逐使ALFWorld成功率降低34.7个百分点,而探针门控的重新浮现并未恢复它。贡献是一个测量和压力测试框架,表明代理关键信息可能是上下文驻留的,而不是持久的。上下文管理是承重的,但仅保护计划是不够的。
英文摘要:
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.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。