[论文解读] Chain of Thought Empowers Transformers to Solve Inherently Serial Problems
该论文提供一个理论框架,表明链式思维(CoT)使恒深变换器能够执行本质上是串行的计算,扩展了超出标准 TC0/AC0 边界的表达能力,并与经验任务相印证。
Instructing the model to generate a sequence of intermediate steps, a.k.a., a chain of thought (CoT), is a highly effective method to improve the accuracy of large language models (LLMs) on arithmetics and symbolic reasoning tasks. However, the mechanism behind CoT remains unclear. This work provides a theoretical understanding of the power of CoT for decoder-only transformers through the lens of expressiveness. Conceptually, CoT empowers the model with the ability to perform inherently serial computation, which is otherwise lacking in transformers, especially when depth is low. Given input length $n$, previous works have shown that constant-depth transformers with finite precision $\mathsf{poly}(n)$ embedding size can only solve problems in $\mathsf{TC}^0$ without CoT. We first show an even tighter expressiveness upper bound for constant-depth transformers with constant-bit precision, which can only solve problems in $\mathsf{AC}^0$, a proper subset of $ \mathsf{TC}^0$. However, with $T$ steps of CoT, constant-depth transformers using constant-bit precision and $O(\log n)$ embedding size can solve any problem solvable by boolean circuits of size $T$. Empirically, enabling CoT dramatically improves the accuracy for tasks that are hard for parallel computation, including the composition of permutation groups, iterated squaring, and circuit value problems, especially for low-depth transformers.
研究动机与目标
- 动机与特性:解释为何链式思维提示能提升仅解码器的变换器的推理能力。
- 在有限精度下,提供一个形式化的表达能力框架,对比包含与不包含 CoT 的变换器。
- 证明 CoT 使得具有有限嵌入的恒深变换器能够模拟电路大小的计算。
- 将理论与经验任务结合,说明在何时 CoT 能帮助解决本质上串行的问题。
提出的方法
- 在电路复杂性视角下定义有限精度变换器模型及其 CoT 扩展。
- 建立带 CoT 的变换器表达能力的复杂性类,包括 CoT[T(n),d(n),s(n),e(n)]。
- 推导并证明上界,表明在现实舍入下,CoT 能将表达能力提升超出 AC0/TC0。
- 证明 CoT 允许在多项式数量的 CoT 步骤下模拟大小为 T 的电路计算。
- 给出经验任务(模加、置换合成、迭代平方、线路值)以验证理论主张。
实验结果
研究问题
- RQ1随着电路规模增大,具备 CoT 的恒深、有限精度的变换器是否能表达超出 TC0/AC0 的函数?
- RQ2带有与不带 CoT 的变换器的精确复杂性界限(如 AC0、TC0、P/poly)是什么?
- RQ3CoT 如何影响低深度变换器解决本质上串行任务的能力?
- RQ4经验任务是否与理论预测一致,即在何时 CoT 能带来增益?
主要发现
- 在某些设定下,未含 CoT 的恒精度变换器被包含在 AC0 内,属于 TC0 的严格子集。
- 经过 T 步 CoT,使用恒比特精度和 O(log n) 嵌入的恒深变换器可以表达任何大小为 T 的电路可计算的函数。
- 使用多项式数量的 CoT 步骤,变换器可以计算 P/poly 中的所有电路,意味着极大地扩展了表达能力。
- 推论表明,所有正规语言都可以通过带线性或对数基础的配置的 CoT 解决。
- 经验任务表明,CoT 能解决本质上串行的问题(例如置换组成、迭代平方、线路值),这是并行计算在低深度难以处理的。
- 结果涵盖了对需要串行计算任务的理论界限与实际演示。
阅读本论文
在 Nubint 阅读器中打开原文,边读边就任意段落提问。
在 Nubint 中阅读本论文本解读由 AI 根据论文原文生成,引用前请核对原文。