Add MNIST Muon microbatch RG spectrum experiment - #83
Draft
charlesmartin14 wants to merge 21 commits into
Draft
Conversation
Member
Author
|
Rectangular FC1/FC2 follow-up completed on real MNIST (seed 1337, 500 optimizer microbatches, each sampled step compared with the immediately preceding checkpoint). Implemented a gauge-aligned decomposition for full-rank rectangular matrices:
Late-step results (last ten sampled points, steps 410–500):
At step 500, FC1 angular happened to fit alpha 2.1838 with 93 / 272 tail modes, but the trajectory is highly variable and does not provide a stable alpha-two signal. FC2 remains the only clean result: broad tail, low KS distance, and a stable exponent close to 2. Conclusion: separating the rectangular core and Grassmann sectors fixes the mathematical incompleteness of the pseudoinverse operator, but it does not rescue FC1 in this 500-step pilot. |
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.
What changed
fc1.weight,fc2.weight, andfc3.weightafter each selected optimizer microbatch, including the initialized step-zero state and an append-safe checkpoint indexabs(log(lambda))deviations with the identity mode removedpowerlaw.Fitand plots alpha versus optimizer step with an alpha=2 reference linepowerlawalpha range from its version-2 default upper bound of 3 to[1.01, 10], and records tail size, tail fraction, KS distance, and boundary hitsRun
Then open
baseline/notebooks/MNIST_MLP3_Muon_Microbatch_RG_ESD.ipynband pointRUN_DIRat the generated run.Scientific scope
The notebook reports three candidates separately:
sigma(W_t)^2sigma(J_t)^2, where the smaller supported square relative map is built with a pseudoinverseabs(log(sigma(J_t)^2)), which removes the trivial identity/orthogonal mode at oneThe relative-flow construction remains basis dependent; this PR implements the proposed numerical test rather than claiming a basis-invariant quotient.
Real-MNIST pilot
A separate Actions run trained the exact baseline on real MNIST for 500 optimizer microbatches and saved initialization plus all 500 updates. At step 500 it reached validation accuracy 97.36% and test accuracy 97.05%.
After refitting the saved spectra with
1.01 <= alpha <= 10, the strongest early signal is the middle hidden layer's log-flow-deviation spectrum:fc2.weight: late-step median alpha1.9519, mean1.9544, standard deviation0.0177165.5 / 512modes (32.3%)0.0204The other candidates do not show a comparable universal alpha-two result in the first 500 steps:
alpharoughly 4.3, 6.2, and 7.6 by layer)fc1andfc3hit the expanded upper bound near 10 with poor KS distances, so those spectra are effectively identity-like rather than credible power lawsfc2raw relative flow has median alpha about 2.56 but a tiny fitted tail, roughly 7.5 of 512 modesfc3has only ten singular values, so its fits are qualitativeThis is one seed and only 500 of approximately 12,900 full-baseline steps. The
fc2log-flow result is therefore an encouraging layer-specific pilot, not yet evidence of a universal fixed point.Validation
Passed on the current feature head:
core-baselinesjob, including all baseline unit testsMLP3andMuonWithAuxAdamW; initialization plus two successive optimizer-step checkpoints were written and reloadedThe separate
one-head-nanogptjob is red because of regressions already present onmain: its reference configuration requires a missingmuon_clipprofile, and two existing angular notebooks no longer satisfy their contract tests. None of those failures involve files changed by this PR.