Loop Reasoning Architecture: How LLMs Achieve Deeper Thinking with Fewer Tokens

    This article explains loop reasoning architectures for large language models, which share Transformer layer weights and execute them recurrently to increase effective depth without increasing parameter count. It covers the technical motivation, key engineering optimizations for memory and inference cost, benchmark results showing stronger reasoning with shorter chain-of-thought output, and practical implications for developers.

    1. Why Loop Reasoning? The Depth Dilemma of LLMs

    Since the Transformer architecture emerged, model capability has generally been positively correlated with network depth. Deeper networks imply stronger abstraction and reasoning ability, but directly stacking more layers introduces two difficult problems. First, parameter count grows linearly, driving up training and deployment costs sharply. Second, gradient propagation and optimization in ultra-deep networks become significantly harder, and the gains do not always continue as depth increases.

    Meanwhile, the rise of reasoning models has changed the path to stronger capability. These models “think” by generating a longer chain of thought before producing an answer, breaking down problems, trying alternatives, and backtracking. They trade inference-time computation for answer quality. But the cost is also clear: the longer the chain of thought, the more tokens are generated, and the higher the inference latency and cost. Moreover, much of the “thinking process” is unfolded as text, which is essentially a low-density form of computation.

    Loop reasoning architectures are proposed to address this tension: rather than spending all of the “thinking” on generating tokens, shift part of the reasoning into the model’s internal computational depth. By letting some Transformer layers share weights and execute recurrently for multiple rounds, the model can increase its effective network depth without changing its parameter count. This allows deeper reasoning to happen in latent space, achieving equal or better results with fewer explicit output tokens.

    2. Core Technical Approach: Weight Sharing + Recurrent Execution

    This idea did not appear out of nowhere. As early as 2018, research proposed a weight-shared deep structure—the Universal Transformer, submitted that year and formally published at ICLR the following year. Its core idea was to replace a fixed stack of layers with the same set of weights executed repeatedly. Theoretically, this simulates a network of arbitrary depth through repeated iteration of a single function while retaining the advantage of parameter efficiency.

    However, general recurrent structures have long faced deployment obstacles in large-scale pretraining, mainly from two sides:

    • Memory and inference overhead: Running two rounds means forward computation nearly doubles, and intermediate states such as KV Cache can also expand significantly without special handling.
    • Training stability: How to “retrofit” an already pretrained model into a recurrent structure, rather than pretraining from scratch, directly determines the engineering feasibility of the approach.

    One model team recently released a flagship model and provided a practical implementation path worth examining. Several key points are relevant to developers.

    1. “Retrofit,” Not “Retrain”

    This approach did not pretrain from scratch. Instead, it took a pretrained base model with about 750B parameters and 28 layers, and through further training converted all 28 layers into shared weights executed for two rounds. In the two rounds, the first round is responsible for building a global context state, while the second round continues reasoning and refining results based on the output of the first round. The result is a network with doubled effective depth but unchanged parameter count. Compared with pretraining a deeper model from scratch, this method trades a smaller amount of compute for a higher intelligence ceiling, and it aligns with the common engineering best practice of reusing existing assets.

    2. Three Key Engineering Optimizations

    The main costs of a recurrent structure are memory usage and inference overhead. For a model of this scale, the approach applied three targeted designs:

    • Per-token gated progressive write-back. Recurrent execution does not mean the second round can simply “overwrite” the first round’s results. This design writes each round’s candidate changes back into the residual stream proportionally: the first round focuses on building global context, while the second round focuses on refinement and fuller write-back. A gating mechanism controls the write magnitude, avoiding oscillation or forgetting of information across rounds and ensuring residual stream stability. For designers familiar with residual networks, this is equivalent to adding a learnable step-size coefficient to iterative updates.

    • KV Cache sharing across rounds. KV Cache is the largest contributor to memory usage in autoregressive inference. If each recurrent round keeps a complete cache, two rounds would directly double KV overhead. This approach lets the second round reuse the sparse KV from the first round, adding only KV within a sliding window rather than retaining the full cache. This keeps the deployment cost increase after upgrading to a recurrent architecture within a manageable range, which is especially important for cost-sensitive users of inference services.

    • Sparse attention index reuse across rounds. The second round directly reuses the sparse attention indices already computed in the first round, without repeating retrieval. This design builds on the index-sharing strategy already validated in the previous-generation model, where the indexer is reused across several layers. It shows that experience with index reuse can be directly transferred to recurrent scenarios.

    The forward process can be roughly described with pseudocode:

    1. # Pseudocode: single forward pass of a Loop Transformer
    2. hidden = embed(tokens)
    3. kv_shared = None # Produced in round 1 and reused in round 2
    4. for round_id in (1, 2):
    5. for layer in shared_layers: # All 28 layers share weights
    6. hidden, kv = layer(hidden, use_kv=kv_shared)
    7. if round_id == 1:
    8. kv_shared = sparse_indices(kv) # Keep only sparse indices
    9. # Gated progressive write-back: write this round's changes into the residual stream by ratio
    10. hidden = gating_merge(residual_stream, hidden, ratio=round_id)
    11. residual_stream = hidden
    12. logits = lm_head(residual_stream)

    3. Validation: Deeper Computation, Shorter Output

    To determine whether such an architecture is “worth it,” two questions need to be answered: Does capability actually improve? Is inference cost controllable?

    In a controlled experiment with the same parameter count—using an approximately 30B model with the same architecture as the 750B base described above, after long-context fine-tuning at the 200K level and with thinking mode enabled for evaluation, with training compute increased by only about 10%—enabling recurrence produced the following gains:

    Benchmark Loop Off Loop On
    AIME25 (math competition reasoning) 19.17 30.42
    GPQA-Diamond (graduate-level QA) 47.58 56.26
    MMLU-Pro (general knowledge) 71.65 75.05

    The gains are most significant on math and highly difficult reasoning tasks, which is intuitive: the extra computational depth from recurrence essentially gives the model more opportunities for internal reasoning, and tasks requiring multi-step reasoning benefit the most.

    More notably, the output side also changed: average output length across multiple benchmarks fell by 10% to 14%, with the reduction mainly coming from the chain of thought. This suggests that some reasoning steps originally unfolded as text were shifted into the latent-space computation enabled by recurrence—the model completed an equivalent amount of thinking with fewer tokens. For API callers, this directly means lower token costs and shorter response latency, representing a new path for inference cost optimization: previously, tokens were saved by compressing chains of thought or truncating output; now, the thinking process can be “built into” the architecture.

    In terms of inference speed, the model can reach up to 200 tokens/s during off-peak periods and about 70 to 80 tokens/s during peak periods, indicating that the cache and index optimizations above do keep the serving cost of the recurrent architecture within a usable range.

    4. Implications for Developers

    1. Parameter count is no longer the single indicator of capability. Shared-weight recurrent execution provides a scaling path that increases computation without increasing parameters. When selecting models in the future, developers should look beyond parameter scale and also consider the trade-off between effective computational depth and inference efficiency.

    2. Inference cost optimization is moving from tactics to architecture. From prompt engineering to compress chains of thought, to internalizing reasoning into depth at the architecture level, the levers of cost optimization continue to move downward. When planning cost models for LLM applications, enterprises should pay attention to changes in dimensions such as “equivalent capability per token cost.”

    3. Engineering support is as important as architectural innovation. Without the three supporting mechanisms—gated write-back, cache sharing, and index reuse—a recurrent architecture would have unacceptable costs. Any architectural innovation requires full-stack collaboration with inference engineering to land in practice.

    4. Similar ideas can be borrowed in developers’ own systems. For example, reusing sparse attention indices in inference services and merging intermediate results from multiple rounds by gating ratios can also be useful for optimizing self-developed inference engines. Developers who want to quickly experience these capability patterns can also validate and compare them on major cloud platforms through general model services and inference acceleration capabilities.

    5. Conclusion

    Loop reasoning architecture responds to one of the most practical questions of the LLM era with a simple idea: how to achieve deeper intelligence with fewer resources. Through shared-weight recurrent execution and three cache and index optimizations, it trades about 10% additional training compute for significant gains on reasoning benchmarks, and shifts part of the “thinking” from the token stream into internal computational depth, enabling shorter output and stronger results. As such architectures are gradually open-sourced and adopted, the trade-off between inference cost and intelligence ceiling will be redefined—an area worth ongoing attention for every developer working on model selection and inference optimization.