# PREREG: Lookahead Ladder (Paper 3 Part A)  v1
Frozen 2026-07-18, before any estimator code or evaluation run.
Spec of record: docs/superpowers/specs/2026-07-18-paper3-lookahead-ladder-design.md (rev 62d92ab).
Amendments: dated, appended, never edited in place.

## Rungs (anchor: TinyLlama-1.1B, A=math, B=code, 20% budget)
- ladL0: block-coherence ledger, A-side only. PRIMARY VARIANT FIXED A PRIORI:
  R1 trace contraction, C=I write factor |w_i . w_j| (raw dots, after-A fp32
  down-proj), S1 L2 row load s_i = sqrt(sum_{j!=i} (R_ij W_ij)^2).
  psi_i(x) = (silu'(g_i) u_i, silu(g_i)) -- BOTH read paths.
  Diagnostics only: R2 (unweighted), S2 (L1). No selection step exists.
- ladL1/ladL4/ladL16: K2-style off-diagonal row load (raw-L2, sketch rng
  20260712, m gates 32->64->128 with rho>=0.9 & Jaccard>=0.8 early stop, as
  curvature_run.run_sketch) along RAW cumulative deltas theta_k - theta_A
  after k in {1,4,16} AdamW steps of train_e4.py --phase B --seed 0.
- curvK2 (L-full): existing mask_curvK2.npz (verified bitwise = top-20% of
  k2_raw_s0, 22/22 layers). Arms RE-RUN with --save-ckpt for endpoint
  uniformity (see Endpoint).

## Reservoir (L0)
All lines of e4-continual/data/train_A_math.jsonl, file order, SEQ_LEN 512.
Never touches eval_math outcome half (OUTCOME_IDX). Frozen.

## Construction / evaluation split
All masks built once from the seed-0 construction stream; committed before
any evaluation run. Evaluation seeds: 1-6 anchor, 1-3 transfer. Seed 0 never
evaluates.

## Endpoint (uniform convention)
Outcome-half NLL degradation = eval_nll(fp32 model @ after-B ckpt,
eval_texts("math", OUTCOME_IDX)) - same at ckpt_A. Computed by
e6-ladder/src/eval_arms.py for EVERY arm: new runs save ckpts (--save-ckpt);
weights s1-s4 and random s1-s4 use their existing ckpts; curvK2 s1-s6 are
re-run to obtain ckpts (published curvK2 numbers are in-loop nll_split -- a
different convention; declared here, not an amendment). Reproduction gate:
eval_arms.py must reproduce outcome_half_evals.json weights_s1..s4 values to
<= 1e-6 before any new number is read.
AMENDMENT 3 2026-07-19 (before G3 ran, full disclosure): code inspection
found the PUBLISHED outcome_half_evals.json was produced under bf16 eval
(eval_outcome_half.py calls load_model with its bf16 default), so an fp32
evaluator cannot reproduce it to 1e-6 and the two requirements above
conflict. Resolution: (i) G3 is re-scoped to CONVENTION EQUIVALENCE --
eval_arms.py run in bf16 mode must reproduce published weights_s1..s4 to
<= 1e-6, proving the new pipeline is the old pipeline; (ii) the registered
fp32 endpoint stands: EVERY number entering the analysis (paired primaries
AND context rows) is a fresh fp32 evaluation from its after-B checkpoint via
eval_arms.py; published bf16 numbers appear nowhere in analysis inputs.

## Primaries (Bonferroni alpha_per = 0.05/3 = 0.0167)
(a) Ladder trend: per-seed Spearman rho over (ladL0 < ladL1 < ladL4 < ladL16
    < curvK2) vs retention benefit; pass = STRICTLY rho > 0 on all 6 seeds
    (exact one-sided sign test p = 1/64 = 0.0156 <= alpha_per). rho = 0
    (reachable on 5 ranks even without outcome ties) counts AGAINST. 5-of-6
    reported as suggestive only. Monotone wording reserved for descriptive
    all-adjacent-differences check.
(b) ladL0 vs weights (crowding): one-sided paired exact sign test, seeds 1-6
    (weights s5/s6 are new runs), direction = ladL0 better; + bootstrap CI.
(c) Saturation: fixed-sequence descending equivalence, L16 vs curvK2 first,
    then L4, L1, L0; TOST via 96.7% bootstrap CI within +/- epsilon;
    epsilon = 0.09 NLL (= half the published K2-vs-Fisher margin 0.183),
    FROZEN HERE. Saturation rung = smallest rung that PASSED; L16 failing =>
    no saturation rung declared.
Bootstrap: B = 10000, percentile CIs, rng seed 20260718.

## Secondaries (diagnostics, never gates)
Per-rung score rank Spearman rho and top-20% Jaccard vs k2_raw_s0; unit-delta
variants; nll_split trajectories; step-100 orderings; L0 diagnostic variants.

## Transfer (B2)
B2 = FICTION: roneneldan/TinyStories train[:4000], > 40 words, packed
190 packs, TARGET ~280 words, rng Random(123), written to
e4-continual/data/train_B2_fiction.jsonl. FROZEN HERE (chosen for maximal
register dissimilarity from code AND math).
Construction: one sacrificial 500-step run + one 4-step capture, both seed 0.
Arms: ladL0 (same mask, B-agnostic), ladL4b2, ladK2b2, weights (same mask),
random (mask_random_s{s}, seed-matched draw = evaluation seed, verified
gen_random_masks.py convention). Evaluation seeds 1-3. 15 evaluation runs.
Endpoint: ESTIMATION only. Kendall tau-b between transfer 5-arm mean ordering
(seeds 1-3) and anchor same-5-arm mean ordering over COMMON anchor seeds 1-4;
anchor and transfer seed sets bootstrapped INDEPENDENTLY (B = 10000, seed
20260718). Registered directional prediction:
curvK2 >= ladL4 >= ladL0 >= weights >= random. No hypothesis test at n=3.

## Gates (block progression, never select variants)
G1 curvK2 mask bitwise reproduction 22/22 layers.
G2 L0 brute-force reference agreement (max rel err <= 1e-3 on registered
   slice: layers {0,11,21}, first 8 reservoir seqs, neurons 0-63).
G3 endpoint reproduction (weights_s1..s4 <= 1e-6, above).
G4 lookahead determinism: 1-step and 4-step captures must equal the first
   1/4 steps of the 16-step capture bitwise (same seed, same stream).
   AMENDMENT 2026-07-19 (operationalization, before any capture ran): the
   prefix property is not directly observable from endpoint checkpoints
   (train_e4 saves no intermediate steps). G4 is operationalized as
   (i) REPEAT-DETERMINISM: the k=1 capture run twice must produce bitwise
   identical checkpoints -- seeded determinism plus identical init/stream
   implies the prefix property for k=1,4 within the k=16 trajectory; and
   (ii) ORDERING: median per-neuron delta norm strictly increasing in k.
   Both must pass; evidence in gate_capture_determinism.json and
   gate_lookahead.json.
   AMENDMENT 2 2026-07-19 (after the repeat check ran, full disclosure):
   bitwise repeat-determinism FAILS on this stack (62/66 tensors differ at
   ~1e-4 max relative -- bf16 reduction-order nondeterminism; forcing
   deterministic kernels would diverge from the training stack every
   published arm used). G4(i) is replaced by a quantitative repeat-stability
   criterion, thresholds set AFTER observing the k=1 repeat values
   (disclosed): two independent k=1 captures must give median per-layer
   delta-norm Spearman rho >= 0.99 and median top-20% Jaccard >= 0.90.
   Observed: rho 0.99945 (min 0.99755), Jaccard 0.9660 (min 0.9297) -- PASS.
   Known noise floor recorded as a boundary, not a gate: the k=1 delta
   DIRECTION carries ||delta_a - delta_b||/||delta|| = 0.063 run-to-run
   jitter (shrinks with k as signal accumulates); ladL1's sketch direction
   inherits it and REPORT_LADDER must state it.

## Scope conditions
Native parameterization + fixed AdamW (E-M4); TinyLlama-1.1B primary;
math->code anchor; 20% budget; neuron granularity.
