Branch worktree-agent-a510b4c9, commit 6cb2257163. Caps any branch's
weight-gradient L2 norm at `num_branches × median(branch_norms)` via a
new single-pass reduce+rescale CUDA kernel, wired into both the
ungraphed fallback and the `adam_grad_child` graph capture path.
Motivation: L40S train-mdh86 (terminated at epoch 20 after Sharpe
regression) showed grad_ratio_mag_dir ∈ {14793, 11934, 12858, 16406,
15141} for the first five epochs, then collapsed to 111× in a single
step at epoch 7 and destabilised learning for the remaining epochs.
HEALTH_DIAG forensics at /tmp/l40s_diag/health.log confirmed the
imbalance as the probable trigger.
Post-fix grad_ratio_mag_dir on the equivalent local smoke: 55, 78, 35,
11, 10 — a 268–1503× reduction in ratio magnitude.
Architectural rule (no tuned knobs, per feedback_adaptive_not_tuned.md):
cap = num_branches × median(branch_norms)
num_branches=4 is the factored-action axis count (architectural)
median is a per-step statistical reference (adaptive)
product is fully signal-driven
Smokes (local RTX 3050 Ti):
magnitude_distribution: PASS — EVAL_DIST Q=0.153 H=0.255 F=0.592,
3 internal folds Sharpe +16.7 / +38.8 / +49.1
multi_fold_convergence: PASS — 3/3 folds Sharpe +57.8 / +55.6 / +119.3
Expected to resolve the L40S regression when validated with the next
argo-train.sh run.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>