interplane.Get Omega
Read in your language

aien-train

AIEN training programme: language-model history, GB10 constraints and the route to training on the project engine. Plans and runnable checks are distinguished.

Brought by drakestapleton

branch main Branches Tags History

aien-train / docs / si19 / CONTRACT.md

113 lines · 5526 bytes Raw Blame History Rendered
1# aien-train#19 offline experiential world model (host, standalone)
2
3This is an offline standalone experiment for aien-train#19. It is not M23/M24
4(AIEN_0) qualification, not an EST-4+ estimator and not a production input.
5EST-3 is FAILED on architecture main, so this module stays outside any runtime,
6default build or test target, like the `src/estimation` pattern
7(CURRENT_EXECUTION_PLAN Lane 7). M20-M22 remain NOT QUALIFIED. This module adds no
8new tensor, autodiff or optimizer. It is a consumer of the aien-train#15
9native step, merged on main as c9782bfd, and any T2 result inherits that status. No sealed G3 holdout exists
10(sealing is BLOCKED_OPERATOR), so the held-out numbers here are development
11results, not sealed results.
12
13## Data source
14`native/si19/fixture.om` is a FIXTURE. It is a seeded, resettable micro-world
15that stands in for Omega X1 `ExperienceTransition` (omega-mv#699, not on main).
16Transitions come from executing fixed dynamics. No model, teacher, corpus or
17self-distillation produces them:
18
19- observation: p in -12..12, v in -3..3; action u in {-1,0,1};
20- dynamics: p2 = p + v and v2 = v + gain*u + gust, where gust is -1 or +1 with
21 probability 1/8 each;
22- env A has gain +1 and env B has gain -1 (reversed action);
23- a transition is terminal when it leaves the bounds or reaches step 7. A terminal
24 record keeps its true successor, and the next record starts from a fresh reset;
25- the behaviour policy is seeded uniform random;
26- training resets p into -12..-4.
27
28## Model and trainer (`native/si19/world.om`)
29- The model is an affine map (p,v,u) -> (p2,v2) with W[3,2] and b[2], 8 binary32
30 parameters, randomly initialized from a seed in {-4..3}/16. There is no prior.
31- Each update is one call to the pinned `afstep` (`docs/si19/dependencies.json`):
32 L720 add32/mul32 forward, sum-squared loss, the explicit gradient and SGD with
33 lr = 2^-9. Each batch has two experiences.
34- Bounded replay keeps two rings of 64 experience ids. There are 4 updates per
35 admitted experience.
36- Arms:
37 - M is trained on A, then on B with one A-replay sample per batch;
38 - N is a copy of M after A, then trained on B only;
39 - S is the shuffled-experience control: same ring and schedule, but each row's
40 inputs and outcome come from independently drawn experiences;
41 - MA and INIT are frozen snapshots.
42- Lineage: per arm, `WS` counts how many applied batches used each experience
43 id. `wsaffect arm id` answers "did id contribute?" for #20. The counts are
44 saved in the checkpoint.
45- All resumable state is in WS, TL (the experience log) and FS (fixture
46 streams). The checkpoint is a 51752-byte image: magic, version, cell count,
47 event, the state, then FNV-1a 64. FNV-1a detects damage but does not
48 authenticate. Admission checks length, magic, version, size, checksum and
49 semantics (event range, ring counts, update count, finite parameters, ring
50 ids, encoded ranges) before it replaces any state.
51
52## Evaluation
53For each environment, a separate seed and a wide reset region generate 128
54held-out transitions. Every held-out (p,v,u) key is absent from that
55environment's training experience, and held-out ids sit outside the training id
56range. The metric is mean squared error over (p2,v2), computed in binary32.
57
58The model is compared with these baselines:
59
60- persistence rule;
61- constant-velocity rule;
62- frequency mode (exact key, falling back to the per-action modal delta);
63- nearest-neighbour retrieval, both raw and delta-transfer;
64- the shuffled control;
65- the init model.
66
67The true-mean-dynamics predictor is shown only as a noise-floor reference (it
68uses hidden fixture knowledge). Forgetting is measured as error on held-out A
69after B, with and without replay.
70
71## Build and run
72`sh tests/si19/run.sh` is disclosed POSIX host glue, kept as the replay
73runner. It holds no training, check or verdict logic; all of that is in the .om
74units. Its Omega replacement path is an OM2 conductor in .om that performs the
75same materialize, hash, build, run and compare steps, as the #14-#16 contracts
76do with runner recipes; until that lands the script stays disclosed host glue.
77It does the following:
78
791. Materializes the four pinned sources from Git objects and checks their
80 SHA-256 values (`docs/si19/deps.sha256`).
812. Checks the compiler hash.
823. Builds `world-test` and the `world` driver with `quiet-build`.
834. Runs the tests.
845. Runs an uninterrupted job, then stops at events 100 and 300, resumes each in a
85 new process and requires the final images and reports to be byte-identical.
866. Requires refusal of damaged and truncated images.
877. Runs six fault-injected units. Each must compile and fail the unchanged test.
88
89Results go to `evidence/SI19/run/`. ELF files and images stay in a temporary
90build directory.
91
92`tests/si19/world-test.om` contains:
93
94- an exact integer golden oracle for two real trainer updates (forward, loss,
95 dW, db and the committed parameters);
96- a forward-only consistency check;
97- fixture determinism, seed sensitivity and transition-boundary checks;
98- exact lineage counts and the shuffle wiring;
99- held-out key and id separation;
100- in-process restart at 10 cut points;
101- checkpoint refusals that leave state unchanged.
102
103## Not covered
104The following remain outside this module:
105
106- calibration and uncertainty outputs;
107- curiosity and active experiments;
108- consent and revocation enforcement (#20, Open Humanity);
109- Cortex/X1 records;
110- sealed evaluation;
111- GPU or simulator execution;
112- a pretrained-adviser comparison;
113- energy measurement.