Planning with Transformers: Chain of Computation and Structured Context Windows

📄 arXiv: 2607.17710v1 📥 PDF

作者: Ehsan Futuhi, Nathan R. Sturtevant

分类: cs.LG

发布日期: 2026-07-20


💡 一句话要点

提出链式计算架构以解决规划问题

🎯 匹配领域: 支柱二:RL算法与架构 (RL & Architecture) 支柱九:具身大模型 (Embodied Foundation Models)

关键词: 大型语言模型 规划问题 变换器架构 链式计算 结构化上下文窗口 汉诺塔问题 模式匹配 自动化决策

📋 核心要点

  1. 现有的大型语言模型在规划问题上表现不佳,无法可靠地解决复杂的任务。
  2. 提出链式计算(COC)架构,通过将变换器模型放入迭代循环中,利用其模式匹配能力来学习规划策略。
  3. 实验结果显示,使用追加式结构化上下文窗口的小型模型在多个规划领域中成功率超过99.89%,并能有效处理汉诺塔问题。

📝 摘要(中文)

大型语言模型(LLMs)在机器学习多个领域产生了显著影响,但在解决规划问题时表现不佳。本文探讨了LLMs的理论计算能力与实际规划性能之间的差距,提出了链式计算(COC)架构,将基于变换器的语言模型置于迭代循环中,利用其模式匹配能力。COC使用结构化上下文窗口(SCW),在每个规划步骤中选择合适的窗口。实验表明,使用追加式SCW的小型LLMs能够在BlocksWorld和煎饼问题上实现超过99.89%的成功率,并能有效解决最多20个盘子的汉诺塔问题。

🔬 方法详解

问题定义:本文旨在解决大型语言模型在规划问题上的不足,现有方法在复杂任务中表现不稳定,无法充分利用其理论计算能力。

核心思路:提出链式计算(COC)架构,将变换器模型嵌入迭代循环中,利用其强大的模式匹配能力来学习规划策略和预测世界模型。

技术框架:COC架构包括一个结构化上下文窗口(SCW),该窗口在每个规划步骤中提供固定大小的上下文,并允许选择合适的窗口。模型通过学习规划策略和执行所需的算术运算来进行规划。

关键创新:COC的主要创新在于将变换器模型与迭代规划相结合,利用追加式SCW使得即使是小型模型也能在复杂任务中实现高成功率,这与传统方法有本质区别。

关键设计:在设计中,使用了追加式SCW,类似于图灵机的带,允许模型在有限的训练数据下进行有效学习,且通过符号支持的算术或确定性下推自动机(PDA)形式化来减少训练数据需求。

🖼️ 关键图片

fig_0
fig_1
fig_2

📊 实验亮点

实验结果显示,使用链式计算架构的小型语言模型在BlocksWorld和煎饼问题上成功率超过99.89%。在汉诺塔问题中,模型能够解决最多20个盘子的实例,所需的动作超过100万次,同时显著减少了训练数据的需求。

🎯 应用场景

该研究的潜在应用领域包括机器人规划、自动化决策系统和智能游戏AI等。通过提升模型在复杂规划任务中的表现,能够为实际应用提供更高效的解决方案,推动智能系统的进一步发展。

📄 摘要(原文)

Large Language Models (LLMs) have had a remarkable impact across many areas of machine learning. However, recent studies have shown that they struggle to reliably solve planning problems. At the same time, theoretical results have shown that transformers, the core architecture underlying modern LLMs, are Turing-complete. In this work, we investigate this apparent gap between the theoretical computational power of LLMs and their empirical planning performance. We propose Chain of Computation (COC), a computational architecture that places a transformer-based LM inside an iterative loop, leveraging its strength as a pattern-matching system. The COC uses a Structured Context Window (SCW) which provides a constant-sized context window with support for choosing which window is used at each planning step. Within this architecture, the LM is able to learn a planning policy, predicts the world model, and performs the arithmetic operations required during planning. We show that, when given an append-only SCW (resembling a Turing Machine tape), even relatively small LMs trained from scratch can learn planning policies and generalize from a small number of training instances within each planning domain, achieving success rates above 99.89\% on BlocksWorld and the Pancake puzzle. Our analysis of failure cases in Tower of Hanoi (TOH) reveals that they arise from arithmetic operations or from encountering previously unseen tokens. We show that COC can solve TOH problem instances with up to 20 disks, requiring over 1 million actions, while requiring substantially less training data by either (1) planning with symbolical support for arithmetic or by (2) using a deterministic pushdown automaton (PDA) formulation for the SCW.