让Transformer通过循环推理实现深度思维,突破固定计算深度限制。
Thinking Deeper, Not Longer: Depth-Recurrent Transformers for Compositional Generalization
- 用共享权重的循环结构在隐空间反复推理,不增加参数量即可加深思考过程。
- 20步以上迭代推理时性能从随机水平跃升至接近完美,展现明确的计算前沿。
- 适合需要复杂多跳推理的任务,如图路径判断、嵌套逻辑和无结构文本理解。
标准Transformer具有固定的计算深度,从根本上限制了其在需要可变深度推理任务(如多跳图遍历或嵌套逻辑)中的泛化能力。我们提出一种深度循环Transformer,通过在隐空间中迭代应用共享权重的Transformer模块,将计算深度与参数量解耦——使模型可在推理时通过增加循环步数实现更深层次的推理。该架构引入三种机制以确保深度循环(20+步)的稳定性:(1) 静默思考目标,仅对最终输出进行监督,迫使模型进行真实的多步推理而非中间启发式捷径;(2) LayerScale初始化,保护脆弱的推理状态免受未训练层噪声影响;(3) 带身份偏置的循环结构,在多步间形成梯度高速公路。我们在三个组合推理任务上评估:图可达性(严格邻接掩码)、嵌套布尔逻辑(相对位置依赖)和非结构化关系文本(序列位置无结构提示)。在所有任务中均观察到清晰的‘计算前沿’——随着思考步数随任务复杂度增长,性能从随机水平跃升至近完美。此外,这些任务揭示了不同类型的泛化行为:精确但脆弱(图)、近似但鲁棒(逻辑)、无需结构提示的自主隐空间路由(文本)。这一进展揭示了任务无关的循环推理核心与任务相关的感知接口之间的相互作用如何塑造分布外(OOD)泛化,为垂直链式思维提供了机制视角,补充了主流的水平生成范式。
原文摘要 · Abstract (English)
Standard Transformers have a fixed computational depth, fundamentally limiting their ability to generalize to tasks requiring variable-depth reasoning, such as multi-hop graph traversal or nested logic. We propose a depth-recurrent Transformer that decouples computational depth from parameter count by iteratively applying a shared-weight Transformer block in latent space -- enabling the model to trade recurrence steps for deeper reasoning at inference time. Our architecture incorporates three mechanisms to make deep recurrence (20+ steps) stable: (1) a silent thinking objective that supervises only the final output, forcing genuine multi-step reasoning rather than intermediate heuristic shortcuts; (2) LayerScale initialization to protect fragile reasoning states from untrained layer noise; and (3) an identity-biased recurrence that creates a gradient highway across many steps. We evaluate on three compositional reasoning domains with decreasing inductive biases: graph reachability (strict adjacency masking), nested boolean logic (relative positioning), and unstructured relational text (where sequence position provides no structural hints). Across all tasks, we observe a clear \emph{computational frontier} -- a boundary where performance transitions from chance to near-perfect as thinking steps scale with task complexity. Moreover, these tasks reveal qualitatively different generalization behaviors: precise but brittle (graph), approximate but robust (logic), and autonomous latent routing without structural hints (text). This progression illuminates how the interplay between a task-invariant recurrent reasoning core and task-specific perceptual interfaces shapes out-of-distribution (OOD) generalization, offering a mechanistic perspective on vertical chain-of-thought that complements the prevailing horizontal token-generation paradigm.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。