Recurrent Depth Scaling: A New Take on LLM Architecture

    This article explains recurrent depth scaling as an alternative to simply increasing parameter counts. It covers how weight sharing and repeated execution of a shared block raise effective compute depth, why two rounds often outperform one, and how moving part of the reasoning into the forward pass can shorten output length. It also discusses multimodal input, million-token context, "pan-code" generation for professional software, evaluation methods based on controlled experiments and layered metrics, practical integration steps, and the compute-versus-capacity trade-offs and limits of the approach.

    1. The Starting Point: Parameter Count Is Not the Only Lever

    Over the past few years, the industry’s main path to stronger models has been to keep scaling up parameter counts and training data. But the marginal cost of that path is rising fast: memory usage, communication overhead, inference latency, and cost per call all inflate together, while the gains curve flattens out. So the industry has begun looking for a second lever — raising a model’s “effective compute depth” within a single forward pass, without adding parameters.

    Effective compute depth can be understood as how many times information is repeatedly processed inside the network. A conventional dense network is “single-pass”: each layer performs one transformation, and information then flows straight to the output. A recurrent structure allows the same set of weights to be invoked multiple times, letting the hidden state be progressively refined over several iterations. The intuition comes from iterative algorithms: many problems are not solved in one shot but are approximated more effectively over multiple rounds.

    2. Core Mechanism of Recurrent Depth Architectures

    2.1 Weight Sharing and Recurrent Execution

    One typical approach is to convert part of the middle layers of a base model into a weight-sharing structure and execute those layers recurrently for two rounds. Suppose the middle section of the base model has L layers. After the change, only one copy of the parameters is kept. The input hidden state h passes through these L layers in the first round to produce h1, then h1 is fed in as input for the second round to produce h2, which is then stitched together with the unmodified layers before and after to complete the forward pass.

    Illustrative pseudocode:

    1. def forward_loop(hidden, shared_block, rounds=2):
    2. for _ in range(rounds):
    3. hidden = shared_block(hidden) # the same weights are reused
    4. return hidden

    The key point: the parameter count stays the same, while activations and compute grow linearly with the number of rounds. This converts “capacity cost” into “compute cost” — friendly to memory, but more demanding on compute and latency.

    2.2 Why Two Rounds Often Beat One

    The gains from recurrence come from iterative refinement at the representation level. The first round is more like coarse-grained feature extraction; the second round performs residual-style correction on top of the existing representation, which is equivalent to deepening the network while reusing the same transformation prior. Compared with training a deeper network from scratch, a recurrent structure has fewer parameters, trains more stably, and is easier to adapt incrementally on an existing base model, without paying the cost of full pretraining.

    2.3 Relation to Chain of Thought: Moving Reasoning into the Forward Pass

    An easily overlooked benefit is shorter output length. Conventional reasoning models rely on long chains of thought, writing a large number of intermediate steps as explicit tokens. A recurrent structure shifts part of the reasoning pressure into extra computation inside the forward pass. The result is a drop in average output length on benchmarks alongside higher accuracy. For engineering teams the implication is direct: shorter generations mean lower decoding cost and more stable time-to-first-token performance.

    3. Expanding Capability: Multimodal Input and Ultra-Long Context

    A typical configuration for a new-generation flagship model is: a base model on the order of hundreds of billions of parameters, an added visual input channel, the ability to accept images, video, text, and files simultaneously, a context window reaching the million-token level, and a maximum single output on the order of a hundred thousand tokens.

    The engineering implications of this combination need to be unpacked:

    • Multimodal input lets the model directly read UI screenshots, design drawings, error screenshots, and screen recordings of operations, reducing information loss caused by manual paraphrasing;
    • Million-level context makes tasks such as “whole-repository code understanding,” “long-document review,” and “multi-turn log correlation analysis” feasible, but it also shifts pressure onto retrieval strategy and attention implementation;
    • Hundred-thousand-level output supports generating a complete module, a long report, or a batch of refactoring patches in one pass, provided there is streaming output and checkpointed continuation.

    It is worth stressing that long context is not free. The longer the context, the higher the cost per request, and there is a common phenomenon of “middle information being diluted.” In engineering practice, layered summarization, reordering of key fragments, and retrieval augmentation are usually still needed, rather than stuffing all material in at once.

    4. Pan-Code Positioning: From Writing Code to Operating Professional Software

    “Pan-code” refers to extending code generation capability to outputs that are not traditional programming: video generation scripts, 3D modeling workflows, mechanical structure design, shaders, and geometric interactive scenes. What they have in common is that these domains all have intermediate representations that can be formally described — scripts, parametric modeling steps, node graphs, and scene description languages.

    An abstracted task pipeline can be expressed as:

    1. natural language requirement
    2. → structured intermediate representation (script/parameters/node graph)
    3. → professional tool execution
    4. → artifact (image/model/animation/engineering drawing)
    5. → visual or numerical feedback
    6. → iterative correction

    Whether this pipeline closes the loop depends on two conditions: whether the model can generate intermediate representations that tools can parse correctly, and whether the system can feed execution results back to the model in multimodal form. The former relies on syntax and tool constraints; the latter relies on visual input capability. Only when both are present can the model complete multiple rounds of self-correction in tasks such as 3D modeling and robotic arm motion simulation, instead of producing unverifiable text in a single pass.

    5. Evaluation Methodology: Avoiding Being Misled by a Single Score

    One practice in the source material worth learning from is distinguishing “official controlled experiments” from “third-party independent evaluations,” and openly acknowledging that some internal evaluation scores were not disclosed. The takeaway for developers is to build their own evaluation system:

    1. Layered metrics: break tasks into dimensions such as syntactic correctness, functional correctness, tool-call success rate, long-horizon task completion rate, and retry recovery rate, instead of relying on a single aggregate score;
    2. Controlled experiment design: fix the base model and data, toggle only the recurrence switch, and observe capability changes at the same parameter count — only then can gains be attributed to the architecture itself;
    3. Include cost dimensions: record average output length, end-to-end latency, and cost per task at the same time, to prevent “capability up but the bill out of control”;
    4. Failure mode statistics: tool-call failure rate and self-recovery ability after failure often predict production readiness better than peak scores.

    At the same parameter count, enabling recurrence produced clear improvements on math and science reasoning benchmarks while output length actually dropped. This kind of “two-way improvement” is the most convincing form of evidence for an architecture-level change.

    6. Engineering Adoption: Integrating the New Architecture into Existing Systems

    To evaluate this class of models in your own system, the recommended order is:

    • Scenario selection: prioritize tasks with long context, multimodal input, and multi-turn tool calls, since these scenarios best show the value of recurrent depth and pan-code capability;
    • Cost control: reserve compute budget for the extra forward computation that recurrence brings, and combine caching, batching, and streaming output to reduce perceived latency;
    • Tool-layer hardening: apply static validation, sandboxed execution, and least privilege to model-generated scripts and parameters, keeping the failure rate within an acceptable range;
    • Feedback loop: feed execution screenshots or logs back in, using visual input to complete a second round of correction;
    • Observability: use monitoring, alerting, and logging services to record call chains, retry counts, and recovery behavior, forming a data asset for continuous optimization.

    On the infrastructure side, model weights and datasets are suited to object storage, inference services run on a container platform, and asynchronous tasks are decoupled through a message queue, with full-chain metrics wired into a monitoring and alerting system. These are general capability categories, and specific choices should be evaluated against your own scale and compliance requirements.

    7. Costs and Boundaries

    The cost of a recurrent structure must be stated clearly: compute grows with the number of rounds, and inference latency and throughput are affected; shared weights may limit representation diversity, and too many rounds may cause representations to converge. So it is not universally optimal, but a trade-off of “trading compute for capacity and depth.” Whether it is worth it depends on how sensitive the business is to latency, cost, and the capability ceiling.

    8. Conclusion

    Raising effective compute depth through recurrent execution represents an evolution path different from simply scaling parameters: the parameter count stays fixed, capability is gained through iterative refinement, and part of the reasoning is migrated from explicit long output into the forward pass. Combined with multimodal input, million-level context, and pan-code extrapolation, the value of this class of models in real engineering tasks lies mainly in long-horizon tasks and tool collaboration. For developers, the real key is to build a layered evaluation and cost-observability system, verify architecture gains with controlled experiments, and then decide whether to bring it into the production pipeline.