Loopback Transformer:残差循环 Transformer 的统一视角研究
Loopback Transformer: Towards a Unified View of Residual Looped Transformers
Loopback Transformer 通过将残差连接视为沿网络深度的内存操作,实现信息存储、传递和重用。在 13 项零样本任务中,1.4B 和 3B 参数版本均比标准 Transformer 验证损失更低(3B 版本从 2.0005 降至 1.9849)、平均准确率更高(从 48.56% 升至 49.45%),参数量分别减少 32% 和 25%,并在 11 项任务中表现更优。
In this paper, we study how residual connections should retain and reuse information when the same Transformer blocks run repeatedly. Inspired by recurrent memory, we develop a unified view of residual connections as memory operating along network depth. The write–transport–read formulation lets us compare different residual designs through what they store, how they carry information forward, and how they retrieve it for subsequent computation.
Guided by this view, we introduce Loopback Transformer. Loopback stores individual block updates, uses geometric forgetting to progressively discount earlier passes, and learns content-dependent attention over the stored updates. This allows the model to retrieve useful information from earlier computation.
At matched training tokens and executed depth, Loopback achieves lower validation loss and higher mean accuracy across 13 zero-shot tasks than Standard Transformers at both 1.4B and 3B, retaining only 68% and 75% of their Transformer parameters, respectively. At 3B, validation loss improves from 2.0005 to 1.9849, mean accuracy rises from 48.56% to 49.45%, and Loopback scores higher on 11 of 13 tasks. In our main comparisons at 191M, 374M, and 778M, it also achieves the lowest validation loss and highest thirteen-task mean among Standard and seven looped residual baselines. Parameter counts exclude token embeddings and the output head.
Our results highlight residual design as an important part of parameter-efficient modeling: sharing computation works better when the model also learns how to retain and reuse its outputs. We welcome feedback and discussion!
来源: Hugging Face Daily Papers · huggingface.co
