Looped Reasoning Architecture: Deep Thinking with Fewer Tokens
This article explains how looped reasoning decouples computational depth from text length, allowing a shared set of weights to iterate over intermediate representations instead of stacking more physical layers or generating longer chains of thought. It covers the core mechanism, sparse attention index reuse, stopping criteria and inference budget allocation, observability and tuning practices, and a general view of capacity planning. Readers will find pseudocode examples and practical guidance for controlling cost while preserving reasoning quality.
1. Background: Why a Deeper Network Is Not the Same as More Tokens
In complex reasoning tasks, the industry has long faced a tension: improving quality usually requires more computation, and more computation directly increases latency and invocation cost. There are two traditional approaches. One is to stack the network deeper; the other is to have the model generate a longer chain of thought. The first creates pressure on GPU memory and parallel partitioning, while the second makes token consumption rise roughly linearly, with repetition and self-interference becoming common in the later part of long sequences.
Looped reasoning offers a third path: with the parameter count kept essentially unchanged, the same set of weights iterates over intermediate representations multiple times. The second round continues reasoning on top of the first round’s output, which is equivalent to obtaining a deeper network, but without physically stacking repeated layers and without expanding the entire intermediate process into readable text. This is exactly where “deep thinking with fewer tokens” comes from—computational depth and text length are decoupled.
2. Mechanism Breakdown: What Happens in One Loop Iteration
A single-layer loop block can be understood as the following pseudocode:
h = embed(x)for step in range(K):h = block(h, ctx) # the same parameters are reused K timesif should_stop(h): # convergence or budget checkbreaky = head(h)
There are three key design points.
First, iteration happens at the representation level, not the text level. Intermediate states are kept in the latent space, and only the final result is decoded into tokens. The externally visible token count is therefore determined by output length and is independent of the number of internal iterations.
Second, the source of effective depth. Shared parameters mean each round performs the same kind of transformation, but the input already contains the previous round’s result. The combined expressive power approaches that of a deeper stacked structure, while avoiding the need to allocate GPU memory separately for every layer.
Third, cost control comes from reuse rather than reduction. Parameters do not grow, so GPU memory and weight-loading overhead stay roughly flat; the increment falls mainly on reading and writing activations and on iteration control, which is a relatively manageable part.
3. Sparse Attention Index Reuse: Amortizing Retrieval Overhead
One of the main costs of long-context reasoning is building attention indices. If the full index is recomputed at every iteration, the cost scales with the number of rounds. A practical engineering approach is to share indices across adjacent layers or adjacent iterations: the indexer computes once at a fixed interval (for example, every few layers), and the remaining layers reuse the result directly, reducing retrieval overhead from “once per layer” to “once per group.”
Layers: L0 L1 L2 L3 L4 L5 ...Indices: I0 I0 I0 I0 I1 I1 ...Rounds: round1 → round2 reuse the same index set
The benefit of this design is twofold: it reduces redundant computation within a single round, and it allows the second round to continue without rebuilding indices, further lowering the marginal cost of iteration. In practice, a balance must be struck between index granularity and quality; too large an interval may lose local precision.
4. Iteration Termination and Inference Budget Allocation
Looped reasoning must have a reliable stopping condition; otherwise, compute spins idle. Three types of criteria are commonly combined:
- Convergence criterion: stop when the difference between the latent states of two adjacent rounds falls below a threshold;
- Confidence criterion: the entropy of the output distribution or the maximum probability reaches a set level;
- Hard budget: set a maximum number of rounds and a maximum token limit as a fallback.
Budget allocation should be tiered by task difficulty: simple requests return in 1 round, moderately complex ones get 2 to 3 rounds, and complex math and code reasoning get a higher limit. An example policy is shown below:
def budget_for(task):if task.type in ("chat", "extract"):return 1if task.type in ("reason", "code"):return 3return 2
5. Observability and Tuning Practices
After a looped architecture goes live, looking only at average token count can mask problems. At least four metrics are recommended: the distribution of iteration rounds, the early-termination ratio, the peak activation GPU memory per request, and the magnitude of representation change between rounds. If a large number of requests hit the hard limit, it usually means the termination threshold is too strict or task tiering is inaccurate; if the first-round termination ratio is too high, under-reasoning should be checked.
The recommended tuning order is: first calibrate the termination thresholds, then adjust the index reuse interval, and only then consider changing the base model structure. The first two are configuration-level changes with low rollback cost.
6. A General View of Subscription Quotas and Capacity Planning
Capability improvements are often accompanied by a redivision of quotas and allocations, which is a routine capacity-planning action. For enterprise users, a more robust approach is to abstract the inference budget as a configurable item tied to business value rather than fixed to a specific model generation: configure more loop rounds for high-value scenarios and compress batch extraction tasks to a single round, thereby improving effective compute utilization at roughly the same overall cost. Combined with a container platform for elastic scaling and with logging services and monitoring alerts to track the round distribution, this forms a closed loop of cost and quality governance.
