跳到正文
Apple Machine Learning Research·· 1 天前AI 评分44

约翰霍普金斯大学提出 SELFCOMPACT:让语言模型智能体自主决定何时压缩上下文

Self-Compacting Language Model Agents

AI 导读

约翰霍普金斯大学提出 SELFCOMPACT,让模型自身决定何时及如何压缩上下文,无需微调或外部监督。该方法结合压缩工具与轻量级评分规则,在六项基准、七个模型上匹配或超越固定间隔摘要,数学任务最高提升 18.1 分,智能体搜索提升 5–9 分,每题成本降低 30–70%。

正文

AuthorsTianjian Li†, Jingyu Zhang†, William Jurayj†, Xi Wang†, Chuanyang Jin†, Mehrdad Farajtabar, Eric Nalisnick†, Daniel Khashabi†

Long agent traces composed of chains of thought and tool calls accumulate stale content that anchor subsequent generations, and eventually outgrow the context window. Existing scaffolds mitigate it with fixed-interval compaction triggered at a token threshold. Such triggers pay no heed to trajectory structure, risking discard of partial results mid-derivation or mid-search. We propose SELFCOMPACT, a scaffold that allows the model itself to decide when and how to compact. Specifically, it pairs two inference-time elements: (i) a compaction tool the model invokes to summarize the accumulated context, and (ii) a lightweight rubric specifying when to fire (a sub-task has resolved, or the trajectory is converging) and when to suppress (mid-derivation, or when stuck). Both are needed. The tool alone is unevenly used across open-weight models, often invoked at unhelpful moments or not at all; the rubric alone cannot act. Together, they elicit effective adaptive compaction without any fine-tuning or external supervision. We present empirical results on six benchmarks (competitive math and agentic search) and seven models. Our results show that SELFCOMPACT matches or exceeds fixed-interval summarization at a fraction of the token cost, improving over a no-summarization baseline by up to 18.1 points on math and 5–9 points on agentic search at 30–70% lower per-question cost. Our results expose a meta-cognitive gap: although unprompted models cannot reliably tell when their own context is rotting, a lightweight rubric closes this gap, reframing when to compact as a capability that scaffolds can supply without training.

  • † Johns Hopkins University

Related readings and updates.

Training a single LLM agent jointly across diverse interactive environments has attracted increasing attention as a route to generalist agents. Existing curriculum and data-selection strategies often allocate training at the environment level or prioritize local reward-based signals, without explicitly considering relationships between current rollouts across environments for prompt-group selection. Meanwhile, as environments are learned at…

Read more

Designing effective reward signals for open-domain question answering is challenging because high-quality responses must simultaneously satisfy multiple aspects of answer quality that are difficult to capture with a holistic scalar objective. We introduce a rubric-based reward framework that generates query-specific rubrics grounded in retrieved evidence and decomposed into multiple quality dimensions, providing fine-grained supervision during…

Read more

来源:Apple Machine Learning Research · machinelearning.apple.com