feat: omega curve and unseen-N, the two steps before psi
omega.md: a plateau at [1,4] that does not track the domain across a 4.7x range, so the bandwidth is a knob that was set wrong rather than a defect to design around. omega=8 is an optimisation cliff, not a mis-tune. The project default of 10 is outside the plateau. scale.md: one parameter set works at an entity count it never trained on -- trained on N<=16 it beats the oracle at N=32 -- and a lookup table does it too. Read against an oracle because the mse/floor ratio is not comparable across N, which is asserted as a test rather than claimed in prose. The cost runs large->small only, at 2.28x, which makes it the pooling's 1/deg dilution rather than a degree-distribution shift. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HCydQraDSoZ9WoTm2v23Eb
This commit is contained in:
8 files changed
+467
-19
No files matched your search
@@ -0,0 +1,88 @@
|
||||
# omega: a knob that was set wrong, not a defect to design around
|
||||
|
||||
`unseen.md` found a 17x swing in held-out error between two hand-picked values of `omega`, the
|
||||
CPPN's bandwidth, and noted that every chess number in this project sits at one of them without
|
||||
anyone having examined it. This file decides which of two things that is:
|
||||
|
||||
- a **knob** that wants a value per domain — document it, choose it, leave `AffectiveCPPN` alone;
|
||||
- a **defect** — a narrow optimum that moves with the domain, in which case a learned or
|
||||
multi-scale frequency is a mechanism question worth asking rather than a tune.
|
||||
|
||||
The answer is the first one, and the reason the code already gave for it is measured **false**.
|
||||
|
||||
## The curve, one domain, 8 seeds
|
||||
|
||||
MSE on held-out relations, `unseen.py`, teacher bandwidth `kfreq=0.35`.
|
||||
|
||||
```
|
||||
omega 0.25 0.5 1 2 4 8 16
|
||||
random 0.00052 0.00016 0.00008 0.00006 0.00007 0.00112 0.00019
|
||||
band 0.00087 0.00034 0.00014 0.00008 0.00007 0.00064 0.00028
|
||||
(seen) 0.00044 0.00012 0.00007 0.00006 0.00006 0.00024 0.00011
|
||||
```
|
||||
|
||||
A plateau at **omega ∈ [1,4]**, in the same place for both hold-out structures. The project's
|
||||
default of 10 sits outside it, 7-11x worse than the optimum. `omega=1`, which `unseen.md` ran
|
||||
at and which was picked without measuring, is not the optimum either — 2 is. That result was
|
||||
obtained by luck, and it is recorded as luck.
|
||||
|
||||
**omega=8 is unstable, not merely mis-tuned.** Per seed: 0.00028, 0.00425, 0.00016, 0.00127,
|
||||
0.00037, 0.00159, 0.00043, 0.00059. `seen` degrades with it (0.00024), so this is optimisation
|
||||
breaking down rather than a bandwidth mismatch — and 16 recovers to 0.00019. The curve has a
|
||||
cliff in the middle, not a single valley, and a sweep of three points could have missed it.
|
||||
|
||||
## Does the optimum move with the domain? No.
|
||||
|
||||
The deciding axis. `kfreq` is the **domain's** spatial frequency, `omega` the **model's**.
|
||||
6 seeds, random hold-out, MSE on held-out relations.
|
||||
|
||||
```
|
||||
kfreq \ omega 0.5 1 2 4 8 best
|
||||
0.15 0.00006 0.00003 0.00003 0.00003 0.00138 4
|
||||
0.35 0.00017 0.00009 0.00006 0.00006 0.00132 2
|
||||
0.70 0.00118 0.00046 0.00028 0.00020 0.00143 4
|
||||
```
|
||||
|
||||
The optimum sits at 2-4 across a domain bandwidth that varies by 4.7x. It does not track the
|
||||
domain. What *does* change with the domain is the **penalty for being under-banded**: at
|
||||
`kfreq=0.7` an `omega` of 0.5 costs 6x the optimum, at `kfreq=0.15` only 2x. And `omega=8`
|
||||
fails at ~0.0013-0.0014 for every domain tested, which confirms the cliff is a property of the
|
||||
model, not of what it is fitting.
|
||||
|
||||
**This contradicts the comment in `core.py`**, which states that omega "is a calibration knob
|
||||
that wants tuning against the domain's length scale". That was a plausible assumption and it is
|
||||
now measured false over the range tested: a fixed value in [2,4] is near-optimal for every
|
||||
domain bandwidth here. The comment should say what the measurement says.
|
||||
|
||||
## What follows
|
||||
|
||||
**Do not rework `AffectiveCPPN`.** There is a broad plateau, it does not move, and a learned or
|
||||
multi-scale frequency would be solving a problem that was not found. That option stays available
|
||||
if a domain ever turns up whose optimum is outside [1,4]; none has.
|
||||
|
||||
**The default is a footgun and the debt is recorded rather than paid here.** Every chess number
|
||||
in this project was produced at `omega=10`, outside the plateau. Those results are comparisons
|
||||
at a *fixed* omega, so the comparisons remain fair and nothing in `chess_reach.md`,
|
||||
`chess_rules.md` or `chess_dist.md` is invalidated — but their absolute levels come from a
|
||||
badly calibrated kernel, and how much of the gap to the rule-knowing control was bandwidth is
|
||||
unknown. Re-running the chess arc in the plateau belongs to the chess arc, which is parked.
|
||||
|
||||
## What this does not establish
|
||||
|
||||
Three domain bandwidths over one order of magnitude, one teacher family (Gabor), one hold-out
|
||||
structure for the grid, 6 seeds. The grid's resolution in omega is 2x, so a shift in the optimum
|
||||
smaller than that would not show. "The optimum does not move" is a statement about this range,
|
||||
and the honest form of it is: nothing was found that would justify redesigning the kernel's
|
||||
frequency, which is a weaker claim than nothing exists.
|
||||
|
||||
## Reproduce
|
||||
|
||||
```
|
||||
for w in 0.25 0.5 1 2 4 8 16; do for k in random band; do
|
||||
uv run python unseen.py --holdout $k --arms rp --omega $w --steps 2500 \
|
||||
--seeds 0,1,2,3,4,5,6,7 --out results/sweep_${k}_w${w}.json; done; done
|
||||
for kf in 0.15 0.35 0.70; do for w in 0.5 1 2 4 8; do
|
||||
uv run python unseen.py --holdout random --arms rp --omega $w --kfreq $kf --steps 2500 \
|
||||
--seeds 0,1,2,3,4,5 --out results/grid_k${kf}_w${w}.json; done; done
|
||||
uv run python analyse_sweep.py
|
||||
```
|
||||
+26
-11
@@ -19,7 +19,7 @@ measure has already been assumed away. No MLP is trained anywhere in this file.
|
||||
|
||||
| # | Property | Status | Evidence |
|
||||
|---|----------|--------|----------|
|
||||
| 1 | **One parameter set, any N** | **Defined: asserted.** Generalises: *untested* | `test_rp_same_parameters_any_n`. ~9k params served N=2..32 throughout the chess arc |
|
||||
| 1 | **One parameter set, any N** | **Measured. Holds — and a GNN has it too** | `scale.md`, `test_rp_same_parameters_any_n` |
|
||||
| 2 | **Permutation equivariance** | **Asserted, sabotage-verified** | `test_rp_permutation_equivariance`, `test_organism_permutation_equivariance_with_memory` |
|
||||
| 3 | **Weights generated from the relation** | **Measured. Real, and smaller than assumed** | `unseen.md` |
|
||||
| 4 | **Translation invariance** | **Asserted, and its cost measured** | `test_rp_translation_invariance`; `chess_rules.md` |
|
||||
@@ -36,8 +36,16 @@ dimension is N·d (or N²·d for pairs) and has to be chosen before training. Ch
|
||||
different model, not a different input. That is the cleanest statement of what the RP buys, and
|
||||
it is structural — no run establishes it and no run can refute it.
|
||||
|
||||
What *is* open is a separate claim that the wording invites confusion with: that the RP still
|
||||
**works** at an N it never trained on. Defined ≠ competent. Untested (`≤16 → 17-32`).
|
||||
What the wording invites confusion with is a separate claim: that the RP still **works** at an N
|
||||
it never trained on. Measured in `scale.md`, and it holds strongly — a model trained on N ≤ 16
|
||||
scores 0.84 of the oracle's error at N=32, i.e. *better* than the model that trained there.
|
||||
|
||||
Two qualifications, both from that file. **A lookup table does the same** (0.86-0.90): neither
|
||||
has a parameter tied to entity count, so this separates the RP from a perceptron and from
|
||||
nothing else. And the cost that does exist runs the other way — training on N ∈ [17,32] and
|
||||
evaluating at N=2 costs 2.28x, because mean pooling dilutes each pair's contribution by 1/deg
|
||||
and the kernel is learned less sharply at large N. **The RP's pooling is a low-pass filter on
|
||||
the learning signal, strength 1/N**; the cheap curriculum is to train small and deploy large.
|
||||
|
||||
### 2. Permutation equivariance
|
||||
|
||||
@@ -123,16 +131,23 @@ The RP earns its cost where at least one of these is load-bearing:
|
||||
And it is the wrong tool where the law is anchored to absolute position (row 4), which has to be
|
||||
patched in through attributes.
|
||||
|
||||
## Where the argument now stands
|
||||
|
||||
Rows 1 and 2 are **shared with any GNN** — measured, not assumed (`scale.md`). Row 5, identity
|
||||
in the kernel, is the same statement as indexing a lookup by type as well as by offset. Row 3,
|
||||
generating weights from geometry, is real but bounded: where relations are few and discrete, a
|
||||
table plus a blur competes (`unseen.md`).
|
||||
|
||||
So the RP's remaining distinguishing claim is **parameter compression in a relation space that
|
||||
cannot be enumerated** — and in this architecture the one genuinely continuous axis is **ψ**. A
|
||||
table over (offset × type × valence × arousal) has no cells to interpolate between on the last
|
||||
two. That makes ψ the deciding experiment rather than a later chapter, and it is claim A2 of the
|
||||
paper arriving from the front.
|
||||
|
||||
## What is open, in order
|
||||
|
||||
1. **Unseen N** (row 1, second half). Train ≤16 entities, evaluate 17-32. Now the first item:
|
||||
after `unseen.md`, row 1 is the RP's least qualified distinguishing property.
|
||||
2. **Unseen relations in a CONTINUOUS space** (row 3, second half). The measured result is
|
||||
bounded by the relation space having been enumerable. Where it is not, the table control
|
||||
cannot be built and the comparison changes shape.
|
||||
3. **`omega`.** Raised by `unseen.md` and not on this card before: the bandwidth is a free knob
|
||||
that moved a result 17x, and every chess number was produced at one unexamined value.
|
||||
4. **Kernel capacity and interference.** How many distinct kernels fit before they collide, and
|
||||
1. **ψ as a continuous kernel axis** (A2). The one place a lookup cannot be built. Decisive.
|
||||
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
|
||||
last: how far a mechanism stretches is only worth measuring once it is known what it is for.
|
||||
|
||||
@@ -0,0 +1,86 @@
|
||||
# One parameter set, an entity count it never trained on
|
||||
|
||||
Row 1 of `rp_properties.md`, second half. That the RP is *defined* at any N is structural and
|
||||
asserted in the library's tests — a fixed-weight layer is not worse there, it has no input
|
||||
dimension to use. Whether it still **works** at an N it never saw is a different claim, and
|
||||
defined is not competent.
|
||||
|
||||
Two things come out, and the second is the more useful one.
|
||||
|
||||
## Read against an oracle, never down the N axis
|
||||
|
||||
`y_i` is a mean over neighbours, so raising N averages more terms, the target's variance falls,
|
||||
and any error-over-floor ratio climbs with N for a model doing nothing wrong. This was found in
|
||||
the smoke run and is asserted in `tests/test_scale.py::test_floor_shrinks_as_n_grows` rather
|
||||
than left in prose.
|
||||
|
||||
What makes the axis comparable is an oracle: a model trained over the full range [2,32] and
|
||||
evaluated at the same N. Three runs, `omega=2` (the measured optimum from `omega.md`, not the
|
||||
value picked by hand for `unseen.md`), 8 seeds, both arms:
|
||||
|
||||
- `forward` trained on N ∈ [2,16] — large N unseen
|
||||
- `reverse` trained on N ∈ [17,32] — small N unseen
|
||||
- `oracle` trained on N ∈ [2,32]
|
||||
|
||||
The reverse direction is a control, not symmetry: mean pooling means degree rises with N, so a
|
||||
cost at large N could be the pooled statistics shifting rather than a failure to generalise over
|
||||
entity count. A cost in **both** directions would be the degree distribution; a cost in **one**
|
||||
is the extrapolation actually asked for.
|
||||
|
||||
## Result: generalising over N is free, and the table does it too
|
||||
|
||||
Ratio to the oracle at the same N. Below 1 means *better* than the model that trained there.
|
||||
|
||||
```
|
||||
N 2 4 8 12 16 20 24 28 32
|
||||
rp fwd/orc 0.75 0.71 0.76 0.80 0.78 0.80 0.80 0.82 0.84
|
||||
rp rev/orc 2.28 1.26 0.91 0.87 0.84 0.83 0.82 0.84 0.84
|
||||
table fwd/orc 0.86 0.76 0.84 0.86 0.86 0.86 0.86 0.91 0.90
|
||||
table rev/orc 1.82 1.27 1.10 1.06 1.04 0.97 0.98 1.03 1.00
|
||||
| unseen for forward ->
|
||||
<- unseen for reverse |
|
||||
```
|
||||
|
||||
**The property holds, strongly.** A model that never saw more than 16 entities is not merely
|
||||
competent at 32: at 0.84 it beats the oracle that trained there.
|
||||
|
||||
**And it does not distinguish the RP from a GNN.** The lookup table shows the same pattern
|
||||
(0.86-0.90 forward). Neither has a parameter tied to the entity count, so neither needs to. Row
|
||||
1 separates the RP from a *perceptron*, for which variable N is undefined, and from nothing
|
||||
else. The property card already said this; it is now measured rather than argued.
|
||||
|
||||
## The asymmetry is the finding
|
||||
|
||||
The cost appears in **one** direction only — large→small, 2.28x at N=2 and 1.26x at N=4, gone by
|
||||
N=8. Small→large is free and better than free.
|
||||
|
||||
The mechanism is the pooling. `h_i = tanh(mean_j m_ij ⊙ W p_j + b)`, so a single pair's
|
||||
contribution to the target is diluted by 1/deg. Training at N=32 dilutes every kernel value by
|
||||
~1/32 before the gradient sees it, and the kernel is learned less sharply; that imprecision is
|
||||
invisible at large N, where averaging hides it, and shows up immediately at N=2, where it does
|
||||
not. **The RP's mean pooling is a low-pass filter on the learning signal, with strength 1/N.**
|
||||
|
||||
That is actionable and it is the opposite of the intuition that more entities means more signal:
|
||||
the cheap curriculum is to train on few entities and deploy on many. It is also a statement
|
||||
about relational architectures rather than about this domain, which is the kind this project is
|
||||
for. The table arm showing the same asymmetry (1.82x at N=2) confirms it is the pooling and not
|
||||
the kernel.
|
||||
|
||||
## What this does not establish
|
||||
|
||||
One domain, one teacher family, N from 2 to 32 on an 8x8 lattice, so density rises with N and is
|
||||
confounded with count — at N=32 half the squares are occupied and the displacement distribution
|
||||
is not the same as at N=2. Separating count from density needs a board that grows with N, and
|
||||
that was not run. The 2.28x at N=2 is the point where that confound is largest.
|
||||
|
||||
## Reproduce
|
||||
|
||||
```
|
||||
uv run python scale.py --train 2,16 --omega 2 --steps 2000 --seeds 0,1,2,3,4,5,6,7 --out results/scale_forward.json
|
||||
uv run python scale.py --train 17,32 --omega 2 --steps 2000 --seeds 0,1,2,3,4,5,6,7 --out results/scale_reverse.json
|
||||
uv run python scale.py --train 2,32 --omega 2 --steps 2000 --seeds 0,1,2,3,4,5,6,7 --out results/scale_oracle.json
|
||||
uv run python analyse_scale.py
|
||||
```
|
||||
|
||||
Tests: `tests/test_scale.py`. The training range is the experiment and a leak would be silent;
|
||||
the range check was run against a deliberately widened sampler and failed there.
|
||||
Reference in new issue
Block a user