The thinking behind the organism, versioned alongside the three code repos rather than living only on one machine. - AILED_General_Specification.md, the authoritative design, and the implementation plan the code was built from - AGENTS.md, the project-wide rules, including the two that were learned the hard way: this is not a performance benchmark, and a null recorded early beats a claim propped up later - the nine superseded module specs, each carrying a banner naming what replaced it - .sdd/, the execution ledger and every task brief and report: each ruling taken, what it would cost if wrong, every correction, and every number verified independently The three code repos are siblings, each its own repository, and are git-ignored here so nothing is nested.
139 lines
7.9 KiB
Markdown
139 lines
7.9 KiB
Markdown
# Task 7b report — frozen-weights probe
|
||
|
||
**Status: complete. Result: a null, and a larger one than the task was scoped to find.**
|
||
|
||
Deliverables: `experiments/frozen.py`, `experiments/tests/test_frozen.py` (13 tests,
|
||
39 in the suite, all passing), `experiments/results/frozen.md` — the full audit trail
|
||
with every table. This report is the summary and the recommendation.
|
||
|
||
8 seeds (0-7), 8000 training steps then 4000 frozen steps, all other parameters at
|
||
`regime.run`'s defaults. 40 runs. No default in `particles.py`/`regime.py` changed,
|
||
`../ailed` untouched, no subagents.
|
||
|
||
## Direct answer
|
||
|
||
**Which one understands the domain, and what is the evidence: neither, and the
|
||
evidence is that removing memory entirely changes nothing.**
|
||
|
||
Part B is a clean null. The regime is linearly decodable from the GRP's `M` at 0.332
|
||
against a chance level of 0.273 that I measured rather than assumed. It is decodable
|
||
from the memoryless RP's `h` at 0.342 against 0.274, and from the `h` inside the same
|
||
GRP organism at 0.338. `M` is consistently the *worst* of the three. The GRP's state
|
||
has not built a regime variable — it carries slightly less regime information than the
|
||
feedforward layer that feeds it.
|
||
|
||
Part A looked at first like a positive: frozen `grp_k0` beats frozen `rp_only` 2.50x
|
||
on steady error, 8/8 seeds, with every parameter bit-frozen. But the two conditions are
|
||
not capacity-matched — `rp_only` has 1442 parameters and `grp_k0` has 5602, a 3.9x
|
||
gap, because the GRP adds a 64→32 gate and a 64→32 candidate layer. I added the control
|
||
that separates them: `grp_k0_nostate`, the same architecture with an empty memory dict
|
||
handed to `Organism.forward` every step, so every parameter is kept and only the
|
||
carrying of state is removed.
|
||
|
||
```
|
||
frozen steady mean 8-seed spread
|
||
------------------------------------------------
|
||
rp_only 5.257e-05 3.99x
|
||
grp_k0_nostate 2.170e-05 1.78x
|
||
grp_k0 2.101e-05 2.46x
|
||
|
||
capacity rp_only / nostate : 2.51x mean, 1.94x median, 8/8 seeds
|
||
state nostate / grp_k0 : 1.06x mean, 1.00x median, 4/8 seeds
|
||
```
|
||
|
||
**The entire frozen-weights advantage is capacity. Memory is worth 1.06x on a coin
|
||
flip of seeds.** The recovery curves agree to within 2% at every lag with the state and
|
||
without it. The same decomposition on the trained phase gives capacity 3.06x (8/8) and
|
||
state 1.25x (4/8).
|
||
|
||
The mechanism is visible and explains both nulls: the gate sits at `g = 0.500 ± 0.029`,
|
||
never above 0.9, never below 0.1, on any seed. It is at its initialisation — 8000
|
||
training steps never moved it. `M ← (1−g)M̃ + gM` has degenerated into a fixed 50/50
|
||
blend with no input dependence. The GRP is not gating anything, so there is no
|
||
mechanism present to represent a regime with.
|
||
|
||
## The two guards you flagged
|
||
|
||
Both held, and both are asserted in code on every run rather than checked by eye.
|
||
|
||
- **The freeze is real.** `parameters_to_vector` snapshot before and after, compared
|
||
with `torch.equal`: **bit-identical on 40/40 runs**. Belt and braces —
|
||
`requires_grad=False` on every parameter *and* the whole phase under
|
||
`torch.no_grad()`, with no optimiser constructed in that scope.
|
||
`test_frozen_phase_detects_a_parameter_change` nudges `out.bias` by 1e-6 after the
|
||
snapshot and asserts the check raises, so the assertion is known to be able to fail.
|
||
- **Memory kept updating.** `min_t max_i |M_t − M_{t−1}|` over the frozen phase is
|
||
**2.587e-04** across every GRP run, mean per-step movement 1.06e-02. Asserted `> 0`
|
||
in `_frozen` and tested separately. The GRP ran as a GRP throughout.
|
||
|
||
Two further correctness guards worth naming: `_train` is a verbatim copy of
|
||
`regime.run`'s loop and a test asserts it reproduces `regime.run`'s metrics exactly, so
|
||
the frozen phase starts from the organism Task 7 measured; and the reconstructed `h`
|
||
is verified `torch.equal` against the organism's own output at every step of every run
|
||
(`org.grp(h, M_prev, arousal)` must equal the returned `M`, `org.out(h)` must equal the
|
||
returned pred), so the RP probe is running on the representation the organism used.
|
||
|
||
## Two places the brief's premises did not hold
|
||
|
||
Reporting these because they change how Part A reads, not to relitigate the design.
|
||
|
||
1. **A frozen `rp_only` is not a fixed function of the current observation.**
|
||
`CONDITIONS["rp_only"]` sets `ctx="affect"`, and `(valence, arousal)` is updated from
|
||
`loss.item()` every step and feeds the CPPN. Freezing weights leaves a 2-d adaptive
|
||
state in place. I controlled for it by re-running the frozen phase with affect also
|
||
pinned: `rp_only` 4.906e-05, `grp_k0` 2.057e-05, ratio 2.26x, still 8/8 seeds. The
|
||
conclusion is unaffected.
|
||
|
||
2. **`recovery[k]` under frozen weights does not measure adaptation.** The prediction
|
||
was that a frozen RP steps up at each switch and never comes down. It comes down —
|
||
57% of its peak excess by `@19` with affect live, 74% with affect pinned — and
|
||
`grp_k0`'s *relative* excursion is larger (2.24x its own floor vs the RP's 1.69x)
|
||
and peaks later. The reason is that at a switch the particle configuration is
|
||
equilibrated to the old regime and the new coupling matrix drives it elsewhere over
|
||
the following ~10-20 steps; that transient belongs to the world and any fixed
|
||
function of the configuration inherits it. `grp_k0_nostate` reproduces `grp_k0`'s
|
||
curve at every lag, which demonstrates it directly.
|
||
|
||
So the shape prediction fails, but not in a way that favours the RP — it fails
|
||
because the observable was measuring the world.
|
||
|
||
## Robustness of the Part B null
|
||
|
||
Stressed three ways, none of which moves it:
|
||
|
||
- **Estimator** — multinomial logistic (LBFGS, strong Wolfe) matches least squares to
|
||
within 0.006 on every representation. Not a least-squares artefact.
|
||
- **Entity identity** — subtracting each entity's own train-split mean, in case a
|
||
regime code hides under a stable per-entity offset, moves accuracy by ≤0.002.
|
||
- **Target** — the regime id is an arbitrary label over four random coupling matrices;
|
||
what entity *i* needs is its own row `k[t_i, :]`. Probing each of the three signed
|
||
entries as a 3-class problem against measured chance: `rp_only` h +0.025, `grp_k0` h
|
||
+0.033, `grp_k0` M +0.024. Same ordering, `M` last.
|
||
|
||
The +0.05 that *is* there is identified: `grp_k0_nostate`, whose `M` is a fixed
|
||
function of the current `h`, decodes at 0.325. It is an instantaneous read-off of the
|
||
visible configuration, not something a memory accumulated.
|
||
|
||
Adaptation latency is reported in `frozen.md` (12.0 steps for `M`, 10.7 for `h`) but
|
||
should not be used: 40 of 164 switches never decode correctly before the next switch,
|
||
and a latency measured off a probe 5 points above chance is measuring probe noise.
|
||
|
||
## Recommendation for A1
|
||
|
||
1. **Do not frame A1 as a memory claim on this domain.** Every `rp_only` vs `grp_k0`
|
||
comparison in the project is confounded 3.9x on parameter count. Where the claim is
|
||
about memory, `grp_k0_nostate` has to appear next to it. On the strongest form of
|
||
the comparison available — weights bit-frozen — the margin is capacity.
|
||
2. **`headroom.md` §5 inherits this.** The frozen-*regime* reliability argument
|
||
("memory reaches the floor every time, memoryless does so on one seed in three")
|
||
was measured without a capacity control, as was the 2.99x at `lr=1e-3`. Re-running
|
||
§5 with `grp_k0_nostate` is cheap and should happen before that sentence goes into
|
||
the paper. I did not do it — it is outside this task's scope and it is your call
|
||
whether §5 is still load-bearing.
|
||
3. **The null is about this setup, not the architecture.** The gate never learned to
|
||
gate, and §1b of `frozen.md` says why it had no reason to: post-switch error is
|
||
dominated by a world transient that no state can shorten. A domain where regime
|
||
identity is worth something to a per-entity state — short transient, long ambiguity —
|
||
would give the gate a job. That is the same conclusion `headroom.md` §6(c) reached
|
||
from the other direction, now with a mechanism attached to it.
|