90 lines
5.8 KiB
Markdown
90 lines
5.8 KiB
Markdown
# experiments — measurement rules
|
|
|
|
The domain and the runs. This repo produces every number the paper reports, so its rules are
|
|
about not fooling ourselves rather than about code style. The library is the sibling `ailed`
|
|
repo, installed editable; the design is `AILED_General_Specification.md` in the parent
|
|
directory.
|
|
|
|
## What is in here
|
|
|
|
| file | responsibility |
|
|
|---|---|
|
|
| `particles.py` | the domain: particles on a torus whose type-by-type coupling switches unannounced |
|
|
| `regime.py` | the conditions, the training loop, and `_metrics` |
|
|
| `frozen.py` | frozen-weights probe, the state ablation, the representation probes |
|
|
| `ceilings.py` | least-squares information ceilings under four information sets |
|
|
| `identify.py` | how much of the hidden variable lives in the past rather than the present |
|
|
| `when_memory_works.py` | the pre-registered test of when per-entity state has a job |
|
|
| `results/*.md` | **the audit trail the paper cites.** Committed. The `.json` files are not. |
|
|
|
|
## The rules that matter
|
|
|
|
- **The gain is knowledge, not performance.** These experiments exist to establish what is
|
|
missing, not to make a mechanism work. Optimising the GRP is a grave error, not a goal.
|
|
Before running anything, apply the test: **is the negative result as informative as the
|
|
positive one?** If the experiment only makes sense when it comes out positive, it is a
|
|
performance experiment wearing a diagnostic costume — redesign it. Write verdicts so both
|
|
branches carry equal weight, and describe no outcome as good or bad news.
|
|
- **Report a null plainly.** Every substantive result in this repo so far is a null, and each
|
|
one turned out more informative than the positive it replaced. Do not soften a negative, do
|
|
not hunt for a configuration that rescues it, and do not defer it by proposing a new domain.
|
|
- **Do not open a new domain to make a mechanism work.** That is p-hacking with extra steps
|
|
and it generalises to nothing. If a mechanism does not help, measure why on the domain you
|
|
have. `results/when_memory_works.md` exists because of this rule.
|
|
- **Do not tune a baseline until it catches up.** Raising the learning rate until the
|
|
memoryless model matches the gated one changes the question instead of answering it.
|
|
Tuning a *mechanism's own* parameters is different and legitimate — `rho_a`/`rho_slow`
|
|
belong to affect, so setting them is fair; `lr` belongs to the comparison, so it is not.
|
|
- **Every comparison is capacity-controlled.** `rp_only` has 1442 parameters and `grp_k0` has
|
|
5602. A number comparing them is confounded 3.9x and is not a memory result. See
|
|
`results/frozen.md` §1d, which also records why "capacity" was the wrong word for that
|
|
margin in the first place.
|
|
- **Verify the model can represent the domain before asking what memory adds.** Every chess
|
|
null before `results/chess_reach.md` was measured on a kernel that could not tell a knight
|
|
from a bishop — the type was in `attrs`, so it could only *scale* one shared geometry, and
|
|
the knight's L scored exactly zero on 8/8 seeds. Those nulls are facts about that setup and
|
|
not about memory. Before a mechanism comparison, measure whether the model has learned the
|
|
domain's own structure; a null on a model that has not is uninterpretable. This is the
|
|
sibling of the oracle rule: the oracle asks whether the information pays, this asks whether
|
|
the architecture can hold it.
|
|
- **Pre-register when the result could be argued either way.** State the success criterion,
|
|
the seed count, and what counts as failure, in `.sdd/progress.md`, before the run. Then
|
|
accept what comes back. No re-running with adjusted criteria.
|
|
- **Oracles are opt-in and free.** Enabling one may only add columns to `attrs`. The
|
|
trajectory, regime schedule, switch times and noise draws stay byte-identical to the
|
|
non-oracle run at the same seed, or a measured difference could come from a different world
|
|
rather than from the extra information.
|
|
- **Seeds.** Across-seed spread here is comparable to the effects being claimed, and worse:
|
|
in Task 10 eight seeds reported the **wrong sign**, flipping only at sixteen. Report
|
|
per-seed values, the count of seeds won, and a paired standard error. If the effect sits
|
|
inside one se of zero, say it is ambiguous rather than reading its sign.
|
|
- **A null needs a positive control.** Task 10's null means something only because the same
|
|
probe, on a synthetic where the signal genuinely was distributed, recovered it at thirteen
|
|
times the measured effect. Without that, "we found nothing" is indistinguishable from "our
|
|
instrument cannot see anything".
|
|
- **Anything a results file quotes must be re-runnable from this repo.** An uncommitted
|
|
throwaway driver is not reproducible. `ceilings.py` exists because of this rule; there is a
|
|
standing debt where `frozen.md` §1d's width-matched rows still are not.
|
|
|
|
## Metrics, and what they do not mean
|
|
|
|
`recovery[k]` **does not measure adaptation.** Under frozen weights a stateless model
|
|
reproduces its shape at every lag, because it tracks the world's own post-switch
|
|
configuration transient (`frozen.md` §1b). Report it if useful, but never build a claim on
|
|
it; the honest observable is a difference between conditions at matched lag.
|
|
|
|
`run()` refuses `window >= t_min`, because a recovery window that reaches the next switch
|
|
silently blends two events into one curve.
|
|
|
|
## Tests
|
|
|
|
`uv run pytest -q`. Same rule as the library: a test that cannot fail is worse than no test.
|
|
When you add a control, verify it can detect the thing it controls for — the freeze assertion
|
|
in `frozen.py` has a test that nudges a weight to prove the assertion fires.
|
|
|
|
## Conventions
|
|
|
|
Python ≥3.11, `uv`, PyTorch, pytest. `pythonpath = ["."]`, so modules sit at the repo root.
|
|
Runs are cheap — 8000 steps takes seconds. Spend the budget on more seeds, not longer runs.
|
|
Commit inside this repo only.
|