The regime decodes from a single M at 0.332 and the question was whether it is distributed across the 16 per-entity states rather than absent from them. Mean-pooling lifts M's gap above the measured shift null by +0.045 -- and lifts the memoryless h it is built from by +0.048, on more seeds. Difference -0.003, paired se 0.015, M ahead on 8/16. Concatenating all 16 adds nothing over the mean once it has samples to fit. The instrument is not blind: a synthetic representation whose regime code is genuinely split across entities gains +0.589 through the same probe, thirteen times the effect measured here, and test_the_power_check_can_fail breaks the pooling on purpose and confirms that control fails. Eight seeds would have reported +0.010 in M's favour on 5/8. Sixteen report -0.003 on 8/16, which is the spread this project keeps being warned about. No training loop and no architecture added: _build, _train, _frozen and probe come from frozen.py unchanged, and seeds 0-7 reproduce results/frozen.json bit-identically.
271 lines
15 KiB
Markdown
271 lines
15 KiB
Markdown
# Pooled probe: is the regime distributed across the 16 per-entity states?
|
||
|
||
Task 10. `results/frozen.md` Part B decoded the world's regime id from a *single*
|
||
entity's `M` at 0.332 against a measured chance of 0.273, and from the `h` inside the
|
||
same GRP at 0.338 against 0.274. An exact decoder reaches 0.958 from one observed
|
||
displacement (`results/when_memory_works.md` §2), so the information is there and the
|
||
organism holds about a fifth of it. Two explanations were left open:
|
||
|
||
- **(b) shape mismatch** — the regime is one global 3×3 matrix `K` and the state is
|
||
per-entity, so the information could be *distributed across* the 16 states while
|
||
being absent from any one of them.
|
||
- **(a) credit assignment** — nothing in the loss rewards carrying the regime forward,
|
||
so the state never learns to hold it at all.
|
||
|
||
**Verdict: (b) is dead. Pooling the 16 states does lift the decode — by +0.045 — but
|
||
it lifts the memoryless `h` by +0.048 at the same time. Pooled `M` gains nothing that
|
||
pooled `h` does not. The gain is noise-averaging over 16 samples, not a global variable
|
||
assembled out of per-entity fragments. (a) is the remaining suspect.**
|
||
|
||
Environment: `experiments/`, `ailed/` unmodified, no default in `particles.py` or
|
||
`regime.py` changed. `grp_k0`, 16 seeds (0-15), 8000 training steps then 4000 frozen
|
||
steps, `lr=1e-3`, `bptt=20`, `hidden=32`, `omega=10`, `kappa=0`. Test split is the last
|
||
30% of the frozen phase, taken as a suffix in time. 24 training runs total.
|
||
|
||
```
|
||
uv run python pooled.py --seeds 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15 \
|
||
--estimators lsq,logit --power-check --out results/pooled.json
|
||
uv run python pooled.py --seeds 0,1,2,3,4,5,6,7 --frozen-steps 16000 \
|
||
--out results/pooled_long.json
|
||
```
|
||
|
||
`pooled.py` adds no training loop and no architecture. `_build`, `_train`, `_frozen`
|
||
and `probe` are imported from `frozen.py` unchanged; the only new code is the three
|
||
views of the representation, the reporting, and the synthetic positive control.
|
||
|
||
## 0. The pin
|
||
|
||
The `single` rows are not a re-implementation of the baseline, they *are* the baseline.
|
||
Every seed 0-7 `M_single` and `h_single` accuracy and chance level in this file is
|
||
**bit-identical to the corresponding entry in `results/frozen.json`** (asserted by
|
||
comparing the two files, and by `test_single_view_reproduces_the_frozen_probe_exactly`,
|
||
which pins `pooled.run_one` against `frozen.run_one` at a small budget). Restricted to
|
||
seeds 0-7 the table below reproduces `frozen.md` Part B exactly: `M` 0.332 against
|
||
0.273, `h` 0.338 against 0.274.
|
||
|
||
## 1. The table
|
||
|
||
16 seeds, least squares, means over seeds. `shuffle` permutes the step labels keeping a
|
||
step's 16 entities together; `shift` circularly shifts the label sequence, preserving
|
||
each regime's 40-80 step block structure, and is the stricter of the two. `gap` is
|
||
`acc − shift`, per seed, then averaged. `feat` is the probe's feature count and `n_tr`
|
||
its training samples — pooling trades 16× the samples for one pooled sample per step,
|
||
and concatenation multiplies the feature count by 16, which is exactly what inflates a
|
||
fitted probe's chance level and why `shift` is not optional.
|
||
|
||
```
|
||
representation feat n_tr acc shuffle shift gap sd(gap) >chance
|
||
---------------------------------------------------------------------------------
|
||
M, single 32 44800 0.312 0.270 0.268 +0.044 0.053 13/16
|
||
M, mean 32 2800 0.349 0.265 0.260 +0.089 0.066 15/16
|
||
M, concat 512 2800 0.292 0.251 0.258 +0.034 0.055 10/16
|
||
h, single 32 44800 0.313 0.272 0.268 +0.045 0.058 13/16
|
||
h, mean 32 2800 0.354 0.267 0.261 +0.093 0.065 16/16
|
||
h, concat 512 2800 0.291 0.251 0.256 +0.036 0.061 12/16
|
||
```
|
||
|
||
The concatenated chance levels do sit lower than the single-entity ones (0.256-0.258
|
||
against 0.268) — the control caught the direction, though not the magnitude some
|
||
inflation argument would predict.
|
||
|
||
## 2. The measurement
|
||
|
||
Pooling's gain is `gap(pooled) − gap(single)`, computed per seed and then averaged.
|
||
**The `h` row is the whole measurement.** `h` is the feedforward layer `M` is built
|
||
from and carries no memory across steps, so whatever pooling buys on `h` is the value
|
||
of pooling as such. (b) is live only if `M` gains what `h` does not.
|
||
|
||
```
|
||
M gain h gain M − h M>h seeds
|
||
------------------------------------------------------------------------
|
||
mean-pooled +0.045 (sd 0.043) +0.048 (sd 0.060) -0.003 8/16
|
||
concatenated -0.010 (sd 0.053) -0.009 (sd 0.063) -0.001 8/16
|
||
```
|
||
|
||
**Mean-pooled `M` gains +0.045. Mean-pooled `h` gains +0.048. The difference is
|
||
−0.003, with a paired across-seed standard error of 0.015, and `M` beats `h` on
|
||
exactly 8 seeds out of 16 — a coin flip.** The gain itself is real: it is positive on
|
||
14/16 seeds for `M` and 13/16 for `h`. It is simply not a memory effect. Concatenation
|
||
gains nothing at all at this budget, on either representation (see §4).
|
||
|
||
Per-seed pooling gains, mean-pooled, seeds 0-15:
|
||
|
||
```
|
||
M gain +0.041 +0.126 +0.025 +0.057 +0.049 +0.088 -0.033 +0.041 +0.081 +0.001 -0.017 +0.106 +0.063 +0.003 +0.056 +0.038
|
||
h gain +0.076 +0.060 +0.055 +0.054 +0.115 +0.086 -0.069 -0.062 +0.066 +0.038 +0.089 +0.116 -0.038 +0.000 +0.062 +0.120
|
||
M − h -0.036 +0.066 -0.030 +0.003 -0.066 +0.003 +0.036 +0.103 +0.015 -0.036 -0.106 -0.010 +0.101 +0.003 -0.006 -0.082
|
||
```
|
||
|
||
Per-seed gap above the shift null, all six representations:
|
||
|
||
```
|
||
representation s0 s1 s2 s3 s4 s5 s6 s7 s8 s9 s10 s11 s12 s13 s14 s15
|
||
------------------------------------------------------------------------------------------------------------------------------------------------
|
||
M, single +0.064 +0.017 +0.042 +0.117 +0.047 -0.047 +0.101 +0.127 +0.014 +0.042 -0.058 +0.087 +0.053 +0.048 -0.019 +0.069
|
||
M, mean +0.105 +0.143 +0.067 +0.174 +0.096 +0.041 +0.068 +0.168 +0.095 +0.043 -0.075 +0.193 +0.116 +0.051 +0.037 +0.106
|
||
M, concat -0.014 -0.050 +0.146 +0.090 +0.093 -0.007 +0.009 +0.091 +0.026 +0.002 -0.010 +0.076 -0.001 +0.061 -0.027 +0.052
|
||
h, single +0.060 +0.019 +0.040 +0.124 +0.082 -0.055 +0.110 +0.137 +0.027 +0.028 -0.072 +0.087 +0.050 +0.039 -0.009 +0.054
|
||
h, mean +0.136 +0.079 +0.094 +0.179 +0.197 +0.031 +0.041 +0.076 +0.093 +0.066 +0.017 +0.203 +0.013 +0.039 +0.053 +0.174
|
||
h, concat +0.034 -0.030 +0.109 +0.127 +0.077 -0.045 +0.047 +0.046 +0.004 -0.063 +0.038 +0.139 +0.006 +0.052 +0.069 -0.035
|
||
```
|
||
|
||
**Eight seeds are worth reporting on their own, because eight is what would have been
|
||
run.** Restricted to seeds 0-7 the mean-pooling gains are `M` +0.049 and `h` +0.039, a
|
||
difference of +0.010 with `M` ahead on 5/8 — which reads, faintly, like support for
|
||
(b). Adding seeds 8-15 flips the sign to −0.003 at 8/16. The apparent effect at 8 seeds
|
||
is smaller than the across-seed spread that produces it, which is the failure mode
|
||
`AGENTS.md` warns about, caught here by running twice the seeds.
|
||
|
||
## 3. Controls
|
||
|
||
### 3a. Pooling representations vs. aggregating decisions
|
||
|
||
A per-step number can also rise by letting 16 independent per-entity decoders vote,
|
||
which involves no pooled representation at all. `frozen.probe` already computes that
|
||
vote. 16 seeds, least squares, accuracies:
|
||
|
||
```
|
||
representation per-entity 16-vote mean-pooled
|
||
---------------------------------------------------
|
||
M 0.312 0.327 0.349
|
||
h 0.313 0.327 0.354
|
||
```
|
||
|
||
Voting recovers roughly half of what mean-pooling recovers, and it recovers exactly the
|
||
same amount for `M` and for `h`. Both routes to a per-step answer are indifferent to
|
||
whether the representation carries memory.
|
||
|
||
### 3b. Second estimator
|
||
|
||
Multinomial logistic (LBFGS, strong Wolfe), same 16 seeds, same splits:
|
||
|
||
```
|
||
M gain h gain M − h M>h seeds
|
||
--------------------------------------------------------------
|
||
mean-pooled +0.054 +0.048 +0.005 7/16
|
||
concatenated -0.001 +0.002 -0.003 6/16
|
||
```
|
||
|
||
The sign of `M − h` flips between the two estimators (−0.003 least squares, +0.005
|
||
logistic) while both stay inside one standard error of zero. Not a least-squares
|
||
artefact; not an effect either.
|
||
|
||
### 3c. The concatenated view was sample-starved — and it does not change the answer
|
||
|
||
`M, concat` fits 513 parameters to 2800 pooled samples and comes out *below* the
|
||
single-entity probe, with a per-seed spread (sd 0.055) as large as the effect. That is
|
||
a fit problem, not an information one, and it had to be separated from the null.
|
||
Re-running 8 seeds with a 16000-step frozen phase — 11200 pooled training samples, 22
|
||
per feature, the only change — turns concatenation into a working probe:
|
||
|
||
```
|
||
representation gap (4000 frozen) gap (16000 frozen)
|
||
-------------------------------------------------------------
|
||
M, single +0.058* +0.097
|
||
M, mean +0.108* +0.160
|
||
M, concat +0.045* +0.105
|
||
h, single +0.065* +0.090
|
||
h, mean +0.104* +0.150
|
||
h, concat +0.046* +0.102
|
||
```
|
||
`*` seeds 0-7 at 4000 frozen steps, so the two columns are the same eight seeds.
|
||
|
||
Every representation decodes better with a longer probe budget, and concatenation
|
||
recovers to parity with the single-entity probe rather than beating it. The gains:
|
||
|
||
```
|
||
M gain h gain M − h M>h seeds (8 seeds, 16000 frozen)
|
||
------------------------------------------------------------------------------------------
|
||
mean-pooled +0.063 +0.060 +0.003 5/8
|
||
concatenated +0.008 +0.012 -0.003 4/8
|
||
```
|
||
|
||
Same null, measured more precisely: every seed's pooling gain is positive for `M`
|
||
(8/8) and for `h` (7/8), and the difference between them is +0.003 on a coin flip.
|
||
**The strongest form of pooling, given enough samples to fit it, adds nothing over the
|
||
mean and still splits evenly between the state and the state-free layer.**
|
||
|
||
### 3d. The positive control: this measurement can detect (b)
|
||
|
||
A null is worth nothing without evidence the instrument has the power to see the
|
||
positive. `pooled.power_check` builds two synthetic representations over a real
|
||
4000-step regime label sequence from the same world (seed 0), so the block structure
|
||
is the world's, and runs them through the same three views and the same probe:
|
||
|
||
- **`distributed`** — hypothesis (b) made true by construction. The regime is two bits;
|
||
entities 0-7 write bit 0 into channel 0 and entities 8-15 write bit 1 into channel 1,
|
||
every other channel noise. No single entity holds more than one bit, so a per-entity
|
||
probe caps near 0.5 while the pool holds both.
|
||
- **`redundant`** — every entity carries the whole regime code plus independent noise.
|
||
Nothing is distributed; pooling only averages noise away. This is the confound the
|
||
`h` control exists to catch, reproduced deliberately.
|
||
|
||
```
|
||
view acc shuffle shift gap pooling gain
|
||
--------------------------------------------------------------------
|
||
distributed single 0.421 0.281 0.328 +0.093 --
|
||
distributed mean 1.000 0.266 0.318 +0.682 +0.589
|
||
distributed concat 0.963 0.252 0.267 +0.696 +0.603
|
||
redundant single 0.691 0.294 0.310 +0.381 --
|
||
redundant mean 1.000 0.283 0.336 +0.664 +0.283
|
||
redundant concat 0.999 0.261 0.280 +0.719 +0.338
|
||
```
|
||
|
||
**A genuinely distributed code produces a pooling gain of +0.589. The measured gain on
|
||
`M` is +0.045, and `h` produces +0.048 of it.** The instrument's demonstrated
|
||
sensitivity is thirteen times the effect it was asked to find, and the effect it did
|
||
find has the redundant signature — present on the memoryless layer too — not the
|
||
distributed one.
|
||
|
||
### 3e. The controls can fail
|
||
|
||
`AGENTS.md`: a test that cannot fail is worse than no test, so the property was broken
|
||
on purpose. `test_the_power_check_can_fail` replaces `views` with one whose `mean` and
|
||
`concat` read entity 0 alone — every downstream shape unchanged, only the aggregation
|
||
removed — and asserts the `distributed` control then **fails** to clear its threshold.
|
||
It does. `test_views_preserve_the_representation` separately pins that `concat` block
|
||
`i` is always particle `i` and that `mean` is the entity average. Full suite: 70 passed
|
||
(66 existing, 4 new); the existing `frozen.py` and `regime.py` tests are untouched and
|
||
still pass.
|
||
|
||
## 4. Verdict
|
||
|
||
**Is the regime information distributed across the per-entity states, or absent from
|
||
them?** Absent from them. Pooling the 16 states does raise the decode — mean-pooled
|
||
`M` reaches 0.349 against a measured chance of 0.260, where a single state reached
|
||
0.312 against 0.268 — but the memoryless `h` inside the very same organism rises by
|
||
the same amount at the same time, from +0.045 to +0.093 above its own chance, and does
|
||
so on more seeds than `M` does. Across three settings (16 seeds at 4000 frozen steps, 8
|
||
seeds at 4000, 8 seeds at 16000) and two estimators, the difference between `M`'s
|
||
pooling gain and `h`'s ranges from −0.003 to +0.010, with a paired standard error of
|
||
about 0.015 and a seed-win count that never leaves the 4/8-to-5/8 band. Against that,
|
||
a synthetic representation whose regime code is genuinely distributed across entities
|
||
gains +0.589 from the same pooling through the same probe. The lift that pooling
|
||
delivers here is what averaging 16 noisy samples of one instantaneous quantity
|
||
delivers, and the instantaneous quantity is the particle configuration the current
|
||
coupling matrix is imposing — visible in `r` right now, in a state-free layer,
|
||
exactly as `frozen.md` §2 concluded from the state-ablated GRP. Even pooled, the decode sits 0.089
|
||
above chance where an exact decoder given one observed displacement sits about 0.73
|
||
above its own measured chance. **Hypothesis (b), that the regime is present but distributed across the
|
||
per-entity states, is not supported: the shape of the memory is not what is stopping
|
||
it. (a), that nothing in the loss ever rewarded carrying the regime forward, is the
|
||
remaining suspect.**
|
||
|
||
## 5. Consequences
|
||
|
||
- **Do not spend the next month on the shape of the memory.** A global read-out head,
|
||
a cross-entity aggregation, or a shared regime slot alongside the per-entity states
|
||
would all be motivated by (b), and (b) is measured dead here. Whatever such a change
|
||
bought would have to come from somewhere other than recovering information the 16
|
||
states already hold, because they do not hold it.
|
||
- **The remaining suspect is testable, and it is testable the way this project already
|
||
knows how.** (a) says the loss never asked. `frozen.md` §3 supplies the mechanism —
|
||
the gate sits at 0.500 ± 0.029, untrained, on every seed — and §1b supplies the
|
||
reason it had no job: the post-switch error is dominated by the world's own
|
||
configuration transient, which no state can shorten. Measure the ceiling first: an
|
||
oracle condition given the regime, in a setting where holding it is worth something,
|
||
before any mechanism is built to hold it.
|
||
- **Eight seeds would have reported the wrong sign.** At seeds 0-7 this measurement
|
||
reads +0.010 in `M`'s favour on 5/8; at 16 seeds it reads −0.003 on 8/16. Nothing
|
||
in this file's design changed between those two numbers except the seed count.
|