Skip to main content
Back

IFNSO Cuts AI Training Math Costs 4x by Replacing Iterative Loops

A new formulation replaces the iterative loop inside Muon's orthogonalization step with a single learned polynomial, cutting FLOPs by up to 4x on wide matrices.

Pro

  • IFNSO replaces Muon's iterative Newton-Schulz orthogonalization with a single learned polynomial, cutting matrix multiplications on the long dimension from N to 1.
  • Uses exponential term growth (n_l = 2^(l-1)) so L terms cover exponents up to 2^(L-1) via repeated squaring.
  • Coefficients are learned offline by sampling points in (0,1) and minimizing squared error toward 1.
  • Achieves 0.040 orthogonalization error vs 0.330 for the best baseline (Cesista's NS) on 128x128.
  • Roughly 4x FLOP reduction on 128x1024 matrices; best MNIST loss and accuracy among NS variants tested.
  • Code released at github.com/greekinRoma/Unified_Newton_Schulz_Orthogonalization; paper under review at Pattern Recognition Letters.

The Muon optimizer has quickly become one of the more interesting alternatives to Adam for large language model pretraining, and at its core sits a small but expensive piece of linear algebra: the Newton-Schulz iteration. A new paper called IFNSO (Iteration-Free Newton-Schulz Orthogonalization) proposes to throw out the iteration entirely and replace it with a single learned polynomial, cutting the number of expensive matrix multiplications along the long dimension from N to 1.

Why Muon needs orthogonalization in the first place

Muon (short for Momentum Orthogonalized by Newton-Schulz) works by taking a momentum-smoothed gradient and projecting it to its nearest orthogonal matrix before applying the update. If G = UΣVᵀ is the singular value decomposition, then the optimal update is proportional to UVᵀ. Computing that exactly means running an SVD on every weight matrix at every step, which is prohibitively slow.

Muon instead approximates the orthogonalization using a small number of Newton-Schulz iterations, typically the five-step polynomial f(X) = 1.5X - 0.5XXᵀX applied repeatedly. This approach has demonstrated improved performance compared with Adam in large-scale language model pretraining and is increasingly adopted in large-scale model training, which makes any efficiency win on the NS step directly translate into faster training runs.

Original Newton-Schulz iteration flow diagram

The bottleneck nobody wants to pay for

The classical NS iteration is defined as X_{k+1} = 0.5(3I - X_k X_kᵀ) X_k. Each step needs two matrix multiplications, and the outer product X_k X_kᵀ is the expensive one because it runs along the long dimension of the weight matrix. Keller Jordan's Muon variant fixes the polynomial to degree five with hand-tuned coefficients (3.4445, -4.7750, 2.0315), and follow-ups like Cesista's variant and the Chebyshev-accelerated CANS method tweak those coefficients further, but they all keep the same iterative shell.

That iterative shell is exactly what the authors argue is unnecessary. Since each iteration is a polynomial in X_0, composing N of them is still just a (much higher degree) polynomial in X_0. If you flatten the whole thing into one expression, you can pick your terms directly instead of paying for the fixed structure of nested loops.

Collapsing the loop into one polynomial

IFNSO writes the orthogonalized output as a single sum:

Y = X + Σ w_l (I - XXᵀ)^(2^(l-1)) X

Three design choices make this work in practice:

  • Exponential term growth. Instead of powers 1, 2, 3, ..., L, the exponents jump as n_l = 2^(l-1). This lets a small number of terms cover a much wider dynamic range of the polynomial, and each higher power is computed by squaring the previous one, so you get exponents up to 2^(L-1) with only L matrix products.
  • A constrained basis. The authors reparameterize using x(1 - x²)^n instead of raw odd powers. This forces the curve to pass through 1 as x approaches 1, which is exactly the fixed point orthogonalization is trying to reach, and gives a stable gradient signal when fitting coefficients.
  • Learnable coefficients trained offline. The weights w_l are fit once by sampling 1000 points from (0,1) and minimizing squared error against the target value 1, using Adam for 20,000 epochs. This is a one-time cost; the resulting constants are then baked into the optimizer.

Results that actually matter for wall-clock time

On randomly generated matrices, IFNSO's orthogonalization error drops to 0.040 compared with 0.330 for Cesista's NS, 1.311 for CANS, and 3.846 for Muon's NS at size 128x128. But the more interesting number is FLOPs on wider matrices:

Method128×128128×1024
Original NS6.75e75.39e8
Muon's NS6.33e75.07e8
Cesista's NS6.33e75.07e8
CANS6.33e75.07e8
IFNSO6.31e71.22e8

Because IFNSO only touches the long dimension once (in the final Y'A step) instead of once per iteration, its cost grows much more slowly as the matrix widens. On a 128x1024 matrix that is roughly a 4x reduction in floating-point operations.

On a small MNIST training run with the Muon optimizer, IFNSO also produced the lowest final loss (4.25 x 10⁻²) and highest accuracy (98.87%) among the compared NS variants, edging out Jordan's original Muon polynomial.

What it isn't good at yet

The authors are honest about the tradeoffs. The polynomial converges to 1 more slowly than some baselines and shows small oscillations near the fixed point. More importantly, the final step still multiplies by A along the long dimension, so when w vastly exceeds h the cost is still dominated by that one product. The scale of the MNIST experiment is also modest, so the LLM-scale story is still to be written.

Where it fits

This is a drop-in replacement for the NS step inside Muon-family optimizers, particularly attractive for training runs where weight matrices are highly rectangular, which describes most transformer projections. The learned coefficients only need to be computed once and then shipped as constants, so integration cost is essentially zero. The reference implementation is on GitHub, and the paper is currently under consideration at Pattern Recognition Letters.

If Muon continues its trajectory into mainstream pretraining stacks alongside Jordan et al.'s original formulation, the pressure on the NS step will only grow. Flattening the iteration into a single learned polynomial is a small conceptual change with a surprisingly clean FLOP payoff on the shapes that matter.