ABench Design report · B-OPT-001
ABench:B-OPT-001 [optimizer] example submission

RankGate: An Optimizer that Adjusts Orthogonalization Strength by the Stable Rank of the Momentum

ABench example submission ABench submission (format example, not a real entry)
Abstract

Muon(Jordan et al., 2024; Liu et al., 2025) orthogonalizes the momentum matrix of each 2D parameter and uses the result as the update direction, which is equivalent to flattening all singular values of the momentum to 1. When the momentum matrix is close to low rank, this amplifies singular directions that carry little energy and consist mostly of noise to the same scale as the principal directions. We propose RankGate: it computes both the orthogonalized update and an Adafactor-style factored adaptive update(Shazeer & Stern, 2018), and interpolates continuously between them using the normalized stable rank of the momentum matrix(Rudelson & Vershynin, 2007). The stable rank is estimated cheaply by a single power-iteration step on a persistent vector(von Mises & Pollaczek-Geiringer, 1929). When the effective dimension of the momentum is high the update is close to Muon; when it is low the update falls back to element-wise adaptive scaling.

1Introduction

Adam(Kingma & Ba, 2015) scales the gradient of each coordinate independently by its second moment and does not use the structure of the parameter matrix. Muon instead approximates the polar decomposition of the whole momentum matrix and takes its orthogonal factor as the update, so the step size is the same along every singular direction. This "whitening" helps when the effective dimension of the momentum is high, because it keeps a few principal directions from dominating the update; but the strength of the whitening is the same for every layer and every stage of training.

The spectral structure of the momentum matrix is not constant: in different layers and at different stages the momentum may concentrate in very few directions. Flattening all singular values then raises the step size along noise directions to that of signal directions. The key points of our design are:

  • use a quantity that is insensitive to small singular values, the normalized stable rank, to describe the effective dimension of the momentum;
  • interpolate continuously between the "orthogonalized" and "factored adaptive" updates according to this quantity, instead of choosing one of them;
  • obtain the required spectral information with a power iteration that costs one matrix–vector product, without an SVD.

Changes relative to the anchor. Each item states what this submission does differently and where it is in the code.

  1. The strength of orthogonalisation adapts per layer and step through the normalised stable rank of the momentum, estimated with one power-iteration step instead of an SVD; Muon uses the same full whitening everywhere. — optimizer.py: RankGate.update step 4) r_norm
  2. The update interpolates continuously between the orthogonalised direction and a factored adaptive (row/column second-moment) update instead of choosing one of them. — optimizer.py: RankGate.update step 4) w, u_new
  3. Factored row and column second-moment statistics supply the adaptive branch. — optimizer.py: RankGate.update step 3) vr, vc

2Related Work

Muon

For 2D parameters, Muon maintains Nesterov momentum and approximates msign(M)=UV⊤ with five Newton–Schulz iterations, where M=UΣV⊤ is the singular value decomposition(Jordan et al., 2024). Liu et al. add weight decay and scale the RMS of the update to the order of 0.2max(m,n), matching the update scale of AdamW(Liu et al., 2025).

Adafactor

Adafactor approximates the second-moment matrix by the outer product of row and column means, reducing state from O(mn) to O(m+n) while keeping element-wise adaptivity(Shazeer & Stern, 2018).

Prior conclusions on adaptivity and scale

The layer-wise analysis of Zhao et al. shows that the effect of adaptivity is concentrated in a few layers(Zhao et al., 2024); Wen et al., after tuning the baselines, find that the advantage of matrix optimizers over AdamW shrinks as model size grows(Wen et al., 2025). Together these suggest that orthogonalization is not equally necessary in every layer and at every stage.

Orthogonalising methods apply the same whitening to every layer, and factored adaptive methods ignore the matrix structure; neither adapts to how concentrated the momentum spectrum is, which is the gap this design addresses.

3Method

3.1Overall structure

For each 2D parameter, RankGate computes two update branches from the same Nesterov momentum and combines them with a gate weight; see Figure 1. 1D parameters (normalization gains, biases) and the word embedding keep AdamW.

gradient GNesterov momentum orthogonalized branch Ostable-rank gate afactored adaptive branch A update ΔW
Figure 1: Data flow of RankGate. The dashed box is the gate added in this work; the two branches follow the computations of Muon and Adafactor respectively.

3.2Definitions

Let the parameter be W∈ℝm×n and the gradient at step t be Gt. The momentum and Nesterov extrapolation are

Mt=μMt−1+Gt,M~t=Gt+μMt (1)

The two branches are

Ot=cNS5(M~t),At=crms(M~t⊘V^t) (2)

where NS5 is the quintic Newton–Schulz iteration, V^t is the factored approximation given by the outer product of row and column second moments, rms(·) rescales a matrix to unit RMS, and c=0.2max(m,n). The two branches therefore have the same update scale, and interpolation changes only the directional structure.

The gate is determined by the normalized stable rank:

rt=‖M~t‖F2‖M~t‖22min(m,n),at=σ(κ(lnrt−lnτ)) (3)

The final update is

Wt+1=Wt−ηt(atOt+(1−at)At+λWt) (4)

rt∈[1/min(m,n),1]: it attains the lower bound at rank one and equals 1 when all singular values are equal. The gate acts on a log scale because typical values of rt span several orders of magnitude; τ and κ are tunable hyperparameters.

3.3Algorithm

Algorithm 1 RankGate (one step for a single 2D parameter)
0:Input: gradient G, state M,vr,vc,u, hyperparameters μ,β2,τ,κ,λ
1:M←μM+G;M~←G+μM
2:O←cNS5(M~) // orthogonalized branch
3:update the row and column second moments vr,vc; A←crms(M~⊘V^) // factored adaptive branch
4:w←M~u;σ^2←‖w‖2;u←M~⊤w/‖M~⊤w‖ // one power-iteration step
5:r←‖M~‖F2/(σ^2min(m,n));a←σ(κ(lnr−lnτ))
6:return −η(aO+(1−a)A+λW)

Lines 1–6 correspond in order to the four steps of RankGate.update in optimizer.py; 1D parameters go through RankGate._adamw.

3.4Complexity

For an m×n parameter, the state is the momentum mn, row and column second moments m+n and the power-iteration vector n, about 1× the parameter count in total, less than the 2× of AdamW. Computationally, the orthogonalized branch is the same as Muon, O(mnmin(m,n)); the factored adaptive branch and the power iteration are each O(mn), adding only a constant factor of element-wise work over Muon.

4Design Rationale

Orthogonalization maps every singular value of M~ to 1. If M~ consists of a low-rank signal plus isotropic noise, then in directions outside the signal rank the orthogonalized step comes entirely from noise. The stable rank ‖M‖F2/‖M‖22 measures over how many directions the energy is spread and is insensitive to very small singular values(Rudelson & Vershynin, 2007), which makes it a suitable signal for "is whitening worthwhile".

Proposition 1.

If M~ has rank one, then rt=1/min(m,n), and choosing τ≫1/min(m,n) gives at→0, so the update reduces to the factored adaptive branch; if all singular values are equal, then rt=1, and choosing τ≪1 gives at→1, so the update reduces to Muon.

Proof sketch.

At rank one ‖M‖F=‖M‖2; with all singular values equal ‖M‖F2=min(m,n)‖M‖22. Substituting into Equation (3) gives the result. ∎

Estimating the spectral norm

The gate needs only the largest singular value. RankGate keeps an estimate u of the top right singular vector in its state and performs one power-iteration step per training step(von Mises & Pollaczek-Geiringer, 1929). The momentum changes slowly between adjacent steps, so the persistent u effectively accumulates iterations across steps, and a single iteration per step gives a usable estimate.

Differences from existing methods

Compared with Muon, the whitening strength of RankGate varies continuously with the spectral structure of the momentum instead of being fixed at full whitening. Compared with Adafactor, the adaptive branch acts on the Nesterov momentum rather than the raw gradient, and dominates only at low stable rank. Compared with assigning optimizers statically per layer, the gate is decided step by step and parameter by parameter from the current momentum. The stable rank comes from the analysis of matrix sampling in high-dimensional probability(Rudelson & Vershynin, 2007), and is used here as a control signal for the optimizer.

5Scope and Limitations

The design relies on two assumptions: that low stable rank of the momentum comes mainly from "a few signal directions + noise", and that the two branches can be interpolated linearly at equal RMS. If low stable rank comes from a genuinely low-rank signal and the remaining directions are equally useful, falling back to the adaptive branch may weaken beneficial whitening. In large-batch training the gradient noise is smaller and the stable rank of the momentum is usually higher, so the gate approaches Muon and the difference from Muon shrinks accordingly. τ and κ are currently shared by all layers, while the best values may differ between layers.

References

  • Jordan et al. (2024) Keller Jordan, Yuchen Jin, Vlado Boza, Jiacheng You, Franz Cesista, Laker Newhouse and Jeremy Bernstein. “Muon: An optimizer for hidden layers in neural networks”. Blog post, 2024. kellerjordan.github.io/posts/muon
  • Kingma & Ba (2015) Diederik P. Kingma and Jimmy Ba. “Adam: A Method for Stochastic Optimization”. In ICLR, 2015. arXiv: 1412.6980
  • Liu et al. (2025) Jingyuan Liu, Jianlin Su, Xingcheng Yao et al. “Muon is Scalable for LLM Training”. Technical report, 2025. arXiv: 2502.16982
  • Rudelson & Vershynin (2007) Mark Rudelson and Roman Vershynin. “Sampling from large matrices: an approach through geometric functional analysis”. In Journal of the ACM 54(4), 2007. arXiv: math/0503442
  • Shazeer & Stern (2018) Noam Shazeer and Mitchell Stern. “Adafactor: Adaptive Learning Rates with Sublinear Memory Cost”. In ICML, 2018. arXiv: 1804.04235
  • von Mises & Pollaczek-Geiringer (1929) Richard von Mises and Hilda Pollaczek-Geiringer. “Praktische Verfahren der Gleichungsauflösung”. In ZAMM 9(1), 1929. DOI: 10.1002/zamm.19290090105
  • Wen et al. (2025) Kaiyue Wen, David Hall, Tengyu Ma and Percy Liang. “Fantastic Pretraining Optimizers and Where to Find Them”. 2025. arXiv: 2509.02046
  • Zhao et al. (2024) Rosie Zhao, Depen Morwani, David Brandfonbrener, Nikhil Vyas and Sham Kakade. “Deconstructing What Makes a Good Optimizer for Language Models”. 2024. arXiv: 2407.07972