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

深入而非冗长:用于组合泛化的深度递归变压器

Thinking Deeper, Not Longer: Memory-Efficient Latent Chain-of-Thought with Depth-Recurrent Transformers for Compositional Generalization

Computer Science and Information Engineering National Central University(计算机科学与信息工程国家中央大学)

Hung-Hsuan Chen

AI总结:

本文提出深度递归变压器,通过在潜在空间中迭代应用共享权重的Transformer块,使模型在推理时能通过增加推理步骤来实现更深层次的推理。在三个组合推理领域中,该方法展示了计算前沿和不同泛化行为。

摘要:

标准Transformer具有固定的计算深度,从根本上限制了其在需要变量深度推理的任务(如多跳图遍历或嵌套逻辑)中的泛化能力。我们提出了一种深度递归Transformer,通过在潜在空间中迭代应用共享权重的Transformer块,将计算深度与参数数量解耦,使模型在推理时能够通过增加推理步骤来实现更深层次的推理。我们的架构集成了三种机制以使深度递归(20步以上)稳定:(1)一个沉默思考目标,仅监督最终输出,迫使真正的多步推理而非中间启发式捷径;(2)LayerScale初始化,以保护脆弱的推理状态免受未训练层的噪声影响;(3)一个身份偏向的递归,创建了跨多步的梯度高速公路。我们在三个具有递减归纳偏置的组合推理领域中进行了评估:图可达性(严格邻接遮蔽)、嵌套布尔逻辑(相对定位)和无结构关系文本(其中序列位置提供无结构提示)。在所有任务中,我们观察到一个清晰的计算前沿——一个边界,其中性能从偶然到接近完美随着推理步骤与任务复杂性成正比。此外,这些任务揭示了不同的泛化行为:精确但脆弱(图)、近似但稳健(逻辑)、以及无结构提示的自主潜在路由(文本)。这种进展阐明了任务不变递归推理核心与任务特定感知接口之间相互作用如何塑造分布外(OOD)泛化,提供了一种关于垂直思维链的机制视角,补充了主流的水平标记生成范式。

英文摘要:

Standard Transformers have a fixed computational depth, limiting their ability to generalize to tasks that require variable-depth reasoning. The usual remedy, Chain-of-Thought (CoT), spends tokens to reason, inflating the key--value cache, so memory becomes the limiting cost when reasoning is served over large query batches. We study a depth-recurrent Transformer that decouples computational depth from parameter count by iterating a shared-weight block, so that adding reasoning steps leaves peak inference memory unchanged and grows latency only linearly, with no token generation. Three ingredients support the recurrence over 20+ thinking steps: a silent thinking objective that supervises only the final output, LayerScale initialization, and an identity-biased gate that opens a gradient highway across steps. We characterize it on three compositional domains with decreasing structural bias: graph reachability (adjacency masking), nested boolean logic (relative positioning), and unstructured relational text (no structural positional cue). We find a \emph{computational frontier}: accuracy climbs once the thinking-step count meets the task's complexity, reaching near-perfect performance on the two structured tasks and a lower plateau on unstructured text. How it climbs depends on the structural bias---abruptly from chance on the graph task, gradually on the other two. Depth recurrence extrapolates beyond the training range: it succeeds on the graph task where fixed-depth models barely extrapolate, and on the two sequence tasks comes within two points of fixed-depth Transformers that use $4$--$6.4\times$ more parameters. On the graph task, whose adjacency mask makes propagation depth verifiable, intermediate per-step supervision---a standard recipe for deep iterative models---consistently \emph{harms} this extrapolation at widths $d \geq 256$. We release the code for reproducibility.

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

↑