arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2603.08391cs.CL
收藏

变换器中的自适应循环与记忆:更努力思考还是更了解更多?

Adaptive Loops and Memory in Transformers: Think Harder or Know More?

Lamarr Institute(拉马尔研究所);Fraunhofer IAIS(弗劳恩霍夫 IAIS 研究所);University of Bonn(波恩大学)

Markus Frey, Behzad Shomali, Ali Hamza Bashir, David Berghaus, Joachim Koehler, Mehdi Ali

AI总结:

本研究提出结合自适应循环和门控记忆的变换器模型,提升数学推理和常识任务性能。

摘要:

链式思考(CoT)提示使语言模型能够进行推理,但需要显式地 verbalize 中间步骤。循环变换器通过在隐藏状态中迭代细化表示提供了另一种方法。这种参数效率以存储容量为代价,因为循环模型缺乏更深模型的存储能力,后者使用每个层独特的权重。在本工作中,我们研究了具有自适应每层循环和门控记忆银行的变换器模型。我们发现,循环主要有助于数学推理,而记忆银行有助于在参数和FLOP匹配模型上恢复常识任务的表现。结合这两种机制获得的模型在数学基准上优于等效FLOP基线模型,具有三倍的层数。模型内部分析揭示了层的专业化:早期层学习循环较少且访问记忆较少,而后期层则更倾向于两者。

英文摘要:

Chain-of-thought (CoT) prompting enables reasoning in language models but requires explicit verbalization of intermediate steps. Looped transformers offer an alternative by iteratively refining representations within hidden states. This parameter efficiency comes at a cost, as looped models lack the storage capacity of deeper models which use unique weights per layer. In this work, we investigate transformer models that feature both adaptive per-layer looping, where each transformer block learns to iterate its hidden state via a learned halting mechanism, and gated memory banks, that provide additional learned storage. We find that looping primarily benefits mathematical reasoning, while memory banks help recover performance on commonsense tasks compared to parameter and FLOP matched models. Combining both mechanisms yields a model that outperforms an iso-FLOP baseline, with three times the number of layers, across math benchmarks. Analysis of model internals reveals layer specialization: early layers learn to loop minimally and access memory sparingly, while later layers do both more heavily.

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

↑