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

训练大型语言模型在连续潜在空间中进行推理

Training Large Language Models to Reason in a Continuous Latent Space

FAIR at Meta(Meta 的 FAIR)

Shibo Hao, Sainbayar Sukhbaatar, DiJia Su, Xian Li, Zhiting Hu, Jason Weston, Yuandong Tian

AI总结:

本文提出名为Coconut的连续思维链新范式,将LLM推理状态表示为连续潜在空间中的隐藏状态,支持广度优先搜索,在需大量搜索的逻辑推理任务上优于CoT,实现更优的准确率效率权衡。

摘要:

大型语言模型(LLMs)通常被限制在语言空间中进行推理,它们通过思维链(Chain-of-Thought, CoT)来表达推理过程以解决复杂问题。然而,语言空间可能并非总是推理的最优选择:大多数词元主要用于确保文本连贯性,对推理并非必需,而一些关键推理步骤需要复杂规划,会给LLMs带来挑战。为探索超越语言的推理潜力,本文引入名为Coconut(连续思维链,Chain of Continuous Thought)的新范式。Coconut将LLM的最后隐藏状态作为推理状态的表示,称为“连续思维”;它不将该状态解码为单词,而是直接在连续空间中作为下一个输入嵌入反馈给模型。这种潜在推理范式支持更高级的推理模式,连续思维可编码多个备选下一步,使模型能执行广度优先搜索(BFS),而非像CoT那样过早确定单一确定路径。在规划时需要大量搜索的逻辑推理任务上,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.

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

↑