Beyond Parameter Scaling: Recurrent Intermediate Layers for Deeper Computation
Parameter scaling is not the only path to stronger models. This article examines recurrent execution of intermediate layers—reusing the same weights for a second pass—as a way to increase effective computation depth without increasing parameter count. It covers why repetition can help, how it differs from scaling parameters, gating and cache reuse, what it does and does not mean for attention recomputation and hidden-state reasoning, evaluation metrics, and engineering trade-offs.
In the race to improve large model capabilities, increasing parameter count was once the most direct path: models with more layers, wider hidden dimensions, and larger expert capacity usually imply stronger representational capability. But parameter scale is not the only variable that determines intelligence level.
Another approach is gaining attention: making some computation paths in the network execute repeatedly without significantly increasing model parameters. Put simply, the model does not “build a larger building”; instead, it lets existing intermediate layers process the same state for a second round. What increases is computation depth, not the number of weights.
This method can be abstracted as:
Input↓Pre-layers: execute once↓Recurrent layers: execute twice with the same weights↓Post-layers: execute once↓Output
Suppose a model originally has 78 layers, where the first 26 layers and the last 24 layers each execute once, and the middle 28 layers execute repeatedly once. Then the number of layer executions in a single forward pass is:
26 + 28 × 2 + 24 = 106
The “106 layer executions” here does not mean the model has 106 layers, nor does it mean the parameter count doubles. The middle 28 layers still have only one set of parameters; the same set of parameters is simply invoked twice. Therefore, this scheme essentially trades additional computation for deeper state transformation capability.
1. Why Repeating Intermediate Layers Can Work
A standard Transformer can be viewed as a layer-by-layer processing system. After the input representation passes through the first layer, it obtains preliminary features. It then passes through subsequent layers that continuously fuse context, abstract semantics, and correct predictions, ultimately forming an output distribution.
In the usual forward pass, each layer executes only once. Even if an intermediate state is ambiguous, later layers can only continue processing based on the current result. If the model forms an inaccurate internal representation at some step, later layers may correct it, but the correction space is constrained by layer count and computation path.
The idea of recurrent execution is different: first let the intermediate layers complete one state transformation, then send the transformed result back into the same network segment. The second pass is not a simple copy of the first pass output; rather, the network performs attention interaction, feature combination, and nonlinear transformation again on the new hidden state.
This can be understood as two different ways of “thinking”:
- Extending the chain of thought: generating more explicit intermediate tokens and writing reasoning steps into the output sequence;
- Increasing recurrent depth: not necessarily generating more text, but continuing to process existing information within the hidden state space.
The former mainly increases decoding steps; the latter mainly increases the number of times a single token passes through the network. Both may improve performance on complex tasks, but their resource consumption patterns differ.
2. How It Differs from Scaling Parameters
Scaling parameters usually means increasing the model’s capacity to memorize and express. A larger parameter space can hold more patterns, knowledge associations, and complex mappings, but the cost is that training cost, storage cost, and deployment cost rise together.
Recurrent computation is closer to “reusing existing capability.” It does not directly add new weight capacity; instead, it lets the model process once more under the same set of transformation rules. The differences can be summarized as follows:
| Dimension | Scaling parameters | Increasing recurrent computation depth |
|---|---|---|
| Weight count | Increases | Mostly unchanged |
| Compute per pass | Usually increases | Increases |
| Storage requirements | Increases significantly | Relatively manageable |
| Representational capacity | Directly expanded | Mainly strengthens the computation process |
| Training difficulty | Requires training a larger model | Requires adapting to repeated execution |
| Inference latency | May increase | Also increases |
| Best fit | Knowledge capacity, generalization | Complex reasoning, state correction |
Therefore, the “effect after recurrent execution” cannot be directly converted into some larger parameter scale. The phrase “reaching the level of a larger model” is usually only an analogy for task performance, not a strict parameter-equivalence relationship.
A model with fewer parameters but deeper recurrence may outperform some larger models on mathematical reasoning, program analysis, or long-context processing; however, it may not have an overall advantage in knowledge coverage, long-tail facts, and multidomain expression.
3. Gating: Preventing the Second Pass from Making Things Worse
Letting intermediate layers reprocess a state does not mean the second pass will necessarily be beneficial. If the model unconditionally changes hidden representations by a large margin, two problems can arise:
- Effective information already formed in the first pass is destroyed;
- Errors are amplified during repeated computation, causing the state to drift gradually.
Therefore, recurrent structures usually need some gating or mixing mechanism to control the influence of the second-pass result on the final state. Its abstract form can be written as:
h_first = F(h_in)h_second = F(h_first)g = Gate(h_first, h_second)h_out = g · h_second + (1 - g) · h_first
Here, F represents the repeatedly used intermediate layers, and g represents the gating weight. The gate is not necessarily a single scalar; it can also be a vector computed per token, per channel, or per layer.
The core value of gating has three points:
1. Preserve the stable first-pass result
If the second pass does not bring obvious gains, the model can reduce its influence so that the output stays close to the first-pass result. This is equivalent to retaining a fallback path for recurrent computation.
2. Let different tokens use different depths
Not all tokens need the same amount of computation. Simple content may be sufficient after the first pass, while complex reasoning positions need the second pass more. Fine-grained gating can let the model approximate adaptive computation.
3. Control training stability
Shared-weight recurrent structures cause gradients to pass through the same set of parameters multiple times. Without reasonable normalization, residual connections, and gating constraints, training may suffer from gradient instability or representation collapse. Gating can mitigate conflicts between different recurrent stages.
Note that gating does not mean “the model necessarily knows what it has thought.” It only learns a state fusion method that benefits the task objective; it cannot be simply interpreted as a human-like thinking switch.
4. Cache Reuse: Reducing Memory Pressure from Recurrent Computation
The most direct cost of recurrent execution is increased computation, but in practical deployment, memory usage is equally important. Especially in long-context scenarios, attention-related caches grow with sequence length. If the second pass fully copies all intermediate data from the first pass, memory pressure may rise quickly.
A common optimization is to distinguish information by scope:
- Long-range context: the first pass has already built an index or summary, and the second pass should reuse it as much as possible;
- Local context: more closely related to the current state, requiring recomputation or separate maintenance;
- Stable sparse attention structures: if the first pass has already determined attention positions, the second pass can continue to use part of the index.
An illustration is as follows:
First pass:Global context -> build sparse indexLocal context -> compute local attentionSecond pass:Reuse global indexReprocess local relationshipsUpdate current hidden state
The essence of this method is not “no recomputation at all,” but avoiding rebuilding all attention information from scratch. It is particularly valuable in long-sequence tasks because the cost of full repeated attention may be much higher than that of the intermediate layers themselves.
However, cache reuse has boundaries. If the index formed in the first pass is no longer suitable for the new state in the second pass, forced reuse may cause information loss. Therefore, engineering implementations usually need to trade off reuse ratio, index update frequency, and accuracy.
5. Does It Equal Recomputing Historical Attention?
Not necessarily.
Repeated execution of recurrent layers mainly means that the hidden state passes through the same set of network transformations again. Whether attention results for historical tokens are recomputed depends on the specific architecture and implementation strategy.
At least three possibilities exist:
Full recomputation
The second pass recomputes all attention relationships. The effect may be more complete, but computation and memory costs are highest.Partial reuse
Long-range information uses existing caches, and only the local scope is updated. This is a common compromise between accuracy and efficiency.Index reuse with value reaggregation
The candidate positions selected in the first pass are retained, but information is reaggregated according to the updated query state.
Therefore, “looping once” cannot be simply understood as “replaying all historical attention in full.” Recurrent depth describes the network execution process, while cache strategy is a specific system optimization; the two need to be discussed separately.
6. Does It Equal Passing a Hidden Draft Across Tokens?
Nor should it be simply understood that way.
In autoregressive models, each token usually has its own hidden state and reads context information through attention. Recurrent computation can let the hidden state at a position continue to evolve inside the network, but this does not mean the model additionally generates a draft text that can be directly read.
More accurate statements are:
- Explicit chain of thought: the draft exists as tokens and can be read by later positions through context;
- Implicit recurrent reasoning: intermediate states iterate in hidden space, and information propagates through network connections;
- The two can be combined: the model can generate a shorter intermediate sequence and also add internal recurrence at each position.
Hidden states are not inherently interpretable. Even if the second pass improves results, output length alone cannot determine which steps the model specifically executed internally. Therefore, when evaluating such mechanisms, shorter output cannot be directly equated with more efficient internal reasoning, and the complete reasoning process cannot be reconstructed from it.
7. Why Not Simply Split into “Draft Experts” and “Assertion Experts”?
An intuitive scheme is to split the network into two parts: one responsible for exploring and generating candidate ideas, and the other for checking and outputting conclusions. This is structurally clear, but it introduces new problems.
First, exploration and verification in complex tasks cannot always be strictly separated. A step in mathematical derivation may both propose a hypothesis and complete local verification. In program analysis, generating code and checking code also overlap.
Second, a hard split easily creates information barriers. If the state produced by the first part lacks sufficient detail, the latter part cannot correct it effectively; if too much intermediate information is retained, the benefits of modularization may be lost.
Third, training objectives become complex. The model needs to learn when to enter “draft mode,” when to switch to “assertion mode,” and how to handle the state interface between the two modes.
The shared-weight recurrent approach is more flexible: the same network segment can take on different functions across passes, with the first pass leaning toward constructing representations and the second pass leaning toward correction and integration, without manually defining strict boundaries.
8. Can Hidden States Be Given “Annotation Dimensions”?
From an engineering perspective, it is possible to try adding extra markers to hidden states, such as recording the current recurrent iteration, confidence, local objective, or computation phase. This information can be injected through positional encoding, conditioning vectors, extra channels, or gating signals.
However, “adding annotation dimensions” does not mean the model obtains a readable internal log. Some dimensions in hidden representations may serve multiple functions at once, and semantics across layers keep changing. To truly observe the model’s internal process, it is also necessary to combine:
- Intermediate state sampling;
- Activation distribution analysis;
- Attention path tracing;
- Task-level ablation experiments;
- Result comparison under different loop counts;
- Layer-by-layer comparison of error cases.
Therefore, annotation signals can help the model control computation, but they cannot automatically solve interpretability.
9. How to Evaluate Whether Recurrent Computation Is Actually Effective
When evaluating such architectures, do not look only at final accuracy; also pay attention to cost and behavioral changes.
At minimum, record the following metrics:
1. Task effectiveness
This includes different types of tasks such as mathematics, code, long-context understanding, factual question answering, and multi-step decision-making. A recurrent mechanism may be effective for some task types but offer limited gains for others.
2. Compute cost
It is necessary to measure layer executions per token, total floating-point operations, batch throughput, and end-to-end latency. Unchanged parameter count does not mean unchanged inference cost.
3. Memory usage
Focus on cache size, peak memory usage, growth trends under different context lengths, and whether nonlinear growth occurs as the loop count increases.
4. Output length
If the chain of thought becomes shorter, further confirmation is needed to determine whether reasoning efficiency improved or the model stopped earlier and became more concise. A conclusion cannot be drawn from length alone.
5. Stability
Compare performance across different random seeds, input lengths, and task difficulties, and check whether recurrent computation shows benefit variance or error amplification.
A more complete controlled experiment can be designed as follows:
Baseline modelBaseline model + longer explicit chain of thoughtBaseline model + one intermediate-layer loopBaseline model + loop and cache optimization
Only by comparing results under similar compute budgets can we determine whether the gains come from parameters, explicit tokens, or additional processing of hidden states.
10. Engineering Considerations for Deployment
First, parameter count cannot be the only cost metric. Deployment planning must also consider layer execution count, parallel efficiency, cache read/write, memory bandwidth, and batch size.
Second, loop count should not be increased blindly. Repeated computation has diminishing marginal returns and may even amplify errors after a certain point. Practical systems should use fixed depth or adaptive depth according to task difficulty.
Third, training and inference must keep the mechanism consistent. If the training stage has never seen recurrent states, temporarily repeating execution at inference time may cause distribution shift.
Fourth, cache optimization needs accuracy validation. Any reuse strategy may sacrifice some information, especially in tasks with frequent topic shifts or strong long-range dependencies.
Fifth, distinguish “capability improvement” from “expression changes.” Shorter output, faster responses, or more stable formatting do not necessarily mean the model has stronger reasoning ability; strict benchmarks and failure case analysis are required.
Conclusion: Computation Depth Is Becoming a New Capability Axis
Large model development is no longer limited to “stacking more parameters.” Parameter scale determines how much capability a model can hold, while computation depth affects whether the model can process existing information more fully within a single inference.
The core value of making intermediate layers repeat execution is not to create a fake “large-parameter model,” but to explore a new resource allocation approach: keep weight scale relatively stable and invest more budget in second-pass processing of key states, error correction, and context integration.
Of course, this method is not free. It increases computation, latency, and system complexity, and it cannot automatically explain the model’s internal process. A truly valuable technical evaluation should answer three questions at the same time:
How much computation was added?How much capability was gained?Is the deployment cost worth it?
When these three questions can be quantified and answered stably, recurrent computation will move from the conceptual “think again” to verifiable, deployable, and optimizable model engineering.
