Skip to content

VSS3-02 (SLM-70): cost-to-go energy scorer as permutation-only ranker#348

Closed
Tyler-R-Kendrick wants to merge 1 commit into
slm-69-vss3-01-solver-supervisionfrom
slm-70-vss3-02-cost-to-go
Closed

VSS3-02 (SLM-70): cost-to-go energy scorer as permutation-only ranker#348
Tyler-R-Kendrick wants to merge 1 commit into
slm-69-vss3-01-solver-supervisionfrom
slm-70-vss3-02-cost-to-go

Conversation

@Tyler-R-Kendrick

@Tyler-R-Kendrick Tyler-R-Kendrick commented Jul 18, 2026

Copy link
Copy Markdown
Owner

Closes SLM-70.

What changed

  • Added src/slm_training/dsl/solver/energy_ranker.py with CandidateEnergyInput, CandidateEnergyOutput, CandidateEnergyScorer, and EnergyCandidateRanker.
  • EnergyCandidateRanker validates that scorer output is a finite permutation of the exact live candidates; invalid output triggers a deterministic fallback.
  • Added optional cost_to_go_head to TwoTowerModel, plus score_candidates() and cost_to_go_loss() that consume VSS3-01 CandidateCostRow records.
  • cost_to_go_loss masks cost_observed=False rows from regression and adds a pairwise ranking loss within each (state_fingerprint, hole_id) group.
  • Wired config fields through ModelBuildConfig, factory.py, and scripts/train_model.py (--cost-to-go-loss-weight, --cost-to-go-hidden-dim).
  • Added src/slm_training/harnesses/model_build/cost_to_go_train.py and scripts/train_cost_to_go.py for head-only training.
  • Added regression tests in tests/test_dsl/test_energy_ranker.py and tests/test_models/test_cost_to_go.py.
  • Updated docs/design/verified-scope-solver.md, docs/design/research-lineage.md, docs/design/quality-experiment-matrix.md, and added docs/design/vss3-02-cost-to-go.md.

Verification

  • ruff check passes on touched files.
  • pytest tests/test_dsl/test_energy_ranker.py tests/test_models/test_cost_to_go.py tests/test_dsl/test_solver_controller.py -q → 45 passed.
  • python -m scripts.repo_policy ok.
  • git diff --check clean.
  • .githooks/check-changed → all targeted suites pass (590 passed).

Honesty

Wiring / fixture evidence only. The head is trained on tiny synthetic rows in tests; no real VSS3-01 corpus train, eval, benchmark, checkpoint ship, or readiness gate is claimed.

- Add src/slm_training/dsl/solver/energy_ranker.py with CandidateEnergyInput,
  CandidateEnergyOutput, CandidateEnergyScorer, and EnergyCandidateRanker.
  The ranker validates permutation, finiteness, and membership; invalid
  output triggers a deterministic fallback.
- Add optional cost_to_go_head MLP to TwoTowerModel, plus score_candidates()
  and cost_to_go_loss() that consume VSS3-01 CandidateCostRow records.
  cost_observed=False rows are masked; pairwise ranking loss compares
  candidates within the same (state, hole).
- Wire config through ModelBuildConfig, factory, and scripts/train_model.py
  (--cost-to-go-loss-weight, --cost-to-go-hidden-dim).
- Add src/slm_training/harnesses/model_build/cost_to_go_train.py and
  scripts/train_cost_to_go.py for head-only training.
- Add regression tests: tests/test_dsl/test_energy_ranker.py and
  tests/test_models/test_cost_to_go.py.
- Update docs/design/verified-scope-solver.md, research-lineage.md,
  quality-experiment-matrix.md, and add docs/design/vss3-02-cost-to-go.md.

Honest wiring only: no model, checkpoint, eval run, or ship gate claimed.
@vercel

vercel Bot commented Jul 18, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
slm-training Ready Ready Preview, Comment Jul 18, 2026 3:08am

Request Review

@coderabbitai

coderabbitai Bot commented Jul 18, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 60d9efec-b0d7-49f5-9e38-3939f5a8edf6

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch slm-70-vss3-02-cost-to-go

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Copy link
Copy Markdown
Owner Author

Superseded by #347, being merged as the canonical VSS3-02 for SLM-70.

#347's energy scorer + CandidateEnergyRanker consume main's canonical VSS3-01 CandidateCostRow schema (from #343) directly — the field set (remaining_expanded_nodes / remaining_verifier_calls / remaining_backtracks / remaining_decisions, cost_observed, censor_reason) was verified field-for-field against main's solver_supervision.py. This PR was built on #344's bespoke solver-supervision schema (now closed), so its cost_to_go_loss targets a CandidateCostRow shape that isn't on main.

Closing as a duplicate to keep one canonical VSS3-02. The extra wiring here (in-checkpoint cost_to_go_head migration, model-build CLI training path) is a useful follow-up on top of #347.


Generated by Claude Code

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