Skip to content

Extract reusable graphon control core and validate numerical workflows - #1

Merged
Hydrodynamical merged 2 commits into
mainfrom
codex/refactor-graphon-framework
Oct 21, 2026
Merged

Hydrodynamical merged 2 commits into
mainfrom
codex/refactor-graphon-framework

Conversation

@Hydrodynamical

Copy link
Copy Markdown
Owner

The numerical experiments duplicate dynamics, objectives and training, while shared figure directories can silently replace outputs. This refactor provides an installable graphon_control package with one numerical core and separate experiment and plotting modules. Existing root commands and numerical imports remain available.

The implementation follows the October 20 manuscript's Appendix 5: W = wbar/N, receiver-to-sender orientation, the beta kernel penalty, Euler/Maruyama noise scaling, and measured receiver variation. The generic trainer's former beta/2 convention is deliberately changed to beta; retaining the former regularization strength requires halving that configuration value. Paper experiment defaults and raw checkpoint names are preserved. Optional bounded scores expose a density-cap mechanism without changing default experiments or claiming an enforced BV budget.

Runs now reserve new directories, save configuration/environment/code provenance and separate evaluation seeds, and refuse overwrite collisions. Saved arrays support --replot without retraining. Figure collection uses an explicit manifest; noisy comparisons and archived sweeps validate their inputs. The README stays brief and links to numerical and development guides.

Validation:

  • 182 CPU tests passed; 2 accelerator tests skipped because CUDA/MPS are unavailable locally.
  • Both 20-update smoke runs generated metrics, checkpoints, PDFs and GIFs; representative figures were visually checked.
  • Archive/replot, legacy checkpoint reload, invalid settings, collision refusal, gradients and analytic numerical invariants are covered by tests.
  • Short pre-refactor E1/E2 replays preserve final model parameters and trajectories exactly; one E2 loss differs by 2.98e-8 from reduction order.
  • Editable install and wheel build/import verified outside the source checkout.
  • GitHub Actions runs the tests and numerical smoke checks on CPU.

The manuscript and reference PDFs are not included or modified. This is a draft for review; main is unchanged.

@Hydrodynamical
Hydrodynamical marked this pull request as ready for review October 21, 2026 00:10
@Hydrodynamical
Hydrodynamical merged commit a02adf7 into main Oct 21, 2026
2 checks passed
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