계획은 지속되지 않는다: LLM 에이전트에서 컨텍스트 관리가 중요한 이유
Plans Don't Persist: Why Context Management Is Load Bearing for LLM Agents
장기적인 목표를 수행하는 에이전트는 컨텍스트 관리에 의존합니다. 컨텍스트 관리 시스템은 정보를 압축하고 요약하며, 더 이상 필요하지 않거나 내부화된 정보는 제거하여 작업이 제한된 범위를 넘어 계속될 수 있도록 합니다. 이는 삭제된 정보가 더 이상 필요하지 않거나 이미 학습되었을 때만 안전합니다. 계획은 이러한 경우에 특히 중요합니다. 계획은 초기에 작성되어 여러 단계에서 사용되며, 가장 먼저 제거되는 경향이 있습니다. 본 연구에서는 '리플레이 페어링(replay pairing)'이라는 진단 방법을 소개합니다. 이 방법은 동일한 경로를 계획 정보가 포함된 상태와 포함되지 않은 상태로 실행하고, 숨겨진 상태 벡터의 코사인 거리를 측정합니다. Llama-3.1-70B 모델에서, 계획 정보는 계획이 사용된 단계를 기준으로 0.453까지 급증하지만, 이후 하나의 액션-관찰 단계마다 4.1배 감소하며, HotpotQA 데이터셋에서는 12.4배 감소합니다. 이는 표준 LLM 에이전트가 계획을 지속적인 상태로 유지하지 않고, 오히려 계획 정보가 컨텍스트 내에 존재하는 것에 의존한다는 증거입니다. L32 레이어에서 수행된 탐색(probe)은 이러한 감소 현상을 진단하는 데 사용되며, 모델이 실제로 계획 내용을 읽는다는 것을 입증하는 것은 아닙니다. 추론 모델은 추가적인 변수를 도입합니다. 이들의 `<think>` 트레이스는 계획 내용을 재구성하므로, 일반적인 정보 제거 방식으로는 계획 관련 정보를 완전히 제거할 수 없습니다. 우리는 이를 '추론-트레이스 혼란(reasoning-trace confound)'이라고 명명하고, 이전의 `<think>` 블록을 제거하는 엄격한 방법으로 해결했습니다. 이 방법은 학습 데이터셋에서 +163%, 검증 데이터셋에서 +153%의 성능 향상을 가져왔으며, 추론 능력이 없는 Llama 모델에서는 거의 변화가 없었습니다 (+4.8%). DeepSeek-R1-Distill-Llama-70B 모델에서, Llama로 학습된 탐색 도구는 AUROC 0.748 (p=6e-4)의 성능을 보이지만, R1에 특화된 탐색 도구는 1.000의 완벽한 성능을 달성합니다. 이는 R1 모델이 계획 정보를 다른 숨겨진 상태 공간에서 인코딩한다는 것을 시사합니다. 마지막으로, 압축 스트레스 테스트를 통해 실제적인 비용을 확인했습니다. 단순하게 계획 정보를 제거하면 ALFWorld 작업 성공률이 34.7pp 감소하며, 탐색 도구를 사용하여 계획 정보가 다시 등장하도록 하는 방법으로는 이러한 손실을 복구할 수 없습니다. 본 연구의 기여는 에이전트에 중요한 정보가 지속적인 상태로 저장되는 것이 아니라 컨텍스트 내에 존재하는 경우도 있다는 것을 보여주는 측정 및 스트레스 테스트 프레임워크입니다. 컨텍스트 관리는 매우 중요하지만, 계획 보호만으로는 충분하지 않습니다.
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.
No Analysis Report Yet
This paper hasn't been analyzed by Gemini yet.
Log in to request an AI analysis.