Repository navigation
grl-snam train: why the SDF retrain diverged, the fix, and the learning measure again - #179
Merged
Merged
Conversation
… term that has one Truncate the backward every 7 rollout steps (--bptt-window) and let the collision term carry gradient (--col-grad). Neither changes a forward value; --bptt-window 0 --no-col-grad is the trainer before the fix and still reproduces the published coef_sdf.pt. --grad-terms-every records each loss term's gradient norm in the history (grad_norm.terms.<term>).
…nd the measure again The source (gradient_source.py), the pilot of each half of the fix, the five-seed retrain, every arm on held-out Austin pairs, the procedural city and arms-eval's cases, and learn-report. sdf_arms.py and objective_arms.py gain the constant_final arm (a constant at the final net's own mean coefficients).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Base GRL-SNAM's SDF retrain (
grl-snam train) clipped every optimizer step and did not descend its own loss (#172). This finds why, fixes it, and runs #172's learning measure again. The record isdocs/learning-validation.md§8.Why it diverged
Two faults. The measurements are in
experiments/learning_proof/gradient_source.pyand §8.1.1. The backward ran through all 28 rollout steps, and on Austin those steps are chaotic.
ipc_piecewise's clamp: still 100% clipped;2. The collision term had no gradient.
sdf_rolloutdetaches the clearance, so3·colwas a constant to the optimizer. With a clean gradient of the rest, training weakens the barrier and the loss rises: 3.96 → 5.40 in 1500 steps.The fix (new defaults of
grl-snam train)--bptt-window 7: the backward is truncated every 7 steps (sdf_eval.loss_terms). Seven is coef-train's own window.--col-grad:sdf_rollout(clr_grad=True)keeps the clearance's gradient.--bptt-window 0 --no-col-gradis the old trainer. It still reproduces the publishedcoef_sdf.ptbit for bit (checked).--grad-terms-every Nrecords each loss term's gradient norm in the history (grad_norm.terms.<term>). The weights are unchanged.tests/test_sdf_train_divergence.pyuses a small field in Austin's frame. Onmainit fails: median pre-clip norm 864, every step clipped.The measure again (§8.3–8.8)
Five seeds × 4000 steps, the same split and arms as §7, plus
constant_final(a constant net at the final net's own mean coefficients). Paired bootstrap CIs, andlearn-report.Now true:
Criterion 1 (held-out per-term losses) passes on the loss. On 5120 held-out pairs, the trained net's objective is lower than every arm's:
The collision term passes too. The goal and reg terms get worse: that is the trade the objective makes.
The net uses what it sees. On held-out Austin pairs it reaches more than a constant at its own mean: +0.7* on its own plant, +1.4* on libcvc's
sim_world. On coef's ice-band city it penetrates 92% less than every arm.Criterion 2 (task metric) still fails, now the other way.
sim_world;grl-snam-weightsis not republished: the final nets reach fewer goals than what ships.Files
grl_snam/tools/train.py,tools/sdf_eval.py,sdf_nav.py(clr_grad),learning_history.py(term_grads),cli.pytests/test_sdf_train_divergence.py, and one assertion intest_sdf_train_instruments.pyexperiments/learning_proof/gradient_source.py;sdf_arms.pyandobjective_arms.pygainconstant_finaldocs/learning-validation.md§8, anddocs/learning-validation/fixed/(histories, curves, arms, objective, scorecards,arms-evaltables,learn-report)Testing
mainin this venv:test_coph_golden::test_torch_rounds_g2s_exp_and_expm1_correctly(torch-version rounding) andtest_plant_capture::test_plant_names(a pycvc build missing a feature).