SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2605.19811 · 2026

LionMuon: Alternating Spectral and Sign Descent for Efficient Training

Samuel Horváth, Aleksandr Beznosikov, Martin Takáč, Andrey Veprikov, Arman Bolatov, Artem Riabinin, Nikita Kornilov

arXiv · PDF · Open in the Atlas

Code that ran

4 of 7 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 1 honoured the contract we drafted, 1 violated it and 0 have no contract verdict; 2 failures of our instrument; 3 no recorded run), measured 2026-11-24; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2605.19811.json · badge: /api/ran/2605.19811.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
brain-lab-research/lion-muon canonical (classifier label)
classifier basis: census
4 ran · 3 no recorded run
FunctionStatusWhere it lives
adjust_lr_wd_for_muon Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
brain-lab-research/lion-muon/src/optim/muon.py
code served (permissive licence) · get_code("9f67a4fea34dc5e4")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned float, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import math

torch.manual_seed(0)

# Analyze the function:
# - lr: a numeric value (float or int)
# - matched_adamw_rms: a numeric value used in multiplication
# - param_shape: a sequence/tuple where we access [:2] to get A, B

ARGS = {
    "lr": 0.001,
    "matched_adamw_rms": 0.1,
    "param_shape": (8, 6, 4)  # A=8, B=6, and extra dimension for completeness
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
normalize_range Ran
ran, violated the contract we drafted
brain-lab-research/lion-muon/src/optim/muon.py
code served (permissive licence) · get_code("ccaf2bdc7c8eeafa")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple, ndim 1, dtype family int; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

# Analyze the function:
# - range: Tuple[int, int] - a tuple of two integers
# - start: an integer that will be subtracted from both elements of range
# The function performs element-wise subtraction on the tuple

range_tuple = (10, 20)
start_value = 5

ARGS = {
    "range": range_tuple,
    "start": start_value
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 1, dtype family int — a tuple output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
precompute_freqs_cis Ran
ran, honoured the contract we drafted
brain-lab-research/lion-muon/src/models/llama.py
code served (permissive licence) · get_code("a1d6f89d43fc42e1")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 3, dtype family float, shape (2, 2, 2) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

ARGS = {
    "dim": 4,
    "end": 2,
    "theta": 10000.0,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 3, dtype family float, shape (2, 2, 2) — shape (2, 2, 2) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
zeropower_via_newtonschulz5 Ran
ran; our contract draft was wrong, not the code
brain-lab-research/lion-muon/src/optim/muon.py
code served (permissive licence) · get_code("04049769e4eed44a")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 2, dtype family float, shape (5, 3) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

# G is a 2D tensor that gets normalized and used in matrix operations
# The function uses: G.shape, G.size(), G.norm(), and @ (matrix multiplication)
# Make it rectangular to test both branches (G.size(0) > G.size(1))
G = torch.randn(5, 3)

# steps is an integer for the number of iterations
steps = 3

ARGS = {
    "G": G,
    "steps": steps,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 2, dtype family float, shape (5, 3) — shape (5, 3) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
apply_rotary_emb Not yet run
unverified (harvested, no recorded run)
brain-lab-research/lion-muon/src/models/llama.py
code served (permissive licence) · get_code("9891174b43bd9c9a")
How it ran

no invocation recorded.

get_model Not yet run
unverified (harvested, no recorded run)
brain-lab-research/lion-muon/src/models/utils.py
code served (permissive licence) · get_code("d2ddaef321aaffbf")
How it ran

no invocation recorded.

none_or_str Not yet run
unverified (harvested, no recorded run)
brain-lab-research/lion-muon/src/config/base.py
code served (permissive licence) · get_code("2fc6fdb85f13dc41")
How it ran

no invocation recorded.

Also present in other papers' code

Of 7 samples lifted from this paper's linked repositories, 7 carry a function identity and 0 do not. Of the 7 distinct functions with an identity, 7 are also present in other papers whose code we hold (7 with at least one paper dated earlier, 4 the same month, 0 later) and 0 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

FunctionAlso present inEarliest-datedOthers named
none_or_str 16 other papers
15 dated earlier, 1 the same month
1810.01845 (2018-10)
Task-Oriented Hand Motion Retargeting for Dexterous Manipulation Imitation
1909.10893 (2019-09)
Recurrent Independent Mechanisms
2109.11251 (2021-09)
Trust Region Policy Optimisation in Multi-Agent Reinforcement Learning
and 13 more not named here
precompute_freqs_cis 6 other papers
5 dated earlier, 1 the same month
2405.18392 (2024-05)
Scaling Laws and Compute-Optimal Training Beyond Fixed Training Durations
2502.05003 (2025-02)
QuEST: Stable Training of LLMs with 1-Bit Weights and Activations
2507.09846 (2025-07)
Through the River: Understanding the Benefit of Schedule-Free Methods for Language Model Training
and 3 more not named here
apply_rotary_emb 5 other papers
4 dated earlier, 1 the same month
2405.18392 (2024-05)
Scaling Laws and Compute-Optimal Training Beyond Fixed Training Durations
2507.09846 (2025-07)
Through the River: Understanding the Benefit of Schedule-Free Methods for Language Model Training
2602.02016 (2026-02)
DASH: Faster Shampoo via Batched Block Preconditioning and Efficient Inverse-Root Solvers
and 2 more not named here
get_model 2 other papers
1 dated earlier, 1 the same month
2507.09846 (2025-07)
Through the River: Understanding the Benefit of Schedule-Free Methods for Language Model Training
2605.06615 (2026-05)
When and Why SignSGD Outperforms SGD: A Theoretical Study Based on ℓ 1 -norm Lower Bounds
adjust_lr_wd_for_muon 1 other paper
1 dated earlier
2601.14603 (2026-01)
Variance-Adaptive Muon: Accelerating LLM Pretraining with NSR-Modulated and Variance-Scaled Momentum
normalize_range 1 other paper
1 dated earlier
2601.14603 (2026-01)
Variance-Adaptive Muon: Accelerating LLM Pretraining with NSR-Modulated and Variance-Scaled Momentum
zeropower_via_newtonschulz5 1 other paper
1 dated earlier
2601.14603 (2026-01)
Variance-Adaptive Muon: Accelerating LLM Pretraining with NSR-Modulated and Variance-Scaled Momentum

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-24.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

In large-scale optimization, the cheapness and effectiveness of update steps are the most crucial factors for a successful optimizer. Sign-based optimizers like Lion or Signum produce cheap per-step updates, whereas Muon's spectral matrix-sign update gives a much stronger direction at a substantially higher per-step cost. In this work, we propose LionMuon which retains the effectiveness of Muon steps while considerably cutting the averaged iteration cost, similar to sign-based methods. It alternates between Lion's and Muon's updates on a fixed period P , sharing a single dual-EMA momentum buffer between them. The optimizer state memory therefore matches Lion and is exactly half of AdamW's. A simpler single-EMA variant, SignMuon, by itself already outperforms pure Muon. At P =2, our LionMuon Pareto-dominates Muon, Lion, Signum, and AdamW on every dataset and architecture we tested at 124M model size, reaching lower validation loss at lower compute, and the same advantage persists at 355M and 720M scale. On the theory side, we prove sharp complexity bounds under heavy-tailed noise which are governed by period-averaged smoothness and noise that interpolate between Muon's and Lion's constants. These bounds predict the compute-optimal period and the conditions under which our LionMuon outruns Muon and Lion. Code: https://github.com/brain-lab-research/lion-muon.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2605.19811")
get_code_for_paper("2605.19811")
have("2605.19811")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2605.19811.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2605.19811.svg)](https://syntology.ai/paper/2605.19811)

Connect an agent — have() is free.