Interactive figure — needs JavaScript. Drag n to change how often the answer is allowed to move.

Paper-explained series 7

TL;DR

The Tiny Recursive Model (TRM) challenges the “bigger is better” dogma by outperforming massive Large Language Models (LLMs) on complex reasoning benchmarks using a fraction of the parameters. By simplifying the Hierarchical Reasoning Model (HRM), TRM utilizes a single “tiny” network (just 2 layers, ~5–7M parameters) that recurses on a latent reasoning state (\( z \)) — an internal “scratchpad” that tracks the logical chain-of-thought distinct from the evolving answer (\( y \)). This approach achieves state-of-the-art generalization on Sudoku-Extreme (87.4%), Maze-Hard (85.3%), and ARC-AGI tasks, proving that deep supervision and recursion can emulate massive effective depth without the massive parameter count.

Introduction

While Large Language Models (LLMs) display impressive capabilities, they often struggle with hard, logical puzzle tasks due to the brittleness of auto-regressive generation. A single incorrect token in a chain can derail the entire solution, a failure mode often mitigated — but not solved — by expensive Chain-of-Thought (CoT) prompting.

To address this, researchers have proposed that small networks using recursion and deep supervision can emulate the “effective depth” of much larger models. The Hierarchical Reasoning Model (HRM) was a pioneer in this space, but it relied on complex biological justifications and separate networks for different frequencies.

So, the Tiny Recursive Model (TRM). TRM simplifies the architecture significantly by using a single tiny network (often just 2 layers) and back-propagating through the full recursion process rather than relying on approximations. Despite having less than 0.01% of the parameters of models like Deepseek R1 or Gemini 2.5 Pro, TRM achieves significantly higher accuracy on rigorous benchmarks. For instance, on the Sudoku-Extreme dataset, TRM achieves 87.4% accuracy compared to HRM’s 55% and the near-zero performance of many standard LLMs.

Why Reasoning is Hard for Autoregressive LLMs

LLMs generate answers token-by-token. In logic puzzles like Sudoku or Mazes, this is high-risk: one wrong digit or direction renders the final answer invalid. While methods like Chain-of-Thought (CoT) attempt to emulate reasoning by generating intermediate steps, they are computationally expensive, require high-quality reasoning data, and remain brittle if the generated reasoning trace contains errors.

TRM's answer is recursion — but it is not the only escape from the one-token-at-a-time straitjacket. Diffusion language models (a Phase-3 node in the Atlas) drop left-to-right generation entirely: they start from a fully masked “garbage” sequence and denoise the whole answer in parallel, revising any position at any step.

Interactive figure — needs JavaScript. It races token-by-token generation against parallel denoising.

The Hierarchical Reasoning Model (HRM)

The precursor to TRM, the Hierarchical Reasoning Model (HRM), introduced the concept of using two small neural networks recursing at different frequencies:

HRM employs deep supervision, where the model attempts to improve its answer over \( N_{\text{sup}} = 16 \) steps, reusing latent features from previous steps as initialization. To manage computational costs, HRM uses Adaptive Computational Time (ACT) to halt processing early for easy examples.

However, HRM relies on the Implicit Function Theorem (IFT) and a 1-step gradient approximation to justify only back-propagating through the last few steps of recursion, assuming the model reaches a fixed point.

To learn about HRMs: https://pub.towardsai.net/hierarchical-reasoning-models-when-27m-parameters-outperform-chain-of-thought-5c2f46cd0467

Empirical Gaps & Design Targets

The authors of TRM identified three key weaknesses in HRM that motivated their new architecture:

  1. Questionable IFT usage: HRM assumes latent features converge to a fixed point to justify its gradient approximation. Empirical analysis shows residuals often remain high, suggesting no fixed point is actually reached.
  2. Inefficient ACT: The halting mechanism in HRM requires a “continue loss” that demands an extra forward pass, slowing down training.
  3. Unnecessary Complexity: HRM uses complex biological arguments to justify its two-network, hierarchical structure, which may not be necessary for artificial neural networks.

TRM at a Glance

The intuition behind TRM is simple: instead of complex hierarchies, the model maintains a current answer (\( y \)) and a latent “chain-of-thought” (\( z \)). It recursively refines the reasoning \( z \) and then updates the answer \( y \) based on the improved reasoning.

Key Differences vs. HRM:

Method

Question x Think — refine z z ← net(x, y, z) repeat ×n (e.g., n = 6) ×1 Write — update y once y ← net(y, z) answer improved (y, z) seed the next cycle — deep recursion ×T, deep supervision ×Nsup
TRM’s “think \( n \) times, write once” cadence: the latent reasoning state \( z \) (blue) is refined \( n \) times with the question \( x \) and current answer \( y \) as context; only then is the answer \( y \) (orange) updated once. The improved \( (y, z) \) pair seeds the next cycle across \( T \) deep-recursion passes and \( N_{\text{sup}} \) supervision steps.

Notation & Setup

The model operates on an input \( x \) and produces an output prediction \( y \).

All 3 tensors generally have shape \( [B, L, D] \), where \( B \) is batch size, \( L \) is sequence length, and \( D \) is embedding dimension.

The Algorithm: “Think n Times, Write Once”

TRM employs a recursive process where the network refines its state multiple times before outputting a prediction. Unlike Chain-of-Thought, it does not append tokens; it updates the vectors in place.

The logic follows a strict “Think, then Write” cadence :

During testing, the model no longer has access to ground truth; instead, it repeatedly applies the same learned recursive refinement function to progressively improve its current prediction. Because deep supervision trained it to move closer to the correct solution at every step, inference becomes an iterative self-correction process that converges toward a valid answer without external feedback.

To understand how TRM processes information, compare it to how a human solves a difficult Sudoku puzzle. You rarely write a number into a cell immediately. Instead, you engage in a hidden mental process: “If I place a 5 here, then the 3 must go there, but that conflicts with the top row…”

TRM mimics this dual process by explicitly separating the Answer State (\( y \)) from the Reasoning State (\( z \)):

Architectural Choices

1. The Goldilocks Depth: Why 2 Layers Beats 4

In deep learning, the standard assumption is that deeper networks are smarter. TRM proves the opposite for reasoning tasks on small datasets: a “dumber” network that thinks longer actually performs better.

2. Hard-Wiring vs. Scanning: Why MLP beats Attention on Sudoku

In modern AI, Self-Attention is the gold standard because it allows a model to “scan” a sequence and dynamically decide which parts are important. However, TRM reveals that for puzzles like Sudoku, this flexibility is actually a weakness.

3. The Context Switch: One Network to Rule Them All

Previous models (like HRM) used two separate neural networks — one specialized for “thinking” and another for “answering.” TRM combines them into a single tiny network, halving the parameter count while surprisingly improving performance.

Training Regime

Datasets & Experimental Setup

The authors evaluated TRM on benchmarks designed to be easy for humans but hard for AI:

Compute: Experiments were run on L40S and H100 GPUs, taking 24–72 hours depending on the dataset.

Results

TRM significantly outperforms HRM and massive LLMs on reasoning tasks, despite its tiny size.

Figure: benchmark results comparing TRM with HRM and large LLMs on Sudoku-Extreme, Maze-Hard, and ARC-AGI — view it in the original article on Towards AI.

Figure: per-task results for the TRM-MLP and TRM-Att variants — view it in the original article on Towards AI.

(Note: TRM-MLP excels at small contexts like Sudoku but fails on larger grids like Mazes, where TRM-Att is required.)

Ablations

The authors conducted extensive ablations to justify their design choices

Limits of TRM

While efficient, TRM has limitations. The need to back-propagate through the full recursion chain (\( n \) steps) increases memory usage linearly. If \( n \) is too large, training can hit Out Of Memory (OOM) errors. Additionally, the MLP variant is strictly limited to small, fixed contexts and fails on larger spatial tasks like Mazes.

Congratulations to Alexia Jolicoeur-Martineau and the team at Samsung SAIL Montréal on this remarkable achievement! Your work proves that elegant, efficient architectures can solve the industry’s toughest reasoning puzzles while bypassing the excessive compute and parameter bloat of modern frontier models. This “Less is More” approach is a massive step forward for sustainable and accessible AI.

Until next time folks…
El Psy Congroo