让大模型在连续潜空间推理,提升复杂问题求解效率
Training Large Language Models to Reason in a Continuous Latent Space
- 用模型隐藏状态作为连续思维,直接回输到模型中
- 在逻辑推理任务上超越链式思维,搜索效率更高
- 适合需要多路径探索的复杂推理场景
大语言模型通常在语言空间中进行推理,通过思维链(CoT)表达推理过程以解决复杂问题。然而,语言空间未必是最优的推理环境:多数词元主要保证文本连贯性,而非推理关键;部分关键词元需复杂规划,对模型构成挑战。为探索超越语言的推理潜力,我们提出新范式 Coconut(连续思维链)。Coconut 将 LLM 最后隐藏状态作为推理状态表示,称为「连续思维」,不将其解码为词语,而是直接以连续空间形式回输为下一轮输入嵌入。该潜空间推理机制支持编码多个候选下一步,使模型能执行广度优先搜索(BFS),而非像 CoT 那样过早确定单一路径。Coconut 在需大量规划搜索的逻辑推理任务上优于 CoT,且在准确率与效率间取得更好平衡。
原文摘要 · Abstract (English)
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.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。