feat: D4-invariant kernel input recovers the knight rule from partial support
InvariantCPPN canonicalises the displacement to (min|dx|, max|dy|), collapsing the square's eight symmetries to one orbit, plus a knight_sym teacher whose eight L-squares carry one value and are therefore a genuine D4 orbit. Trained on six of the eight, it recovers the other two at 0.4% of the floor on 6/6 seeds where the raw-displacement kernel sits above the floor. Two controls, both predicted beforehand: on a teacher whose eight squares share a support but not a value the invariance is worse than nothing, and on a smooth teacher with no D4 symmetry it costs 31x. The arm dispatch now raises on unknown names -- an edit had silently failed to land and rp_inv ran as plain rp, which looked like a null. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HCydQraDSoZ9WoTm2v23Eb
This commit is contained in:
4 files changed
+186
-13
No files matched your search
@@ -0,0 +1,90 @@
|
||||
# The knight null was an input, not an architecture
|
||||
|
||||
`sharp.md` measured that shown six of a knight's eight L-squares, neither the CPPN nor any
|
||||
control finds the other two — everything at or above the floor. That looked like a verdict on
|
||||
relational architectures. It was a verdict on what the kernel was allowed to see.
|
||||
|
||||
The CPPN reads `r_ij` raw. It has no reason to know that (1,2) and (-2,-1) are the same law;
|
||||
they are two different points of the plane. Canonicalise the displacement to
|
||||
`(min|dx|, max|dy|)` — a D4 invariant — and the square's eight symmetries collapse to one orbit.
|
||||
The knight's eight squares become **a single input**.
|
||||
|
||||
```
|
||||
teacher arm seen unseen floor u/floor vs rp
|
||||
knight_sym rp 0.00097 0.02395 0.02182 1.098
|
||||
knight_sym rp_inv 0.00002 0.00009 0.02182 0.004 -0.02386 +/- 0.00154 6/6
|
||||
knight_sym table_interp 0.00001 0.02205 0.02182 1.010 -0.00190 +/- 0.00014 6/6
|
||||
knight rp 0.00117 0.02359 0.02228 1.059
|
||||
knight rp_inv 0.00130 0.02611 0.02228 1.172 +0.00252 +/- 0.00189 2/6
|
||||
smooth rp 0.00006 0.00007 0.01533 0.004
|
||||
smooth rp_inv 0.00138 0.00216 0.01533 0.141 +0.00209 +/- 0.00025 0/6
|
||||
```
|
||||
|
||||
**Six of eight L-squares gives the other two, exactly.** 0.02395 → 0.00009, 0.4% of the floor,
|
||||
6 seeds out of 6, per-seed 0.00012 0.00008 0.00007 0.00012 0.00004 0.00012 — no spread worth
|
||||
reporting. The same architecture, the same parameters, the same training data. Only the
|
||||
parameterisation of the relation changed.
|
||||
|
||||
It is also 48x better on the cells it *did* train on (0.00097 → 0.00002). Eight squares became
|
||||
one thing to learn, so this is sample efficiency and generalisation from the same cause.
|
||||
|
||||
## The two controls are why this means anything
|
||||
|
||||
Handing a model an invariance does not sneak the held-out cells into training — it hands over
|
||||
the **claim** that those cells are equivalent to ones it saw. The controls test that claim in
|
||||
both directions, and both were predicted before the run.
|
||||
|
||||
**When the claim is false, the invariance hurts.** The `knight` teacher puts a different value on
|
||||
each of the eight squares: they share a support but not a rule. `rp_inv` reads 0.02611 against
|
||||
plain `rp`'s 0.02359 — worse than doing nothing, and worse than the floor. It is not that
|
||||
invariants always win.
|
||||
|
||||
**When the claim is the wrong one, it costs 31x.** The smooth Gabor has random frequency
|
||||
directions and no D4 symmetry. Collapsing eight directions into one destroys information the
|
||||
model needed: 0.00007 → 0.00216, 0/6 seeds. **An invariance is a commitment, not a free lunch.**
|
||||
|
||||
## What this says
|
||||
|
||||
A relational architecture infers a rule exactly when the domain's invariance is in its input,
|
||||
and pays for the invariance where the domain does not have it. That is a statement about
|
||||
relational architectures rather than about knights, and it is the same shape as this project's
|
||||
other good result — `chess_reach.md`'s finding that the piece type must enter the kernel rather
|
||||
than scale it. Both are failures of **what was expressible in the input**, not of capacity. That
|
||||
is now five separate times in this project, and it is the pattern worth taking to the paper.
|
||||
|
||||
For the RP verdict, this reverses the conclusion `sharp.md` was heading towards. The RP does not
|
||||
have to be let go. Its knight null was our input design, and when the input carries the group the
|
||||
same mechanism does rule inference cleanly.
|
||||
|
||||
## What it does not say, and this is the real frontier
|
||||
|
||||
**The model is GIVEN the group. It does not find it.** `rp_inv` is handed the exact symmetry the
|
||||
teacher was built with. So the claim earned is: *if you know a domain's invariance, putting it in
|
||||
the kernel's input converts unseen orbit members into seen ones.* Whether a model can **discover**
|
||||
which invariance a domain has is untouched, and it is arguably what the word "understanding" in
|
||||
this project's framing actually means. Everything measured so far — including this — is a model
|
||||
applying structure it was given.
|
||||
|
||||
That is the sharpest open question the project has, and unlike the ones before it, it does not
|
||||
have an obvious cheap oracle. Candidates: a model that learns the canonicalisation, or one
|
||||
scored across a family of domains with different groups so that discovering the right one is the
|
||||
only way to win.
|
||||
|
||||
**Also untested:** one group (D4), one sparse family, one exactly-representable student-teacher
|
||||
setup. And a prediction this now makes, for the parked chess arc: a kernel given D4 invariants
|
||||
should learn piece movement from fewer positions and generalise to offsets it never saw. That is
|
||||
recorded as a prediction, not a result.
|
||||
|
||||
## Reproduce
|
||||
|
||||
```
|
||||
for t in knight_sym knight smooth; do
|
||||
uv run python unseen.py --teacher $t --holdout support --arms rp,rp_inv,table_interp \
|
||||
--omega 2 --steps 2500 --seeds 0,1,2,3,4,5 --out results/inv_${t}.json
|
||||
done
|
||||
```
|
||||
|
||||
Tests: `tests/test_unseen.py`. One of them exists because an edit silently failed to land and
|
||||
`rp_inv` ran as plain `rp`, producing two identical columns that could have been read as
|
||||
"invariants change nothing"; the arm dispatch now raises on an unknown name and the test asserts
|
||||
each arm builds the kernel it claims.
|
||||
@@ -151,18 +151,30 @@ signal or sit at a boundary. On top of that sits the cost argument, which is una
|
||||
table scales as B^(continuous axes) × cells × channels and the CPPN is constant, 80-320× at two
|
||||
continuous axes.
|
||||
|
||||
**And one thing nothing here can do.** Shown six of a knight's eight L-squares, neither the CPPN
|
||||
nor any control infers the other two — both sit at or above the floor (`sharp.md`). The symmetry
|
||||
group is not learned. That bounds how `chess_reach.md` may be read: the type-conditioned kernel
|
||||
can **represent** a knight's L, which is what its 0.000 → 0.758 measures. It did not acquire the
|
||||
rule. It memorised a shape it was shown in full.
|
||||
**And the null that looked like a verdict was an input.** `sharp.md` found that shown six of a
|
||||
knight's eight L-squares nothing infers the other two. `invariance.md` gives the CPPN D4
|
||||
invariants of the displacement instead of the raw vector — the eight squares become one input —
|
||||
and the same architecture recovers them exactly: 0.02395 → 0.00009, 0.4% of the floor, 6/6 seeds,
|
||||
and 48× better on the training cells too. Two controls make it mean something: where the eight
|
||||
squares share a support but not a rule the invariance is *worse* than nothing, and on a domain
|
||||
without that symmetry it costs 31×. **An invariance is a commitment, not a free lunch.**
|
||||
|
||||
That is the fifth time in this project that a null turned out to be what was expressible in the
|
||||
input rather than what the mechanism could do. It also bounds `chess_reach.md` differently than
|
||||
`sharp.md` did: the type-conditioned kernel represents a knight's L, and a D4-conditioned one
|
||||
would generalise it — a prediction for the parked chess arc, not a result.
|
||||
|
||||
**What is still not shown: the model is GIVEN the group, it does not find it.** Every result in
|
||||
this project is a model applying structure it was handed. Discovering which invariance a domain
|
||||
has is untouched, and it is what the word "understanding" in this project's framing means.
|
||||
|
||||
## What is open, in order
|
||||
|
||||
1. **Rule inference on a sparse support.** The knight null is one symmetry group, one sparse
|
||||
family, one architecture. It says the group was not inferred here, not that none can be. This
|
||||
is the sharpest open question the project has and it is the one chess kept implying it had
|
||||
answered.
|
||||
1. **Discovering an invariance rather than being handed one.** `invariance.md` settled that a
|
||||
given group converts unseen orbit members into seen ones. Finding the group is untouched, has
|
||||
no obvious cheap oracle, and is the only remaining question whose answer would justify the
|
||||
word "understanding". Candidates: learning the canonicalisation, or scoring a model across a
|
||||
family of domains with different groups so that discovery is the only way to win.
|
||||
2. **Kernel capacity and interference.** How many distinct kernels fit before they collide, and
|
||||
which pairs collide first. The pawn/colour result is one measured point of this curve; the
|
||||
sweep makes similarity an independent variable instead of an accident of chess. Deliberately
|
||||
|
||||
Reference in new issue
Block a user