Repository navigation
learn-report: the loss family against the untrained and constant arms (held-out objectives in arms-eval) - #174
Merged
Merged
Conversation
… (held-out objectives in arms-eval) #171's loss claims compared a trained run's held-out loss terms only with that run's own step 0, because a learning history holds the trained run alone. Every arm is now scored with the trainer's own objective on the same held-out units, and learn-report claims on those as loss terms, as it already did for the task metric. - grl_snam.learning.objective: per-unit held-out terms for grl-snam train (loss, goal, col, reg per held-out pair; the mean is the history's obj_<term>) and coef-train (loss, goal, coll per held-out start, surrogate or bicycle; the mean is the trainer's step record at a fixed net). No gradient, a forked torch RNG, the net's mode restored. - arms-eval: opt-in cases objective-sdf and objective-coef (direction down, family "loss", unit "pair"/"start"); --label names the run. The default cases are unchanged. - arms: per-case family/unit fields; runs_paired_diff, a runs x units two-level bootstrap for one table per training seed. - learn-report: claims on a loss case are family "loss" (loss:<case>:<term>:trained-vs-<arm>); --arms repeats (one table per run, pooled). The report JSON only gains fields (sources.arms_tables; unit, runs, per_run, labels in evidence). - experiments/learning_proof/objective_arms.py scores through the library; it rebuilds docs/learning-validation/objective.json byte for byte.
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.
Closes the gap #171 named.
grl-snam learn-report's loss family compared a trained run's held-out loss terms only with that run's own step 0, because a learning history holds the trained run alone. Now every arm (trained, untrained step 0, constant) is scored with the trainer's own objective on the same held-out units. The loss family is tested against the untrained and the constant arm, as the task family already was.What changes
grl_snam.learning.objective(new): held-out loss terms per unit, for any arm.grl-snam train: loss, goal, col, reg per held-out pair, inside the run's held-out blocks. The mean over pairs issdf_eval.objective_terms, theobj_<term>a--val-frachistory logs.--heldout-seed,--heldout-agents,--horizon,--grid), on the surrogate or the bicycle rollout. Each start averages the trainer's BPTT windows, as its step record does. At lr 0 the mean equals the trainer's logged step terms (tested).grl-snam arms-eval: two opt-in cases,objective-sdfandobjective-coef. Every metric has directiondown, familyloss, and a unit ofpairorstart.--labelnames the run. The default--casesis stillcoef,scorecard.grl_snam.learning.arms:arms_tablewrites optional per-casefamily/unit.runs_paired_diffpools one table per training seed with a runs × units two-level bootstrap (the statistic Does base GRL-SNAM's policy learn? The coef_sdf learning check, and E1 (planted dissipation) #172 used).grl-snam learn-report:loss:loss:<case>:<term>:trained-vs-<arm>, "held-out goal (objective-sdf) is lower for trained than for untrained (paired by held-out pair, 95% CI)".--armsrepeats, one table per training run, and the runs pool.sources.arms_tables, andunit/runs/per_run/labelsin evidence);report()still takes one table;task_claimsstill exists. With no loss case in the table, every claim and number is what it was.experiments/learning_proof/objective_arms.pyscores through the library. It rebuildsdocs/learning-validation/objective.jsonbyte for byte.On #172's retrain (5 seeds,
docs/learning-validation/retrain)arms-eval --cases objective-sdfper seed (1024 held-out pairs, seed 777, the run's held-out blocks), with arms trained = the pick, untrained = step 0, and constant =const:hist(the pick's own head means). Thenlearn-reporton the five histories and five tables:Tests
tests/learning/test_learning_objective.py, 13 tests, about 6 s:sdf_eval.objective_terms;.jsonl.gz;--armsrepeated.tests/learning: 73 pass, 1 skip (pycvc'snav_coef_mlp_forward).