Skip to content

Generalize FPSL to higher dimensions - #17

Open
braniii wants to merge 14 commits into
mainfrom
feature/higher-dim-generalization
Open

braniii wants to merge 14 commits into
mainfrom
feature/higher-dim-generalization

Conversation

@braniii

@braniii braniii commented Aug 7, 2026 •

Copy link
Copy Markdown
Member

Port of the N-dim generalization work from the private fork: v_sigma-based
FP regularization (finite-difference estimator, replaces the 1D-only exact
gradient when set), N-dim W&B FEL logging, get_fourier_func2d, and the
get_fourier_func/FourierFeatures even/odd cleanup. Left out
CustomCentralInversionMLP/FPSL2D on purpose — turned that into a tutorial
section instead of new API surface, since nothing used it yet.

Also: found and fixed a real bug from the private-side refactor —
ScorePeriodicMLP had silently become cosine-only (same as
ScoreSymmetricPeriodicMLP), losing its sine terms. Added tests that catch
it.

Added test coverage for everything above (none of it had tests before) plus
a changelog entry.

braniii added 14 commits August 6, 2026 23:27
The unification onto _BaseScorePeriodicMLP gave ScorePeriodicMLP the
same odd=False Fourier config as ScoreSymmetricPeriodicMLP, making the
two architectures identical and contradicting ScorePeriodicMLP's own
sine+cosine docstring. Restore odd=True and add regression tests that
fail without the fix.
Covers the new even/odd/idx_offset parameters on get_fourier_func and
the new 2D expansion get_fourier_func2d, neither of which had any
tests. Reconstruction accuracy is checked against known analytic
periodic functions.
Covers the two previously-untested N-dimensional generalizations: the
v_sigma finite-difference Fokker-Planck regularization path, and the
dim==2 branch of the end-of-training free-energy-landscape logging.
Demonstrates building a score network invariant under a custom
central-inversion symmetry (odd*odd and even*even products of
per-coordinate Fourier bases) and plugging it into FPSL via
score_model, the same extension pattern used for the custom noise
schedule earlier in the notebook.

This branch has not been deployed

No deployments
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