Interactive figure — needs JavaScript. Drag the number of low-level steps to reshape the convergence curve.

Paper-explained Series 4

TL;DR

Most AI models “reason” by talking themselves through problems using chain-of-thought, which is slow, brittle, and expensive.
This article explains a different idea called the Hierarchical Reasoning Model (HRM).

Instead of reasoning in words, HRM thinks silently in layers, similar to how the human brain separates planning from execution. A slow, high-level module decides what to do, while a fast, low-level module figures out how to do it — repeating this cycle until the problem is solved.

Despite being much smaller and trained on very little data, HRM solves hard problems (like complex Sudoku, mazes, and abstract puzzles) that even large language models fail at.

The big takeaway: better reasoning doesn’t necessarily come from bigger models or longer explanations — sometimes it comes from better internal structure.

In this article, we will cover A-Z about HRMs…

link to original paper: https://arxiv.org/pdf/2506.21734

Core Philosophy and Architecture

HRM doesn’t reason by talking to itself — it reasons by thinking longer.

The Hierarchical Reasoning Model (HRM) is designed to overcome a core limitation of modern Transformers: fixed computational depth. No matter how long the input or how hard the task, a standard Transformer always performs the same number of layer-wise computations. This fundamentally limits its ability to carry out long-horizon reasoning, search, and backtracking.

HRM takes a different approach. Instead of increasing depth through more layers or longer chains of thought, it decouples computation time from architectural depth. This allows the model to think longer internally — inside its hidden states — before producing an output. This idea is known as latent reasoning: reasoning happens in continuous internal representations rather than explicit text tokens.

What HRM Actually Is (Architecturally)?

Despite being conceptually different, HRM is still built from Transformer blocks:

So HRM does not replace Transformers — it reuses them inside a recurrent, hierarchical loop.

The Two-Module Hierarchical Structure

HRM splits reasoning across two tightly coupled recurrent modules that operate at different timescales, mirroring how the brain separates high-level planning from low-level execution.

High-Level Module (\( z_H \)) — The Planner

You can think of this module as deciding what kind of solution strategy should be pursued next.

Low-Level Module (\( z_L \)) — The Executor

This is the part that does the “heavy lifting” within a given plan.

The Interaction Loop (How Reasoning Actually Happens)

HRM reasoning unfolds through repeated hierarchical cycles:

  1. Input Encoding
    The input \( x \) is mapped into a latent working representation \( \bar{x} \) using an embedding network.
    For example: Converts discrete tokens (or grid values like Sudoku cells) into continuous vectors
    Note: Uses full self-attention

  2. Low-Level Computation (Inner Loop)
    With the high-level state held constant, the low-level module iterates for \( T \) steps:

    • It updates based on its previous state
    • It attends to the input representation
    • It is guided by the current high-level context
    • During these steps, the low-level module converges toward a local equilibrium — effectively performing search or refinement.
  3. High-Level Update (Outer Loop)
    After \( T \) steps, the high-level module:

    • Observes the final low-level state
    • Updates its own state to reflect progress
    • Establishes a new global context
    • Reset and Restart
      The low-level module is now exposed to a new high-level state.
      This resets its convergence, allowing it to begin a fresh computational phase instead of stalling.
Input x tokens / grid cells Embedding x̄ (full self-attention) Low-level module z_L fast · executor · search & refinement T inner steps per cycle → local fixed point z_L* High-level module z_H slow · planner · updates once per cycle final low-level state new global context (resets convergence) Output ŷ after the final cycle
One hierarchical cycle of the dual-timescale recurrence: the fast low-level module iterates \( z_L^{(i)} = f_L\!\big(z_L^{(i-1)},\, z_H,\, \bar{x}\big) \) for \( T \) steps while the high-level state stays fixed; the slow high-level module then updates \( z_H \leftarrow f_H\!\big(z_H,\, z_L^{(T)}\big) \), issuing a new context that resets the inner loop.

This process — called hierarchical convergence — allows HRM to perform deep, multi-stage reasoning while remaining stable and efficient

Why This Matters Compared to Transformers + CoT

The result is a model that can execute algorithmic reasoning, search, and backtracking — all without generating intermediate reasoning text.

Mathematical Foundations

HRM’s ability to reason deeply without exploding memory or training instability comes from two tightly connected mathematical ideas:
(1) how computation unfolds over time and
(2) how gradients are computed without backpropagating through that entire history.

I. Hierarchical Convergence

A core problem with standard recurrent models is premature convergence.

In a typical RNN, repeated application of the same update function causes the hidden state to quickly settle into a fixed point. Once this happens, updates become negligibly small, effectively halting computation — the model stops “thinking,” even if more steps are allowed.

Note: It is premature convergence is different from Over-Smoothing problem also faced by RNNs.

HRM avoids this failure mode through hierarchical convergence.

How it works:

This alternating pattern — local convergence followed by deliberate disruption — allows HRM to sustain long-running, meaningful computation instead of collapsing early like standard RNNs

computation steps → state change per step local fixed point z_L* z_H update · reset z_H update · reset standard RNN: converges once, stalls cycle 1 (T steps) cycle 2 (T steps) cycle 3 (T steps)
Hierarchical convergence: within each cycle the low-level module (orange) settles toward a local fixed point; each high-level update (blue) reshapes the solution landscape and restarts convergence, sustaining computation where a standard RNN would stall after its first fixed point.

II. Fixed Point Theorem & Implicit Function Theorem (IFT)

Unrolling (same layers taking there output as input for \( N \) steps) recurrent computation across many timesteps usually requires Backpropagation Through Time (BPTT).

Backpropagation Through Time (BPTT) is the standard algorithm used to train Recurrent Neural Networks (RNNs).

The Process:

  1. Forward Pass (Thinking): The input goes into Copy 1, which passes its state to Copy 2, and so on, until the end. You must save the state of every single copy in memory.
  2. Calculate Error: At the end of the sequence (or at each step), you compare the output to the target to find the error.
  3. Backward Pass (Learning): You calculate the gradient (the necessary correction) starting from the last step and moving backward to the first. The error signal flows "through time" from \( T \to 0 \).

BPTT stores all intermediate states, leading to:

HRM avoids this by reframing the problem.

Fixed-point assumption: During each cycle, the paper assumes the low-level module approximately satisfies:

$$ z_L^{*} \;=\; F\!\left(z_L^{*},\, z_H;\ \theta\right) $$

That is, the low-level state behaves reaches a fixed point of its update function under a fixed high-level context.

Fixed point is premature convergence state about we discussed earlier.

Why this matters?

If the final state is defined implicitly by this equation, then its dependence on the model parameters can be computed without unrolling the entire trajectory.

Using the Implicit Function Theorem, the gradient of the fixed point can be expressed as:

$$ \frac{\partial z^{*}}{\partial \theta} \;=\; \left(I - J_F\right)^{-1} \frac{\partial F}{\partial \theta}\,\bigg|_{z\,=\,z^{*}} $$

where:

The math (Implicit Function Theorem) proves that if you are at a stable Fixed Point, you don’t need the history to calculate the gradient. You can calculate the correct update using only the fixed point \( z^{*} \)

This provides a mathematically principled way to compute gradients without BPTT

III. Deep Supervision

Deep supervision plays a crucial role in making HRM trainable at large reasoning depths. Instead of waiting until the very end of a long reasoning process to compute gradients, HRM introduces periodic, structured learning checkpoints during inference.

This addresses two core issues:

Deep supervision turns long reasoning into a sequence of short learning episodes, each nudging the model in the right direction without forcing it to remember every step.

A. Segmented Reasoning

Rather than performing a single extremely long forward pass, HRM breaks computation into segments.

Each segment consists of a full HRM reasoning cycle:

This allows the model to reason progressively while exposing intermediate internal states to learning.

B. Intermediate Supervision

After each segment \( m \):

These intermediate losses act as dense feedback signals, nudging the model toward useful representations even if the final solution has not yet fully emerged.

Importantly, the intermediate outputs are not required to be fully correct — they serve as directional guidance rather than strict checkpoints.

C. State Detachment (The Critical Step)

Before the next segment begins, the hidden state \( z^{(m)} \) is explicitly detached from the computation graph.

This means:

From a mathematical standpoint, this creates a 1-step approximation of what would otherwise be a deeply recursive gradient flow.

IV. Adaptive Computation Time (ACT)

Not all problems require the same amount of reasoning. Some can be solved almost instantly, while others demand prolonged deliberation. HRM incorporates Adaptive Computation Time (ACT) to dynamically allocate computation based on task difficulty — mirroring the brain’s distinction between fast, automatic reasoning (System 1) and slow, deliberate thinking (System 2).

Rather than fixing the number of reasoning cycles, HRM learns when to stop thinking.

A. The Halting Mechanism

At the end of each reasoning segment \( m \), HRM evaluates whether further computation is beneficial.

Q-Head

A dedicated Q-head reads the current high-level latent state \( z_H^{(m)} \)

It outputs two values:

$$ \hat{Q}^{(m)} \;=\; \left(\hat{Q}^{(m)}_{\mathrm{halt}},\ \hat{Q}^{(m)}_{\mathrm{continue}}\right) \;=\; \sigma\!\left(\theta_Q^{\top}\, z_H^{(m)}\right) $$

These values estimate the expected utility of stopping now versus reasoning longer.

Importantly, the Q-head does not operate on outputs or tokens — it reasons purely over the internal planning state.

B. Decision Logic (When to Stop)

The halting decision follows simple but carefully designed rules:

The model halts if either:

  1. The number of segments exceeds a hard cap \( M_{\max} \), or
  2. The predicted value of halting exceeds continuing:
$$ \hat{Q}^{(m)}_{\mathrm{halt}} \;>\; \hat{Q}^{(m)}_{\mathrm{continue}} $$

and the model has already completed at least \( M_{\min} \) segments

To encourage exploration, \( M_{\min} \) is randomized during training with a small probability, nudging the model to occasionally “think longer” even when early stopping seems attractive.

C. Training the Halting Policy (Q-Learning)

The Q-head is trained using a lightweight Q-learning objective, integrated directly into HRM’s supervised training loop.

Reward Structure:

This framing teaches the model a simple but powerful trade-off: Is one more round of thinking likely to improve the final answer?

D. Joint Loss Function

At each segment, HRM minimizes a combined objective:

$$ \mathcal{L}^{(m)} \;=\; \mathrm{LOSS}\!\left(\hat{y}^{(m)},\, y\right) \;+\; \mathrm{BCE}\!\left(\hat{Q}^{(m)},\, \hat{G}^{(m)}\right) $$

Where:

This joint loss aligns accuracy and efficiency, rather than optimizing them separately.

E. Inference-Time Scaling (A Hidden Superpower)

A remarkable consequence of ACT is inference-time scaling.

Empirically:

Adaptive Computation Time enables HRM to dynamically trade computation for accuracy, allowing the model to stop reasoning as soon as additional thinking is unlikely to improve the final answer.

Performance and Benchmarks

Figure: benchmark results comparing HRM against much larger chain-of-thought models on ARC-AGI, Sudoku-Extreme, and Maze-Hard — view it in the original article on Towards AI.

HRM is evaluated on reasoning-heavy benchmarks explicitly chosen to stress long-horizon planning, search, and abstraction — areas where standard Transformers and chain-of-thought (CoT) models struggle.

Benchmarks Used:

Key Results:

Across all benchmarks, HRM demonstrates strong performance with minimal data and compute:

Despite these constraints:

A massive congratulations is in order for the research team at Sapient Intelligence and Tsinghua University — specifically Guan Wang, Jin Li, Yuhao Sun, Xing Chen, Changling Liu, Yue Wu, Meng Lu, Sen Song, and Yasin Abbasi Yadkori.

Their work on the Hierarchical Reasoning Model (HRM) represents a bold and elegant step away from the brute-force “scaling laws” that dominate current AI. By taking inspiration from the hierarchical and multi-timescale processing of the human brain, they have demonstrated that depth of thought matters more than sheer size.

Achieving state-of-the-art results on the ARC-AGI, Sudoku-Extreme, and Maze-Hard benchmarks with a model of only 27 million parameters — trained on just 1,000 examples — is a staggering achievement in data efficiency and architectural design. They have effectively shown that we can build “System 2” reasoning capabilities without needing trillion-parameter giants, paving the way for more accessible and biologically plausible General Artificial Intelligence.

Coming Next: Tiny Recursive Models (TRM)

In our next deep dive, we will shift gears to explore an even more advanced concept that pushes the boundaries of efficiency further: Tiny Recursive Models (TRM) from Alexia Jolicoeur-Martineau.

We will discuss how TRM builds upon these recursive principles to achieve powerful reasoning with even fewer parameters, potentially challenging everything we know about the “minimum viable size” for intelligence. Stay tuned!

Until next time folks…
El Psy Congroo

Figure: the article’s closing image — view it in the original article on Towards AI.