{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/arxiv-2604-01472","title":"The Newton-Muon Optimizer","arxiv_id":"2604.01472","date":"2026-04-01","proceeding":null,"authors":["Zhehang Du","Weijie Su"],"abstract":"The Muon optimizer has received considerable attention for its strong performance in training large language models, yet the design principle behind its matrix-gradient orthogonalization remains largely elusive. In this paper, we introduce a surrogate model that not only sheds new light on the design of Muon, but more importantly leads to a new optimizer. In the same spirit as the derivation of Newton's method, the surrogate approximates the loss as a quadratic function of the perturbation to a weight matrix $W$ using only three matrices: the gradient $G$, an output-space curvature matrix $H$, and the data matrix $Z$ that stacks the layer inputs. By minimizing this surrogate in one step and adopting a certain isotropic assumption on the weights, we obtain the closed-form update rule (up to momentum and weight decay) $W \\leftarrow W - η\\cdot \\mathrm{msgn}(G(ZZ^\\top)^{-1})$, where $η$ is the learning rate and $\\mathrm{msgn}(X)=UV^\\top$ if $X=USV^\\top$ is a compact singular value decomposition. This new optimization method, which we refer to as Newton-Muon, shows that standard Muon can be interpreted as an implicit Newton-type method that neglects the right preconditioning induced by the input second moment. Empirically, on a reproduction of the earliest publicly released Modded-NanoGPT speedrun configuration using Muon for GPT-2 pretraining, Newton-Muon reaches the target validation loss in 6\\% fewer iteration steps and reduces wall-clock training time by about 4\\%.","url_abs":"https://arxiv.org/abs/2604.01472","url_pdf":"https://arxiv.org/pdf/2604.01472","source":{"archive":null,"snapshot":"2025-07-28","note":"not in the Papers with Code archive (frozen at the snapshot)","row_kind":"graph","title_abstract_authors_date":"arXiv metadata, CC0 1.0 (https://info.arxiv.org/help/license)"},"code_links":[],"tasks":[],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2604.01472","atlas_url":"https://app.syntology.ai/?focus=2604.01472","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2604.01472"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-25T09:33:49+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"mentioned_in_github":null,"is_official":null,"provenance":"deterministic:regex_extraction","mentioned_in_paper":null,"url":"https://github.com/KellerJordan/modded-nanogpt","reach":null}],"summary":{"ran":12,"unverified":10},"by_repo_kind":{"found_in_text":{"samples":22,"ran":12,"repositories":1}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted","community":"Not in the archive's code links for this paper; a community repository Syntology harvested"},"n_pointer_only_for_licence":0,"samples":[{"code_sha256_prefix":"c3231dd5161304ae","entry":"add_legend","repo":"KellerJordan/modded-nanogpt","repo_kind":"found_in_text","path":"records/track_3_optimization/make_figures.py","file_url":"https://github.com/KellerJordan/modded-nanogpt/blob/HEAD/records/track_3_optimization/make_figures.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"c3231dd5161304ae"}},{"code_sha256_prefix":"e00ba58b92a3a5b0","entry":"apply_rotary_emb","repo":"KellerJordan/modded-nanogpt","repo_kind":"found_in_text","path":"records/track_1_short/2024-10-09_SOAP/train_gpt2.py","file_url":"https://github.com/KellerJordan/modded-nanogpt/blob/HEAD/records/track_1_short/2024-10-09_SOAP/train_gpt2.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"e00ba58b92a3a5b0"}},{"code_sha256_prefix":"b5b22bb0a8c0ed23","entry":"collect","repo":"KellerJordan/modded-nanogpt","repo_kind":"found_in_text","path":"records/track_1_short/2026-05-07_XSAGatedLayers/analyze_sweep.py","file_url":"https://github.com/KellerJordan/modded-nanogpt/blob/HEAD/records/track_1_short/2026-05-07_XSAGatedLayers/analyze_sweep.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"b5b22bb0a8c0ed23"}},{"code_sha256_prefix":"c061af6669e19aa4","entry":"format_evidence","repo":"KellerJordan/modded-nanogpt","repo_kind":"found_in_text","path":"records/track_3_optimization/make_figures.py","file_url":"https://github.com/KellerJordan/modded-nanogpt/blob/HEAD/records/track_3_optimization/make_figures.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"c061af6669e19aa4"}},{"code_sha256_prefix":"16290ad6274808ff","entry":"get_lr","repo":"KellerJordan/modded-nanogpt","repo_kind":"found_in_text","path":"records/track_1_short/2024-10-09_SOAP/train_gpt2.py","file_url":"https://github.com/KellerJordan/modded-nanogpt/blob/HEAD/records/track_1_short/2024-10-09_SOAP/train_gpt2.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"16290ad6274808ff"}},{"code_sha256_prefix":"4e63e6195b90a817","entry":"norm","repo":"KellerJordan/modded-nanogpt","repo_kind":"found_in_text","path":"records/track_1_short/2024-12-04_ValueEmbed/train_gpt2.py","file_url":"https://github.com/KellerJordan/modded-nanogpt/blob/HEAD/records/track_1_short/2024-12-04_ValueEmbed/train_gpt2.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"4e63e6195b90a817"}},{"code_sha256_prefix":"ea051f315b60d0e7","entry":"rmsnorm","repo":"KellerJordan/modded-nanogpt","repo_kind":"found_in_text","path":"records/track_1_short/2024-10-09_SOAP/train_gpt2.py","file_url":"https://github.com/KellerJordan/modded-nanogpt/blob/HEAD/records/track_1_short/2024-10-09_SOAP/train_gpt2.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"ea051f315b60d0e7"}},{"code_sha256_prefix":"960f9b8115e925ee","entry":"score_sequence","repo":"KellerJordan/modded-nanogpt","repo_kind":"found_in_text","path":"evals/hellaswag.py","file_url":"https://github.com/KellerJordan/modded-nanogpt/blob/HEAD/evals/hellaswag.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"960f9b8115e925ee"}},{"code_sha256_prefix":"644144f36200f8e0","entry":"t_lower_p","repo":"KellerJordan/modded-nanogpt","repo_kind":"found_in_text","path":"records/track_1_short/2026-05-07_XSAGatedLayers/analyze_sweep.py","file_url":"https://github.com/KellerJordan/modded-nanogpt/blob/HEAD/records/track_1_short/2026-05-07_XSAGatedLayers/analyze_sweep.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"644144f36200f8e0"}},{"code_sha256_prefix":"a724304bec537d51","entry":"welch","repo":"KellerJordan/modded-nanogpt","repo_kind":"found_in_text","path":"records/track_1_short/2026-05-07_XSAGatedLayers/analyze_sweep.py","file_url":"https://github.com/KellerJordan/modded-nanogpt/blob/HEAD/records/track_1_short/2026-05-07_XSAGatedLayers/analyze_sweep.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"a724304bec537d51"}},{"code_sha256_prefix":"f21c15e79f628ed4","entry":"zeropower_via_newtonschulz5","repo":"KellerJordan/modded-nanogpt","repo_kind":"found_in_text","path":"records/track_3_optimization/train_gpt_simple.py","file_url":"https://github.com/KellerJordan/modded-nanogpt/blob/HEAD/records/track_3_optimization/train_gpt_simple.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"f21c15e79f628ed4"}},{"code_sha256_prefix":"0aa8c57b206bf7e2","entry":"zeropower_via_svd","repo":"KellerJordan/modded-nanogpt","repo_kind":"found_in_text","path":"records/track_1_short/2024-10-10_Muon/train_gpt2.py","file_url":"https://github.com/KellerJordan/modded-nanogpt/blob/HEAD/records/track_1_short/2024-10-10_Muon/train_gpt2.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"0aa8c57b206bf7e2"}},{"code_sha256_prefix":"0f4f2333e89a6c8c","entry":"apply_rotary_emb","repo":"KellerJordan/modded-nanogpt","repo_kind":"found_in_text","path":"records/track_1_short/2024-10-14_ModernArch/train_gpt2.py","file_url":"https://github.com/KellerJordan/modded-nanogpt/blob/HEAD/records/track_1_short/2024-10-14_ModernArch/train_gpt2.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"0f4f2333e89a6c8c"}},{"code_sha256_prefix":"b144323a9c6e08cd","entry":"backward","repo":"KellerJordan/modded-nanogpt","repo_kind":"found_in_text","path":"train_gpt_medium.py","file_url":"https://github.com/KellerJordan/modded-nanogpt/blob/HEAD/train_gpt_medium.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"b144323a9c6e08cd"}},{"code_sha256_prefix":"ada98d810430b292","entry":"backward_t","repo":"KellerJordan/modded-nanogpt","repo_kind":"found_in_text","path":"train_gpt.py","file_url":"https://github.com/KellerJordan/modded-nanogpt/blob/HEAD/train_gpt.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"ada98d810430b292"}},{"code_sha256_prefix":"2a9e445529f71938","entry":"mm_backward_op","repo":"KellerJordan/modded-nanogpt","repo_kind":"found_in_text","path":"train_gpt_medium.py","file_url":"https://github.com/KellerJordan/modded-nanogpt/blob/HEAD/train_gpt_medium.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"2a9e445529f71938"}},{"code_sha256_prefix":"05ddce9e4507d60a","entry":"mm_op","repo":"KellerJordan/modded-nanogpt","repo_kind":"found_in_text","path":"train_gpt_medium.py","file_url":"https://github.com/KellerJordan/modded-nanogpt/blob/HEAD/train_gpt_medium.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"05ddce9e4507d60a"}},{"code_sha256_prefix":"e4294370eb7980a3","entry":"mm_t_op","repo":"KellerJordan/modded-nanogpt","repo_kind":"found_in_text","path":"train_gpt.py","file_url":"https://github.com/KellerJordan/modded-nanogpt/blob/HEAD/train_gpt.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"e4294370eb7980a3"}},{"code_sha256_prefix":"e2d7543a51c8ea15","entry":"muon_update","repo":"KellerJordan/modded-nanogpt","repo_kind":"found_in_text","path":"records/track_3_optimization/train_gpt_simple.py","file_url":"https://github.com/KellerJordan/modded-nanogpt/blob/HEAD/records/track_3_optimization/train_gpt_simple.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"e2d7543a51c8ea15"}},{"code_sha256_prefix":"5728875012ffc26a","entry":"zeropower_via_newtonschulz5","repo":"KellerJordan/modded-nanogpt","repo_kind":"found_in_text","path":"records/track_1_short/2024-10-10_Muon/train_gpt2.py","file_url":"https://github.com/KellerJordan/modded-nanogpt/blob/HEAD/records/track_1_short/2024-10-10_Muon/train_gpt2.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"5728875012ffc26a"}},{"code_sha256_prefix":"063edbb4688922ba","entry":"zeropower_via_newtonschulz5","repo":"KellerJordan/modded-nanogpt","repo_kind":"found_in_text","path":"records/track_1_short/2024-10-14_ModernArch/train_gpt2.py","file_url":"https://github.com/KellerJordan/modded-nanogpt/blob/HEAD/records/track_1_short/2024-10-14_ModernArch/train_gpt2.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"063edbb4688922ba"}},{"code_sha256_prefix":"52f6a37650968e45","entry":"zeropower_via_newtonschulz5","repo":"KellerJordan/modded-nanogpt","repo_kind":"found_in_text","path":"records/track_1_short/2024-12-04_ValueEmbed/train_gpt2.py","file_url":"https://github.com/KellerJordan/modded-nanogpt/blob/HEAD/records/track_1_short/2024-12-04_ValueEmbed/train_gpt2.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"52f6a37650968e45"}}]},"arxiv_metadata":{"licence":"arXiv metadata, CC0 1.0 (https://info.arxiv.org/help/license)","fields":["title","abstract","authors","date"],"primary_category":"cs.LG","source":"arxiv_2026.jsonl"},"syntology_extracted_results":{"kind":"leaderboard_placements","source":"Syntology's leaderboard-shaped extractor over the paper's own arXiv-HTML tables: a model pointed at a cell, the number was read from that cell and checked against the board's metric, dataset, split and scale, and an independent check accepted the entry; not reviewed by the paper's authors or the archive's editors","extractor_model":"global.anthropic.claude-sonnet-4-5-20250929-v1:0","verifier_model":null,"prompt_sha":"fa63d4bb9d755694","coverage":{"sentence":"Syntology has checked 6,885 of the 9,623 papers on this site that are newer than the archive; results from the others appear after they are checked.","papers_newer_than_archive":9623,"papers_checked":6885},"entries":[],"not_placed":{"boards":0,"rejected_by_independent_check":0,"refused_by_a_rule":0,"check_did_not_answer":0,"proposed_without_a_cell":0,"declined_by_site":0}}}