# Where to Spend Test-Time Compute in Recursive Reasoning

> Gated Answer Resampling, a tuning-free test-time method that resamples only the decoded answer state, boosts TRM accuracy from 85.9% to 99.4% on Sudoku and 68.8% to 85.6% on PPBench at minimal compute cost.

- **Source:** [arXiv](https://arxiv.org/abs/2610.16427)
- **Published:** 2026-10-24
- **Permalink:** https://picx.dev/p/PyFaxp
- **Whiteboard:** https://picx.dev/p/PyFaxp/image

## Summary

## Summary (Overview)

- **Key Finding**: In recursive reasoning models like the Tiny Recursive Model (TRM), failures are carried in the **answer state** y (the decoded state), not the reasoning state z. Resampling y at test time recovers significantly more failures than perturbing z.
- **Proposed Method**: **Gated Answer Resampling (GAR)** — a tuning-free, test-time compute approach that restarts only puzzles rejected by the model's halting head, resampling the fillable cells of y with isotropic Gaussian vectors rescaled to the initial norm.
- **Results**: GAR improves TRM from 85.9% → 99.4% on Sudoku-Extreme and 68.8% → 85.6% on Pencil Puzzle Bench (PPBench) validation, at only 2.03× and 7.08× the cost of a standard pass.
- **Compute Efficiency**: GAR outperforms Probabilistic TRM (PTRM) even when PTRM uses 42–197× more compute.
- **State Asymmetry**: Resampling y once per retry beats any perturbation of z (including PTRM's per-step noise), and the gap widens as the compute budget grows.

---

## Introduction and Theoretical Foundation

### Background

Recursive reasoning models like the **Hierarchical Reasoning Model (HRM)** and **Tiny Recursive Model (TRM)** solve structured puzzles by iteratively refining latent states over many iterations, rather than writing intermediate steps as tokens. TRM uses a two-layer network of a few million parameters with two latent states:

- **Answer state y**: decoded into the output grid (the "slow" state, updated once per supervision step)
- **Reasoning state z**: never decoded (the "fast" state, updated 6 times per latent recursion)

The recursion is **deterministic** — a rerun fails the same puzzles identically. Failures are attributed to **bad basins** (Sghaier et al., 2026): regions of latent space that trap the recursion on wrong answers, analogous to **spurious fixed points** in HRM (Ren & Liu, 2026).

### Key Theoretical Question

Recent test-time approaches make the recursion stochastic by perturbing y, z, or both:

| Method | State Perturbed | Mechanism |
|--------|----------------|-----------|
| PTRM | z | Gaussian noise before every supervision step |
| Efstathiou & Balwani | y (initial) | Perturb initial answer (proof of concept) |
| Corbett et al. | y and z | Particle filter with proposal on both states |
| GRAM | y (slow) | Trained with noise on slow state |
| EqR | y and z | Trained with noise on both states |

**Three open questions** motivate this work:
1. Which state carries the failure?
2. Should test-time compute continue a failed trajectory (depth) or restart from the initial state (width)?
3. Can compute be saved by only retrying puzzles the model fails?

### Theoretical Foundation: The Recursion

TRM's supervision step applies a two-layer network $f_\theta$ in $T = 3$ latent recursions, each with $n = 6$ updates of z and one update of y:

$$
\mathbf{z} \leftarrow f_\theta(\mathbf{x} + \mathbf{y} + \mathbf{z}) \quad (n \text{ times}), \qquad \mathbf{y} \leftarrow f_\theta(\mathbf{y} + \mathbf{z}), \tag{1}
$$

where x is the input embedding. States have shape $[P + L, d]$ with $P = 16$ prefix positions, $d = 512$ hidden width. Each layer ends in RMS normalization (without learnable gain), so every output position has norm $\sqrt{d}$.

---

## Methodology

### The Shared Harness

All methods run under a common protocol:
1. Run the **standard pass** (one block of $T_{\text{blk}} = N_{\text{sup}} = 16$ supervision steps from initial states)
2. If halting logit $\hat{q} \geq 0$: commit the grid, nothing else runs
3. Otherwise: run **retries** (one block each) for at most R blocks
4. First retry with $\hat{q} \geq 0$ ends the search; if none, return grid with highest $\hat{q}$

### Retry Variants

A retry either **continues** the failed trajectory (depth) or **restarts** from initial states (width), and either applies no perturbation, resamples one state, or adds PTRM's noise. To resample a state, fillable cells (not fixed by input) receive fresh isotropic Gaussian vectors rescaled to the initial state's norm:

$$\mathbf{y}_i \leftarrow \|\mathbf{y}_{\text{init}}\| \frac{\varepsilon_i}{\|\varepsilon_i\|}, \quad \varepsilon_i \sim \mathcal{N}(\mathbf{0}, \mathbf{I}_d), \quad \forall i \in \mathcal{M}(\mathbf{x})$$

### Gated Answer Resampling (GAR)

**Algorithm 1: GAR**

```
Require: puzzle x, trained TRM, T_blk = N_sup = 16, budget R (= N_sup by default), threshold 0
1: (y, z, ŷ, q̂) ← BLOCK(x, y_init, z_init)      ▷ standard 16-step pass
2: (ŷ*, q̂*) ← (ŷ, q̂)                            ▷ fallback on halting logit
3: for r = 1 to R do
4:   if q̂ ≥ 0 then return ŷ*                     ▷ gate, then stopping rule
5:   (y, z) ← (y_init, z_init)                    ▷ restart
6:   y_i ← ‖y_init‖·ε_i/‖ε_i‖, ε_i ~ N(0, I_d), ∀i ∈ M(x)   ▷ resample fillable y
7:   (y, z, ŷ, q̂) ← BLOCK(x, y, z)
8:   if q̂ > q̂* then (ŷ*, q̂*) ← (ŷ, q̂)
9: end for
10: return ŷ*
```

### Experimental Setup

- **Sudoku-Extreme**: TRM-MLP checkpoint, 1,000 random test puzzles, standard pass solves 85.90%
- **PPBench**: TRM-Att on 5 puzzle types (sudoku, lightup, nurikabe, heyawake, tapa), 308 validation puzzles, standard pass solves 68.83%
- **Statistical protocol**: 3 sampling seeds per stochastic method, paired differences with 95% bootstrap intervals (B = 10,000)
- **PTRM baseline**: Rerun on their checkpoints (originals unavailable), with $\sigma = 0.3$ on Sudoku-Extreme and $\sigma^* = 1.5$ on PPBench (selected on validation labels)

---

## Empirical Validation / Results

### 1. The Answer State Carries the Failure

After 16 retries, **continuing** the failed trajectory without perturbation recovers:
- 74% of standard-pass failures on Sudoku-Extreme
- 16% on PPBench validation

**Resampling y** raises this to 89% and 34%, while **resampling z** barely helps (74% and 19%).

> **Diagnostic insight**: One step into a continued retry, resampling y has moved z *further* than resampling z itself (cosine 0.565 vs. 0.837 with an unperturbed copy), suggesting z is largely recomputed from x and y.

### 2. Compute Scaling: Resampling y > Perturbing z

**Figure 2 key results** (fraction of failures recovered after 16 retries):

| Retry Type | Sudoku-Extreme (continue/restart) | PPBench (continue/restart) |
|------------|-----------------------------------|---------------------------|
| No perturbation | 74% / 0% | 16% / 0% |
| PTRM noise on z | ~74% / ~74% | ~19% / ~19% |
| Resample z | 74% / 74% | 19% / 19% |
| **Resample y (GAR)** | **89% / 88%** | **34% / 40%** |

After 64 restarts, GAR recovers **96%** of Sudoku-Extreme failures and **54%** of PPBench failures, versus 85% and 27% when z is resampled instead.

### 3. Head-to-Head Comparison (Table 1)

| Method | Sudoku-Extreme (16 retries) | Sudoku-Extreme (64 retries) | PPBench (16 retries) | PPBench (64 retries) |
|--------|-----------------------------|-----------------------------|----------------------|----------------------|
| TRM (depth alone) | 96.30 (1.97) | 97.40 (3.33) | 73.70 (4.79) | 75.00 (15.20) |
| PTRM | 96.93 ± 0.15 (1.82) | 97.87 ± 0.06 (2.90) | 76.52 ± 0.68 (4.25) | 79.00 ± 0.19 (11.86) |
| **GAR** | **98.27 ± 0.21 (1.68)** | **99.43 ± 0.15 (2.03)** | **81.28 ± 0.68 (3.48)** | **85.61 ± 0.37 (7.08)** |
| z instead of y | 96.97 ± 0.35 (1.80) | 97.90 ± 0.00 (2.84) | 75.43 ± 0.50 (4.42) | 77.16 ± 0.19 (12.92) |
| Continue instead of restart | 98.40 ± 0.26 (1.69) | 99.73 ± 0.06 (1.98) | 79.55 ± 0.86 (3.73) | 83.01 ± 0.50 (9.06) |

*Values in parentheses are costs in blocks per puzzle.*

### 4. GAR vs. PTRM at Full Scale (Table 2)

| Method | Sudoku-Extreme Cost | Sudoku-Extreme Acc | PPBench Cost | PPBench Acc |
|--------|--------------------|--------------------|--------------|-------------|
| TRM standard pass | 1 | 85.90 | 1 | 68.83 |
| PTRM (K'=100, D=64/48)† | 400 | 98.57 | 300 | 79.98 |
| PTRM under harness | 8.65 | 98.47 | 42.25 | 82.14 |
| **GAR (R=16)** | **1.68** | **98.27** | **3.48** | **81.28** |
| **GAR (R=64)** | **2.03** | **99.43** | **7.08** | **85.61** |

†PTRM's headline budget: costs 197× and 42× GAR at R=64.

### 5. Key Scaling Properties

- **GAR loses no solved puzzle**: The halting head re-opens 99.3% (Sudoku) and 87.5% (PPBench) of failures, and 0% of successes
- **Gap widens with budget**: Each doubling of r adds ~2 points to GAR on PPBench vs. ~1 point when z is perturbed
- **Restart ≈ Continue**: With y resampled, continuing vs. restarting makes no significant difference at 16 retries; at 64, continuing helps slightly on Sudoku but hurts on PPBench

---

## Theoretical and Practical Implications

### Why the Answer State Matters

The asymmetry stems from the recursion's structure:

- **z is the fast state**: updated 18 times per supervision step, each update reads x and y
- **y is the slow state**: updated only 3 times, but **read by all 21 updates**

A resampled y is read by all updates of the next latent recursion, while a resampled z is read once and then recomputed through the map $\mathbf{z} \mapsto f_\theta(\mathbf{x} + \mathbf{y} + \mathbf{z})$. Under the assumption that this map contracts locally (Corbett et al., 2026, Prop. 5.1), perturbing z does not change the map, so z returns toward the unperturbed path. Perturbing y changes the map itself, moving z away from the failed trajectory.

### Practical Implications

1. **Compute allocation**: Test-time compute is best spent on the decoded state, not the reasoning state — contrary to PTRM's design
2. **Halting head as a gate**: The head can identify which puzzles need retries, saving compute on solved puzzles
3. **Parallelizable**: Restarts are independent draws, so they can run in parallel; running sequentially only saves compute via early stopping
4. **Tuning-free**: GAR has no hyperparameters to tune (block length, threshold, norm, and fillable cells all come from the model or data)

---

## Conclusion

### Main Takeaways

1. **Failures live in the answer state**: A failed trajectory carries its failure in y, not z
2. **Resample y, not z**: At equal compute, resampling y recovers more failures than any z perturbation, with the gap widening as budget grows
3. **GAR is effective and efficient**: Tuning-free, loses no solved puzzles, and outperforms PTRM at a fraction of the cost

### Limitations

- PTRM's PPBench checkpoint was unavailable; results use a reconstructed training pipeline
- GAR inherits the halting head's imperfections (misses 12.5% of PPBench validation failures)
- Not tested on Maze-Hard (where the head is poorly aligned), ARC-AGI, or beyond TRM
- On PPBench, $\mathcal{M}(\mathbf{x})$ relies on a hand-written per-type table; gains are smaller on nurikabe and heyawake

### Future Directions

- Testing GAR on other recursive reasoning architectures (HRM, GRAM, EqR)
- Investigating whether training with noise on y (as in GRAM) interacts favorably with test-time y-resampling
- Extending the gated-retry framework to settings where the halting head is less reliable

---

_Markdown view of https://picx.dev/p/PyFaxp, served by PicX — AI-generated visual whiteboard summaries of research papers._
