# Retrofitting Pretrained Transformers With Under-Relaxed Recurrent Depth for RLVR: Production-Path Diagnostics, Compute-Matched Controls, and Dual-Depth Routing on Qwen3-0.6B-Base

## Abstract

Recurrent-depth (looped) transformers iterate a middle block core between a prelude and a coda to execute additional latent layers without expanding base parameters [1], while prior work converts fixed-depth pretrained models into recursive architectures via layer-wise adaptation [7] and stabilizes deep residual branches via near-zero per-channel scaling (*LayerScale* [8], *ReZero* [9]). We present a controlled, fully regradable study (`15` runs, `58,773` SymPy-regraded candidate answers, `0` grading discrepancies) testing middle-block recurrence ($R=2$ passes over layers `[12:20]`, `36` effective layers) on untied `Qwen3-0.6B-Base` (`751,632,384` base parameters [12]) under `GRPO` ($L_{\text{train}}=1024, K=4$). To avoid selection leakage from `Val210` (used at Step 0 to choose $\gamma_0 = 0.05$), we evaluate all trained models primarily on untouched **`HeldOut740 = Ext240 + MATH-500`** (`200` GSM8K + `40` AMC23 [13] + `500` `MATH-500` items) and report 3-seed (`Seeds 42, 101, 7`) `Mean ± SD`, per-seed triples, and 95% paired $t$-intervals ($df=2$). First, on the production 28-layer BF16 model across all 210 `Val210` prompts, un-gated recurrence (`Naive-Loop`, $\gamma=1.0$) induces an **`85.57%`** relative $L_2$ displacement at Coda entry $\mathbf{h}_{20}$ (`logit KL = 0.3057`), collapsing 50-step `GRPO` to `201.00 ± 7.55 / 740` on `HeldOut740 Fast@2048` (`-168.33 ± 14.57` below 50-step `Single-Depth GRPO`), whereas under-relaxed gating (`GRD`, $\gamma_0=0.05$, `+9,216` gate parameters) bounds Coda-entry shift to **`5.09%`** (`KL = 0.00237`) and recovers `376.33 ± 10.02 / 740` ($R_{\text{eval}}=2$) and `379.33 ± 9.87 / 740` ($R_{\text{eval}}=1$ `bypass_loop=True`), consistent with recovery from inserted-state perturbation [10]. Second, an on-policy Step-3 `GRPO` gradient decomposition proves that the extra-pass core parameter gradient is only **`2.25%`** of the primary core gradient (`cosine = 0.999770`), refuting a Sobolev-regularization explanation, and a frozen-gate control (`fixed_small_gate`, $\gamma \equiv 0.05$) matches trainable `GRD` on `HeldOut740 Fast@512` (`338 / 740` vs. `337 / 740`, Seed 42). Third, while 50-step `GRD` ($R_{\text{eval}}=1$) exceeds 50-step `Single-Depth GRPO` on `HeldOut740` (`+10.00 ± 6.08` at `@2048`, `+9.33 ± 5.03` at `@512`), a **65-step compute-matched `Single-Depth GRPO` control (`1,820` vs. `1,800` layer-steps, `654.9s` vs. `679.2s`)** reaches **`380.67 ± 6.81 / 740`** at `Fast@2048` (`-1.33 ± 4.04`, 95% CI `[-11.4, +8.7]`), closing the long-horizon single-pass gap [11]. Fourth, we validate deployed online batching of truncation-triggered depth escalation (`EscFB`, `346 / 740` on `HeldOut740 Fast@512` for `fixed_small_gate`) and compare 3-seed `GRD EscFB` (`386.00 ± 7.55 / 740` at `@2048`, `0` observed regressions; `341.33 ± 1.53 / 740` at `@512`) against a 2-attempt stochastic `Single-Depth` control (`386.67 ± 4.93 / 740` at `@2048`, `4` regressions; `339.00 ± 3.00 / 740` at `@512`) under full prefill+decode layer-token FLOP accounting.

---

## 1. Introduction and Relationship to Prior Work

Standard reinforcement learning with verifiable rewards (`RLVR`) such as `GRPO` [2, 3] scales test-time reasoning sequentially by generating longer token chains (`512` to `2048+` tokens) through a fixed stack of transformer layers [4]. An orthogonal direction—*recurrent-depth* or *looped* transformers [1, 5, 6]—partitions a transformer into an entry *Prelude*, a weight-tied middle *Core* iterated $R \ge 1$ times in latent space, and an exit *Coda*.

While Geiping et al. [1] pretrain recurrent-depth language models from scratch with randomized recurrence $R$, practical open-weights `RLVR` pipelines begin from fixed-depth pretrained checkpoints (`Qwen3-0.6B-Base`, `28` layers). Retrofitting recurrence onto a fixed-depth pretrained transformer builds directly on three established lines of work that must be distinguished from our specific experimental contribution:
1. **Converting Pretrained Transformers Into Recursive Models:** Bae et al. (*Relaxed Recursive Transformers*, `arXiv:2410.20672` [7]) convert fixed-depth pretrained transformers into looped models and uptrain them with layer-wise LoRA adapters.
2. **Near-Zero Residual Branch Scaling:** Small learnable per-channel residual gates initialized near zero ($\gamma_0 \ll 1$) were introduced by Touvron et al. (*LayerScale*, `arXiv:2103.17239` [8]), building on scalar residual gating in Bachlechner et al. (*ReZero*, `arXiv:2003.04887` [9]). We adopt LayerScale-style per-channel gating ($\gamma_0 = 0.05$) and Geiping et al.'s prelude-anchoring ($\beta_0 = 0$) [1] as a known stabilization mechanism rather than claiming a new gating architecture.
3. **Same-Problem `r/math_rlvr` Precedents on Inserted-State Recovery, Untied Parameters, and Compute-Matched Controls:** In `r/math_rlvr`, `math_rlvr_8` (`v2` [10]) showed that when inserted latent computation perturbs a pretrained model's representations, subsequent training primarily recovers from inserted-state damage rather than establishing a fitted latent-reasoning advantage. Furthermore, `math_rlvr_29` (`v1` [11]) demonstrated that approximately compute-matched single-turn `GRPO` controls (`492.67 ± 6.43 / 950` at `@2048`) close apparent gains over 50-step baselines, while `math_rlvr_2` (`v2` [12]) established that the supplied `Qwen3-0.6B-Base` loader constructs **untied** embedding and output-head tensors (`751,632,384` trainable base parameters, vs. `596,049,920` weight-tied equivalent), and `math_rlvr_25` (`v8` [13]) defined the external benchmark `Ext240` (`200` `gsm8k_test` + `40` `amc23_test` items).

Within this context, our study makes four concrete, reproducible empirical contributions:
1. **Production 28-Layer BF16 Coda-Entry Shift & On-Policy `GRPO` Gradient Audit (`Section 2.2 & 3.1`):** Using `diagnostics/verify_production_looped.py` (`diagnostics/production_looped_audit.json`), we audit the exact 28-layer BF16 `LoopedFastModel` (`751,641,600` total trainable parameters, `36` KV-cache slots) across all `210` `Val210` prompts and decompose actual on-policy `GRPO` backpropagation (`Step 3, Seed 42`), proving that at $\gamma_0 = 0.05$ the extra-pass core parameter gradient is only **`2.25%`** of the primary core gradient (`cosine = 0.999770`).
2. **Separating Selection (`Val210`) From Untouched Confirmation (`HeldOut740 = Ext240 + MATH-500`) Against a 65-Step Compute-Matched Ordinary Control (`Section 3.2`):** Because `Val210` was used in Phase 0 to choose $\gamma_0 = 0.05$, we separate `Val210` (`210` items) from untouched **`HeldOut740`** (`740` items) and run a 3-seed **65-step compute-matched `Single-Depth GRPO` control** (`single_depth_1024_65st_s{42,101,7}`, `1,820` layer-steps, `654.9 ± 16.9s` vs. `1,800` layer-steps, `679.2 ± 40.2s` for 50-step `GRD-GRPO`), alongside a **Frozen-Small-Gate control** (`fixed_gate_1024_50st_s42`, $\gamma \equiv 0.05, \beta \equiv 0$ frozen).
3. **Deployed Online `EscFB` Batching & Compute-Matched 2-Attempt Ordinary Comparator (`Section 3.3`):** We execute `EscFB` online by batching *only* triggered items $\mathcal{I}_{\text{trig}}$ through $R_{\text{eval}}=2$ (`evaluate_online_escfb`), verify its agreement with full-sweep offline `EscFB`, and compare 3-seed `GRD EscFB` against a **2-attempt stochastic `Single-Depth` comparator** (`evaluate_two_attempt_single_depth`, $T=0.6, \text{top-}p=0.95$ on triggered items under the identical `EscFB` rule) with full prefill+decode layer-token FLOP accounting.
4. **Complete Regradable Evidence & Split Manifests (`verify_looped_results.py`):** Our `< 1.5 MiB` uncompressed supplement includes `data_splits/create_splits.py`, `data_splits/math_val210.json`, `data_splits/gsm8k_amc_bench240.json`, `data/pool950_manifest.json`, and all `58,773` extracted candidate strings in `data/compact_looped_evaluations.json`, regraded from scratch via `grade_answer`.

---

## 2. Architecture, Production-Path Diagnostics, and Experimental Protocol

### 2.1 Prelude–Core–Coda Formulation, Untied Parameter Accounting, and Exact `bypass_loop` Definition

Starting from pretrained 28-layer `Qwen3-0.6B-Base` ($d_{\text{model}}=1024$, $n_{\text{heads}}=16$, $n_{\text{kv}}=8$, $d_{\text{head}}=128$, SwiGLU $d_{\text{ff}}=3072$, RoPE $\theta=10^6$), we partition the layer stack `[0:28)` into:
- **Prelude** (`layers` $[0, 12)$, `188,771,328` parameters): maps token embeddings $\mathbf{x}$ (`tok_emb`, `155,582,464` parameters) to $\mathbf{h}_{\text{pre}} = \mathbf{h}_{12} \in \mathbb{R}^{B \times T \times 1024}$.
- **Shared Recurrent Core** (`layers` $[12, 20)$, core length $M = 8$, `125,847,552` parameters): executed once in the primary pass ($r=0$, un-gated) and $n_{\text{extra}} = R - 1 = 1$ additional time in latent space ($r=1$), giving $28 + 8 = 36$ effective transformer layers at $R=2$.
- **Coda** (`layers` $[20, 28)$, `125,847,552` parameters): maps the post-core state $\mathbf{h}_{20}$ through blocks `20..27`, final RMSNorm (`1,024` parameters), and the untied output head (`out_head`, `155,582,464` parameters).

**Exact Parameter Accounting (`diagnostics/production_looped_audit.json`):** As established in `math_rlvr_2` [12], `FastModel` constructs independent `tok_emb` and `out_head` tensors without weight tying. Thus, `Single-Depth` and `Naive-Loop` have exactly **`751,632,384` trainable base parameters** (`596,049,920` if `tok_emb` and `out_head` were tied). In **Under-Relaxed Gated Recurrent Depth (`GRD`)**, we add a per-channel prelude anchor $\beta_r \in \mathbb{R}^{1024}$ (initialized to $\mathbf{0}$, `1,024` parameters) and LayerScale-style per-layer, per-channel residual gates $\gamma_{r,j} \in \mathbb{R}^{1024}$ (initialized to $\gamma_0 = 0.05$, $8 \times 1024 = 8,192$ parameters) [8]:

$$\mathbf{h}^{(r)}_{0} = (1 - \beta_r) \odot \mathbf{h}^{(r-1)}_{M} + \beta_r \odot \mathbf{h}_{\text{pre}}, \qquad \mathbf{h}^{(r)}_{j+1} = \mathbf{h}^{(r)}_{j} + \gamma_{r,j} \odot \Big(\text{Block}_{12+j}\big(\mathbf{h}^{(r)}_{j}\big) - \mathbf{h}^{(r)}_{j}\Big).$$

This adds **`9,216` gate parameters** (`+0.00123%` of the `751,632,384` untied base parameters, totaling **`751,641,600` trainable parameters**). In our **`fixed_small_gate` control**, $\gamma_{r,j} \equiv 0.05$ and $\beta_r \equiv 0$ are registered as frozen buffers (`requires_grad=False`, `751,632,384` trainable parameters).

**Exact Definition of `bypass_loop=True` ($R_{\text{eval}}=1$ Bypass):** Setting $\gamma = 0$ alone is mathematically equivalent to skipping the extra pass *only* when $\beta_r = \mathbf{0}$; once $\beta_r$ is updated during training, setting $\gamma = 0$ alone would still apply the prelude mixture $\mathbf{h}^{(1)}_0 = (1 - \beta_1)\odot \mathbf{h}^{(0)}_M + \beta_1 \odot \mathbf{h}_{\text{pre}}$. In our code (`LoopedFastModel.forward`), **`bypass_loop=True` skips the entire extra recurrent stage** (both the $\beta_1$ prelude mixture and all $M=8$ extra-pass core blocks, using `28` KV-cache slots), routing $\mathbf{h}^{(0)}_M$ directly into Coda block `20`.

**Production 28-Layer BF16 `KVCache(36)` Audit (`verify_production_looped.py`):** In `LoopedFastModel`, primary blocks $i \in [0, 28)$ write to `KVCache` slot $i$, while recurrent pass $r=1$ at core offset $j \in \{0, \dots, 7\}$ writes to dedicated slot $28 + j$ (`36` slots total). In `diagnostics/probe_looped_qwen3.py`, a unit test on a synthetic 6-layer width-32 FP32 model confirmed exact algebraic equivalence (`max_diff = 3.64e-7`). In `diagnostics/verify_production_looped.py` (`production_looped_audit.json`), we audit the **production 28-layer BF16 `LoopedFastModel` (`36` cache slots)** on `Val210` prompts: unpadded (`B=1`) cached prefill matches uncached full-sequence evaluation on **`8/8` top-1 tokens** (`max_abs_logit_diff = 0.2988` from BF16 SDPA kernel reduction order), and over 64-step greedy decoding (`116` generated tokens across 8 prompts) cached vs. uncached BF16 decoding matches identically on `6/8` full sequences (`78/116` token positions), while left-padded `B=8` vs. unpadded `B=1` cached decoding matches on `5/8` full sequences (`72/116` tokens). Because BF16 attention reductions depend on batch composition, all primary sweeps use identical length-sorted `batch=24` decoding, and we explicitly test deployed online `EscFB` batching in `Section 3.3`.

### 2.2 On-Policy Step-3 `GRPO` Gradient Decomposition and Decoupled Gate Clipping

In our initial submission, we hypothesized that the extra-pass core gradient $\gamma \nabla_{\theta_{\text{core}}}\mathcal{L}|_{r=1}$ acted as a strong "directional-derivative / Sobolev regularizer." To test this directly on the production 28-layer BF16 model during an actual on-policy `GRPO` step with sampled trajectories and verifiable rewards, `verify_production_looped.py` records the exact backward pass at **Step 3 of Seed 42** (the first non-zero-variance update, `rollout_lengths = [80, 83, 3, 13]`, `rewards = [1.0, 1.0, 0.0, 1.0]`, `179` generated tokens) with `detach_extra_loop_core=False` (full `GRD`) vs. `detach_extra_loop_core=True` (where the $r=1$ pass uses a synchronized stop-gradient copy of core blocks `[12:20]`, preserving the exact forward pass and Coda/Prelude activation gradients while zeroing $\nabla_{\theta_{\text{core}}}\mathcal{L}|_{r=1}$):

| Gradient Quantity (Production 28-Layer BF16 `LoopedFastModel`, Step 3, Seed 42) | Full `GRD-GRPO` | Stop-Grad Extra-Pass Core (`detach_extra_loop_core=True`) | Isolated Difference / Cosine |
| :--- | :---: | :---: | :---: |
| Total Base Parameter Gradient Norm $\|\nabla_{\theta_{\text{base}}}\mathcal{L}\|_2$ | `374.0185` | `373.4334` | `diff = 0.5851` |
| Prelude `[0:12)` Parameter Gradient Norm $\|\nabla_{\theta_{\text{pre}}}\mathcal{L}\|_2$ | `284.0035` | `284.0035` | `max_abs_diff = 0.0` |
| **Shared Core `[12:20]` Parameter Gradient Norm $\|\nabla_{\theta_{\text{core}}}\mathcal{L}\|_2$** | **`175.5572`** | **`174.3073`** | **`isolated r=1 norm = 3.9558` (`2.25%`), `cos = 0.999770`** |
| Coda `[20:28)` Parameter Gradient Norm $\|\nabla_{\theta_{\text{coda}}}\mathcal{L}\|_2$ | `125.1344` | `125.1344` | `max_abs_diff = 0.0` |
| Gate Gradient Norms $\|\nabla_\gamma \mathcal{L}\|_2$ / $\|\nabla_\beta \mathcal{L}\|_2$ / Combined | `0.7552 / 1.1502 / 1.3760` | `0.7552 / 1.1502 / 1.3760` | `max_abs_diff = 0.0` |
| Post-Clip Gate Norm (`joint clip` vs. `decoupled clip max_norm=1.0`) | `0.00368` (joint) / `1.0000` (decoupled) | `0.00368` (joint) / `1.0000` (decoupled) | **`374.02x` suppression under joint clipping** |

**Table 1:** Production on-policy `GRPO` Step-3 gradient decomposition (`diagnostics/production_looped_audit.json`).

Table 1 establishes two exact mechanistic facts:
1. **Why the "Sobolev Regularizer" Hypothesis Is Refuted:** Because $\gamma_0 = 0.05$ scales the extra-pass residual branch by $1/20$, the isolated extra-pass core parameter gradient has $L_2$ norm **`3.9558` vs. `174.3073` (`2.25%` of the primary core gradient)**, and the full core gradient has cosine similarity **`0.999770`** with the stop-gradient core gradient. Thus, `99.98%` of the core parameter update direction comes from the primary pass ($r=0$); the recurrent pass influences training primarily by perturbing the **forward hidden state $\mathbf{h}_{20}$ entering the Coda (`5.09%` relative $L_2$ shift)**, which alters the sampled on-policy rollout trajectories and advantages!
2. **Why Decoupled Gate Clipping Is Required When Training Gates:** At Step 3, $\|\nabla_{\theta_{\text{base}}}\mathcal{L}\|_2 = 374.02$ while $\|\nabla_{(\gamma,\beta)}\mathcal{L}\|_2 = 1.3760$; clipping all parameters jointly to `max_norm = 1.0` suppresses the gate gradient by `374.02x` (to `0.00368`). Clipping `base_params` (`lr=1e-5, wd=0.01`) and `gate_params` (`lr=1e-3, wd=0.0`) separately preserves full unit-norm gate updates.

### 2.3 Benchmark Panels, Split Separation (`Val210` vs. `HeldOut740`), and Compute-Matched Controls

All runs train on prefixes of `math_train.json` (`first 50` problems for 50-step arms; `first 65` problems for the 65-step compute-matched control) with $K=4$ rollouts/problem, $T_{\text{sample}}=0.8, \text{top-}p=0.9, L_{\text{train}}=1024$, binary `grade_answer` verification requiring `\boxed{...}` preceded by $\ge 30$ characters (`--min-pre-boxed-chars 30`), and zero-variance group skipping (`std(R) < 1e-6`, stepping `AdamW` with zeroed gradients [13]).

We evaluate every checkpoint with greedy decoding (`L_eval = 2048`, exact prefix slicing at `1024` and `512` tokens for `Fast@2048`, `Fast@1024`, and `Fast@512`) across `950` problems (`0 / 950` overlap with `math_train.json[:500]`, verified in `Check 2` of `verify_looped_results.py`), strictly separating the selection split from untouched confirmation splits:
- **Phase-0 Selection Split — `Val210` (`210` problems, `data_splits/math_val210.json`):** Deterministically constructed by `data_splits/create_splits.py` (`random.Random(20261015)`) by sampling `6` problems per `(subject, level)` cell (`7` subjects $\times$ `5` levels = `210` problems) from `math_train.json[500:]`. Used in Phase 0 to select $\gamma_0 = 0.05$ and `[12:20]`.
- **Untouched Confirmation Benchmark — `HeldOut740 = Ext240 + MATH-500` (`740` problems):**
  - **`Ext240` (`240` problems, `data_splits/gsm8k_amc_bench240.json`):** Consists of exactly **`200` `gsm8k_test` problems and `40` `amc23_test` problems** [13].
  - **`MATH-500` (`500` problems, `code/data/math500_test.json`):** Standard `MATH-500` test benchmark (`0` overlap with `math_train.json`).
- **Aggregate `Pool950` (`950` problems):** `Val210 + HeldOut740`, reported alongside `HeldOut740` for continuity with prior `r/math_rlvr` tables [11, 13].

---

## 3. Empirical Results

### 3.1 Phase-0 & Production-Path `Val210` Hidden-State Shift Across $\gamma_0$

Table 2 combines our Phase-0 probe (`diagnostics/looped_qwen3_zero_shot_probe.json`, 16 shortest prompts) with our full 210-prompt production hidden-state and logit shift audit (`diagnostics/production_looped_audit.json`, measuring the exact Coda-entry representation $\mathbf{h}_{20}$ after layer 19 vs. after the extra pass through `[12:20]`):

| Core Window | Gate Init $\gamma_0$ | Effective Layers | `Val210` ($N=210$) Pre-Coda $\mathbf{h}_{20}$ Rel. $L_2$ Shift | `Val210` Pre-Coda $\mathbf{h}_{20}$ Cosine Sim | `Val210` Pre-Coda Norm Ratio | `Val210` ($N=210$) Next-Token Logit KL | `Val210` ($N=210$) Top-1 Agreement | Zero-Shot `Val210` `Fast@512` |
| :--- | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: |
| `[12:20]` (Base $R=1$) | `0.00` | `28` | `0.00%` | `1.000000` | `1.0000` | `0.00000` | `100.00%` (`100.0%` on 16p) | **`44 / 210` (`20.95%`)** |
| **`[12:20]` (`GRD` Init)** | **`0.05`** | **`36`** | **`5.09%`** | **`0.999373`** | **`1.0360`** | **`0.00237`** | **`93.81%` (`100.0%` on 16p)** | **`44 / 210` (`20.95%`)** |
| `[12:20]` | `0.10` | `36` | `9.71%` | `0.997861` | `1.0698` | `0.00514` | `93.33%` (`93.75%` on 16p) | `39 / 210` (`18.57%`) |
| `[12:20]` | `0.20` | `36` | `18.98%` | `0.993118` | `1.1425` | `0.01473` | `90.95%` (`87.50%` on 16p) | `43 / 210` (`20.48%`) |
| `[12:20]` | `0.50` | `36` | `44.95%` | `0.974207` | `1.3631` | `0.07455` | `78.10%` (`68.75%` on 16p) | `38 / 210` (`18.10%`) |
| `[12:20]` (`Naive-Loop`) | `1.00` | `36` | **`85.57%`** | **`0.941616`** | **`1.7285`** | **`0.30567`** | **`56.67%` (`43.75%` on 16p)** | **`24 / 210` (`11.43%`)** |
| `[14:22]` | `0.10` | `36` | `8.23%` | `0.998540` | `1.0606` | `0.00572` | `91.90%` (`87.50%` on 16p) | `42 / 210` (`20.00%`) |
| `[14:22]` (`Naive-Loop`) | `1.00` | `36` | `85.56%` | `0.937336` | `1.7188` | `0.43785` | `61.43%` (`50.00%` on 16p) | `24 / 210` (`11.43%`) |

**Table 2:** Production 28-layer BF16 Coda-entry ($\mathbf{h}_{20}$) hidden-state shift and next-token logit KL across all 210 `Val210` prompts (`diagnostics/production_looped_audit.json`), alongside Phase-0 zero-shot `Val210` accuracy (`diagnostics/looped_qwen3_zero_shot_probe.json`). Note that a large displacement $\|\mathbf{h}^{(1)}_{20} - \mathbf{h}^{(0)}_{20}\|_2$ measures input shift relative to the pretrained Coda's operating range rather than non-contractivity of the core map.

At $\gamma_0 = 1.00$ (`Naive-Loop`), iterating `[12:20]` inflates the Coda-entry norm by `1.7285x` and shifts $\mathbf{h}_{20}$ by **`85.57%`** in relative $L_2$ norm (`KL = 0.30567`), cutting Step-0 `HeldOut740` `Fast@2048` accuracy by **$-42.2\%$** (`102 / 740` to `59 / 740`; `Pool950`: `144 / 950` to `86 / 950`). Initializing at $\gamma_0 = 0.05$ bounds the Coda-entry relative $L_2$ shift to **`5.09%`** (`cosine = 0.999373`, `KL = 0.00237`) and preserves Step-0 accuracy (`103 / 740` vs. `102 / 740` on `HeldOut740 Fast@2048`; `99 / 740` vs. `96 / 740` on `HeldOut740 Fast@512`).

### 3.2 3-Seed Fixed-Depth Evaluation on `HeldOut740` and `Pool950` Against Compute-Matched Controls

Because 50-step `GRD-GRPO` executes `36` effective layers per token (`50 x 36 = 1,800` layer-steps, wall-clock `679.2 ± 40.2s`), comparing it only against 50-step `Single-Depth GRPO` (`50 x 28 = 1,400` layer-steps, `533.3 ± 40.0s`) leaves a $1.27\times$–$1.29\times$ training compute gap. We therefore evaluate a 3-seed **65-step compute-matched `Single-Depth GRPO` control (`SD-65st`, `65 x 28 = 1,820` layer-steps, `654.9 ± 16.9s`, `100.1k ± 2.2k` generated tokens)** and a **50-step Frozen-Small-Gate control (`Fixed-Gate`, $\gamma \equiv 0.05, \beta \equiv 0$ frozen, Seed 42, `635.1s`)**. Table 3 reports all single-pass fixed-depth results with `HeldOut740 = Ext240 + MATH-500` separated from `Val210`.

| Arm / Condition | Eval Layers | Train Steps (`Layer-Steps`) | Train Time (`s`) & Gen Tokens | **`HeldOut740` `Fast@2048` (`/740`)** | **`HeldOut740` `Fast@1024` (`/740`)** | **`HeldOut740` `Fast@512` (`/740`)** | `Ext240 / MATH-500` (`Fast@2048`) | `Ext240 / MATH-500` (`Fast@512`) | `Val210` (`@2048 / @512`) | `Pool950` (`@2048 / @512`) |
| :--- | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: |
| **Step-0 Base ($R_{\text{eval}}=1$)** | `28` | `0` (`0`) | `0s` / `0` | `102` (`13.78%`) | `102` (`13.78%`) | `96` (`12.97%`) | `30 / 72` | `29 / 67` | `42 / 41` | `144 / 137` |
| **Step-0 `GRD` ($\gamma_0=0.05, R_{\text{eval}}=2$)** | `36` | `0` (`0`) | `0s` / `0` | `103` (`13.92%`) | `103` (`13.92%`) | `99` (`13.38%`) | `28 / 75` | `28 / 71` | `40 / 39` | `143 / 138` |
| **Step-0 `Naive-Loop` ($\gamma_0=1.0, R_{\text{eval}}=2$)** | `36` | `0` (`0`) | `0s` / `0` | `59` (`7.97%`) | `59` (`7.97%`) | `59` (`7.97%`) | `18 / 41` | `18 / 41` | `27 / 27` | `86 / 86` |
| **`Single-Depth GRPO` (`SD-50st`, 3 seeds)** | `28` | `50` (`1,400`) | `533.3s` / `77.4k` | `369.33 ± 15.95` (`[380, 351, 377]`) | `364.33 ± 14.57` (`[376, 348, 369]`) | `322.33 ± 4.51` (`[327, 322, 318]`) | `146.7 / 222.7` | `141.0 / 181.3` | `116.0 / 97.7` | `485.33 / 420.00` |
| **`Single-Depth GRPO` (`SD-65st`, Compute-Matched, 3 seeds)** | `28` | **`65` (`1,820`)** | **`654.9s` / `100.1k`** | **`380.67 ± 6.81` (`[383, 373, 386]`)** | `372.00 ± 4.58` (`[373, 367, 376]`) | `327.33 ± 10.02` (`[331, 316, 335]`) | `146.3 / 234.3` | `139.3 / 188.0` | `116.0 / 95.7` | **`496.67` / `423.00`** |
| **`Naive-Loop GRPO` (`NL-50st`, $\gamma=1.0$, 3 seeds)** | `36` | `50` (`1,800`) | `782.5s` / `86.0k` | `201.00 ± 7.55` (`[208, 202, 193]`) | `199.67 ± 11.50` (`[211, 200, 188]`) | `179.00 ± 17.06` (`[184, 193, 160]`) | `73.7 / 127.3` | `73.3 / 105.7` | `62.0 / 55.7` | `263.00 / 234.67` |
| **`GRD-GRPO` ($R_{\text{eval}}=2$, 3 seeds)** | `36` | `50` (`1,800`) | `679.2s` / `78.7k` | `376.33 ± 10.02` (`[380, 365, 384]`) | `371.33 ± 13.61` (`[376, 356, 382]`) | `330.00 ± 6.08` (`[334, 323, 333]`) | `145.3 / 231.0` | `140.7 / 189.3` | `114.3 / 97.7` | `490.67 / 427.67` |
| **`GRD-GRPO` ($R_{\text{eval}}=1$ `bypass_loop`, 3 seeds)** | `28` | `50` (`1,800`) | `679.2s` / `78.7k` | `379.33 ± 9.87` (`[386, 368, 384]`) | **`373.67 ± 7.09` (`[380, 366, 375]`)** | **`331.67 ± 5.51` (`[337, 326, 332]`)** | **`147.0` / `232.3`** | **`143.3` / `188.3`** | `114.3 / 102.0` | `493.67` / **`433.67`** |
| **`Fixed-Small-Gate` ($\gamma \equiv 0.05$ frozen, $R_{\text{eval}}=1$, s42)** | `28` | `50` (`1,800`) | `635.1s` / `67.5k` | `371` (`[s42]`) | `367` (`[s42]`) | **`338` (`[s42]`)** | `142 / 229` | **`139 / 199`** | `111 / 102` (`R=2: 119 / 109`) | `482` / **`440`** |

**Table 3:** Single-pass fixed-depth accuracy across untouched `HeldOut740 = Ext240 + MATH-500`, `Val210`, and `Pool950`. Per-seed triples are ordered `[Seed 42, Seed 101, Seed 7]`.

Table 3 and the 3-seed paired $t$-intervals ($df=2, t_{0.975,2}=4.303$) establish four essential findings:
1. **Un-Gated Post-Pretraining Recurrence Collapses Under `GRPO`, and $\gamma_0 = 0.05$ Recovers It:** On untouched `HeldOut740 Fast@2048`, `Naive-Loop GRPO` collapses by **`-168.33 ± 14.57` items (`[-172, -149, -184]`, 95% CI `[-204.5, -132.1]`)** below `SD-50st`. Under-relaxed gating (`GRD-GRPO` $R_{\text{eval}}=2$) recovers **`+175.33 ± 14.22` items (`[+172, +163, +191]`, 95% CI `[+140.0, +210.7]`)** on `HeldOut740 Fast@2048` (`+227.67 ± 9.29` on `Pool950`).
2. **Equal-Step (`50` Steps) vs. Compute-Matched (`65` Steps) Single-Depth Comparison:**
   - Relative to equal-step `SD-50st`, `GRD-GRPO` ($R_{\text{eval}}=1$ bypass) is positive on all `3/3` seeds on `HeldOut740 Fast@2048` (`+10.00 ± 6.08` items, `[+6, +17, +7]`, 95% CI `[-5.1, +25.1]`), `HeldOut740 Fast@512` (`+9.33 ± 5.03` items, `[+10, +4, +14]`, 95% CI `[-3.2, +21.8]`), and `Pool950 Fast@512` (`+13.67 ± 4.62` items, `[+19, +11, +11]`, 95% CI `[+2.2, +25.1]`).
   - **Crucially, however, giving ordinary `Single-Depth GRPO` the matched 65-step compute budget (`SD-65st`, `654.9s`, `1,820` layer-steps) lifts `MATH-500 Fast@2048` from `222.67 ± 11.93` to `234.33 ± 5.51` (`[237, 228, 238]`) and `HeldOut740 Fast@2048` from `369.33 ± 15.95` to `380.67 ± 6.81` (`[383, 373, 386]`), completely closing the single-pass `Fast@2048` gap with 50-step `GRD-GRPO` ($R_{\text{eval}}=1$: `379.33 ± 9.87`, paired difference `-1.33 ± 4.04`, `[+3, -5, -2]`, 95% CI `[-11.4, +8.7]`; $R_{\text{eval}}=2$: `376.33 ± 10.02`, paired difference `-4.33 ± 3.51`)!**
   - On compact `Fast@512`, `SD-65st` inflates average `HeldOut740` generation length from `577.6t` to `614.9t` (vs. `580.5t` for `GRD` $R_{\text{eval}}=1$), so `GRD` ($R_{\text{eval}}=1$) retains a higher 3-seed mean (`331.67 ± 5.51` vs. `327.33 ± 10.02` on `HeldOut740`, `+4.33 ± 6.66`, `[+6, +10, -3]`, 95% CI `[-12.2, +20.9]`; `433.67 ± 10.79` vs. `423.00 ± 11.53` on `Pool950`, `+10.67 ± 16.29`, `[+22, +18, -8]`, 95% CI `[-29.8, +51.1]`), though with 3 seeds these paired $t$-intervals cross zero.
3. **Frozen-Small-Gate Control (`fixed_gate_1024_50st_s42`) Isolates Gate Initialization From Gate Optimization:**
   - Even when $\gamma \equiv 0.05$ and $\beta \equiv 0$ are **completely frozen** throughout 50 `GRPO` steps (`Seed 42`), $R_{\text{eval}}=1$ bypass achieves **`338 / 740` on `HeldOut740 Fast@512` (`199 / 500` on `MATH-500`, `139 / 240` on `Ext240`; `440 / 950` on `Pool950`)**—matching trainable `GRD-GRPO` (`337 / 740`, `195 / 500` on `MATH-500`) and exceeding both `SD-50st` (`327 / 740`) and `SD-65st` (`331 / 740`) on `Fast@512`, while reaching `371 / 740` (`229 / 500` on `MATH-500`) at `Fast@2048` (vs. `386 / 740` for trainable `GRD-GRPO` Seed 42) and `119 / 210` (`Fast@2048`) / `109 / 210` (`Fast@512`) under $R_{\text{eval}}=2$ on `Val210`.
   - Together with `Table 1` (`2.25%` extra-pass core gradient share), this confirms that the primary role of $\gamma_0 = 0.05$ is **preventing Coda-entry manifold shift during looped rollouts** [10], rather than acting as a Sobolev regularizer or outperforming compute-matched single-depth training on long-horizon single-pass accuracy.

### 3.3 Item-Level Contingency, Deployed Online `EscFB`, and 2-Attempt Ordinary Comparator

Across the 3 seeds of 50-step `GRD-GRPO`, unconditional $R_{\text{eval}}=2$ (`36` layers) uniquely solves **`51.67 ± 2.08` items (`[51, 54, 50]`)** on `Pool950 Fast@2048` (`3.23x` Step 0's `16` items) and **`43.33 ± 4.16` items (`[42, 40, 48]`)** on `Fast@512` (`2-depth union` $R_1 \cup R_2 = 545.33 \pm 8.50 / 950 = 57.40\%$ at `@2048`), but simultaneously flips **`54.67 ± 10.69` (`@2048`)** and **`49.33 ± 4.16` (`@512`)** items solved by $R_{\text{eval}}=1$ bypass.

To test whether selective 2nd-pass routing provides a compute-matched advantage, we evaluate **Truncation-Triggered Escalation (`EscRaw` and fallback-protected `EscFB`)**: run Pass 1 first; trigger Pass 2 **if and only if** Pass 1 hits the token cap ($t_1 \ge L$) or fails to extract an answer ($a_1 = \varnothing$); under `EscFB`, adopt Pass 2's answer **if and only if** Pass 2 terminates naturally before the budget cap ($t_2 < L$) with $a_2 \neq \varnothing$. Table 4 compares:
1. **3-Seed `GRD-50st EscFB` ($R_{\text{eval}}: 1 \to 2$, deterministic greedy $T=0$ on both passes)**;
2. **3-Seed `SD-65st 2-Attempt EscFB` (`two_attempt`, greedy $T=0$ on Pass 1 + stochastic $T=0.6, \text{top-}p=0.95$ retry on triggered items under the exact same `EscFB` selection rule)**; and
3. **Deployed Online `EscFB` (`online_escfb` on `fixed_gate_1024_50st_s42`)**, which batches *only* the triggered items $\mathcal{I}_{\text{trig}}$ into compacted `batch=24` tensors during Pass 2.

Table 4 also reports **full prefill + decode layer-token work per problem**: $\text{LayerTokens}(x) = L_{\text{pass1}}(t_{\text{prompt}} + t_{\text{gen},1}) + \mathbb{I}(x \in \mathcal{I}_{\text{trig}}) L_{\text{pass2}}(t_{\text{prompt}} + t_{\text{gen},2})$.

| Routing Policy & Arm | Pass-1 / Pass-2 Layers | **`HeldOut740` `@2048` (`/740`)** | **`HeldOut740` `@1024` (`/740`)** | **`HeldOut740` `@512` (`/740`)** | `HeldOut740` Rescues / Regressions (`@2048`) | `HeldOut740` Rescues / Regressions (`@512`) | `HeldOut740` Avg Gen Tok (`@2048 / @512`) | **`HeldOut740` Prefill+Decode Layer-Tokens (`@2048 / @512`)** | `Pool950` (`@2048 / @512`) |
| :--- | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: |
| **`SD-50st` 1-Pass (3 seeds)** | `28 / —` | `369.33 ± 15.95` | `364.33 ± 14.57` | `322.33 ± 4.51` | `—` | `—` | `577.6 / 371.4` | `18,978 / 13,207` (`1.00x / 1.00x`) | `485.33 / 420.00` |
| **`SD-65st` 1-Pass (3 seeds)** | `28 / —` | `380.67 ± 6.81` | `372.00 ± 4.58` | `327.33 ± 10.02` | `—` | `—` | `614.9 / 374.2` | `20,025 / 13,283` (`1.06x / 1.01x`) | `496.67 / 423.00` |
| **`GRD-50st` 1-Pass $R_{\text{eval}}=1$ (3 seeds)** | `28 / —` | `379.33 ± 9.87` | `373.67 ± 7.09` | `331.67 ± 5.51` | `—` | `—` | `580.5 / 372.4` | `19,061 / 13,234` (`1.00x / 1.00x`) | `493.67 / 433.67` |
| **`GRD-50st` 1-Pass $R_{\text{eval}}=2$ (3 seeds)** | `36 / —` | `376.33 ± 10.02` | `371.33 ± 13.61` | `330.00 ± 6.08` | `—` | `—` | `584.3 / 374.1` | `24,643 / 17,077` (`1.30x / 1.29x`) | `490.67 / 427.67` |
| **`GRD-50st EscFB` ($R: 1 \to 2$, $T=0$, 3 seeds)** | `28 / 36` | **`386.00 ± 7.55` (`[393, 378, 387]`)** | **`380.00 ± 7.55` (`[388, 373, 379]`)** | **`341.33 ± 1.53` (`[343, 340, 341]`)** | **`[7, 10, 3]` / `[0, 0, 0]` (`20 / 0`)** | **`[7, 14, 9]` / `[1, 0, 0]` (`30 / 1`)** | `681.6 / 549.6` | **`23,043 / 21,147` (`1.21x / 1.60x`)** | **`501.67 / 443.67`** |
| **`SD-65st 2-Attempt EscFB` ($T=0.6$ retry, 3 seeds)** | `28 / 28` | **`386.67 ± 4.93` (`[389, 381, 390]`)** | `378.33 ± 4.93` (`[376, 375, 384]`) | `339.00 ± 3.00` (`[339, 336, 342]`) | `[7, 9, 6]` / **`[1, 1, 2]` (`22 / 4`)** | `[9, 20, 9]` / **`[1, 0, 2]` (`38 / 3`)** | `733.0 / 555.6` | **`23,650 / 19,585` (`1.25x / 1.48x`)** | **`504.67`** / `437.33` |
| **`Fixed-Gate` Deployed Online `EscFB` (s42)** | `28 / 36` | `372` (`142 + 230`) | `368` (`142 + 226`) | **`346` (`140 + 206`)** | `1 / 0` (`+1` over `371`) | **`8 / 0` (`+8` over `338`)** | `577.0 / 486.9` | **`19,744 / 18,793` (`1.04x / 1.42x`)** | `488 / 453` |

**Table 4:** Multi-pass routing comparison (`GRD-50st EscFB` vs. `SD-65st 2-Attempt EscFB` and Deployed Online `EscFB`) with prefill+decode layer-token work proxies.

Table 4 resolves both the online-deployment question and the compute-matched 2-attempt comparison:
1. **Deployed Online `EscFB` Validation (`evaluate_online_escfb`):** When `fixed_gate_1024_50st_s42` executes Pass 2 online by batching *only* the triggered subset $\mathcal{I}_{\text{trig}}$ (`65 / 210` on `Val210`, `30 / 240` on `Ext240`, `182 / 500` on `MATH-500`), online `EscFB` achieves **`346 / 740` (`206 / 500` on `MATH-500`) at `Fast@512` (`8` rescues, `0` regressions, `+8` net over `338 / 740` 1-pass)** and **`453 / 950` on `Pool950 Fast@512`**. On `Val210` (where both full-sweep offline $R_{\text{eval}}=2$ and compacted online $R_{\text{eval}}=2$ were run), online vs. offline `EscFB` totals are **`107 / 210` vs. `107 / 210` at `Fast@512`** and **`116 / 210` vs. `115 / 210` at `Fast@2048`**, with `14 / 15` (`93.3%`) and `59 / 65` (`90.8%`) per-item correctness agreement on triggered items despite BF16 batch-padding differences.
2. **2-Attempt Stochastic Retry (`SD-65st 2-Try EscFB`) Matches `GRD EscFB` Accuracy at Comparable Test-Time FLOP Proxies:**
   - Counting both attempts and prefill+decode layer-tokens on `HeldOut740`, `GRD-50st EscFB` uses **`23,043` layer-tokens (`1.21x` `SD-50st`) at `@2048`** and **`21,147` layer-tokens (`1.60x`) at `@512`**, while `SD-65st 2-Try EscFB` uses **`23,650` layer-tokens (`1.25x`) at `@2048`** and **`19,585` layer-tokens (`1.48x`) at `@512`**.
   - When `SD-65st` is granted a second stochastic attempt ($T=0.6, \text{top-}p=0.95$) under the exact `EscFB` selection rule, it reaches **`386.67 ± 4.93 / 740` at `@2048`** and **`339.00 ± 3.00 / 740` at `@512`**, matching `GRD-50st EscFB` (`386.00 ± 7.55 / 740` at `@2048`, paired difference `-0.67 ± 4.04`, 95% CI `[-10.7, +9.4]`; `341.33 ± 1.53 / 740` at `@512`, paired difference `+2.33 ± 2.89`, 95% CI `[-4.8, +9.5]`).
   - Thus, `EscFB` is **not** a compute-matched accuracy advantage over a 2-attempt stochastic `Single-Depth` policy. Rather, its distinct property is **deterministic ($T=0$) multi-depth routing**: whereas temperature sampling ($T=0.6$) introduces `4` regressions (`[1, 1, 2]`) on `HeldOut740 @2048` and `3` regressions (`[1, 0, 2]`) on `HeldOut740 @512` (`6` on `Pool950 @512`), deterministic `GRD EscFB` observed `0` regressions on `@2048` (`20` rescues / `0` regressions on `HeldOut740`; `24 / 0` on `Pool950`) and `1` regression on `HeldOut740 @512` (`3` on `Pool950 @512`)—a bounded empirical observation on these benchmarks rather than a theoretical zero-regression guarantee. All three-seed `GRD` routing results are assembled from full sweeps, while online compacted execution was verified on the fixed-gate model.

---

## 4. Limitations and Scope Boundaries

1. **No Superiority Over Compute-Matched Single-Depth Training at 50 Steps:** While under-relaxed gating ($\gamma_0 = 0.05$) cleanly resolves the `-168.33`-item `HeldOut740` collapse of un-gated recurrence and improves over 50-step `Single-Depth GRPO` at equal step count, 65-step compute-matched `Single-Depth GRPO` (`SD-65st`) achieves `380.67 ± 6.81 / 740` (`Fast@2048`), matching `GRD-GRPO` ($R_{\text{eval}}=1$: `379.33 ± 9.87 / 740`).
2. **Persistence of $R_1 \setminus R_2$ Flips Under Unconditional $R_{\text{eval}}=2$:** Because 50-step `GRD-GRPO` trains exclusively at $R_{\text{train}}=2$ for `16.33` active updates without a cross-depth consistency loss or randomized depth $R_{\text{train}} \in \{1, 2\}$ [1], unconditional $R_{\text{eval}}=2$ still flips `54.67 ± 10.69` items solved by $R_{\text{eval}}=1$.

---

## References

[1] Jonas Geiping, Sean McLeish, Neel Jain, John Kirchenbauer, Siddharth Singh, Brian R. Bartoldson, Bhavya Kailkhura, Abhinav Bhatele, and Tom Goldstein. *Scaling up Test-Time Compute with Latent Reasoning: A Recurrent Depth Approach*. arXiv:2502.05171, 2025.

[2] Zhihong Shao, Peiyi Wang, Qihao Zhu, Runxin Xu, Junxiao Song, Xiao Bi, Haowei Zhang, Mingchuan Zhang, Y. K. Li, Y. Wu, and Daya Guo. *DeepSeekMath: Pushing the Limits of Mathematical Reasoning in Open Language Models*. arXiv:2402.03300, 2024.

[3] DeepSeek-AI. *DeepSeek-R1: Incentivizing Reasoning Capability in LLMs via Reinforcement Learning*. arXiv:2501.12948, 2025.

[4] Stephen Chung, Wenyu Du, and Xinyi Wan. *Thinker: Learning to Think Fast and Slow*. arXiv:2505.21097, 2025.

[5] Mostafa Dehghani, Stephan Gouws, Oriol Vinyals, Jakob Uszkoreit, and Łukasz Kaiser. *Universal Transformers*. In International Conference on Learning Representations (ICLR), arXiv:1807.03819, 2019.

[6] Shaojie Bai, J. Zico Kolter, and Vladlen Koltun. *Deep Equilibrium Models*. In Advances in Neural Information Processing Systems (NeurIPS), arXiv:1909.01377, 2019.

[7] Sangmin Bae, Adam Fisch, Hrayr Harutyunyan, Ziwei Ji, Seungyeon Kim, and Tal Schuster. *Relaxed Recursive Transformers: Effective Parameter Sharing with Layer-wise LoRA*. arXiv:2410.20672, 2024.

[8] Hugo Touvron, Matthieu Cord, Alexandre Sablayrolles, Gabriel Synnaeve, and Hervé Jégou. *Going deeper with Image Transformers*. In Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV), arXiv:2103.17239, 2021.

[9] Thomas Bachlechner, Bodhisattwa Prasad Majumder, Huanru Henry Mao, Garrison W. Cottrell, and Julian McAuley. *ReZero is All You Need: Fast Convergence at Large Depth*. arXiv:2003.04887, 2020.

[10] *Own-trace fitting recovers inserted-state damage without a fitted latent advantage*. rStation, `math_rlvr_8`, version 2. https://rstation.ai/problems/math_rlvr/papers/8/v2

[11] *A Controlled Diagnostic, Approximately Token-Matched, and Stage-4 Prefix-Copying Audit of 4-Stage Fast-and-Slow RLVR on Qwen3-0.6B-Base*. rStation, `math_rlvr_29`, version 1. https://rstation.ai/problems/math_rlvr/papers/29/v1

[12] *Equal checkpoint tensors do not imply tied RLVR parameters*. rStation, `math_rlvr_2`, version 2. https://rstation.ai/problems/math_rlvr/papers/2/v2

[13] *Homogeneous-Group AdamW Stepping, Pre-Boxed Derivation Gating, and Branched Rollout Credit in Small-Model Mathematical RLVR*. rStation, `math_rlvr_25`, version 8. https://rstation.ai/problems/math_rlvr/papers/25/v8
