results: correct frozen.md §1a — the margin is the gated head, not capacity

`grp_k0_nostate` was described as a capacity-matched control with "identical
5602 parameters". It is neither capacity-matched nor the same network:
- With M_prev identically zero, gate.weight[:, 32:] and cand.weight[:, 32:]
  receive no gradient and end training bit-identical to their initialisation
  (max |Δ| exactly 0.0). 2048 of 5602 parameters never train; the honest
  effective count is 3554.
- The ablated update collapses to (1−σ(W_g[h‖0]))·tanh(W_c[h‖0]) — a gated
  feedforward head with no recurrence, not the same network minus memory.
- Width-matched memoryless controls (D=86/3548, D=139/5615, cppn_hidden=141/
  5584; 8 seeds each) do not close the gap: grp_k0 wins 7/8 or 8/8 at every
  width, and the 5602-matched RPs are worse than the 1442-parameter one.
Replaces "the margin is capacity, not memory" with "the margin is the gated
post-RP nonlinearity, not memory and not parameter count". The null for memory
is unchanged (1.06x on 4/8 frozen, 1.19x on 11/16 trained). New §1d carries the
measurements and states the untuned-wide-RP limitation, including the D=139
instability on seeds 1 and 6. a1.md gets a one-line pointer; its numbers stand.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KAWnnPg2qvmLNySamE2k85
This commit is contained in:
chrnxandClaude Opus 5 committed 2026-09-02 10:48:19 -05:00
1 parent 4eaf142b9a
commit 39ffbc5272
2 files changed
+94 -10

No files matched your search

+89 -10
View File
@@ -10,10 +10,13 @@ optimiser step.
builds an internal regime variable.**
1. Under frozen weights `grp_k0` beats `rp_only` 2.50x on steady error, on 8/8 seeds.
**That entire margin is the GRP's extra 4160 parameters, not its state.** The same
architecture with the state ablated — every parameter kept, an empty memory handed
in each step — measures 2.170e-05 against `grp_k0`'s 2.101e-05. Memory is worth
1.06x, on 4 seeds out of 8. Its recovery curve is indistinguishable at every lag.
**That margin is the GRP's gated post-RP nonlinearity, not its state — and not its
parameter count either.** The same architecture with the state ablated — an empty
memory handed in each step — measures 2.170e-05 against `grp_k0`'s 2.101e-05.
Memory is worth 1.06x, on 4 seeds out of 8. Its recovery curve is indistinguishable
at every lag. This item originally read "that entire margin is the GRP's extra 4160
parameters"; that attribution was wrong and is corrected in §1d. The null for memory
is unchanged.
2. The regime is decodable from `M` at 0.332 against a measured chance of 0.273. It is
decodable from the memoryless RP's `h` at 0.342 against 0.274. **`M` knows no more
about the regime than the feedforward representation it is built from** — slightly
@@ -52,9 +55,10 @@ so the GRP is running as a GRP throughout. `_train` is a verbatim copy of
reproduces `regime.run`'s metrics exactly, so the frozen phase starts from the
organism Task 7 measured.
Parameter counts, which turn out to be the whole story: `rp_only` **1442**,
`grp_k0` **5602**. The RP is identical in both (1376); the GRP adds a 64→32 gate and
a 64→32 candidate layer, 4160 parameters, 3.9x the total.
Parameter counts: `rp_only` **1442**, `grp_k0` **5602**. The RP is identical in both
(1376); the GRP adds a 64→32 gate and a 64→32 candidate layer, 4160 parameters, 3.9x
the total. These counts are not the story — §1d measures what the count buys, and the
answer is nothing.
## 1. Part A — frozen recovery
@@ -65,8 +69,10 @@ comparable with Task 7's; as there, they are computed on the second half of the
Frozen-phase `steady`, means over seeds 0-7. `grp_k0_nostate` is `grp_k0` with an
empty memory dict handed to `Organism.forward` every step, in training and in the
frozen phase: identical architecture, identical 5602 parameters, `M_prev` always zero.
It is the capacity-matched feedforward control.
frozen phase: identical architecture, identical parameter *tensors*, `M_prev` always
zero. It was originally described here as the capacity-matched feedforward control.
**It is not one** — §1d. The rows below are the measurements; the capacity reading of
them is withdrawn.
```
condition steady sd min max max/min n_params
@@ -103,7 +109,8 @@ grp_k0 1.742e-05 1.656e-05 2.006e-05 2.170e-05 1.931e-05 2.365e-05 3.515e
Note also that the across-seed spread — Task 7's "memory buys reliability" reading —
goes the same way. `grp_k0_nostate` has the *tightest* spread of the three (1.78x
max/min, against `grp_k0`'s 2.46x). Reliability is capacity here too.
max/min, against `grp_k0`'s 2.46x). Reliability goes with the gated head too — not
with the parameter count; see §1d.
### 1b. The recovery shape: the prediction under test fails
@@ -167,6 +174,78 @@ Removing the RP's last adaptive channel does not rescue the prediction — the R
decay gets *stronger* (74% of the excess, up from 57%), confirming the decay is the
world's, not affect's.
### 1d. Correction: the control is not capacity-matched, and the margin is not capacity
This section replaces the "capacity, not memory" reading above. Three measurements,
all at the settings this file already uses (8000 train + 4000 frozen steps, `lr=1e-3`,
`bptt=20`, `omega=10`, `kappa=0`, frozen-phase `steady`).
**(i) 2048 of the 5602 parameters never train.** With `M_prev ≡ 0` the gate and
candidate layers both see `[h ‖ 0]`, so the second half of each input weight matrix is
multiplied by zero and receives exactly no gradient. Trained `grp_k0` stateless for
8000 steps and diffed every block against its initialisation: `gate.weight[:, 32:]`
and `cand.weight[:, 32:]` (1024 parameters each) come out at max |Δ| **exactly 0.0**,
while every other block moved (max |Δ| 0.035–0.091). The honest effective count for
`grp_k0_nostate` is **3554**, not 5602.
**(ii) It is a different network, not the same network minus state.** With `M_prev = 0`
the update `M ← (1−g)·M̃ + g·M` collapses to
```
M = (1 − σ(W_g[h‖0])) · tanh(W_c[h‖0])
```
— a two-layer gated feedforward head on `h`, with no recurrence and no BPTT path
through state. The original conclusion needed this control to be *the same network with
memory deleted*; it is instead *a simpler, better-conditioned network that happens to
share tensor shapes*. That is the difference between "the extra parameters explain the
margin" and "this particular feedforward head explains the margin".
**(iii) A genuinely parameter-matched memoryless model does not close the gap.** The
decisive check the original section never ran: widen `rp_only` until it has ≈5602
parameters and compare it against `grp_k0`. Two knobs, 8 seeds each, frozen `steady`:
```
condition params mean grp_k0 wins per-seed ratio vs grp_k0
--------------------------------------------------------------------------------------
rp_only D=32 1442 5.257e-05 8/8 2.47 2.30 1.54 1.48 5.46 2.36 2.53 1.85
rp_only D=86 3548 3.915e-05 8/8 1.57 1.33 1.36 1.38 2.33 1.05 2.88 2.48
rp_only D=139 5615 1.046e-04 7/8 1.82 6.84 1.41 1.33 2.07 0.99 15.5 1.86
rp_only cppn_hidden=141 5584 7.195e-05 8/8 5.58 2.51 2.78 2.08 6.13 1.67 3.84 3.02
grp_k0_nostate 5602 2.170e-05 4/8 1.49 0.92 1.33 0.92 0.90 1.08 0.78 1.10
grp_k0 5602 2.101e-05 —
```
Reproduction: `frozen.py`'s CLI exposes neither width knob, so these rows came from a
throwaway driver that calls `frozen._train` and `frozen._frozen` unchanged against an
`Organism(hidden_dim=..., cppn_hidden=...)` built in `_build`'s exact order, so the RNG
stream matches. No file in `experiments/` or `ailed/` was modified. The driver is pinned
by reproducing `grp_k0_nostate` seed 0 at 2.588e-05, bit-for-bit the value in §1a's
per-seed table.
D=86 is matched to the *effective* 3554; D=139 and `cppn_hidden=141` to the nominal
5602. **Parameter-matched by either knob, the memoryless RP gets worse, not better** —
D=139 means 1.046e-04 against the 1442-parameter RP's 5.257e-05 — and `grp_k0` still
wins 7/8 or 8/8 seeds at every width tried. Only `grp_k0_nostate`, which adds the gated
head rather than width, closes it.
**The corrected claim.** The 2.5x margin is *not* capacity: capacity added as RP width
makes the memoryless model worse. The margin comes from the gated post-RP nonlinearity
`(1−σ(W_g[h‖0]))·tanh(W_c[h‖0])`, which `grp_k0_nostate` supplies with no memory at
all. **The null for memory is unchanged and if anything sharper**: state is still worth
1.06x on 4/8 frozen and 1.19x on 11/16 trained, and the mechanism that does the work is
the gate acting as a nonlinearity, not as a memory controller.
*Limitation, stated rather than tuned.* The wide `rp_only` runs use this file's
`lr=1e-3` and 8000-step budget unchanged, and a wider model may be lr- or init-limited
at that budget. Two of the D=139 seeds destabilise outright — seed 1 at 1.133e-04 and
seed 6 at 5.451e-04, against a same-condition median of 3.0e-05 — so the D=139 mean is
carried by those two and should be read as instability, not as a clean loss. They are
reported and not tuned: retuning a baseline until it catches up changes the question
instead of answering it (`AGENTS.md`). What the runs establish is the negative — added
width does not buy the margin — not a tight estimate of how a well-tuned wide RP would
do.
## 2. Part B — what does the state know?
Linear decode from a per-entity representation to the world's regime id. Test split is