ChatPaper.aiChatPaper

ACON:優化長視野LLM代理的上下文壓縮

ACON: Optimizing Context Compression for Long-horizon LLM Agents

October 1, 2025
作者: Minki Kang, Wei-Ning Chen, Dongge Han, Huseyin A. Inan, Lukas Wutschitz, Yanzhi Chen, Robert Sim, Saravan Rajmohan
cs.AI

摘要

大型語言模型(LLMs)正日益被部署為動態、現實世界環境中的代理,其成功既需要推理能力,也需要有效利用工具。代理任務的一個核心挑戰是日益增長的上下文長度,因為代理必須累積長期的行動和觀察記錄。這種擴展增加了長期任務的成本並降低了效率,然而先前關於上下文壓縮的研究大多集中在單步任務或狹窄的應用上。我們引入了代理上下文優化(ACON),這是一個統一框架,能夠將環境觀察和互動歷史最優地壓縮為簡潔而信息豐富的摘要。ACON利用自然語言空間中的壓縮指南優化:在給定完整上下文成功但壓縮上下文失敗的配對軌跡時,能力強大的LLMs分析失敗原因,並據此更新壓縮指南。此外,我們建議將優化後的LLM壓縮器蒸餾到較小的模型中,以減少額外模塊的開銷。在AppWorld、OfficeBench和多目標問答上的實驗表明,ACON將記憶體使用量減少了26-54%(峰值詞元),同時在很大程度上保持了任務性能,當蒸餾到較小的壓縮器時保留了超過95%的準確性,並作為長期代理增強了較小的語言模型,性能提升高達46%。
English
Large language models (LLMs) are increasingly deployed as agents in dynamic, real-world environments, where success requires both reasoning and effective tool use. A central challenge for agentic tasks is the growing context length, as agents must accumulate long histories of actions and observations. This expansion raises costs and reduces efficiency in long-horizon tasks, yet prior work on context compression has mostly focused on single-step tasks or narrow applications. We introduce Agent Context Optimization (ACON), a unified framework that optimally compresses both environment observations and interaction histories into concise yet informative condensations. ACON leverages compression guideline optimization in natural language space: given paired trajectories where full context succeeds but compressed context fails, capable LLMs analyze the causes of failure, and the compression guideline is updated accordingly. Furthermore, we propose distilling the optimized LLM compressor into smaller models to reduce the overhead of the additional module. Experiments on AppWorld, OfficeBench, and Multi-objective QA show that ACON reduces memory usage by 26-54% (peak tokens) while largely preserving task performance, preserves over 95% of accuracy when distilled into smaller compressors, and enhances smaller LMs as long-horizon agents with up to 46% performance improvement.
PDF292October 2, 2025