arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2502.17416cs.CLcs.AIcs.LG
收藏

潜在思维推理:循环Transformer的威力

Reasoning with Latent Thoughts: On the Power of Looped Transformers

Google Research(谷歌研究院);Toyota Technological Institute at Chicago(芝加哥丰田理工学院)

Nikunj Saunshi, Nishanth Dikkala, Zhiyuan Li, Sanjiv Kumar, Sashank J. Reddi

AI总结:

本研究证明循环Transformer能以较少参数实现深层推理,在合成与语言建模任务上媲美深层模型,并揭示其与思维链推理的联系,提出有效正则化方法。

摘要:

大型语言模型展现出卓越的推理能力,扩展定律表明,大参数规模(尤其是深度维度)是主要驱动因素。在本工作中,我们提出一个更强的论断——许多推理问题需要较大的深度,但不一定需要大量参数。这为循环模型在推理中的新应用打开了大门。首先,我们表明,对于许多合成推理问题,如加法、$p$-跳归纳和数学问题,一个$k$层Transformer循环$L$次几乎可以匹配$kL$层非循环模型的性能,并且显著优于$k$层模型。理论结果进一步证实了这一点,表明许多此类推理问题可以通过迭代算法解决,因此可以使用具有接近最优深度的循环模型有效解决。或许令人惊讶的是,这些优势也转化到语言建模的实际场景中——在许多下游推理任务上,一个$k$层语言模型循环$L$次可以与$kL$层语言模型竞争,甚至更好。事实上,我们的实证分析揭示了一个有趣的现象:循环和非循环模型表现出依赖于其有效深度的扩展行为,类似于思维链(CoT)推理的推理时扩展。我们进一步阐明了与CoT推理的联系,证明循环模型隐式生成潜在思维,并可以用$T$次循环模拟$T$步CoT。受这些发现的启发,我们还提出了推理与记忆之间的有趣二分法,并设计了一种基于循环的正则化方法,在这两方面都有效。

英文摘要:

Large language models have shown remarkable reasoning abilities and scaling laws suggest that large parameter count, especially along the depth axis, is the primary driver. In this work, we make a stronger claim -- many reasoning problems require a large depth but not necessarily many parameters. This unlocks a novel application of looped models for reasoning. Firstly, we show that for many synthetic reasoning problems like addition, $p$-hop induction, and math problems, a $k$-layer transformer looped $L$ times nearly matches the performance of a $kL$-layer non-looped model, and is significantly better than a $k$-layer model. This is further corroborated by theoretical results showing that many such reasoning problems can be solved via iterative algorithms, and thus, can be solved effectively using looped models with nearly optimal depth. Perhaps surprisingly, these benefits also translate to practical settings of language modeling -- on many downstream reasoning tasks, a language model with $k$-layers looped $L$ times can be competitive to, if not better than, a $kL$-layer language model. In fact, our empirical analysis reveals an intriguing phenomenon: looped and non-looped models exhibit scaling behavior that depends on their effective depth, akin to the inference-time scaling of chain-of-thought (CoT) reasoning. We further elucidate the connection to CoT reasoning by proving that looped models implicitly generate latent thoughts and can simulate $T$ steps of CoT with $T$ loops. Inspired by these findings, we also present an interesting dichotomy between reasoning and memorization, and design a looping-based regularization that is effective on both fronts.

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

↑