arXiv:2509.25260cs.AIcs.CL2025-09中稿 · ICLR

揭示语言模型内部规划能力,看它能想多远、是否考虑多种可能。

Internal Planning in Language Models: Characterizing Horizon and Branch Awareness

  • 用压缩隐藏状态的方法,量化模型的内部规划行为。
  • 模型能记住未选正确路径,但主要依赖最近计算结果。
  • 适合研究模型可解释性与推理机制的学者。

Decoder-only语言模型在长程生成中是否具备规划能力——即组织中间计算以支持连贯输出——仍是一个关键问题,影响模型可解释性、可靠性与设计。规划涉及长期计算结构与对多种可能延续的考量,但基于Transformer的语言模型在无外部引导(如思维链提示)时的表现尚不清晰。本文通过分析Transformer核心的隐藏状态,这些状态承载中间结果和信息,但冗余且细节繁杂。为此,我们开发了基于向量量化变分自编码器的压缩管道,将隐藏状态转化为紧凑的摘要码,从而测量互信息并分析模型行为的计算结构。利用该框架,我们在合成语法、路径查找任务和自然语言数据集上研究了两个规划特性:(i) 输出前计算的规划视野,(ii) 模型对其他有效延续的考虑程度。作为该管道的下游应用,我们还分析了生成下一个词时,决策相关信息在层间和早期前缀块中的分布。结果表明,有效规划视野取决于任务;模型会隐式保留未使用正确延续的信息;预测主要依赖近期计算,但早期块仍具信息价值。

原文摘要 · Abstract (English)

The extent to which decoder-only language models (LMs) engage in planning, that is, organizing intermediate computations to support coherent long-range generation, remains an important question, with implications for interpretability, reliability, and principled model design. Planning involves structuring computations over long horizons, and considering multiple possible continuations, but how far transformer-based LMs exhibit them without external scaffolds, e.g., chain-of-thought prompting, is unclear. We address these questions by analyzing the hidden states at the core of transformer computations, which capture intermediate results and act as carriers of information. Since these hidden representations are redundant and encumbered with fine-grained details, we develop a pipeline based on vector-quantized variational autoencoders that compresses them into compact summary codes. These codes enable measuring mutual information and analyzing the computational structure of the underlying model behavior. Using this framework, we study planning in LMs across synthetic grammar, path-finding tasks, and natural language datasets, focusing on two planning properties: (i) the planning horizon of pre-output computations, and (ii) the extent to which the model considers alternative valid continuations. As a separate downstream use of the same pipeline, we also analyze how decision-relevant information is distributed across layers and earlier prefix blocks when producing next-token predictions. Together, these analyses advance our understanding of planning in LMs and provide a general-purpose pipeline for inspecting internal model dynamics. Our results reveal that the effective planning horizon is task-dependent, that models implicitly preserve information about unused correct continuations, and that predictions draw most on recent computations, though earlier blocks remain informative.

语言模型内部规划可解释性隐藏状态

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。