Add analytic and numerical MuonClip polar Jacobian baseline - #84
Draft
charlesmartin14 wants to merge 7 commits into
Draft
Add analytic and numerical MuonClip polar Jacobian baseline#84charlesmartin14 wants to merge 7 commits into
charlesmartin14 wants to merge 7 commits into
Conversation
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.
Adds an MNIST MLP3 MuonClip baseline for the local polar-projection Jacobian at single matrix checkpoints.
For each layer matrix W, the notebook computes J = D Pi(W) and compares the Gram spectrum G = J*J in two ways: (1) analytically from the closed-form polar Frechet derivative and its exact eigenvalues 4/(sigma_i+sigma_j)^2 plus rectangular 1/sigma_i^2 modes, and (2) numerically from isotropic random perturbations, centered finite differences of Pi(W), and the empirical response Gram X^T X.
Both raw positive spectra are passed directly to WeightWatcher's WW_powerlaw.pl_fit. The notebook compares WeightWatcher alpha, KS D, xmin, and tail size, and includes a probe-count convergence helper for a single checkpoint. No spectrum normalization, trace normalization, log-binning, KDE, entropy, participation-ratio, or hand-written power-law fit is used.
The reusable operator code lives in baseline/rg_baselines/polar_jacobian.py; the experiment driver and mathematical derivation live in baseline/notebooks/MNIST_MLP3_MuonClip_Polar_Jacobian_Baseline.ipynb.