Recurrent Reasoning Architectures: Deeper Thinking with Fewer Tokens

    Recurrent reasoning architectures shift part of model reasoning from long explicit token streams into internal looped computation. This article explains the motivation, weight sharing and progressive write-back, KV cache and attention-index reuse, reported quality and cost tradeoffs, and practical deployment and tuning considerations.

    Large language models often gain “thinking” ability from greater computational depth at inference time. The usual path is a longer chain of thought: more output tokens buy more intermediate reasoning steps. That approach works, but it raises latency, bandwidth use, and inference cost. A recent class of recurrent reasoning architectures offers another option. Instead of substantially increasing the parameter count, selected layers share weights and run for multiple rounds. Some reasoning moves from the output token stream into internal looped computation, so the model can think more deeply with fewer tokens. This article examines the technical principles, engineering optimizations, quality–cost tradeoffs, and deployment practice behind that design.

    1. Why a longer chain of thought is not the only answer

    On complex question answering, code generation, mathematical reasoning, and tool-calling tasks, a model must break down the problem, check intermediate results, and assemble a final answer. A common method is to emit a longer chain of thought and carry the reasoning in explicit tokens. Longer chains increase time to first token and total generation time, and they raise cache and bandwidth pressure. Under high concurrency, long outputs also cut throughput sharply.

    The core assumption of recurrent reasoning is that not all reasoning has to be written into the output sequence. Extra depth inside the model can do part of the work. In simple terms, the first loop builds a global context state, and the second continues to infer and refine on top of it, which is equivalent to a deeper network. Because the looped layers share weights, the parameter count does not have to grow in proportion. The model can gain computational depth with relatively few new parameters. That is a different axis of optimization from simply scaling parameters or lengthening the output.

    These designs do not necessarily require pretraining from scratch. A pretrained base model can be further trained into a recurrent structure, trading a modest compute cost for a higher capability ceiling. Public descriptions cite a case in which about 28 layers of the base are converted to shared weights and executed for two rounds, on a base on the order of 750B parameters. The key is not simply repeating layers. It is how state is written back between rounds, how caches are shared, and how attention indexes are reused.

    2. Architecture: shared weights, two-round inference, and effective depth

    A recurrent Transformer can be summarized as follows. A subset of layers forms a recurrent block whose weights are shared across rounds. Each round continues from the previous round’s output. A gate controls how much of the candidate state is written back into the residual stream. The first round tends to build a global context representation; the second tends to refine it and write the result back more fully.

    The sketch below describes the computation only. It is not a product interface.

    1. h0 = embed(input)
    2. for round in [1, 2]:
    3. candidate = shared_block(h_{round-1})
    4. h_round = residual + gate(round) * (candidate - residual)
    5. output = head(h2)

    gate(round) sets how much of each round’s candidate change is written into the residual stream. If the first round writes back too strongly, local representations may lock in too early. If the second round writes back too weakly, the extra depth from the loop never fully shows up. Token-level progressive write-back is therefore the engineering crux: the write-back ratio is adjusted per token, the first round establishes global context, and the second refines and writes the result back more completely. That preserves stable representations from the base model while still letting the loop affect the final output.

    Compared with capability gains from post-training, this change happens at the base-model level. Post-training can improve instruction following, preference alignment, and performance on specific tasks, but computational depth is still limited by the original network. Looped execution adds effective depth in the structure itself. The two are not in conflict: the recurrent structure supplies new compute capacity, and post-training turns that capacity into usable ability.

    3. Engineering challenges: memory, KV cache, and retrieval cost

    The main costs are memory and inference overhead. Multiple rounds mean more intermediate state and more complex cache management. On very large models, keeping a full KV cache for every round would raise deployment cost quickly. Three changes described in public technical notes are representative.

    First, token-level progressive write-back. The second round does not simply overwrite the first. Candidate changes are written into the residual stream in proportion. The first round handles global context; the second handles refinement. The gate schedule must stay consistent with training. Changing write-back ratios freely at inference time can cause representation drift.

    Second, KV cache sharing across rounds. The second round reuses the first round’s sparse KV and adds only a sliding-window KV, rather than keeping a full extra cache. That avoids cache size growing linearly with the number of rounds and keeps the deployment-cost increase under control. In practice, reusable historical KV must be distinguished from the new window KV for the current round, with paging and lifetime management that work under batching.

    Third, the second round reuses the first round’s sparse attention indexes and does not add retrieval cost. This continues an existing idea of reusing indexes across layers: the indexer is shared so repeated retrieval is reduced. For long context and high concurrency, index reuse cuts extra attention-retrieval cost, but index quality must stay stable so reuse does not accumulate recall bias.

    The configuration below only illustrates tuning dimensions.

    1. loop_rounds: 2
    2. shared_block_weights: true
    3. progressive_writeback: true
    4. gate_schedule: [moderate, strong]
    5. kv_cache:
    6. cross_round_share: true
    7. extra_window_only: true
    8. attention_index:
    9. reuse_from_round1: true

    4. Gains and costs: fewer tokens is not zero cost

    In public controlled comparisons, 30B models of the same parameter count, with training compute increased by about 10%, showed mathematical reasoning rising from about 19 to about 30, expert question answering from about 47 to about 56, and broad knowledge from about 71 to about 75 when recurrence was enabled. Average output length on the related evaluations fell by about 10% to 14%, mostly from shorter chains of thought. That indicates some reasoning moved from the token stream into the extra depth of the loop: the model thinks with fewer tokens.

    Fewer tokens does not mean zero cost. Extra rounds add computation, and time to first token can rise. Memory use and batching strategy need to be reassessed. Poorly implemented gated write-back or KV sharing can hurt long-context stability. Public figures for one deployment setup report up to about 200 tokens/s off peak and about 70 to 80 tokens/s at peak, with a controlled cost increase versus the previous generation. Capacity planning should still be based on input length, output length, concurrency, and SLAs, not on single-request speed alone.

    5. Deployment and tuning

    Choose the number of rounds for the workload. Two rounds fit tasks that need moderate reasoning depth and are sensitive to latency. More rounds should be justified by offline evaluation rather than added by default. Manage the KV cache in layers: reuse stable cross-round KV, allocate space only for the new window of the current round, and use batching and paging to cap peak memory. Keep the write-back gate aligned with the training configuration; the serving stack should not change it sharply at runtime. For long context, measure recall bias from index reuse, and keep independent indexes on critical layers when needed. Evaluate with answer quality, output token count, time to first token, total latency, and peak memory.

    On a general cloud environment such as Baidu AI Cloud, inference can run on a container platform, weights and evaluation sets can live in object storage, and logging plus monitoring can track latency and memory. Those generic cloud capabilities help operate the service; they do not change the architectural tradeoffs of the model itself.

    6. Where it applies: code as a base capability for broader tasks

    The “general programming” value of recurrent reasoning is that code is not only the final artifact. It is also the medium that connects multi-step work. Examples include front-end code that draws frames in real time and calls an audio model to produce a music video; math, geometry, and shaders that build an interactive 3D scene; and general CAD or 3D modeling tools used to model a robot arm and simulate its motion. These tasks need code generation together with geometry, physics, tool use, and multi-step checks. Looped computation can add internal reasoning depth without substantially lengthening the output.

    7. Conclusion

    A recurrent reasoning architecture is not simply “running the network twice.” Through weight sharing, progressive write-back, cross-round KV sharing, and index reuse, it looks for a new balance among parameter count, computational depth, memory cost, and output tokens. Its technical point is to move part of reasoning from explicit tokens into internal looped computation, so the model can think more deeply with fewer tokens. In production, gating, cache management, index reuse, and workload-specific evaluation should be tuned together, with attention to safety evaluation, open-weight governance, and stability on long-tail tasks. For developers, understanding where the gains stop matters more than chasing a single performance number.