连续思维通过叠加态并行搜索,显著提升大模型图推理能力
Reasoning by Superposition: A Theoretical Perspective on Chain of Continuous Thought
- 用连续思维向量的叠加态同时编码多个搜索路径,实现并行广度优先搜索
- 仅需图直径D步即可解决有向图可达性问题,远少于离散思维所需的O(n²)步
- 训练中自动涌现多路径并行探索,无需额外监督,适合复杂推理任务
大型语言模型在链式思维(CoTs)技术下展现出卓越性能,能通过生成“思考标记”来解决复杂推理问题。尽管已有理论表明离散链式思维可增强模型能力,但连续链式思维为何在诸如有向图可达性这类基础图推理任务中表现更优,仍缺乏理论解释。本文证明:一个两层Transformer配合D步连续链式思维可解决有向图可达性问题,其中D为图的直径;而采用离散链式思维的常数深度Transformer需O(n²)解码步,其中n为顶点数(D < n)。我们的构造中,每个连续思维向量作为叠加态,同时编码多个搜索前沿(即并行广度优先搜索),而离散链式思维只能从叠加态中选择单一路径,导致串行搜索,耗时更多且易陷入局部最优。我们还通过大量实验验证,理论构造与训练动态得到的实证解高度一致。值得注意的是,多路径叠加态的编码在训练连续链式思维时会自然涌现,无需显式监督引导模型同时探索多条路径。
原文摘要 · Abstract (English)
Large Language Models (LLMs) have demonstrated remarkable performance in many applications, including challenging reasoning problems via chain-of-thoughts (CoTs) techniques that generate ``thinking tokens'' before answering the questions. While existing theoretical works demonstrate that CoTs with discrete tokens boost the capability of LLMs, recent work on continuous CoTs lacks a theoretical understanding of why it outperforms discrete counterparts in various reasoning tasks such as directed graph reachability, a fundamental graph reasoning problem that includes many practical domain applications as special cases. In this paper, we prove that a two-layer transformer with $D$ steps of continuous CoTs can solve the directed graph reachability problem, where $D$ is the diameter of the graph, while the best known result of constant-depth transformers with discrete CoTs requires $O(n^2)$ decoding steps where $n$ is the number of vertices ($D<n$). In our construction, each continuous thought vector is a superposition state that encodes multiple search frontiers simultaneously (i.e., parallel breadth-first search (BFS)), while discrete CoTs must choose a single path sampled from the superposition state, which leads to sequential search that requires many more steps and may be trapped into local solutions. We also performed extensive experiments to verify that our theoretical construction aligns well with the empirical solution obtained via training dynamics. Notably, encoding of multiple search frontiers as a superposition state automatically emerges in training continuous CoTs, without explicit supervision to guide the model to explore multiple paths simultaneously.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。