Files
foxhunt/docs
jgrusewski 79945987a5 fix(sp22): W-read guards across ALL atom-shift kernels
Verify smoke train-t5885 partial result: dir CLEAN, mag NaN. The
isfinite(W) guard added in compute_expected_q didn't extend to the
other atom-shift consumers. Adam-corrupted W propagates through them
via 0*NaN=NaN.

Adds isfinite(w_aux[a]) guards to all atom-shift kernels:
- mag_concat_qdir
- quantile_q_select
- c51_loss_kernel (eq_per_action shift + effective_reward W[a0]/W[best_next_a])

Also strengthens c51_aux_dw_kernel: guard sp/isw/dz/gamma/done (not
just dz<1e-7 which doesn't catch NaN). Any NaN/Inf input -> skip
sample (no dW contribution).

Defense-in-depth complete: NaN cannot propagate through any
atom-shift path regardless of source.

Cargo check clean.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-13 14:13:40 +02:00
..