Recurrent Reasoning Architectures: How to Achieve Complex Inference with Fewer Tokens
This article explores how recurrent reasoning architectures optimize large language model inference by reallocating compute budgets. Instead of solely generating more tokens, these architectures re-process hidden states through specific network layers. We examine structural adaptations, techniques for maximizing the value of secondary compute passes (including per-token gating and KV cache sharing), and practical evaluation methodologies to verify genuine token reduction and end-to-end cost efficiency.
1. Fewer Tokens Generated Does Not Mean Less Computation Done
When tackling mathematical derivation, code analysis, and multi-constraint decision-making, large language models often improve their chances of solving a problem by generating more intermediate steps. Autoregressive generation incorporates already-generated content into subsequent context, allowing the model to reference previous results in the next step. However, this path also lengthens the decoding sequence: for every additional token generated, the server must execute another decoding step and continue maintaining the corresponding context state.
Recurrent reasoning offers an alternative way to allocate the compute budget: rather than spending all new computation on generating more tokens, some network layers can re-process the current hidden state before generating the next token. The former extends the sequence; the latter deepens single-step computation. The two approaches can be combined and are not mutually exclusive.
The most critical distinction here is that parameter count, number of generated tokens, and inference compute are three independent metrics. Two execution passes can share the same set of weights, so there is no need to duplicate parameters for the recurrent block. However, the second pass still requires computation and may incur additional memory access. Whether this allows the model to achieve the same quality with fewer tokens cannot be deduced from the architecture itself; it must be verified through controlled experiments.
2. Structural Changes: Re-executing Network Layers Instead of Re-generating Text
A typical approach involves selecting a set of continuous layers from an existing model to serve as a recurrent block. After passing through the preceding layers, the input enters this module. The hidden state produced by the first execution pass is fed to the second pass, and the subsequent layers then calculate the probability of the next token based on the updated representation. Both passes use the same set of weights, but the input states differ, meaning it is not a mechanical double calculation of the exact same input.
Compared to directly stacking non-shared network layers, this method increases the execution depth along the computational path rather than the independent parameter scale of the recurrent block. It is also not equivalent to a network with the same execution depth but independent weights for each layer: weight sharing restricts the transformations each pass can learn, but the advantage is the ability to iteratively refine representations using the same parameters. The actual capability depends on whether training enables the second pass to learn useful updates.
In engineering, a pre-trained base model can serve as a starting point, adapting to the recurrent structure through further training without needing to train the entire model from scratch. However, one cannot simply assume that executing the original layers twice will improve performance. The original weights are adapted to the input distribution during a single execution pass, whereas the second pass reads a state that has already been transformed once. If the training does not adapt to this change, the repeated computation may only introduce redundancy or even disrupt existing capabilities.
3. How to Make the Second Compute Pass More Valuable
1. Per-Token Gating: Controlling How Much Candidate Update to Write Back
Each execution pass of the recurrent block yields candidate changes that can be used to update the hidden state. One approach is to introduce per-token gating on the residual write-back path, determining the proportion of the update to write in based on the current position’s state, rather than unconditionally overwriting the old representation with the new result. This can be understood as retaining the original state and adding the current pass’s modifications according to the ratio provided by the gate.
This design lays the groundwork for a division of labor between the two passes. The first pass can initially integrate the context, and the second pass can then supplement or correct information based on the existing representation. However, this division of labor is a design intent, not a guarantee provided by the gating mechanism itself. Moreover, controlling the write-back magnitude does not equate to skipping computation: if the candidate update must be fully calculated first, even if the gate ultimately only writes back a tiny fraction, it will not automatically save the forward pass overhead for that round.
2. Cross-Pass KV Cache Sharing: Avoiding Two Complete States for Long Contexts
Autoregressive decoding typically caches the keys and values corresponding to historical tokens (i.e., the KV cache) to avoid recalculating historical positions at each decoding step. The cache consumes more memory as the sequence grows, and the memory pressure usually becomes more pronounced with a higher number of concurrent requests. If the recurrent block independently retains a full historical cache for each pass, the parameter storage saved by weight sharing may not be enough to offset the extra runtime pressure.
A compromise solution is to let the second pass reuse the sparse historical keys and values accessible to the first pass, only retaining an extra sliding window of KV for recent tokens. This way, the second pass can still leverage the historical information saved by the first pass while using its own updated state within the recent range. The trade-off is that it cannot freely access the second pass’s representation for all historical positions as it could with a fully independent cache. Long-range dependency tasks should be included in the evaluation, such as integrating constraints scattered throughout a long document at the end, to check whether this compromise affects the results.
3. Reusing Sparse Attention Indexes: Skipping Repeated Candidate Selection
Sparse attention typically reads only a selected subset of historical positions. In implementations with an independent candidate retrieval step, the second pass can also reuse the historical positions selected during the first pass, eliminating the need to run index selection again. Unlike cache sharing, the index answers “where to read,” while the KV cache stores “what is read.” Reusing indexes saves repeated retrieval but does not mean the second pass can skip the attention computation for the selected positions.
The trade-off of this approach is that the second pass’s hidden state has already changed, and the context it most needs to examine may not be exactly the same as the first pass’s. If the first pass misses selecting a key piece of evidence, reusing the index may perpetuate that omission. Therefore, deployment evaluation should not only look at retrieval overhead but also check whether tasks relying on scattered evidence degrade, distinguishing whether the problem stems from missing candidate positions or the model selecting the evidence but failing to use it correctly.
4. How to Verify You Actually Used Fewer Tokens
Public controlled experiments with the same parameter scale provide a useful clue: after completing long-text supervised fine-tuning, the experimental group with the recurrent structure enabled achieved higher scores in mathematical reasoning, graduate-level science Q&A, and general knowledge evaluations, with a reported 10% increase in training compute. This indicates that under specific training and evaluation conditions, extra recurrent computation can translate into higher task scores. However, an increase in training cost is not an increase in online inference cost, and a score improvement is not proof of reduced token generation. Without published comparable data on generation length, latency, and resource usage, one cannot deduce the online savings ratio based on this alone.
Practical testing can be conducted in three directions:
- Fixed Generation Budget, Compare Task Quality. Give the baseline and recurrent models the same prompts, sampling configuration, stopping rules, and maximum generation length, then compare accuracy, test pass rates, or manual acceptance rates. Requests truncated due to reaching the length limit should be recorded separately to avoid misjudging incomplete answers as a lack of reasoning capability.
- Fixed Quality Target, Compare Generation Length. Test multiple length budgets for both solutions to find the operating points that meet the same quality threshold, then compare the median and high percentiles of actual generated tokens. If the system can distinguish between internally generated reasoning tokens and user-visible output, they should be tracked separately to avoid treating “shorter display” as “fewer actual generations.”
- Fixed Deployment Conditions, Compare End-to-End Resources. Under comparable hardware, precision, input length, and concurrency configurations, record time-to-first-token, inter-token latency, total request latency, throughput, and peak memory. Short inputs and long inputs should be reported separately to prevent a high proportion of one request type from masking the performance degradation of another.
A simplified example illustrates why all three directions are indispensable: suppose the single-step decoding cost for a certain type of request increases to 1.5 times the original, and the generation length happens to decrease by one-third. Estimating based solely on “steps multiplied by single-step cost,” the total decoding cost of the two approaches would be roughly equal. This example is not an empirical result and does not include input pre-fill, queuing, and batching overhead. It demonstrates that even if tokens are indeed reduced, it is still necessary to independently confirm whether the service has become faster or cheaper.
5. Deployment: Prioritize the Total Cost of Task Completion
Recurrent architectures do not have to be profitable for all requests. Format conversion, short Q&A, and field extraction inherently have short outputs with limited compressible generation space, so increasing per-step computation may actually increase latency. Tasks like multi-constraint code modification and long-document evidence integration are more worthy of priority validation: as long as the extra computation can reduce critical errors, retries, or manual rework, it may lower the total cost of completing the task even if a single request does not speed up noticeably.
A prudent approach is to establish an offline baseline based on task type, input length, and expected output length, and then conduct low-traffic testing on scenarios with potential gains. After deployment, in addition to monitoring token volume and latency, it is also necessary to observe answer truncation rates, rework rates after tool calls, and final delivery pass rates. For developers, the most useful question is not “does the model output shorter text,” but rather: at equal quality, can the task be completed with lower end-to-end cost; or, at equal cost, can more reliable results be delivered?
