Sam Babichenko

Reading notes / NanoGPT speedrun

Convergence theory for Muon

Kovalev, 2025; Chen et al., 2025

Context. Muon orthogonalizes the momentum of each hidden matrix and, at scale, adds decoupled weight decay, W←(1−ηλ)W−η UV⊤W\leftarrow(1-\eta\lambda)W-\eta\,UV^\top, which Moonshot found essential for long runs. Kovalev (2025) reads Muon as a trust-region method and gives its first rates; Chen et al. (2025) show that with weight decay it solves a spectral-norm-constrained problem. In both, Muon's learning rate is a radius, so the size of the gradient never enters the step. A fixed-radius step moves the full distance η\eta even when its direction is off, so an error in the direction raises the loss by an amount proportional to η\eta, the same order as the progress, and momentum is needed to remove the error floor that a single noisy gradient leaves. Decoupled weight decay plus a bounded update confines the weights to a spectral ball of radius b/λb/\lambda for an update of spectral norm at most bb, the learning rate setting only how fast it is reached.

Muon is the exact trust-region step in the spectral norm. Minimizing the linear model over a spectral ball of radius η\eta gives −ηUV⊤-\eta UV^\top, because ⟨G,UV⊤⟩=∥G∥nuc\langle G,UV^\top\rangle=\|G\|_{\mathrm{nuc}} and ∥UV⊤∥op=1\|UV^\top\|_{\mathrm{op}}=1, so Kovalev's method is mk+1=(1−α)mk+α g(xk;ξk),xk+1=xk−η orth(mk+1).m_{k+1}=(1-\alpha)m_k+\alpha\,g(x_k;\xi_k),\qquad x_{k+1}=x_k-\eta\,\mathrm{orth}(m_{k+1}). A squared-norm penalty gives the same direction with length θ∥G∥nuc\theta\|G\|_{\mathrm{nuc}}; only the trust-region form makes a constant learning rate Muon, and it caps every step at η\eta, which is what controls the drift of the momentum. The analysis assumes EMA momentum and exact orthogonalization, so the speedrun's Nesterov momentum and five Newton-Schulz steps are not covered.

A fixed-radius step lowers the loss by η\eta times the dual norm of the gradient. With exact gradients, the smoothness upper bound and the trust-region identity give f(xk+1)≤f(xk)−η∥∇f(xk)∥∗+L2η2,f(x_{k+1})\le f(x_k)-\eta\|\nabla f(x_k)\|_*+\tfrac L2\eta^2, and telescoping gives min⁡k∥∇f(xk)∥∗≤Δ0/(ηK)+Lη/2\min_k\|\nabla f(x_k)\|_*\le\Delta_0/(\eta K)+L\eta/2, so η≍ε/L\eta\asymp\varepsilon/L and K≍LΔ0/ε2K\asymp L\Delta_0/\varepsilon^2, the optimal deterministic rate. It is gradient descent's rate in the pair of norms: for Muon, LL is measured in the spectral norm and stationarity in the nuclear norm.

With momentum, the momentum error enters the descent inequality multiplied by η\eta, like the progress. Feeding mk+1m_{k+1} to the oracle and bounding the mismatch by the dual-norm pairing gives f(xk+1)≤f(xk)−η∥∇f(xk+1)∥∗+2η∥∇f(xk+1)−mk+1∥∗+32Lη2.f(x_{k+1})\le f(x_k)-\eta\|\nabla f(x_{k+1})\|_*+2\eta\|\nabla f(x_{k+1})-m_{k+1}\|_*+\tfrac32L\eta^2 . The error carries the same factor η\eta as the progress. In SGD the noise enters only at order η2\eta^2, because the cross term averages to −η∥∇f∥2-\eta\|\nabla f\|^2; here the step is a nonlinear function of its direction, so E g=∇f\mathbb E\,g=\nabla f does not average the error away, and the direction itself must be close to ∇f\nabla f in the dual norm.

The momentum error is initialization plus drift plus averaged noise. Unroll the EMA around the moving target. The initialization error decays like (1−α)k+1(1-\alpha)^{k+1}; each drift term ∇f(xi)−∇f(xi+1)\nabla f(x_i)-\nabla f(x_{i+1}) is at most LηL\eta because the trust region caps every step, and the weights sum to at most 1/α1/\alpha; the noise terms are conditionally centered, so their sum is bounded in the Euclidean norm, where the cross terms vanish, and converted with ρ=min⁡(m,n)\rho=\sqrt{\min(m,n)}, the factor from Frobenius to nuclear norm, with σ2\sigma^2 the Euclidean gradient variance. Hence E∥mk+1−∇f(xk)∥∗≤(1−α)k+1ρσ+α ρσ+Lηα.\mathbb E\|m_{k+1}-\nabla f(x_k)\|_*\le(1-\alpha)^{k+1}\rho\sigma+\sqrt\alpha\,\rho\sigma+\frac{L\eta}{\alpha}.

Momentum lowers the noise floor but adds staleness, and balancing the two gives the optimal rate. Inserting the error bound into the descent inequality, after an index shift that adds 2Lη2L\eta, gives Kovalev's Theorem 2, Emin⁡k≤K∥∇f(xk)∥∗≤Δ0ηK+2ρσαK+2α ρσ+7Lη2+2Lηα.\mathbb E\min_{k\le K}\|\nabla f(x_k)\|_*\le\frac{\Delta_0}{\eta K}+\frac{2\rho\sigma}{\alpha K}+2\sqrt\alpha\,\rho\sigma+\frac{7L\eta}{2}+\frac{2L\eta}{\alpha}. Without momentum (α=1\alpha=1) the bound keeps 2ρσ2\rho\sigma for every η\eta and KK, a floor only a larger batch lowers. Momentum averages about 1/α1/\alpha gradients, which lowers the floor to 2α ρσ2\sqrt\alpha\,\rho\sigma and adds a staleness term 2Lη/α2L\eta/\alpha. Balancing gives K≍LΔ0ρ2σ2/ε4K\asymp L\Delta_0\rho^2\sigma^2/\varepsilon^4, the unimprovable stochastic first-order rate. This matches SGD's rate in order. It shows that Muon is no worse in the worst case; it does not show that Muon is faster, and any advantage would come from LL, ρ\rho and the norm in which stationarity is measured. The same lemma argues, without a theorem, for momentum before orthogonalization: an average of raw gradients averages centered errors, whereas an average of orth(gi)\mathrm{orth}(g_i) averages biased ones.

Weight decay shifts the ball toward the origin, which bounds the iterates and makes the analysis a contraction. Kovalev's weight-decay step is the trust region centered at (1−β)xk(1-\beta)x_k, that is xk+1=(1−β)xk−η orth(mk+1)x_{k+1}=(1-\beta)x_k-\eta\,\mathrm{orth}(m_{k+1}). If η≥βmax⁡{∥x0∥,∥x∗∥}\eta\ge\beta\max\{\|x_0\|,\|x^*\|\}, the iterates stay in ∥x∥≤η/β\|x\|\le\eta/\beta by induction, and the point βx∗+(1−β)xk\beta x^*+(1-\beta)x_k is feasible; comparing the step with it, using smoothness and star-convexity of ff, gives f(xk+1)−f∗≤(1−β)(f(xk)−f∗)+4Lη2+2η∥mk+1−∇f(xk)∥∗.f(x_{k+1})-f^*\le(1-\beta)\big(f(x_k)-f^*\big)+4L\eta^2+2\eta\|m_{k+1}-\nabla f(x_k)\|_* . Unrolling, with the momentum error bounded as before but with drift 2Lη/α2L\eta/\alpha, since steps now reach 2η2\eta, gives the contraction (1−β)K(1-\beta)^K. With η=βD\eta=\beta D, D=∥x∗∥D=\|x^*\|, the noise floor becomes 2α Dρσ2\sqrt\alpha\,D\rho\sigma, set by α\alpha alone, and every other floor is linear in β\beta, which gives ε−3\varepsilon^{-3} in function value. In code, p←(1−lr⋅wd) p−lr⋅s⋅orth(m)p\leftarrow(1-\mathrm{lr}\cdot\mathrm{wd})\,p-\mathrm{lr}\cdot s\cdot\mathrm{orth}(m) with shape factor ss has β=lr⋅wd\beta=\mathrm{lr}\cdot\mathrm{wd} and η=lr⋅s\eta=\mathrm{lr}\cdot s, so the invariant ball ∥p∥op≤s/wd\|p\|_{\mathrm{op}}\le s/\mathrm{wd} does not depend on the learning rate.

Extrapolation cancels the first-order lag of momentum. The drift Lη/αL\eta/\alpha is the gap between an average of past gradients and the current one. Sampling the gradient at xˉk+1=xk+1α(xk+1−xk)\bar x_{k+1}=x_k+\frac1\alpha(x_{k+1}-x_k), chosen so that αxˉk+1+(1−α)xk=xk+1\alpha\bar x_{k+1}+(1-\alpha)x_k=x_{k+1}, makes each drift term a convex combination of gradients minus the gradient at the combination's own point, so the first-order Taylor term cancels, and a Hessian-Lipschitz condition with constant HH bounds the remainder by H2(α∥xˉi+1−xi+1∥2+(1−α)∥xi−xi+1∥2)≤Hη22α.\frac H2\Big(\alpha\|\bar x_{i+1}-x_{i+1}\|^2+(1-\alpha)\|x_i-x_{i+1}\|^2\Big)\le\frac{H\eta^2}{2\alpha}. Re-balancing gives ε−3.5\varepsilon^{-3.5}, from a new Muon variant whose practical value is open.

Muon is Lion-K with the nuclear norm, so with weight decay it is a constrained method. Chen et al.'s template keeps a momentum with weight β2\beta_2, takes the update at a look-ahead with weight β1\beta_1, and applies ∇K\nabla K for a convex KK; with decoupled decay it minimizes F+1λK∗(λX)F+\frac1\lambda K^*(\lambda X). Muon's msgn(X)=U sgn(Σ)V⊤\mathrm{msgn}(X)=U\,\mathrm{sgn}(\Sigma)V^\top is a subgradient of the nuclear norm (the element of Watson's subdifferential with no extra term), and the conjugate of a norm is the indicator of the dual unit ball, here the spectral unit ball, so Muon with weight decay solves min⁡XF(X)s.t.∥X∥op≤1λ.\min_X F(X)\quad\text{s.t.}\quad\|X\|_{\mathrm{op}}\le\frac1\lambda . At a fixed point M=M~=−∇F(X)M=\tilde M=-\nabla F(X), so λX=msgn(−∇F(X))\lambda X=\mathrm{msgn}(-\nabla F(X)); since ∂K∗\partial K^* inverts ∂K\partial K, this is stationarity of the regularized objective, and every singular value on the gradient's range sits at 1/λ1/\lambda, on the boundary. Practical Newton-Schulz is the same direction up to bounded distortion of the singular values (for a 256×1024256\times1024 Gaussian GG, ⟨G,N(G)⟩≈0.95 ∥G∥nuc\langle G,\mathcal N(G)\rangle\approx0.95\,\|G\|_{\mathrm{nuc}}, our computation), and the constraint applies to it unchanged.

Any bounded update with decoupled weight decay reaches a ball of radius b/λb/\lambda and stays there. The constraint does not depend on momentum or on the choice of KK. For Xt+1=Xt+ηt(Ot−λXt)X_{t+1}=X_t+\eta_t(O_t-\lambda X_t) with ∥Ot∥≤b\|O_t\|\le b in any norm and ηtλ≤1\eta_t\lambda\le1, the triangle inequality gives ∥Xt+1∥−bλ≤(1−ηtλ)(∥Xt∥−bλ),\|X_{t+1}\|-\frac b\lambda\le(1-\eta_t\lambda)\Big(\|X_t\|-\frac b\lambda\Big), so the excess over b/λb/\lambda shrinks by e−λ∑sηse^{-\lambda\sum_s\eta_s}, and weights inside the ball stay inside. For Muon the norm is spectral and bb is the update's spectral norm as applied: the shape factor times the polynomial's overshoot (at most about 1.20 for Jordan's five steps and 1.12 for Polar Express, our computation). With exact orthogonalization b=sb=s, and this is Kovalev's ball s/wds/\mathrm{wd} again.

What this means for choosing λ\lambda. Choosing λ\lambda chooses a ball, of radius b/λb/\lambda in units of the update's spectral norm. With decay coupled to the learning rate as 1−ηλ1-\eta\lambda, the learning rate does not enter the radius; it sets only the speed λ∑sηs\lambda\sum_s\eta_s at which the weights get there, which an LR cooldown slows. With SGD this decay is a ridge penalty; here it is a hard constraint, and the speedrun's cautious weight decay, which decays only where the update agrees in sign and keeps the original objective, is a different object. The experiments (ResNets, a ViT, small LLaMA and Qwen models) show top singular values staying below 1/λ1/\lambda, which any bounded update with decay guarantees; whether the iterates reach KKT points, whether the constraint helps generalization, and whether it binds at the weight decay values used at scale are not tested.

The KKT score is λ\lambda times the Frank-Wolfe gap. Chen et al. measure convergence by S(X)=∥∇F∥nuc+⟨λX,∇F⟩S(X)=\|\nabla F\|_{\mathrm{nuc}}+\langle\lambda X,\nabla F\rangle. For feasible XX, max⁡∥Z∥op≤1/λ⟨∇F(X),X−Z⟩=⟨∇F,X⟩+1λ∥∇F∥nuc=S(X)λ\max_{\|Z\|_{\mathrm{op}}\le1/\lambda}\langle\nabla F(X),X-Z\rangle=\langle\nabla F,X\rangle+\tfrac1\lambda\|\nabla F\|_{\mathrm{nuc}}=\frac{S(X)}\lambda (our reading), so S≥0S\ge0 by norm duality and S=0S=0 means no feasible direction decreases the linear model. Their Proposition 2 makes this exact: S(X)=0S(X)=0 puts λX\lambda X in the subdifferential of the nuclear norm at −∇F-\nabla F, so the singular values of XX on the gradient's range sit at 1/λ1/\lambda with the singular vectors of −∇F-\nabla F, and feasibility with S=0S=0 is the KKT condition.

Inside the ball a Hamiltonian-type Lyapunov function decreases, which needs β1<β2\beta_1\lt\beta_2. With momentum written as M≈−∇FM\approx-\nabla F, the Lyapunov function is Ht=F(Xt)−F⋆+ctλ(∥Mt∥nuc−⟨λXt,Mt⟩),H_t=F(X_t)-F^\star+\frac{c_t}{\lambda}\Big(\|M_t\|_{\mathrm{nuc}}-\langle\lambda X_t,M_t\rangle\Big), whose second term is a kinetic energy, nonnegative by duality and zero when the weights are aligned with the momentum's polar factor at the boundary. Expanding Ht+1−HtH_{t+1}-H_t with smoothness and convexity and choosing the weights so the cross terms cancel leaves a decrease by inner products that are nonnegative because subgradients of convex functions are monotone, plus O(η2CK2L)O(\eta^2C_K^2L) with CK=min⁡(n,m)C_K=\sqrt{\min(n,m)}. The weights divide by β2−β1\beta_2-\beta_1, so plain EMA momentum (β1=β2\beta_1=\beta_2) is excluded. The speedrun's Nesterov form, m←βm+(1−β)gm\leftarrow\beta m+(1-\beta)g with direction βm+(1−β)g=β2mold+(1−β2)g\beta m+(1-\beta)g=\beta^2m_{\mathrm{old}}+(1-\beta^2)g, has β2=β\beta_2=\beta and β1=β2<β2\beta_1=\beta^2\lt\beta_2 (our mapping), so it is covered.

From the Lyapunov decrease to the KKT score, with a noise floor that momentum does not reduce. Write S(Xt)=⟨msgn(∇F)+λXt,∇F⟩S(X_t)=\langle\mathrm{msgn}(\nabla F)+\lambda X_t,\nabla F\rangle, split ∇F\nabla F into −M~t-\tilde M_t plus the tracking error, and drop one term by norm duality: S(Xt)≤Γt−1+2CK∥∇F(Xt)+M~t∥F,S(X_t)\le\Gamma_{t-1}+2C_K\|\nabla F(X_t)+\tilde M_t\|_F, where Γt−1≥0\Gamma_{t-1}\ge0 is a monotonicity term of the Lyapunov decrease and the tracking error is of order η\eta plus a decaying initial term, by unrolling the EMA, since each step moves XX by at most 2ηCK2\eta C_K. With exact msgn\mathrm{msgn} and η≍1/T\eta\asymp1/\sqrt T, min⁡tS(Xt)=O(1/T)\min_tS(X_t)=O(1/\sqrt T). With stochastic gradients (Chen et al.'s Theorem 4) a term O(σ/nbatch)O(\sigma/\sqrt{n_{\mathrm{batch}}}) remains that momentum does not reduce, because the noise is bounded step by step, never averaged; in Kovalev's analysis, which tunes the EMA weight to the target accuracy, momentum does remove it. An almost-sure version comes from a stochastic LaSalle argument with Robbins-Monro steps and growing batches.

Consequences and limits. Muon's learning rate is a radius, momentum is required and belongs before the orthogonalization, and decoupled weight decay is a hard spectral-norm bound of radius s/λs/\lambda, independent of the learning rate. Both analyses assume exact orthogonalization.

Terms

xk+1=arg⁡min⁡∥x−xk∥≤η⟨m,x⟩+R(x)x_{k+1}=\arg\min_{\|x-x_k\|\le\eta}\langle m,x\rangle+R(x)
the trust-region step: the linear model minimized over a ball of fixed radius
orth(G)=(GG⊤)†/2G=UV⊤\mathrm{orth}(G)=(GG^\top)^{\dagger/2}G=UV^\top
minimizer of the linear model on the spectral-norm ball; ⟨G,UV⊤⟩=∥G∥nuc\langle G,UV^\top\rangle=\|G\|_{\mathrm{nuc}}
∥⋅∥∗\|\cdot\|_*
dual norm; nuclear norm for Muon, the norm in which stationarity is measured
ρ\rho
conversion ∥x∥∗≤ρ∥x∥2\|x\|_*\le\rho\|x\|_2; min⁡(m,n)\sqrt{\min(m,n)} for nuclear versus Frobenius; multiplies every noise term
α\alpha
EMA weight; noise term α ρσ\sqrt\alpha\,\rho\sigma, staleness Lη/αL\eta/\alpha
rates
ε−4\varepsilon^{-4} non-convex, ε−3\varepsilon^{-3} star-convex with weight decay (function value), ε−3.5\varepsilon^{-3.5} with extrapolation and Hessian-Lipschitz
∥X∥op≤1/λ\|X\|_{\mathrm{op}}\le1/\lambda
Muon's implicit constraint; radius b/λb/\lambda when the update has spectral norm at most bb
∥Xt∥−b/λ\|X_t\|-b/\lambda
shrinks by 1−ηtλ1-\eta_t\lambda per step for any update bounded by bb
S(X)=∥∇F∥nuc+⟨λX,∇F⟩S(X)=\|\nabla F\|_{\mathrm{nuc}}+\langle\lambda X,\nabla F\rangle
KKT score, λ\lambda times the Frank-Wolfe gap; zero exactly at KKT points of the feasible set
β1<β2\beta_1\lt\beta_2
look-ahead weight strictly below the momentum weight; the speedrun's Nesterov form has β1=β2\beta_1=\beta^2, β2=β\beta_2=\beta

Quiz

  1. Steepest descent with a squared spectral-norm penalty and the trust-region step both move along −UV⊤-UV^\top. What separates them?
  2. Theorem 2 gives Muon the rate ε−4\varepsilon^{-4}. What does that tell you about Muon versus SGD?
  3. At a fixed point of exact Muon with weight decay, where ∇F(X)\nabla F(X) has full rank, what do the singular values of XX look like?
  4. Theorem 4 has a term O(σ/nbatch)O(\sigma/\sqrt{n_{\mathrm{batch}}}) that does not shrink with TT. Why does momentum not remove it here, when it does in Kovalev's analysis?

Sources