feat(sp22): H6 Phase 3 α/β — RESTORE structural priors

Verification smoke train-5t6vb @ 79945987a confirmed wiring sound
across 3 folds (Fold 0 WR=0.4345, Fold 2 WR=0.4331, no NaN at any
HEALTH_DIAG[0]).

Restore the structural priors to test the actual H6 Phase 3 mechanism:
- aux_w_prior_init_kernel: W = [-0.5, 0.0, +0.5, 0.0]
  (Short/Hold/Long/Flat)
- training_loop reset arm: scale_beta prior = 0.5

Defense-in-depth guards from 79945987a provide safety net — any non-
finite input gracefully degrades to no-op rather than NaN cascade.

Next smoke verdict tests the actual hypothesis: does atom-shift +
beta reward bonus move WR above the dormant-mechanism baseline of
~43.45%?

Cargo check clean.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
jgrusewski
2026-05-13 15:39:20 +02:00
parent 79945987a5
commit b4e26a3b45
3 changed files with 57 additions and 28 deletions

View File

@@ -17447,3 +17447,32 @@ Cargo check clean.
Together with the previously-added guards on `state_121` and on `total` (dW write), Adam inputs (`g, lr, m, v`), and `W` in `compute_expected_q`, this provides defense-in-depth across the entire atom-shift path. No NaN can propagate through any of the 4 forward kernels OR the dW/Adam backward.
Cargo check clean.
#### Structural priors RESTORED — full Phase 3 α/β activation (2026-05-13)
**Verification smoke `train-5t6vb` @ `79945987a` completed cleanly across 3 folds**:
- Fold 0 val WR: 0.4345
- Fold 2 val WR: 0.4331
- All HEALTH_DIAG[0] readouts CLEAN — no NaN
Defensive guards confirmed sound. Wiring infrastructure proven.
**This commit restores the structural priors** to test the actual α/β mechanism:
- `aux_w_prior_init_kernel.cu`: W = `[-0.5, 0.0, +0.5, 0.0]` (Short/Hold/Long/Flat)
- `training_loop.rs::reset_named_state`: scale_β prior = `0.5`
The defense-in-depth guards from `79945987a` provide safety net:
- All atom-shift forward kernels guard `w_aux[a]` and `state_121` reads
- c51_aux_dw_kernel guards sp/isw/dz/gamma/done inputs
- adam_w_aux_kernel early-returns on non-finite inputs
If any of these inputs go non-finite (e.g., from an unidentified upstream NaN), the mechanism gracefully degrades to no-op for that sample instead of cascading NaN.
**Next smoke verdict** (1 epoch, 3 folds, baseline):
| Pattern | Interpretation |
|---------|---------------|
| WR clean + > 43.45% | H6 Phase 3 α/β mechanism IMPROVES WR — declare success |
| WR clean + ~= 43.45% | Wiring sound but mechanism doesn't help at chosen magnitude — falsified or needs tuning |
| NaN reappears | Defensive guards too aggressive (sanitizing real signal) — investigate root cause |
Cargo check clean.