[论文解读] Reasoning Beyond Words ? Exploring framework for hidden state reasoning
本文介绍 Coconut,一种连续思维链(潜在推理)范式,使大模型能够在连续潜在空间中而非语言空间进行推理,采用多阶段课程和潜在搜索模式,在需要规划的任务上可超越传统的 CoT。
Large language models (LLMs) are typically constrained to reason in the language space, where they express the reasoning process through a chain-of-thought (CoT) to solve complex problems. However, the language space may not always be optimal for reasoning. Most word tokens primarily ensure textual coherence and are not essential for reasoning, while some critical tokens require complex planning and pose challenges to LLMs. To explore the potential of reasoning beyond language, we introduce a new paradigm called Coconut (Chain of Continuous Thought). Coconut utilizes the last hidden state of the LLM as a representation of the reasoning state, termed "continuous thought." Instead of decoding this state into words, we feed it back to the model as the next input embedding directly in the continuous space. This latent reasoning paradigm enables an advanced reasoning pattern, where continuous thoughts can encode multiple alternative next steps, allowing the model to perform a breadth-first search (BFS) rather than committing prematurely to a single deterministic path as in CoT. Coconut outperforms CoT on logical reasoning tasks that require substantial search during planning and achieves a better trade-off between accuracy and efficiency.
研究动机与目标
- 在语言基于推理的局限性面前,激发在潜在、无语言空间中的推理。
- 提出 Coconut 框架,将连续隐藏状态作为模型的下一输入输入。
- 证明潜在推理能够实现类似广度优先搜索的规划,并在某些任务上超越标准 CoT。
- 展示多阶段课程能有效地从语言基础的 CoT 监督中训练潜在推理。
提出的方法
- 通过在语言模式与潜在模式之间交替定义 Coconut,在潜在模式下将最后一隐藏状态作为下一输入嵌入。
- 引入 <bot> 与 <eot> 标记来标记潜在推理区间并在训练与推理阶段包裹连续思考。
- 使用多阶段课程训练,逐步用 c 个连续思考替代语言推理步骤(c 控制每步的潜在思考数量)。
- 使用带掩码的标准交叉熵损失进行训练,同时允许对连续思考进行反向传播。
- 通过贪心解码在潜在模式与语言模式之间切换推理,潜在模式长度采用固定值或分类器引导的决定。
- 在 GSM8k 上进行数学推理、在 ProntoQA 上进行逻辑推理、在 ProsQA 上进行需要广泛计划的推理,并将结果与 CoT、No-CoT、iCoT 以及 Pause-token 基线进行比较。
实验结果
研究问题
- RQ1潜在的连续思考是否能比基于语言的链条在大模型中实现更高效更有效的推理?
- RQ2多阶段课程是否比端到端的潜在训练更有效地训练潜在推理?
- RQ3在哪些推理任务中,潜在空间推理能超越传统的链式思维?
- RQ4潜在推理如何表示规划与回溯,并且是否可以被解释为潜在搜索树?
主要发现
- 连续思考在所有三个数据集上相对于 No-CoT 提高了推理准确性。
- 在 ProntoQA 和 ProsQA 上,Coconut 的变体在最终准确率上超过 CoT,同时生成的 token 数更少,表明效率和规划的提升。
- 在 GSM8k 上,增加每步语言步骤中的潜在思考数量 c,表现更好,暗示潜在空间中的连锁效应。
- ProsQA 在需要大量规划的任务中显示出潜在推理的优势,而 CoT 表现不佳。
- 多阶段课程至关重要;移除它(无课程)会恶化性能,尤其是在没有潜在思考时。
更好的研究,从现在开始
从论文设计到论文写作,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。