Files
ailed-experiments-rp/results/scale.md
T
chrnxandClaude Opus 5 d95383f8a2 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
2026-09-07 17:45:41 -05:00

4.6 KiB

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.