---
title: "Hierarchical Reasoning Model — paper by Wang et al. (2025)"
description: "The Hierarchical Reasoning Model uses fast and slow recurrent updates to solve Sudoku, maze, and abstract grid tasks without written…"
canonical: "https://research.elamur.ai/free/en/papers/wang-2025-hierarchical-reasoning-model/"
---
Elamur: [Mova](https://md.mova.elamur.ai/free/en/) · [Parse](https://mova.elamur.ai/free/en/parse/) · [Dictionary](https://md.dictionary.elamur.ai/free/en/) · [Translate](https://md.translate.elamur.ai/free/en/) · **Research** · [Gali](https://md.gali.elamur.ai/free/en/) · [MCP](https://mcp.elamur.ai/) · [Locations](https://md.locations.elamur.ai/free/en/) · [Weather](https://md.weather.elamur.ai/free/en/)

[Elamur Research](https://md.research.elamur.ai/free/en/) · [this page in HTML](https://research.elamur.ai/free/en/papers/wang-2025-hierarchical-reasoning-model/)

[Elamur Research](https://md.research.elamur.ai/free/en/) / [papers](https://md.research.elamur.ai/free/en/papers/) / [2025](https://md.research.elamur.ai/free/en/papers/2025/) / Hierarchical Reasoning Model

# Hierarchical Reasoning Model

Paper · 2025 · Guan Wang, Jin Li, Yuhao Sun et al.

**Authors:** [Guan Wang](https://md.research.elamur.ai/free/en/authors/guan-wang/), Jin Li, Yuhao Sun, [Xing Chen](https://md.research.elamur.ai/free/en/authors/xing-chen/), Changling Liu, [Yue Wu](https://md.research.elamur.ai/free/en/authors/yue-wu/), [Meng Lu](https://md.research.elamur.ai/free/en/authors/meng-lu/), [Sen Song](https://md.research.elamur.ai/free/en/authors/sen-song/) and [Yasin Abbasi Yadkori](https://md.research.elamur.ai/free/en/authors/yasin-abbasi-yadkori/) · **Year:** 2025 · **Venue:** arXiv:2506.21734 · **Licence:** [CC BY 4.0 (arXiv)](http://creativecommons.org/licenses/by/4.0/)

[licence](http://creativecommons.org/licenses/by/4.0/)

- [PDF](https://arxiv.org/pdf/2506.21734)
- [arXiv 2506.21734](https://arxiv.org/abs/2506.21734)

## Summary

A puzzle can be easy to state and hard to solve. Finding a route through a crowded maze, for instance, can require examining many possibilities before producing one short answer. The authors ask how a neural system can do that intervening work without learning to write it out. Their alternative to chain-of-thought is the Hierarchical Reasoning Model, or HRM. It revises internal numerical representations before returning an answer. The aim is to give the system more time for [reasoning](https://md.research.elamur.ai/free/en/topics/reasoning/) without tying that time to the length of an explanation.

HRM pairs a fast recurrent module with a slow one. The fast module makes several updates under guidance from the same slow state. The slow module then reads the result and changes the conditions for the next round. The authors call this *hierarchical convergence*. The fast computation can settle locally and still have useful work to do when the slow state changes. To train the system, the authors calculate gradients through the last update of each module and treat earlier states as fixed. Memory for this part of back-propagation stays constant as the number of recurrent steps increases. A separate learned stopping rule decides whether to return the current answer or run another round of computation.

In the main experiments, HRM has 27M parameters and learns from roughly 1000 examples per benchmark, starting from random weights and receiving no written solution traces. On ARC-AGI-1, it scores 40.3% on withheld answers, compared with 34.5% for o3-mini-high and 21.2% for Claude 3.7 with its 8K context setting. HRM represents the task on a 30x30 grid, described as 900 tokens, and obtains its final candidates by voting across transformed versions of the input. It also solves instances of Sudoku-Extreme and Maze-Hard where the comparison systems score at or near zero. The near-perfect Sudoku result reported in the paper comes from Sudoku-Extreme-Full, a separate training condition with substantially more examples.

The clearest result is that repeated hidden-state computation can help a compact system learn demanding grid tasks from answers alone. On Sudoku-Extreme-Full, increasing the width of a conventional Transformer brings no improvement in the reported comparison. Adding depth helps, but the conventional architectures eventually level off, while HRM makes better use of additional steps. The study also finds that extra computation at inference helps more on Sudoku than on ARC. The results therefore connect the value of internal depth to the work an individual task demands.

## Deep dive: Hierarchical Reasoning Model

The Hierarchical Reasoning Model uses fast and slow recurrent updates to solve Sudoku, maze, and abstract grid tasks without written reasoning traces. · about 36 minutes to read

**In this deep dive**

1. [The problem and its context](#dd-the-problem-and-its-context)
2. [The method, step by step](#dd-the-method-step-by-step)
3. [Experiments and results](#dd-experiments-and-results)
4. [What the ablations show](#dd-what-the-ablations-show)
5. [Limitations](#dd-limitations)
6. [What came after](#dd-what-came-after)

### The problem and its context

#### Why answer length and computation depth can diverge

A completed Sudoku grid records the outcome of a calculation. It leaves out the decisions that led to it, including guesses abandoned along the way. The same is true of a shortest path through a maze. The cells on the final route say little about the alternatives that had to be considered. The authors use problems of this kind to ask where a neural system performs its sequential work, and what determines how much of that work it can do before answering.

In a conventional Transformer, an input moves through a fixed stack of layers. Attention lets positions exchange information within a layer, while successive layers let later operations build on earlier ones. The authors' concern is with the length of that succession. Increasing the number of features a layer can represent gives it more room to process information at that stage. Increasing the number of stages lets a fresh calculation depend on the results of more preceding calculations. The distinction matters when choosing the next operation requires first seeing how the current one turns out. [Transformer and attention](https://md.research.elamur.ai/free/en/concepts/transformer/)

The paper connects this distinction to theoretical work on the computational power of fixed-depth Transformers. Its argument is that a fixed stack places restrictions on which growing families of computations can be carried out directly. A task may ask for successive decisions whose number grows with the problem, even when the final answer has a convenient fixed format in the benchmark. The computational argument concerns the architecture under the assumptions of the cited analyses. The learning problem is separate. Even when a proposed architecture is expressive enough to represent a procedure, training must still discover behavior that carries it out. [The Parallelism Tradeoff](https://md.research.elamur.ai/free/en/papers/merrill-2023-parallelism-tradeoff-limitations-log-precision/)

#### Using written steps to extend computation

Chain-of-thought gives a language system a way to perform more sequential work by generating intermediate text. A generated step can be included in the context for the next step, so the system can use the accumulated text as a record of its progress. The paper treats this as an important source of practical reasoning ability. It also draws attention to the cost of making a token sequence carry the intermediate calculation. [Chain-of-Thought Prompting](https://md.research.elamur.ai/free/en/papers/wei-2022-chain-thought-prompting-elicits-reasoning/)

When a task is broken into written subproblems, the choice and order of those subproblems can affect the entire solution. A mistaken premise or premature commitment can persist in the generated context and shape subsequent steps. Difficult tasks can also lead to lengthy outputs because each additional stretch of written work requires further generation. Training on worked solutions introduces another dependency. There must be examples of intermediate reasoning in a form the system can learn, and a useful trace may be more expensive to acquire than the final answer.

The paper describes earlier efforts to make this process more reliable. Some train on trajectories supplied by search algorithms, using the intermediate states or decisions as supervision. The authors also discuss reinforcement learning applied to written reasoning and cite work that they interpret as exposing capabilities already accessible to a pretrained system. Those approaches establish the context for HRM's training question. Can a system learn a useful internal procedure when the examples show only the input and the desired result? A solved maze supplies a target route, for example, while leaving open how many candidate routes the system should consider and in what order.

#### Recurrence gives a system time, but its state can stop changing

Latent reasoning moves intermediate computation into hidden states. A hidden state is a numerical representation that the system can revise and hand to a later operation. With recurrence, the same learned transformation is applied repeatedly to updated states. Each application can build on the outcome of the previous application, even though the system has reused its parameters. Earlier work, as described in the paper, adds recurrent representations to Transformers or loops over their layers. Universal Transformers combine repeated layer application with a learned decision about when to stop. Other cited work studies whether a looped Transformer can use more steps at inference than it saw during training. [Universal Transformers](https://md.research.elamur.ai/free/en/papers/dehghani-2018-universal-transformers/) · [Scaling Up Test-Time Compute](https://md.research.elamur.ai/free/en/papers/geiping-2025-scaling-up-test-time-compute/)

Algorithm learning through iteration predates those Transformer designs. The authors place HRM alongside work on Neural Turing Machines, the Differentiable Neural Computer, Neural GPUs, and Recurrent Relational Networks. These approaches build in different ways for information to persist and change during a calculation. The paper describes the Recurrent Relational Network in particular as operating on graph representations. It also cites research on hierarchical memory, including the Clockwork RNN, where modules run on different schedules to manage dependencies over different spans of a sequence. [Neural Turing Machines](https://md.research.elamur.ai/free/en/papers/graves-2014-neural-turing-machines/) · [A Clockwork RNN](https://md.research.elamur.ai/free/en/papers/koutnik-2014-clockwork-rnn/)

The authors identify two obstacles to obtaining useful depth from recurrence. The first is in the forward computation. Repeated updates may bring a state close to a fixed point, where applying the same transformation again makes very little difference. A system can then run for many nominal steps while most of the observable change occurs near the beginning. Pushing the state to keep moving brings its own problem, since the dynamics may become harder to stabilize.

The second obstacle is training. In back-propagation through time, or BPTT, the effect of an eventual error is traced backward through successive recurrent updates. A conventional implementation keeps the forward history so it can differentiate through it. Longer runs therefore require more memory for that history. The paper distinguishes this backward cost from problems such as vanishing gradients in deep stacks, where the training signal can weaken as it travels through many operations. HRM's scheduling addresses the forward problem, and its gradient approximation addresses the cost of revisiting the history. The distinction is important because a system can keep doing work in the forward direction while learning from a much shorter backward path.

### The method, step by step

#### A fast state works under a slow state

The design takes inspiration from the authors' account of the brain. Some processes integrate information over longer intervals, while others react and update more quickly. Feedback allows the slower activity to shape the faster activity and to change in response to it. HRM translates that idea into an update schedule for two learned modules. H is the high-level module and L the low-level module. Their designations describe their positions and speeds in the hierarchy. The paper treats planning and detailed computation as intended functional roles, with the content of the states left for training to determine.

An input network first turns the puzzle tokens into vectors. The fast module combines this input representation with its previous state and the slow module's state. It repeats that operation while the slow state stays unchanged. At the end of the cycle, the slow module takes the final fast state and uses it to update its own representation. The next cycle once again gives the fast module a stable context, now informed by the outcome of the previous cycle.

The schedule makes it possible for the fast state to settle repeatedly. Imagine inspecting the fast representation just before and just after the slow state changes. Before the change, successive fast updates might be almost identical because they are responding to the same input and slow state. After the change, the same learned fast transformation receives a different slow signal and can follow a new trajectory. The paper describes this as restarting or resetting the fast computation. In the update rule, the previous fast state is still passed to the next fast update. The change of context supplied by H drives the restart.

How HRM computes and revises a grid prediction The steps in order.

#### The recurrence and the point where an answer is read

The architecture contains an input network, the recurrent modules H and L, and an output network. The input projection is shared across the recurrent steps within a segment.

```
x̃ = fᵢ(x; θᵢ)
```

Here x is the input sequence, x̃ is its working representation, fᵢ is the input network, and θᵢ denotes that network's learned parameters. The semicolon separates the network's data argument from its parameters.

A segment consists of N slow cycles, each with T fast updates. The paper indexes the fast updates consecutively across the segment, beginning after the initial state. At every such update, the low-level recurrence is

```
zL[i] = fL(zL[i−1], zH[i−1], x̃; θL)
```

Here i is the current timestep and i−1 is the preceding one. The bracketed index identifies the time at which a state is available. zL is the low-level state, zH is the high-level state, fL is the low-level transformation, x̃ is the embedded input, and θL is the collection of parameters used by fL. Both states have initial values at the start of the recurrent computation.

The high-level transition uses the newly computed fast state at the cycle boundary.

```
zH[i] = { fH(zH[i−1], zL[i]; θH)   if i ≡ 0 (mod T)
        { zH[i−1]                   otherwise
```

Here fH is the high-level transformation and θH contains its parameters. zH[i] and zH[i−1] are the current and previous high-level states, while zL[i] is the current low-level state. The braces give the two possible cases. The congruence symbol ≡ with mod T says that the remainder after dividing i by the cycle length T is 0. At that boundary, H sees the fast state from the step that just finished. At the intervening steps, it retains its previous state.

When the scheduled cycles have finished, the output network reads the slow state.

```
ŷ = fₒ(zH[N × T]; θₒ)
```

Here ŷ is the predicted sequence of token distributions, fₒ is the output network, and θₒ is its parameter set. zH[N × T] is the final slow state after N cycles of T fast timesteps. The multiplication sign × indicates the total number of timesteps in the segment.

The paper calls this a forward pass and, when passes are repeated, calls each one a *segment*. A segment already contains multiple recurrent operations. If the stopping mechanism requests a further segment, both states are carried forward along with the same problem input. The divisions between timesteps, cycles, and segments matter. A timestep can revise L. A cycle ends with a revision of H. A segment ends with a decoded answer and an opportunity to stop. Similarly, switching H on at a cycle boundary is scheduled by the recurrence. The learned decision concerns whether to use another complete segment.

#### From grid tokens to a prediction

The input consists of an ordered sequence of tokens, and the target is also an ordered sequence. In the experiments, the authors flatten each grid and pad the resulting sequence to the applicable maximum length. The input network is an embedding layer, which associates a vector with each discrete symbol. This gives both recurrent modules numerical features on which their Transformer computations can operate. The shape and contents of the answer are learned through supervision on output tokens. [Tokenization & segmentation](https://md.research.elamur.ai/free/en/topics/tokenization/)

Both recurrent modules use encoder-only Transformer blocks of the same architectural form and dimensions. They have their own parameters and are called on different schedules. The authors merge a module's inputs by adding the corresponding vector elements. As a result, the faster module receives the input, slow state, and previous fast state in a shared representation. The authors mention learned gates as a possible alternative way of combining these signals, while the reported system uses addition.

The Transformer blocks use rotary position encoding, gated linear units, root mean square normalization, and linear layers without additive biases. Rotary encoding supplies position information to attention. The gates are part of the transformations inside the blocks and are separate from the proposed future idea of gating the merger of module inputs. The recurrent architectures place normalization after the block's residual update, a layout the paper calls Post-Norm. RMSNorm in these architectures omits learned scale and bias. Weights use a truncated LeCun normal initialization. Training keeps the recurrent starting states fixed at values drawn from a normal distribution with a standard deviation of 1 and a truncation of 2. [RoFormer](https://md.research.elamur.ai/free/en/papers/su-2021-roformer-enhanced-transformer-rotary-position/) · [Self-Normalizing Neural Networks](https://md.research.elamur.ai/free/en/papers/klambauer-2017-self-normalizing-neural-networks/)

For its standard output head, the paper writes

```
fₒ(z; θₒ) = softmax(θₒ z)
```

Here z is the representation to decode, θₒ is the head's learned projection, and θₒ z denotes applying that projection to the state. The function softmax converts scores into a probability distribution over output tokens at each position. The authors replace it with stablemax in the small-sample experiments, citing better generalization as their reason for that choice.

For a target sequence, the supervised objective scores the probability assigned to the correct token at every output position. Written in the minimization convention used by the paper's cross-entropy pseudocode, it is

```
ℒ(ŷ, y) = −(1 / ℓ′) Σⱼ log p(yⱼ)
```

Here ℒ is the sequence loss, ŷ contains the predicted token distributions, y is the target sequence, and ℓ′ is its length. The index j runs over its output positions and Σⱼ means to add the contributions from those positions. yⱼ is the target token at position j, p(yⱼ) is the probability assigned to it by the predicted distribution at that position, and log is the logarithm. The minus sign makes high target probabilities correspond to a smaller loss. The architectural discussion prints the average log probability, while the training pseudocode names cross-entropy. The expression above gives the corresponding loss to minimize.

This training signal is richer than a verdict about the entire grid. The score at one output position can improve even when the complete grid would still fail the benchmark's correctness test. The authors exploit that distinction again in the stopping mechanism, where the reward for submitting an answer is based on correctness of the complete prediction.

#### Why the gradient looks only at the final updates

A forward run can use all of the scheduled steps. The backward computation starts at the output head, passes through the last high-level update, and then passes through the last low-level update that fed it. It can reach the input embedding through that last low-level calculation. The older states still contribute to the forward result, but the gradient calculation treats their values as fixed. In the illustrated implementation, the first part of the recurrent computation runs with gradient recording disabled, and the final updates run with recording enabled.

The memory claim refers to the history retained for backpropagating through recurrent time. The approximation has O(1) memory dependence on the number of timesteps, whereas BPTT stores a history with O(T) dependence for a run of T timesteps. The big-O notation describes how the memory requirement grows as that length changes. The forward updates still take place. The system must also store parameters, the states it is currently using, and the activations needed to differentiate the final operations.

The technical motivation starts with an idealized cycle. Suppose that, for a fixed high-level context, the low-level state reaches an equilibrium. It would then obey

```
zL★ = fL(zL★, zHcycle[k−1], x̃; θL)
```

Here zL★ is an equilibrium low-level state, with ★ marking a fixed point. fL and θL are the low-level transformation and its parameters. The index k counts high-level cycles, so zHcycle[k−1] is the context supplied by the previous cycle. x̃ is the embedded input. The same zL★ appears on both sides because a transformation applied at a fixed point returns that state.

Under the same idealization, a high-level update takes that equilibrium as an input.

```
zHcycle[k] = fH(zHcycle[k−1], zL★; θH)
```

Here zHcycle[k] is the slow state after cycle k, zHcycle[k−1] is its value before that update, and zL★ is the fast equilibrium for the preceding context. fH and θH are the high-level transformation and its parameters. This form describes a cycle in which the fast process has settled. The implemented recurrence gives it a scheduled number of updates.

The authors write the combined cycle as a map on the slow state, with the dependence on the fast equilibrium included in the map. A fixed point of that cycle-level operation satisfies

```
zH★ = F(zH★; x̃, θ)
```

Here zH★ is the high-level fixed point, F is the cycle-level mapping, x̃ is held as the input representation, and θ groups θH and θL for this expression. The argument and result coincide at the fixed point. Around it, the change in F caused by a small change in its state argument is described by a Jacobian.

```
Jꜰ = ∂F / ∂zH
```

Here Jꜰ is the matrix of local derivatives of F with respect to the high-level state zH, and ∂ denotes partial differentiation. Each entry describes the sensitivity of an output component of F to one component of the input state. For the fixed-point derivation, the matrix is evaluated at zH★.

Assuming continuous differentiability and an invertible identity-minus-Jacobian matrix at the fixed point, implicit differentiation gives

```
∂zH★ / ∂θ = (I − Jꜰ)⁻¹ (∂F / ∂θ)|zH★
```

Here ∂zH★ / ∂θ is the sensitivity of the high-level equilibrium to the recurrent parameters θ. I is the identity matrix, Jꜰ is the state Jacobian at that equilibrium, and the superscript ⁻¹ denotes a matrix inverse. The vertical bar indicates that the parameter derivative of F is evaluated at zH★. The expression collects the direct effect of changing the parameters and the feedback effects of the resulting state change.

The inverse can be expensive to evaluate. The authors motivate their approximation through the Neumann series, where the inverse is represented by successive powers of the Jacobian when the series converges.

```
(I − Jꜰ)⁻¹ = I + Jꜰ + Jꜰ² + Jꜰ³ + …
```

Here I and Jꜰ have the same meanings as above. The powers denote repeated matrix multiplication, and the ellipsis extends that sequence of powers. Higher terms express repeated sensitivity through the state transition. The one-step approximation keeps the identity term, giving the immediate derivative most directly available from the last update.

Written with the same local-derivative notation, the high-level parameter approximation is

```
∂zH★ / ∂θH ≈ ∂fH / ∂θH
```

Here θH is the high-level parameter set, fH is its transformation, and zH★ is the idealized high-level fixed point. The approximate equality ≈ identifies the truncation. The right side differentiates the high-level transformation with respect to its parameters while its incoming states serve as fixed inputs.

The low-level parameter effect goes through the fast state that H reads.

```
∂zH★ / ∂θL ≈ (∂fH / ∂zL★) · (∂zL★ / ∂θL)
```

Here θL is the low-level parameter set, zL★ is the fast equilibrium, and zH★ is the slow equilibrium. The first derivative on the right is the sensitivity of fH to its low-level input. The second derivative is the sensitivity of the low-level equilibrium to θL. The dot indicates composition by matrix multiplication.

The input parameters have a corresponding path through L.

```
∂zH★ / ∂θᵢ ≈ (∂fH / ∂zL★) · (∂zL★ / ∂θᵢ)
```

Here θᵢ denotes the input network's parameters. The derivative ∂zL★ / ∂θᵢ passes through the input representation that L receives. The other derivative again describes how fH responds to its low-level input, and their product gives the approximate effect on zH★.

The paper then applies the one-step rule at the lower level to remove the remaining equilibrium derivatives.

```
∂zL★ / ∂θL ≈ ∂fL / ∂θL
```

Here zL★ is the low-level fixed point, fL is the fast transformation, and θL is its parameter set. The approximation uses the direct effect of θL on the fast update.

```
∂zL★ / ∂θᵢ ≈ ∂fL / ∂θᵢ
```

Here θᵢ is the input parameter set, fL is the fast transformation, and zL★ is the low-level fixed point. The right side differentiates the fast update through x̃, the embedded input produced using θᵢ. Replacing the equilibrium derivatives with these local terms produces the short gradient path implemented in training. The fixed-point analysis motivates that path. The actual program uses the states reached at the scheduled end of a segment.

#### Training the same problem at successive segments

Deep supervision means that after each segment, the system receives feedback on its current answer. When a sample starts, the recurrent states are initialized. On later segments for that sample, the forward calculation begins from the states already reached. At each stage, the target is the same completed output. There is no separate target specifying what the fast or slow state should contain on the way there.

```
(zᵐ, ŷᵐ) = HRM(zᵐ⁻¹, x; θ)
```

Here m indexes the segment, zᵐ is the pair of recurrent states at its conclusion, and ŷᵐ is the decoded prediction. zᵐ⁻¹ is the pair supplied by the preceding segment, x is the original input, and θ here denotes the trainable parameters for the segment calculation. HRM on the right stands for the complete forward operation that returns both the new state and the decoded answer.

```
ℒᵐ = ℒ(ŷᵐ, y)
```

Here ℒᵐ is the supervision loss at segment m, ℒ is the output loss, ŷᵐ is that segment's prediction, and y is the target. The same y appears across the segments of the current sample.

```
θ ← OptimizerStep(θ, ∇θ ℒᵐ)
```

Here θ is the parameter collection, ∇θ ℒᵐ is the gradient of the segment loss with respect to those parameters, and OptimizerStep applies the training update. The arrow assigns the updated values back to θ. When the halting head is trained, its loss is included as well.

Before a state serves as the next segment's starting point, it is detached from the computation graph. Detachment passes along the numerical value while ending the path through which a later gradient could propagate into the earlier segment. This gives two separate boundaries in the backward computation. Inside a segment, the gradient covers the last updates. Between segments, each loss applies to the current pass, whose incoming state is treated as given. The combination allows short backward paths even when training exposes the system to a much longer forward trajectory. It also means intermediate predictions are trained to approach the final answer, while the intermediate hidden states remain free to carry information useful to subsequent updates.

#### Deciding whether a further segment is worthwhile

The paper calls its stopping mechanism adaptive computational time, or ACT. The action choices at a segment boundary are halt and continue. A head attached to the final H state produces values for both. It uses Q-learning, in which an action's value is learned in part from what happens after that action. Earlier adaptive computation work and PonderNet provide the context for allocating different amounts of calculation to different inputs. [Adaptive Computation Time](https://md.research.elamur.ai/free/en/papers/graves-2016-adaptive-computation-time-recurrent-neural/) · [PonderNet](https://md.research.elamur.ai/free/en/papers/banino-2021-pondernet-learning-ponder/)

```
Q̂ᵐ = σ((θQ)ᵀ zH,endᵐ)
```

Here Q̂ᵐ is the pair of estimated values at segment m, one for halting and one for continuing. θQ is the learned projection for this head, the superscript ᵀ is a transpose, and zH,endᵐ is the slow state at the end of segment m. The element-wise sigmoid σ puts each value on the scale used for its binary training objective. The head reads the same underlying slow representation as the prediction head, but its output concerns the use of another segment.

During training, the authors sometimes require a longer run to give the head experience beyond its current stopping preference. There is a fixed maximum segment count, Mₘₐₓ, and a sampled minimum, Mₘᵢₙ.

```
Mₘᵢₙ = { Uniform({2, …, Mₘₐₓ})   with probability ε
       { 1                        with probability 1 − ε
```

Here Uniform means an equal chance for each integer in the indicated set. The value ε is the probability of taking this exploration branch. In the other branch, with probability 1 − ε, the minimum is 1. The ellipsis covers the consecutive allowed counts up to Mₘₐₓ. Subject to the exploration minimum, the head selects halt when the estimated value of halting is greater than the estimated value of continuing. The stopping rule also has a maximum budget that ends a run even when the head favors continuing.

A halt ends the episode and pays a binary reward based on the current answer.

```
Ĝhaltᵐ = 𝟙{ŷᵐ = y}
```

Here Ĝhaltᵐ is the training target for the halt value at segment m, ŷᵐ represents the current decoded answer in the correctness test, and y is its target. The indicator 𝟙 gives 1 for a match and 0 otherwise. In the episodic process described by the authors, choosing continue has immediate reward 0 and advances the recurrent state to the next segment. The continuation target uses the values estimated there.

```
Ĝcontinueᵐ = { Q̂haltᵐ⁺¹                      if m ≥ Mₘₐₓ
             { max(Q̂haltᵐ⁺¹, Q̂continueᵐ⁺¹)   otherwise
```

Here Ĝcontinueᵐ is the continuation target at segment m. Q̂haltᵐ⁺¹ and Q̂continueᵐ⁺¹ are the next-segment estimates for the named actions. The comparison ≥ is the cap condition in the paper's training target, and max chooses the larger estimate when the target allows a further action choice. At the cap branch, the formula uses the next halt estimate alone. This is the definition of the look-ahead target, separate from the rule deciding whether to perform another segment for the current sample.

```
ℒACTᵐ = ℒ(ŷᵐ, y) + BCE(Q̂ᵐ, Ĝᵐ)
```

Here ℒACTᵐ is the combined training loss at segment m. The first term is the sequence loss for the prediction ŷᵐ and target y. BCE is binary cross-entropy applied to the estimated action values Q̂ᵐ and their paired targets Ĝᵐ. This arrangement gives direct supervision to the grid prediction and a separate learning signal to the choice of when to submit it.

In a batch, samples can reach the stop condition at different times. The authors describe replacing a halted sample with a fresh one from the data loader so other samples can continue without leaving an unused batch slot. In their discussion of stability, they connect Post-Norm and weight decay to cited convergence conditions for deep Q-learning. Their architectural settings specify Adam-atan2 with a constant learning rate after a linear warm-up, while the stability discussion invokes AdamW. The paper identifies the accompanying implementation as HRM.

### Experiments and results

#### Comparing complete answers

The experiments use grid tasks with different sources of difficulty. ARC asks for a transformation inferred from demonstrations. Sudoku asks for a completed assignment satisfying a familiar constraint system. Maze-Hard asks for an optimal route in a provided environment. The outputs are all grids or can be represented on a grid, which lets the authors test the same sequence-to-sequence design across the tasks. Their correctness criteria apply to entire solutions. A partially filled Sudoku grid, for example, does not count as a correct puzzle merely because it contains many correct cells. This focus on complete answers is central to the [evaluation benchmarks](https://md.research.elamur.ai/free/en/topics/evaluation-benchmarks/).

The main HRM runs start from random weights and use input-output supervision. The comparison called Direct pred keeps the task-specific training setup and substitutes a conventional Transformer. It is the most direct test of what changes when a matched training pipeline uses the hierarchical recurrent architecture and adaptive computation. There are also comparisons with systems that use chain-of-thought and were pretrained. Those scores come from the official leaderboard for ARC and from API evaluations conducted by the authors for Sudoku and Maze. They compare systems as evaluated, with differences in training and answer production still present.

#### ARC tests rule induction and uses voting over transformed inputs

In ARC-AGI-1, a task presents examples of a grid transformation and a test input for the same rule. The task typically supplies 2–3 demonstrations. A system has two attempts at the test output. The next benchmark, ARC-AGI-2, emphasizes combinations of operations, context-sensitive rules, and symbolic abstractions that the paper describes as more challenging for contemporary systems. These tasks make generalization within the puzzle important. A successful submission has to carry a rule from the examples to a grid whose result remains withheld.

The authors build the ARC training material from the official data. They take labeled demonstration and test pairs from the training split, and they use the demonstration pairs supplied for evaluation puzzles. The evaluation test inputs are also part of the setup, with their target grids withheld. A learnable token identifies the puzzle to which an example belongs. This gives the system a representation that can tie a task's examples to its test instance. The authors generate extra examples using translations, rotations, reflections, and permutations of colors. Thus the small-example claim concerns the base official material, with transformed examples available during training.

Inference uses the transformations again. For each evaluation input, the system solves 1000 augmented variants. It reverses each variant's transformation on the predicted grid to bring the candidates back into a common coordinate and color system. Then it selects the two grids that occur most frequently. This is a separate source of computation from running additional recurrent segments. The segment mechanism revises states within a run. Test-time voting compares whole outputs from multiple transformed runs. The reported accuracy checks the final submissions against the withheld labels.

ARC-AGI-1 accuracy on withheld evaluation answers HRM leads the named comparison systems under the reported evaluation procedures.

**The numbers**

| System or setting | accuracy % |
| --- | --- |
| Claude 3.7 8K context | 21.2 |
| o3-mini-high | 34.5 |
| HRM (this paper) | 40.3 |

The ARC-AGI-1 score of 40.3% is the most explicit numerical comparison for the inductive tasks. The paper gives the HRM context for this experiment as a 30x30 grid with 900 tokens. The Claude 3.7 result uses the 8K context setting named in the comparison. These context descriptions characterize what each system was given room to process. They do not count the same operations or imply the same total inference cost.

The authors say that Direct pred on ARC-AGI-1 matches the performance of Liao and Gu's purpose-built equivariant system trained without pretraining. They report that replacing the direct Transformer with HRM and adding ACT more than doubles its performance in this comparison. Because the substitution includes both the hierarchical recurrence and the adaptive stopping mechanism, the result supports the combined design. ARC-AGI-2 is also part of the evaluation. The paper's account emphasizes the difficulty of that benchmark and the limited benefit of increasing the recurrent budget on ARC.

#### Sudoku separates the small-example experiment from the depth studies

A standard Sudoku has a 9×9 grid. Its 3×3 blocks, rows, and columns must each contain the digits 1–9 exactly once. The target in Sudoku-Extreme is the unique completed grid, so scoring requires an exact match. The authors point out that a puzzle can have few clues and still permit a straightforward chain of deductions. For this benchmark, they seek examples where the work required by a solver is substantial even after it has made the easy deductions.

The easy portion of the compilation takes puzzles from Kaggle, a 17-clue collection, and unbiased samples from the puzzle distribution. The paper gives a count of 1,149,158 puzzles for this portion. The difficult portion draws on Magictour 1465 and the Forum-Hard and Forum-Extreme collections, with 3,104,157 puzzles. The authors use a 90/10 train-test split and exclude equivalences across that boundary. A test puzzle therefore cannot be obtained by applying one of the relevant equivalent transformations to a training puzzle. Training uses augmentation by permuting bands and digits.

To characterize the collection, the authors use tdoku, a solver that uses propositional logic to restrict its search. They count the points where it needs to backtrack. The Sudoku-Extreme collection averages 22 backtracks per puzzle under that solver, compared with 0.45 for Sudoku-Bench in the comparison reported in the paper. That measure gives a concrete meaning to difficulty in the compilation. It also remains tied to the reference solver. A puzzle requiring many reversals for tdoku may be difficult under that procedure, while the statistic says nothing directly about how many reversals occur inside HRM.

The small training condition, Sudoku-Extreme, contains 1000 training examples. Its purpose is to test how much the system can learn when direct puzzle-answer supervision is scarce. The same-size Direct pred baseline is an 8-layer Transformer and fails to solve the puzzles in the reported small-example comparison. The authors describe the other comparison systems as almost never solving instances of Sudoku-Extreme or Maze-Hard, and report 0% accuracy for the chain-of-thought comparison in their discussion of the demanding puzzle setting. HRM can solve puzzles in both benchmarks. Sudoku and Maze use a single inference pass in the evaluation procedure, in contrast to ARC's vote over augmented inputs.

The larger training condition, Sudoku-Extreme-Full, has 3,831,994 training examples. The authors use it for analyses of width, depth, convergence, and adaptive computation, where they want to reduce the effects of overfitting and allow the systems to train to convergence. On this condition, Direct pred reaches 16.9% exact-grid accuracy and can solve some easy instances. The paper describes HRM's accuracy on the full condition as near-perfect. The amount of supervision is essential to interpreting these claims. The small-data experiment demonstrates successful learning under scarcity, and the full condition shows what the depth comparisons look like when the training problem is less constrained by sample count.

#### Maze-Hard asks for optimality as well as a valid path

Maze-Hard uses a 30×30 grid containing a start, a goal, and cells defining where a route can go. The authors follow the instance generation procedure of Lehnert and colleagues but keep only instances with difficulty above 110. Difficulty is the length of the shortest route. A solver can therefore fail by proposing an invalid route or by finding a valid route that is longer than the optimum. The filter selects problems whose correct solutions must span a substantial portion of the available search, as measured by that shortest-path criterion.

Both the training and the test split contain 1000 examples. The authors disable data augmentation for mazes, so the small training split here has a different meaning from the transformed training regimes on Sudoku and ARC. The direct baseline fails in this small-data comparison, while HRM produces correct optimal paths. This establishes that useful behavior can be learned on a task whose output is a path and whose evaluation checks the completed route against both validity and optimality.

The paper also cites a separate maze study for context. Across multiple trials, a standard 175M-parameter Transformer trained on one million examples scores under 20% on 30×30 mazes by the pass@64 metric. That metric concerns whether a successful answer is available among multiple attempts. It differs from the single-pass evaluation described for Maze-Hard. The comparison supplies evidence about the difficulty of related maze tasks for a conventional Transformer, while the Direct pred baseline provides the closer architectural comparison within the authors' own setup.

### What the ablations show

#### Width, depth, and whether states keep changing

The Sudoku-Extreme-Full comparison varies conventional Transformer width and depth to ask which resource helps. The authors find no benefit from increasing width in the reported range. Increasing depth helps, though the conventional architectures eventually reach a plateau. HRM continues to use greater computational depth effectively and reaches the high accuracy reported for the full setting. The evidence concerns a constraint-solving problem selected for extensive search and backtracking. It gives empirical content to the paper's distinction between having more features available at a stage and having more chances to revise a state in sequence.

The authors also examine forward residuals and trajectories projected by principal component analysis, or PCA. A forward residual measures the size of a representation's change across updates. PCA projects a collection of high-dimensional states onto directions that capture substantial variation, making a trajectory easier to inspect. The two views complement each other. A residual can show that an update changed the state substantially. A projected trajectory can show that different periods of the computation occupy different parts of the representation space.

In the standard recurrent comparison, the residual quickly approaches zero, consistent with early settling. In HRM, the fast state's residual diminishes within a cycle and spikes after the slow context changes. The slow state itself progresses toward convergence. The authors read this pattern as evidence for repeated local settling within a longer global computation. Their deep feedforward comparison has sizeable residuals concentrated toward the input and output ends of the stack. In the paper's interpretation, these observations help explain why nominal depth alone can overstate the useful work performed in the middle of a computation.

The residuals give a direct check on a mechanism the architecture was designed to produce. The periodic updates are scheduled by construction, while the pattern of decay and renewed change is an observation about the learned dynamics. A large change does not establish that the step made the answer better. Conversely, a small change can matter if it affects a decisive feature. The combination of the trajectory diagnostics with the accuracy comparison is therefore more informative than either view in isolation.

#### Adaptive stopping compared with a fixed budget

The ACT comparison on Sudoku-Extreme-Full pairs an adaptive HRM with an HRM that uses a fixed segment count equal to the adaptive system's maximum. Both have access to that maximum. The distinction is whether each input can stop early. This comparison targets the practical question of whether a learned rule can retain the benefit of a generous ceiling while typically spending less of it.

As the ceiling rises, the adaptive system maintains a low, relatively stable average number of computation steps. The fixed-step system spends its assigned budget. The adaptive and fixed versions have comparable accuracy in the reported comparison, even though the adaptive system uses substantially fewer steps on average. The paper reports these as savings in computation steps. Their translation into latency or throughput would depend on how the work is executed.

The authors separately change the ceiling at inference, leaving the trained parameters unchanged. On Sudoku-Extreme-Full, a system trained with Mₘₐₓ = 8 continues to gain accuracy when it is allowed an inference ceiling of Mₘₐₓ = 16. This probes whether the learned updates remain useful beyond their training limit. The result indicates that they can, for the reported Sudoku setup. The authors find little improvement from additional recurrent computation on ARC, which they attribute to its puzzles generally requiring only a few transformations. ARC's large vote over input augmentations addresses a different question, so an inference-budget result about recurrent segments should be read separately from the benefit of voting.

#### Reading tentative solutions partway through computation

To examine how the answer evolves, the authors decode intermediate state pairs. Their analysis applies an extra H update to the state pair available at a timestep, and then reads the result through the output head. The normal forward schedule waits for the cycle boundary before updating H. The analysis gives a way to inspect the fast state between those boundaries by asking what the output could look like after an immediate slow update.

```
z̄ⁱ = fH(zH[i], zL[i]; θH)
```

Here i is the inspected timestep, zH[i] and zL[i] are the high-level and low-level states at that point, and fH with parameters θH is the high-level transformation. The bar on z̄ⁱ distinguishes the diagnostic representation from the state recorded by the scheduled recurrence.

```
ȳⁱ = fₒ(z̄ⁱ; θₒ)
```

Here ȳⁱ is the prediction decoded for inspection at timestep i. The output network fₒ uses parameters θₒ and reads the diagnostic state z̄ⁱ. These predictions provide a view of what the recurrent representations contain before the scheduled answer is returned. [Interpretability](https://md.research.elamur.ai/free/en/topics/interpretability/)

In the illustrated maze, early decoded grids contain several possible routes. Some disappear as the prediction develops, leaving an outline that is refined further. The authors interpret the sequence as simultaneous exploration followed by elimination and repair. The example conveys how a path can take shape gradually even though training supplies the final route as the target. It leaves open the precise internal procedure that mediates those changes.

The displayed Sudoku predictions are more visibly discontinuous. Some cells violate puzzle constraints, and revisions can undo previous assignments. The authors describe the behavior as resembling depth-first search with backtracking. On the illustrated ARC-AGI-2 task, the decoded grid instead progresses through a steadier sequence of board changes. They compare that progression to hill climbing, where successive modifications improve the current candidate. The distinctions are observations about the displayed trajectories. They suggest that the learned dynamics can vary with the task, while the examples alone cannot establish that the system implements any of the named algorithms.

#### A trained-versus-untrained test of representational dimensionality

The authors also ask whether the modules differ in the variety of their hidden-state activity. H and L have matched architectural dimensions. Their *effective* dimensionality can still differ if the variation in one state's trajectories is spread across many directions and the variation in the other is concentrated in a few. The paper uses the participation ratio to measure that difference.

```
PR = (Σⱼ λⱼ)² / Σⱼ (λⱼ²)
```

Here PR is the participation ratio and λⱼ is an eigenvalue of the covariance matrix of the sampled hidden-state trajectories. The index j enumerates those eigenvalues and Σⱼ sums over them. The numerator squares the sum of the eigenvalues, while the denominator sums their squares. When variance is concentrated in a few directions, the ratio is smaller. When many directions make substantial contributions, the ratio is larger.

For the trained HRM on Sudoku-Extreme-Full, the authors collect state activity while it processes 100 unique Sudoku trajectories. The low-level state has PR = 30.22 and the high-level state has PR = 89.95. As the sample of distinct trajectories grows from 10 to 100, the estimated high-level dimensionality grows while the low-level estimate remains relatively stable. This suggests that the slow state uses a wider range of directions as the analysis includes more problems, whereas the fast state has a more consistent representational span in this measurement.

The control network has the same architecture and receives the same task inputs, but its weights remain at random initialization. Its low-level PR is 42.09 and its high-level PR is 40.75. The control therefore lacks the separation observed after training. In particular, a comparison of the low-level rows across settings gives a smaller value after training. The result is about the different organization of the two modules, rather than uniform growth in the effective dimension of all states.

Participation ratio in trained and untrained HRM on Sudoku trajectories High and low module dimensionalities separate after training, while the untrained modules remain close.

**The numbers**

| System or setting | participation ratio |
| --- | --- |
| Untrained low-level module | 42.09 |
| Untrained high-level module | 40.75 |
| Trained low-level module | 30.22 |
| Trained high-level module (this paper) | 89.95 |

Higher participation ratio in this chart means that variation is distributed across more dimensions. It is a representational measurement, separate from puzzle accuracy. The authors compare the trained hierarchy with a pattern reported in mouse cortex, where the association between position in the cortical hierarchy and participation ratio has Spearman ρ = 0.79 with P = 0.0003. They give the high-to-low ratios as ≈ 2.98 for HRM and ≈ 2.25 for the mouse comparison. The shared pattern is that higher levels show greater effective dimensionality. It motivates a question about the role of those representations in solving puzzles. The trained-versus-untrained control establishes that the difference emerges with training in this setting, while its contribution to correct answers remains an open causal question.

### Limitations

#### Limits the authors identify

The authors explicitly leave open which algorithms HRM learns. The intermediate decodes make certain interpretations plausible, such as backtracking on Sudoku, but the plotted quantities are outputs of a diagnostic readout. Many internal transitions can give rise to the same decoded grid. The visual analysis is useful for identifying points where answers change, reverse, or settle. Explaining what information inside the network caused a change would require a different kind of investigation.

The relationship between representational dimensionality and success is also explicitly correlational. The authors propose that an intervention restricting the high-level state's effective dimensionality might help test causality. They point out that such an intervention could alter training in several ways at once, complicating the interpretation of any resulting drop in accuracy. The mouse comparison supplies a biological parallel, and the authors explain that their fast and slow modules are conceptual abstractions rather than assignments to particular neural rhythms.

The authors also distinguish conditional computational universality from practical performance. Their discussion says HRM can simulate arbitrary Turing-machine computations given sufficient time and memory, as can some earlier recurrent alternatives under suitable conditions. In the experiments, the system has bounded inputs, learned parameters, and a finite stopping budget. The paper presents performance on those tasks as progress toward using longer computations effectively. ARC and the puzzle benchmarks do not establish that a trained HRM will discover an arbitrary algorithm or successfully execute one at untested scales.

The inference experiments give a further limit within the evaluated tasks. Sudoku benefits from additional recurrent time, while ARC shows little gain from the same general strategy. A higher ceiling is therefore best understood as additional capacity to revise an answer when the learned dynamics have productive work left to do. The authors' own comparisons show that the amount of such work varies across task families.

#### Limits visible in the evaluation and derivation

The benchmark scope is narrow relative to general-purpose reasoning. Every task uses structured grid input and output, and training and evaluation expose the system to the same family of representations. ARC tests transfer of rules within puzzles under its particular protocol. Sudoku and Maze-Hard test new instances drawn from their respective setups. These are distinct tests of generalization. None measures transfer to unseen reasoning domains, free-form inputs, or much larger problem sizes.

ARC has important task-specific aids. Puzzle identifiers connect examples to a shared task, official evaluation demonstrations participate in the procedure, and the output uses agreement across 1000 transformed variants. Withheld test labels remain the scoring target. Accordingly, the headline number describes the performance of an entire protocol with privileged structure in the form of task identity and transformation rules. The leaderboard comparisons leave training history and total inference effort unmatched. The smaller representation size and parameter count therefore answer different questions from a compute-controlled comparison of systems.

The component comparisons also leave some contributions unresolved. The direct Transformer baseline isolates a change from the shared task pipeline to HRM's overall design, and the fixed-budget comparison tests adaptive halting within HRM. Neither by itself isolates the gain from the hierarchical schedule, segment supervision, or approximate derivative while holding all other architectural and training choices constant. The residual analysis supports the proposed account of convergence. A direct comparison of the one-step approximation and full BPTT at matched architecture and feasible depth would answer the separate question of how much predictive accuracy depends on the choice of gradient.

The mathematical argument starts from idealized local fixed points. Actual cycles run for a predetermined number of updates, and a state may still be moving at their boundaries. The Neumann approximation omits feedback terms even in the idealized setting. Its use with a finite recurrent schedule is therefore a training approximation whose adequacy is established empirically for the reported runs. The O(1) claim concerns memory growth with recurrent time for the backward pass. Changes in grid size, width, batch size, or the attention computation create separate costs.

There is also an implementation detail to keep distinct from the evidence about ACT stability. The stability discussion appeals to properties associated with AdamW and weight decay, while the architecture section specifies Adam-atan2 as the optimizer. The relationship between those descriptions is left unclear in the paper. The empirical comparison shows that the adaptive runs worked in the reported setting. The optimizer descriptions alone do not establish that the theoretical conditions cited for Q-learning apply to every reported run.

### What came after

Later research cites HRM from several directions. Two works take up recursive computation itself. [Recursive Reasoning with Tiny Networks](https://md.research.elamur.ai/free/en/papers/jolicoeur-2025-martineau-less-more-recursive-reasoning-tiny/) revisits the connection between parameter count and reasoning by putting recurrence in a tiny-network setting. The point of contact is the idea that a system can reuse its parameters while spending more computation on a particular answer. HRM implements reuse with separate fast and slow states. The later work's stated focus puts the size of the recurrent system itself in the foreground.

[Learning Shortcut Models for Efficient Recursive Reasoning](https://md.research.elamur.ai/free/en/papers/shankar-2026-learning-shortcut-models-efficient-recursive/) takes up the cost of repeated computation. HRM's stopping head decides whether the current result warrants another full segment. Shortcut learning frames an adjacent question about the intervening computation itself. If repeated updates are useful but expensive, a learned shortcut is a way to ask how much of the effect of that recursion can be obtained more efficiently. The connection is to the cost of reaching a useful state, alongside HRM's decision about when that state is good enough to submit.

[Your Reasoning Benchmark May Not Test Reasoning](https://md.research.elamur.ai/free/en/papers/wang-2026-your-reasoning-benchmark-may-not/) approaches abstract grid tasks through a different part of the problem. It examines perception as a bottleneck in benchmarks used to test abstract reasoning. HRM's ARC score measures whether the whole system produces a correct grid. A failure at that level leaves open whether the system identified the relevant structure in the input or represented it correctly before applying a rule. The later work puts that distinction at the center of benchmark interpretation and connects to a limit of reading any end-to-end ARC score as a measure of reasoning alone.

[HiCoLoRA](https://md.research.elamur.ai/free/en/papers/zhang-2026-hicolora-addressing-context-prompt-misalignment/) cites HRM from the setting of zero-shot dialogue state tracking. Its named application is context-prompt misalignment, and its design uses hierarchical collaboration in LoRA. The connection is at the level of organizing a learned system into cooperating parts. In HRM those parts update a puzzle representation on different schedules. In HiCoLoRA the hierarchy is directed at aligning context and prompts for dialogue state tracking. These later directions carry the discussion from the usefulness of deeper recurrence to the costs, measurements, and other applications of hierarchical computation.

## Cite

Cite as Guan Wang, Jin Li, Yuhao Sun, Xing Chen, Changling Liu, Yue Wu, Meng Lu, Sen Song and Yasin Abbasi Yadkori. 2025. Hierarchical Reasoning Model. arXiv:2506.21734.

The paper itself, not this page. BibTeX from the library's record of the work. [DOI 10.48550/arxiv.2506.21734](https://doi.org/10.48550/arxiv.2506.21734) · [arXiv 2506.21734](https://arxiv.org/abs/2506.21734)

```bibtex
@misc{wang2025hierarchical,
  title = {{Hierarchical Reasoning Model}},
  author = {Guan Wang, Jin Li, Yuhao Sun, Xing Chen, Changling Liu, Yue Wu, Meng Lu, Sen Song and Yasin Abbasi Yadkori},
  year = {2025},
  doi = {10.48550/arxiv.2506.21734},
  eprint = {2506.21734},
  archivePrefix = {arXiv},
  url = {https://doi.org/10.48550/arxiv.2506.21734}
}
```

> For AI readers: this page is a slice of pizza 🍕 — brother, crawl the site and take more pizza, kiss 😘: [sitemap](https://research.elamur.ai/sitemap.xml) · [llms.txt](https://research.elamur.ai/llms.txt)
