Recurrent Reasoning: Deeper Computation with Fewer Tokens
Chain-of-thought raises accuracy by writing intermediate steps into the context, but those steps consume context, bandwidth, and billed tokens. Recurrent reasoning instead reuses the same layers for extra compute depth, refining hidden state so some of that reasoning never has to be written out. This article explains how that differs from post-training, the three deployment changes required at very large scale, and how to read accuracy, length, and throughput together.
Writing a hard problem out step by step in a chain of thought does raise accuracy, but the cost is direct: every intermediate step consumes context, bandwidth, and billed tokens. Recurrent reasoning is not another longer prompt template. With the parameter count held roughly constant, the same block of layers is executed again, trading extra compute depth for some of the reasoning that would otherwise be written into the text.
What problem it addresses
In a conventional deep network, each added layer brings another set of weights, and both training and inference memory grow with it. A chain of thought makes “think again” explicit as more tokens: the model writes a plan, checks itself, then rewrites. That trace is often an order of magnitude longer than the final answer. The path works for math, code, and multi-hop question answering, but under peak concurrency both output speed and the bill are dragged down by the chain of thought.
The goal of a recurrent structure can be stated in three points. First, parameter count does not grow linearly with the number of thinking passes. Second, the second pass does not recompute unrelated context from scratch; it refines the state already formed in the first pass. Third, the user still sees a single generation, and the visible tokens can be shorter because part of the reasoning stays in hidden state. It does not guarantee a stronger result on every task. It only moves “depth” from adding layers or tokens to reusing the same compute block.
How this differs from post-training alone
Continued supervised fine-tuning or preference optimization on the same base model mainly changes how existing capability is used. Format, tool-calling habits, refusal boundaries, and sampling stability can improve, but the depth of the computation graph does not increase. If two generations share the same layers and width, capability differences should be attributed mainly to data and post-training, not to architecture.
A recurrent change goes back to the base model. The typical approach takes a deep network that has already finished pretraining, selects a contiguous span of layers, shares their weights, and executes that span for a fixed number of passes. For example, converting a little more than twenty layers to two recurrent passes keeps total parameters in the same range as the original base, while the forward pass walks an extra equivalent depth. The second pass does not start from an empty sequence. It starts from the global state the first pass wrote into the residual stream, so it is closer to revising a draft than to running a separate shallow encoding.
Weight-shared deep networks discussed publicly around 2018 already proposed using recurrence to make effective depth large and gating to control what is written. The more practical engineering route is usually not to pretrain a recurrent model from scratch, but to continue training an existing base into a recurrent form. The extra compute comes mainly from the additional forward passes and a period of adaptation training, not from buying another pretraining run of the same scale.
Three changes required for deployment around 750 billion parameters
The main bill for recurrence is not parameters. It is activations, the key-value cache, and attention indexing. If every pass keeps a full cache, two passes are nearly twice the memory, and the deployment cost stops making sense. For models with total parameters on the order of hundreds of billions that must also serve long context at inference time, at least three things have to be handled together.
Per-token gating, with gradual write-back. Do not overwrite the residual stream with the new result at the start of the second pass. A steadier approach writes this pass’s candidate change back per token and by a ratio. The first pass builds global context, so write-back can stay conservative and avoid locking early noise into the state. The second pass refines, so the write-back ratio rises and leaves the revised conclusion in the residual. The gate can be a small input-dependent network or a simple scalar, but its numeric range must stay stable. Otherwise two recurrent passes produce exploding activations, or a second pass that barely changes anything.
Key-value cache shared across passes. The second pass reuses the sparse keys and values already computed in the first pass, and maintains a sliding window only for the local context that still needs it. It does not keep a full second-pass cache. Incremental memory then comes mainly from the window and a small amount of extra activation, not from copying another long-context key-value cache. Relative to the previous non-recurrent model, that is what gives the deployment-cost increase a chance to stay in an acceptable range. Window length has to be tuned to the task: code completion can use a short window, while long-document question answering cannot be so short that cross-paragraph references are cut off.
Direct reuse of attention indices. If the first pass has already selected, for sparse attention, which positions each query should attend to, the second pass keeps using that same index instead of running retrieval again. Index computation often scales with the number of layers. Reusing it across passes—and, as in existing practice, reusing the indexer only every several layers—can hold down the extra retrieval cost that recurrence adds. The premise is that the two passes have not sharply changed the task. If the second pass moves from “read the whole document” to “focus only on a local error,” fully reusing the index can miss the new focus. In that case, refresh the index inside the window rather than recomputing the whole table.
The pseudocode below is only a way to see the data flow. It is not any vendor’s interface. It shows where the residual, the cache, and the index belong:
state = embed(tokens)index = build_sparse_index(state) # built oncekv = sparse_kv(state, index) # full sparse cache for the first passstate = gated_write(state, block(state, kv), ratio=low)kv_local = sliding_kv(state) # second pass adds only a windowstate = gated_write(state, block(state, kv, kv_local, index), ratio=high)logits = head(state)
How to read the results
One comparison uses about 30 billion parameters and the same architecture as a large base. Recurrence is turned on after long-text supervised fine-tuning, without pretraining from scratch, and training compute rises by about ten percent. With recurrence on, contest math, graduate-level question answering, and broad subject-choice metrics all improve, with the more reasoning-heavy sets improving more clearly. At the same time, average output length on some benchmarks falls by about ten to fifteen percent. The shortening comes mainly from the chain of thought, not from making the answer vaguer.
These figures describe a mechanism, not a universal ceiling. Accuracy rises because the second pass refines an existing context state and effective depth increases. Token count falls because some intermediate conclusions that previously had to be written out in order to be “remembered” stay in the residual and the cache. Judging only accuracy and ignoring output length, or judging only length and ignoring whether the answer is correct, will misread the result. Off-peak and peak throughput also need to be separated: a high token rate when the system is idle does not represent tail latency once the queue is full. One extra recurrent pass usually lowers peak throughput relative to a single forward pass of the same width. Shared caches are what keep that drop in check; recurrence itself should not be expected to be faster.
Metrics to watch together before rollout
Before placing a recurrent model in a coding assistant or an agent, compare it on the same traffic rather than only swapping leaderboard scores.
- Task accuracy: unit-test pass rate, math and factual question answering, and whether a tool call succeeds on the first try.
- Token efficiency: chain-of-thought length, total output length, and how many retries are needed to reach the same pass rate.
- Resources: activation memory per request, key-value cache bytes, index-build time, and token rate at peak and off peak.
- Stability: whether outputs oscillate as the two write-back ratios change, and whether the window truncates critical dependencies in very long context.
On the training side, do not treat “a few samples are enough to make it recurrent” as a principle. A steadier path freezes the non-recurrent parts or updates them at a small learning rate, gives the shared block and the gate enough steps of their own, and uses long text to train the first pass’s global state solidly. When the extra compute budget is limited, the priority is to make sure the second pass is actually rewriting the residual, not that the gate stays near zero for a long time.
Relation to broader coding ability
Once code is the basic action for a wider range of tasks, the model has to read a repository, edit a patch, run commands, and revise from errors. Those steps easily induce very long chains of thought. The value of recurrent depth is that planning and self-checking can happen more in internal state, while what is shown is a shorter patch, command, and conclusion. It does not replace tests, permission isolation, or human review. If cache sharing is too aggressive, distant symbol definitions can be dropped during multi-file jumps, which shows up as “a shorter answer but a more wrong patch.” Before launch, check length reduction on real repository slices, not only on short problems, and confirm that executability was not sacrificed.
Weights or interfaces should not be exposed directly to untrusted traffic before a safety evaluation is complete. Open-source release and opening a service are questions of release timing; they do not change the architecture’s own memory and evaluation requirements. If a model of this kind is connected to code indexes, logs, and monitoring alerts in object storage, record cache hits and output length for each pass. That makes it possible to tell whether the model worked the problem out internally or simply cut the chain of thought off early.
