feat: learned-frame arm and an orbit-consistency diagnostic

rp_learn_K learns K linear maps on the displacement and averages the CPPN over
them, so a set closed under the domain's group makes the kernel invariant to it
without anyone naming the group. orbit_consistency measures that invariance from
the kernel's behaviour rather than its parameters, validated against the two
kernels whose answers are known exactly.

Both false-positive modes are instrumented: fit-versus-held-out separates extra
capacity from discovery, and the spread of the learned maps catches a collapse
to K=1.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HCydQraDSoZ9WoTm2v23Eb
This commit is contained in:
chrnxandClaude Opus 5 committed 2026-09-07 19:45:14 -05:00
1 parent ff8ccbc819
commit 4fc5b38be9
4 files changed
+226 -9

No files matched your search

+109
View File
@@ -0,0 +1,109 @@
# Discovering an invariance instead of being handed one — and why the objective forbids it
`invariance.md` settled that a group **given** to the kernel converts unseen orbit members into
seen ones: six of a knight's eight L-squares yields the other two at 0.4% of the floor. Every
result in this project is a model applying structure it was handed. This asks the only question
whose answer would justify the word "understanding" in the project's own framing: can the model
**find** the reparameterisation?
**No. And more optimisation makes it worse, which is the useful part — it means the objective,
not the optimiser, is what forbids it.**
## Setup
`rp_learn_K` learns K linear maps on the displacement and averages: `m = (1/K) Σ_k CPPN(T_k r)`.
If the learned set is closed under the domain's group the average is invariant to it and the
eight knight squares become one input, without anyone having said "D4". The `T_k` start at the
identity plus noise, so collapse to K=1 is the null the run has to move away from rather than
where it accidentally begins.
The band is measured on the same harness and seeds, not assumed: `rp` 0.02395 below,
`rp_inv` 0.00009 above, floor 0.02182. And at K=8 **the solution exists in the parameter space** —
`T_k` equal to the eight D4 matrices makes the average invariant by construction — so a null here
cannot be a capacity result.
`orbit` measures D4-invariance of the kernel's behaviour as a fraction of its own scale, so it
answers "did it find the group" without the learned maps having to look like anything. Validated
against the one kernel whose answer is known exactly: `rp_inv` reads 0.000, raw `rp` reads 1.12.
## Results, knight_sym, 6 seeds
```
arm steps seen unseen orbit spread
rp 2500 0.00097 0.02395 1.121 -
rp_learn_2 2500 0.00093 0.02143 1.019 0.664
rp_learn_4 2500 0.00087 0.02031 1.005 1.111
rp_learn_4 12000 0.00032 0.04258 1.129 1.236
rp_learn_8 2500 0.00065 0.02742 0.969 1.424
rp_learn_8 12000 0.00020 0.04341 1.042 1.558
rp_inv 2500 0.00002 0.00009 0.000 -
floor 0.02182
```
**The 266x band is essentially untravelled.** The learned arms sit at the floor. `orbit` moves
from 1.121 to 0.969 at best — a weak drift towards invariance that buys nothing.
**Both false-positive modes appeared, and both were instrumented before the run.** `seen`
improves monotonically with K and with steps (0.00097 → 0.00020, a 5x fit) while `unseen` does
not: the K transforms were used as extra capacity. And `spread` rises with K (0.66 → 1.56), so
the maps did not collapse to one — they diverged, just not towards the group.
**Training to convergence makes it worse, not better.** This was run to the same standard applied
to the binned table in `psi.md`, because under-training an arm is the mirror of tuning one until
it catches up. At 12000 steps `seen` improves 3x and `unseen` **doubles** (0.02031 → 0.04258),
while `orbit` moves *away* from invariance (1.005 → 1.129). The null is not a budget artefact; it
is the opposite of one.
## Why, and this is the finding
**Nothing in the objective rewards invariance.** The loss scores fit on the cells the model was
shown. Invariance only pays on the cells it was not shown, and those are by construction absent
from the loss. An unconstrained kernel fits the training cells better than one tied to an orbit,
so gradient descent walks away from the invariant solution — correctly, by its own lights.
That reframes the null. It is not that the architecture cannot hold the answer (it can, at K=8),
and not that the optimiser is too weak (more of it hurts). It is that **the thing we want was
never in what we asked for.** Which is the same shape as the five previous nulls in this project,
one level up: those were about what the input could express, this one is about what the objective
could reward.
It also gives the next paper a measured starting line rather than a hunch. Evolutionary search —
already recorded as where this project goes next — selects on fitness, and a fitness that
includes held-out relations puts invariance *in* the objective, where gradient on a training loss
cannot. That is now a stated prediction with a number to beat: 0.02395 floor, 0.00009 ceiling,
and gradient reaching 0.02031.
## One thing the learned frame does buy
On the `smooth` teacher, which has no D4 symmetry, `rp_learn` costs nothing: 0.00006-0.00007
against plain `rp`'s 0.00007. The hardcoded invariance costs **31x** there (0.00216). So a
learnable frame is free where the domain lacks the symmetry and a fixed one is not — the
advantage of discovering over committing is real. It just does not come with any discovering.
And the `knight` control behaves: eight squares sharing a support but not a rule, every arm flat
at ~0.024 with `orbit` unmoved at ~1.49. Nothing to discover, nothing discovered.
## What this does not establish
One route to invariance (averaging over learned frames), one objective (fit the shown cells), one
optimiser (Adam 3e-3), one initialisation (identity plus 0.4 noise), K ∈ {2,4,8}, one group.
Other parameterisations exist — a learned canonicalisation, a Lie-algebra generator basis — and
they are not the same experiment. **This is a null about this route to discovery, not about
discovery.** The mechanism it points at, though, is not specific to the route: an objective that
scores only what was seen has no term that invariance improves, whatever the parameterisation.
## Reproduce
```
for t in knight_sym knight smooth; do for a in rp rp_inv rp_learn_2 rp_learn_4 rp_learn_8; do
uv run python unseen.py --teacher $t --holdout support --arms $a --omega 2 --steps 2500 \
--seeds 0,1,2,3,4,5 --out results/disc_${t}_${a}.json
done; done
for k in 4 8; do
uv run python unseen.py --teacher knight_sym --holdout support --arms rp_learn_$k --omega 2 \
--steps 12000 --seeds 0,1,2,3,4,5 --out results/disc_long_k$k.json
done
```
Runs go 10-wide with `OMP_NUM_THREADS=1`; torch takes ~2 threads per process by default, so
pinning to one and going wide turns a 40-minute sweep into 6 minutes on this machine.