Skip to content

fix(coef_train): align native-surrogate default lr to the M10 corrected barrier - #63

Merged
transfix merged 1 commit into
mainfrom
fix/coef-train-native-lr-m10
Sep 8, 2026
Merged

transfix merged 1 commit into
mainfrom
fix/coef-train-native-lr-m10

Conversation

@transfix

@transfix transfix commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

train_native() hardcoded the surrogate refinement lr at the pre-M10 2e-4, overriding the C++ coef_trainer default when dispatching to the native backend. The M10 barrier fix (#61) made the barrier steeper, so 2e-4 overshoots and degrades the policy — city seed-0 trained reach 71%→26%. Retuned to 5e-5 (matching libcvc coef_train.h; 1e-4..1e-5 all recover). Bicycle keeps its own 1e-5. The torch imitation (1e-3) and train_on_geometry.py (3e-4) regimes are left for their own sweep.

…ed barrier

train_native() hardcoded the surrogate refinement lr at 2e-4 — the pre-M10 value —
which OVERRODE the C++ coef_trainer's own default when dispatching to the native
backend. The M10 barrier fix (#61) made the IPC barrier steeper (b'' gains +1/d^2),
so 2e-4 now overshoots and DEGRADES the trained policy: on the city scene (seed 0),
trained reach falls 71% -> 26%. Retuned to 5e-5, matching libcvc's coef_train.h
default (1e-4..1e-5 all recover; 5e-5 is mid-band). The bicycle path keeps its own 1e-5.

The torch imitation trainer (lr=1e-3) and scripts/train_on_geometry.py (lr=3e-4) are
different regimes not covered by the surrogate sweep and are left unchanged pending
their own validation. See the training guide's corrected-barrier section.
@transfix
transfix merged commit 0e02242 into main Sep 8, 2026
3 checks passed
@transfix transfix mentioned this pull request Sep 8, 2026
transfix added a commit that referenced this pull request Sep 8, 2026
Two fixes since v0.2.0, both parts of the M10 IPC-barrier correction:

- #61: the IPC wall-barrier FORCE is now the true gradient of the barrier
  b(d) = -(d-d_hat)^2 * log(d/d_hat). The shipped force carried a spurious
  (d-d_hat)+1 factor that opened an attraction band inside d_hat; corrected
  to the analytic derivative -(2*(d-d_hat)*log(d/d_hat) + (d-d_hat)^2/d),
  verified against autograd.
- #63: the native-surrogate trainer default lr retuned 2e-4 -> 5e-5. The
  corrected (steeper) barrier made the old rate overshoot and DEGRADE the
  policy (city seed-0 trained reach 71% -> 26% at 2e-4; 1e-4..1e-5 recover).

Fixes only, pre-1.0 -> patch bump. Version lives in pyproject.toml; the three
cvcpkg columns mirror it in upstream_version and the package.files dist-info
path. cvc_revision stays 1 (a new upstream version restarts its revision
count, and 0.2.0 was already revision 1).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant