Manuscript Offprint

arXiv:2611.07226

Loopback Transformer: Towards a Unified View of Residual Looped Transformers

Xuan Ouyang, Zefan Cai, Chenlong Zhang, Cheng Luo, Ke Wan, Junjie Hu

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

ABSTRACT

Looped Transformers reduce parameter count by repeatedly applying shared blocks, but parameter sharing alone does not determine how the results of repeated computation are reused. We take the depth-memory view of residual connections and analyze which representation is stored after each block application and how later reads weight it. A full block output contains both its input and its new update, so weighting that output also reweights the history already carried by the input. Reading individual updates instead, with the shared stack's input kept on a separate path, gives separate controls over input strength, total update weight, and allocation across updates. The Loopback Transformer implements these controls: geometric decay sets the total update weight and supplies a recency prior, and attention learns how to allocate that weight. On ClimbMix, Loopback reaches lower validation loss than standard Transformer baselines with 40–75% of their Transformer parameters (excluding token embeddings and the output head) at reference scales from 191M to 3B, with training tokens and executed depth matched. It also has higher mean accuracy over thirteen downstream tasks at 1.4B and 3B. At 191M, 374M, and 778M, it has the lowest validation loss and the highest thirteen-task mean among the standard Transformer and seven looped residual designs.

Code: github.com/yancyou/Loopback

Project page: yancyou.github.io/Loopback_page

Figure

Figure 1: Loopback versus the standard Transformer from 191M to 3B. Each pair uses the same token budget and executed depth at the 20-TPP setting (tokens per reference-model parameter). (a) Validation loss and (c) thirteen-task mean accuracy against the standard Transformer's estimated training FLOPs; (b) the same losses against Transformer parameters, where percentages give Loopback's share of the standard Transformer's. Lines interpolate the points.

✉^{✉}Correspondence to Xuan Ouyang, Zefan Cai, and Junjie Hu (xouyang7@wisc.edu, zefncai@gmail.com, jhu@cs.wisc.edu).

1 INTRODUCTION

Looped Transformers reduce parameter count by repeatedly applying shared blocks to an evolving hidden representation (Dehghani et al., 2018; Lan et al., 2019). Sharing separates computational depth from the number of distinct blocks and supports latent reasoning and inference-time scaling (Saunshi et al., 2025; Geiping et al., 2026). Each visit applies the same transformation to a different hidden state and so produces a different update. Parameter sharing fixes which transformation is reused; it leaves open how the updates from successive visits are stored, carried forward, and used.

Residual connections turn depth into a form of memory: each layer writes new computation into a residual stream carried forward to later layers. Standard residual addition accumulates block updates with fixed unit coefficients (He et al., 2016), whereas Attention Residuals (AttnRes) learns how to weight these updates and the input (Team et al., 2026). Hyper-Connections (HC) and Hyperloop introduce learned pathways across residual streams or loop visits (Zhu et al., 2025a; Zeitoun et al., 2026).

This depth-memory view (Team et al., 2026) connects residual design to linear attention and related recurrent models. Linear attention expresses attention over token history as writes to and reads from a recurrent memory (Katharopoulos et al., 2020); RetNet and Mamba-2 additionally control how that memory is retained across steps (Sun et al., 2023; Dao & Gu, 2024). We use this write-transport-read perspective to analyze repeated computation along depth. Here, each block produces a new write from a representation assembled from earlier writes, so the memory rule also influences subsequent computation. We therefore examine what is stored and how memory transitions and readout determine each update's contribution.

Seen this way, common residual designs tie together quantities that could be controlled separately. First, a full block output contains both its input and its new update. Weighting that output therefore also weights the history carried by the input. Storing updates separately lets the reader assign a coefficient directly to each update. Second, a joint softmax over the original input and stored updates makes them compete for a fixed total weight. Ordinary addition instead fixes the input coefficient but assigns every update weight one, so total update weight grows with the number of block applications. We therefore want separate controls over input strength, total update weight, and allocation across updates.

The Loopback Transformer is built around these three controls. It stores individual block updates rather than full block outputs and keeps the shared stack's input on a separate path with coefficient one. Geometric decay assigns a baseline weight to each update. A softmax reader redistributes their total weight according to update content, using the decay weights as a recency prior. This separates total update weight from allocation without changing the shared blocks or their token-axis attention.

We compare against the standard Transformer, which uses distinct parameters at every layer (labeled Standard in tables and figures), and against seven looped residual designs, always at the same budget of training tokens and the same executed depth. On ClimbMix (Diao et al., 2026), Loopback reaches lower validation loss and a higher thirteen-task mean than Standard at 191M, 374M, 778M, 1.4B, and 3B while storing 40–75% of its Transformer parameters (Tables 2, 4 and 9 and Fig. 1). At 191M, 374M, and 778M, it also has the lowest validation loss and the highest thirteen-task mean of all nine designs (Table 2).

We make three contributions:

  • We connect residual designs with linear attention and related recurrent models by adapting their memory-update rules from token sequences to network depth. The resulting framework describes what each block writes and how its contribution is transported and read.

  • Within this framework, we design the Loopback Transformer, which adds a weighted sum of block updates to the original loop input. Geometric decay keeps the total update weight bounded as visits increase at fixed stack size. Attention adjusts each update's weight according to its content while preserving the total.

  • On ClimbMix, Loopback reaches lower validation loss and higher zero-shot task means than matched-depth standard Transformers at five scales from 191M to 3B, with 40–75% of their Transformer parameters.

References (78)