Recurrent Depth Architecture Explained: Running a 28-Layer Network Twice

    This article breaks down recurrent depth architecture, in which a shared set of 28 layers is executed twice so the hidden state is refined across passes without duplicating parameters. It clarifies the difference between model parameters, internal computation, and chain-of-thought tokens, explains why post-training, representation stabilization, and deployment optimization are required, and offers practical guidance on estimating compute cost, latency, and evaluation.

    1. Introduction: Why Recurrence Is Back in Focus

    In conventional stacked LLMs, the main path to greater capability is to keep adding layers and parameters. But growing depth also raises training difficulty, memory consumption, and inference latency at the same time. Recurrent depth architectures take a different approach: a group of computation layers with shared weights is executed repeatedly, and the hidden state from the previous pass is fed into the next one for further processing. This increases the effective computational depth while keeping the parameter count roughly unchanged.

    According to publicly available technical descriptions in the industry, a model foundation was further trained after pre-training to introduce a recurrent structure, running its 28 layers for two passes. This shows that recurrent architectures have reached fairly large model scales. However, parameter reuse does not mean computation is free, nor does it guarantee that every task runs faster. To understand it accurately, you need to separate three things that are often confused: model parameters, internal computation, and chain-of-thought tokens.

    2. What Actually Repeats

    A recurrent architecture repeats a group of computation layers inside the model. It does not run the exact same input several times, and it does not resubmit the first pass’s answer to the chat interface. Every pass shares the same set of weights, but the hidden state keeps changing.

    You can think of it as the same group of analysts revising the same working draft over and over: the people are not duplicated, but the draft is updated. This analogy only illustrates parameter reuse; what is actually passed along is a high-dimensional numerical representation, not a piece of text that has already been written.

    A conceptual flow looks like this (illustrative only, not a runnable implementation):

    1. Input
    2. ↓
    3. Pre-processing (e.g., embedding)
    4. ↓
    5. Initial hidden state h0
    6. ↓
    7. Shared recurrent block: pass 1 h0 -> h1
    8. ↓
    9. Same block: pass 2 h1 -> h2
    10. ↓
    11. Post-processing (normalization, output projection, etc.)
    12. ↓
    13. Predict the next token

    The key point is that weights can be shared, but the hidden state must change. Recurrence is therefore neither repeated computation nor feeding intermediate text results back in.

    3. What “28 Layers Run Twice” Means

    Looking only at the recurrent segment, the number of executions can be understood as 28 × 2 = 56 layer computations. The 56 describes the unrolled computation of that segment; it is not the model’s total layer count, and it does not mean the parameters are doubled. The network still contains other layers, gating structures, caches, and other designs.

    Three boundaries are worth emphasizing:

    • Parameter count: the recurrent segment keeps only one set of weights, so parameters do not grow linearly with the number of passes.
    • Computation count: the number of multiply-add operations in the forward pass increases with each pass, so latency and compute overhead are real.
    • Source of capability: the gains from recurrence depend on how the model is trained; it does not inherently provide reasoning or self-correction.

    4. Why Supporting Changes Are Necessary

    Stability after adding recurrence and the deployment overhead both need dedicated handling. Common industry practices fall into the following categories (general technical categories, not specific product capabilities):

    1. Training strategy: continue training on top of the foundation model so it learns to converge its representations within a limited number of passes, avoiding representation drift as passes increase.
    2. Representation stabilization: introduce normalization or residual-style updates at the recurrent boundary to control the scale of the hidden state and reduce accumulated error across passes.
    3. Deployment optimization: apply operator fusion, cache reuse, and batch scheduling to the repeated computation graph to reduce extra memory and scheduling overhead.

    Illustrative pseudocode (structure only):

    1. h = embed(tokens)
    2. for _ in range(num_loops): # the same parameters are shared
    3. h = shared_block(h) # the hidden state is updated each pass
    4. logits = head(norm(h))

    5. How It Differs from Chain-of-Thought Tokens

    Chain-of-thought tokens write intermediate reasoning into the context, consuming sequence length and the externally visible context window. Recurrent depth keeps the processing inside the model and does not increase the number of output tokens. The two can complement each other but cannot replace each other: one is “write it out and read it back,” the other is “compute a few more passes internally.”

    6. Practical Advice and Common Pitfalls

    • Do not estimate the cost of a recurrent model by doubling the total layer count or the parameter count; estimate compute from the number of layer executions after unrolling.
    • Do not assume recurrence always reduces latency; in throughput-bound scenarios, the extra passes may cancel out the gains.
    • Evaluate by task type, and watch for stability, long-context performance, and tail latency.
    • If you use general-purpose cloud capabilities, container platforms, log services, and monitoring and alerting can help you observe the resource curves of multi-pass execution.

    7. Conclusion

    The value of recurrent depth architecture lies in trading parameter reuse for effective computational depth, but its cost is real computation and engineering complexity. Only by understanding the boundaries between parameters, computation, and chain-of-thought tokens can you correctly assess the benefits and costs and make sound architecture and deployment decisions.