Why Recurrence Is Returning to Transformers
Attention replaced step-by-step hidden states so language models could train in parallel, but recurrence is returning inside that parallel backbone. This article explains why stacked layers are not the same as extra reasoning steps, distinguishes time-wise, depth-wise, and block-level iteration, and weighs parameters, memory, latency, and stopping rules before adding loops.
Replacing step-by-step dependence along a sequence with direct links between any positions was the turning point that made large-scale training of modern language models practical. Recurrence did not lose its point. When a task must revisit evidence, revise intermediate conclusions, or buy more useful computation under a fixed parameter budget, researchers put “run another pass” back inside the network. This is not a return to early sequence models. It keeps a parallelizable backbone and reuses state updates and weights.
Sequential state and direct association are not the same
Early sequence models compressed history into a hidden state updated over time. If (ht) is the state at the current position and (x_t) is the current input, the core relation is (h_t = f\theta(h_{t-1}, x_t)). The next step must wait for the previous one. The dependency chain along time both limits data parallelism and makes distant information more likely to fade or tangle after many nonlinear transforms.
Self-attention changes who can talk to whom. Inside one layer, every position can directly aggregate information from other positions using queries, keys, and values, so positions in the same layer can be computed together during training. Long-range links no longer have to hop along the time axis. That is why parallel training became the default, and why stacking more layers was preferred for a time over cycling the same layer again: extra layers add capacity, more feature transforms, and residual paths that optimization already handles well.
Dropping recurrence along time does not mean iterative computation has no value. Attention routes information across positions. Recurrence applies the same transform repeatedly and keeps intermediate conclusions explicit so they can be revised. They answer different questions.
The hidden cost of only stacking layers
Deepening the network alone writes almost every “think one more step” as “add another layer of parameters.” That creates several familiar pressures.
First, parameters and memory grow roughly linearly with depth. Each layer has its own projections and feed-forward weights, and activations must be kept for backpropagation. When the context is already long, the attention key-value cache is often the inference bottleneck; unbounded depth raises both weight size and memory traffic.
Second, depth is not automatically the number of effective reasoning steps. Some layers mainly restyle features; others actually retrieve, align, and rewrite. If a task needs several rounds of self-check—extract constraints, then check contradictions, then rewrite the answer—a single fixed forward pass may not separate those steps. The model has to squeeze a multi-step process into one representation transform.
Third, training parallelism and inference shape do not match. Training wants as much parallelism as possible inside a layer and a batch. Online inference cares about time to first token, cost per token, and whether computation can stop early by difficulty. Freezing all compute into a fixed depth makes it hard to spend compute according to sample difficulty.
Recurrence is therefore reintroduced not to restore “read left to right before looking right,” but to add iterations inside a parameter budget, or to make the hidden state a readable and writable working memory.
Which meaning of recurrence is actually being added
Engineering practice should separate at least three different kinds of “recurrence.” Mixing them misreads the benefit.
Recurrence along time. State updates strictly in token order, and the next step depends on the previous one. That matches the intuition of incremental generation, but training parallelism is poor and long-range credit assignment is hard. Modern large models rarely revert the whole network to this form. Similar state compression is more often used in local modules to cut cache cost for very long contexts.
Recurrence along depth, or layer recurrence. The weights of one group, or a few groups, of layers run several times. The input sequence can still be processed in parallel by attention inside each round. The loop is over rounds of computation, not over waiting for the token to the left. The main gain is weight sharing: fewer independent parameters for more nonlinear transforms. The cost is that gradients pass through an unrolled graph, so training stability and effective learning rate need separate treatment. Each inference round still pays for attention and the feed-forward block. What is saved is parameter count, not compute.
Block iteration and feedback. The model first produces an intermediate representation or draft, then feeds it back as an extra condition, possibly with a stopping rule. This is closer to an outer generate-and-check loop. Some implementations put the loop inside the network graph; others leave it in the decoding policy or outside tool calls. An inner loop can be differentiated and trained jointly with the representations. An outer loop has clearer module boundaries and observable failures, but each round costs more scheduling overhead.
A recurrent Transformer that keeps the modern training pattern usually falls into the latter two: the backbone is still attention and feed-forward layers, and recurrence shows up as weight reuse, state write-back, or repeated block execution. The evaluation question is whether tokens stay parallel, whether the loop is over rounds, or whether the token dependency chain has been lengthened again.
The capabilities it tries to restore
From the shape of the task, the return of recurrence has a few solid motives.
One is working memory. Attention can pull in a distant token, but “what is already believed” and “which constraints are already satisfied” are hard for later layers to rewrite selectively if they exist only inside activations. An explicit state, or an intermediate representation that can be fed back, is a draft area the model can overwrite. Mathematically it is still an iteration (z^{(k+1)} = g_\theta(z^{(k)}, x)), where (x) is the original context, (z) is the quantity kept across rounds, and (\theta) is shared across rounds or specialized for only a few of them.
Another is separating computational depth from parameter count. Hard problems often need more serial steps; simple sentences do not. Multi-round iteration with shared weights lets the step count be adjusted at inference: fewer loops for easy samples, more for hard ones. That differs from simply increasing width. Width mainly adds parallel capacity per step; it does not add reasoning steps that must happen in order.
A third is state compression for long context. A full key-value cache grows with sequence length. If a recurrent state absorbs earlier information, and attention handles a local window or retrieved spans, quality and memory can be traded off. Compression necessarily drops information. What matters is whether the compressor is learnable and whether the task allows approximation.
A fourth is how training signal is organized. Some data is itself multi-round revision: draft, critique, final text. An iterative structure matches that generation process better than hoping a single forward pass implicitly learns every correction. That does not automatically mean higher accuracy. The inductive bias is closer to “revise repeatedly” than to “write it once.”
How this differs from early recurrent networks
Comparing only “whether there is a hidden state” makes the change look like a step backward. The difference is the direction of dependence in the computation graph.
In early recurrent networks, dependence unrolls along the sequence, so sequence length is the critical-path length and a GPU has a harder time splitting positions. For layer recurrence, the critical path is mainly the number of rounds, while each round can still run parallel attention over all positions. Long sequences can still use matrix-multiply throughput. More rounds increase latency. That is serial depth traded for representation quality, not the old bill of reading one word at a time.
The information bottleneck is different too. The old state was often a fixed-width vector with the whole history packed inside. One modern iteration can still operate on a full-sequence representation: attention routes within the round, and recurrence rewrites after it. The bottleneck moves from “history must fit in one vector” to “compute budget and stopping time per round.”
Optimization is no longer the same either. Residual connections, normalization, and large-scale pretraining recipes grew up around deep residual networks. Repeating the same block lengthens the gradient path, and output scale can drift from round to round. Cautious practice usually includes capping the maximum unroll, using residuals around the loop body, scaling the update of each round, and not forcing early and late rounds to share everything—for example, sharing the trunk and using extra adapter parameters only on the last round. These are general training techniques, not tied to one implementation.
Four accounts to keep at once
Before adding recurrence, split the gains into separate accounts instead of judging only whether the structure looks more advanced.
Parameters and compute. Weight reuse cuts independent parameters and some loading cost. It does not cut floating-point work per round. If the bottleneck is reading weights, reuse may raise arithmetic intensity. If the bottleneck is already attention compute, one more loop is almost one more bill.
Memory. Unrolling (K) rounds in training stores more activations. Gradient checkpointing can trade recomputation for memory, but it lengthens the step. At inference, refreshing the full key-value cache every round does not shrink long-context memory just because parameters are shared. The cache shrinks only with state compression or windowing.
Latency and elastic compute. The maximum number of rounds sets the tail-latency ceiling. With a reliable early stop—intermediate representations changing below a threshold, or a separate confidence head—average latency can beat a fixed deep stack. The stopping rule itself can kill hard problems too early. Check the distribution of easy and hard samples on a validation set, not only the average score.
Parallelism and pipelining. Layer recurrence can still use tensor parallelism inside one round. Rounds are serial, so pipeline bubbles can grow. An outer scheduling loop makes it easier to batch requests together, but host-to-accelerator round trips eat the gain. Inner versus outer depends on whether one iteration is heavy enough and whether the loop must be end-to-end differentiable.
The sketch below fixes the control flow of “loop over rounds, parallel inside a round.” It is not an interface for any framework:
state = embed(tokens)for step in range(max_steps):# Within one step, attention across positions can run in paralleldelta = block(state, tokens)state = state + scale(step) * deltaif should_stop(state, step):breaklogits = head(state)
Inside block, the usual attention-plus-feed-forward pattern can remain. scale damps drift across rounds. If should_stop is not differentiable, training usually still unrolls a fixed number of rounds, and early exit is enabled only at inference.
When it is worth doing, and when it is not
Recurrence or iterative refinement fits tasks whose intermediate conclusions are rewritten repeatedly: multi-constraint planning, consistency checks over long text, reasoning that resolves ambiguity step by step, and contexts long enough that history must be compressed. Short inputs, direct labels, and classification or extraction that a single mapping can fit often only add latency.
If quality is short, separate lack of capacity, lack of data, and lack of reasoning steps. If capacity is short, more width or more independent layers is more direct. If the data has no revision process, changing the computation graph will not create self-checking by itself. Extra, adjustable iteration depth is the right remedy only when the error clearly comes from steps being flattened together.
Evaluation should not report a single average. At least look at quality versus number of rounds, quality per unit of latency, peak memory, and how early stopping hurts hard cases. Without those curves, it is impossible to tell whether recurrence provides elastic compute or hides undertraining with repeated work.
How to place it in an existing system
Keep module boundaries clear. The representation model owns context encoding and iterative updates. Length, stopping round, and batch size belong in inference configuration, not hard-coded business logic. Where an audit trail is needed, write each round’s intermediate conclusion as structured fields to a logging service, and use monitoring alerts for average rounds, timeout rate, and how often the system falls back to fewer rounds. Object storage fits offline per-round outputs, so you can check whether “one more round of thinking” actually reduces factual conflicts or format errors. These are general engineering capabilities and do not depend on a specific model.
On the training side, start with few rounds, strong residuals, and a path back to a single forward pass. Show a stable gain from two or three rounds over one round before raising the maximum. If the validation set worsens after more rounds, check normalization scale, learning rate, and whether stop labels are too noisy before unrolling deeper. On the deployment side, cap rounds for tail latency. Past the cap, return the current best intermediate result and mark it as degraded, so the loop cannot make tail latency unusable.
Summary
Attention replaced hidden states passed along the sequence because it removed the time dependence on the training critical path and made large-scale parallelism possible. Recurrence is appearing again because parameter scale, memory, long context, and “spend thinking steps by difficulty” are constraints that stacking more independent layers cannot meet all at once.
The higher-level return means keeping in-round parallel routing, and using recurrence for rounds, state write-back, and stoppable iteration—not restoring the old bottleneck of mandatory step-by-step reading. Whether to adopt it depends on whether the task truly needs extra serial revision, and whether each added round of compute buys a measurable quality gain inside the latency and memory budget.
