arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2610.38980cs.AI
收藏

世界模型的上下文压缩

Context Compaction for World Models

Boston University(波士顿大学);AllSpice Inc.(AllSpice公司)

Hayder Tirmazi

AI总结:

本文针对世界模型重新访问区域时无法一致再生的问题,构建了上下文检索基准与执行上下文压缩的智能体框架,发现上下文压缩可使世界模型在无需重训时检索4倍于上下文窗口的房间,且该方法比切换滑动窗口注意力更具优势。

摘要:

世界模型允许观测者探索并与生成的世界进行交互。近期研究表明,当观测者重新访问某个区域时,现有模型往往无法一致地再生该区域。我们将此视为一个上下文检索问题。大语言模型(LLM)智能体在其栈的两层结构中管理上下文检索:在模型层,键值缓存(KV cache)的设计决定了内存中可容纳的上下文量;在智能体框架层,Claude Code等框架会选择发送给LLM的上下文。现有关于世界模型的研究大多仅关注模型层。本文做出三项贡献:第一,我们构建了一个用于测量世界模型上下文检索的基准,该基准为每个回合生成新的世界,防止模型利用训练数据回忆房间,还将上下文检索与基于邻近帧的猜测分离开;第二,我们构建了一个针对世界模型执行上下文压缩的智能体框架,据我们所知,这是现有研究未探讨过的;第三,我们使用该基准研究了四种世界模型设计,上下文压缩使我们的世界模型在无需重新训练的情况下,能够在上下文窗口之外检索多达4倍的房间,但采用滑动窗口注意力的世界模型在“做梦”(dreaming)时会丢失大部分上下文检索能力,因此,做梦的世界智能体通过上下文压缩扩展其世界模型的覆盖范围,比在模型层切换为滑动窗口注意力更有益。

英文摘要:

World models let observers explore and interact with generated worlds. Recent work shows that when observers revisit a region, current models often fail to regenerate it consistently. We view this as a context retrieval problem. LLM agents manage context retrieval at two layers of their stack. At the model layer, the KV cache design determines how much context fits in memory. At the agent harness layer, harnesses such as Claude Code pick the context sent to the LLM. Prior work on world models has mostly focused only on the model layer. In this paper, we make three contributions. First, we build a benchmark to measure world model context retrieval. It generates new worlds for every episode, preventing a model from recalling rooms using training data. It also separates context retrieval from guesses based on nearby frames. Second, we build an agent harness that performs context compaction for world models, which to our knowledge no prior work has studied. Third, we use our benchmark to study four world model designs. Context compaction lets our world models retrieve rooms up to 4 times beyond their context window without retraining. However, world models with sliding-window attention lose most of their context retrieval when dreaming. Therefore, a dreaming world agent benefits more from extending the reach of its world model using context compaction than switching to sliding window attention at the model layer.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑