skip to content
← Scientific Spaces English

Slow Is Fast, Part 1: Does Shampoo Lead to Muon in the End?

As is well known, the Muon optimizer has been popular for quite some time. Although it cannot be said to have completely replaced Adam, it is certainly an unignorable, highly competitive optimizer. At the same time, over the past two years, the Shampoo family of optimizers has refused to lag behind; beyond the original Shampoo, variants such as KL-Shampoo, OKLS, PSGD, and SOAP, among others, all claim to have achieved better results than Muon.

However, this post will pour a bucket of cold water: for all Shampoo-like, Kronecker-product-based preconditioned optimizers, their ideal limit may well be Muon—the preconditioning matrices we construct at such great cost might all be 'wasted effort'.

Average Convergence #

We start from the average convergence result derived in Making Model Training More Scientific, Part 10: Breaking Down and Repairing the Monotonicity Assumption: under the convexity assumption, the update rule satisfies the following inequality:

where

The meanings of the other symbols will not be expanded upon here; readers can refer to the original article directly. Intuitively, this convergence upper bound splits into two terms: the first term represents how fast the descent is, while the second term represents how severely the convergence process fluctuates. In practical training, we need to choose appropriate and to balance the magnitudes of the two terms and make the bound as small as possible.

That is to say, we assume: By minimizing the convergence upper bound, we can obtain a better optimizer. We already have a precedent for this approach: the article Making Model Training More Scientific, Part 9: Classical Adaptive Gradient Algorithms, based on the assumption that and that is constant, replaced with its upper bound , and then minimized the upper bound to obtain , thereby leading to the AdaGrad optimizer.

And this assumption is also the core starting point running throughout the derivations in this post.

Slowest Descent #

Now let's take a different perspective: suppose we have an existing, fixed matrix , and we transform it into , where is an orthogonal matrix. We hope to choose a suitable such that

becomes a better optimizer. How do we judge whether it is good or not? Following the viewpoint of the previous section, we want it to reduce the convergence upper bound. Notice that orthogonal transformations do not change eigenvalues, so , and then assuming that varies slowly with , then

In this way, is approximately invariant under the substitution , so if we only want to optimize , then only the second term remains in the objective function:

Since for each , the corresponding can be different, we can completely minimize pointwise , which can also be written as

where is the update direction of the optimizer. We know that , so another meaning of the above equation is that under a first-order approximation, it minimizes the amount of loss decrease at each step, namely the slowest descent.

The Debate Between Fast and Slow #

Readers who have read Muon Sequel: Why We Chose to Try Muon?, Steepest Descent on Manifolds, Part 1: SGD + Hypersphere, and Beyond MuP, Part 2: Linear Layers and Steepest Descent, among other articles, should know that many optimizers are derived based on the principle of steepest descent (that is, fastest descent). Now that slowest descent comes along, don't the two conflict?

In fact, this precisely represents two completely different perspectives on optimizers. Steepest descent is a first-order approximate, local greedy solution that hopes taking the optimal step at each iteration will yield an overall better solution, representing an optimistic assumption; minimizing the convergence upper bound, on the other hand, represents a global, pessimistic assumption that hopes we can still achieve certain convergence properties even in the worst-case scenario.

The reason the latter happens to take the counterintuitive form of slowest descent is that we have restricted the optimization space to orthogonal transformations here, making the first term of the convergence upper bound approximately negligible and leaving only the second term, whose meaning is precisely slowest descent. This also reminds us that slowest descent cannot be considered for every optimization space; this is merely a special case under the orthogonal space, and the feasibility in other situations requires case-by-case analysis.

Here, the role of slowest descent is to make the optimization trajectory smoother while ensuring descent, thereby allowing the use of a larger learning rate, or advancing faster and more accurately under the same learning rate. In the language of steepest descent, one would need to incorporate the assumption about stability into the constraint on the update amount (for example, Muon chooses the spectral norm).

In addition, for stochastic optimization scenarios, this term is also related to noise—decomposing into "true value + random noise", then will contain a variance term—so slowest descent also means reducing the impact of noise on the optimization process, thereby making optimization more accurate.

Matrix Optimization #

The previous sections discussed the general principles; now we formally derive with matrix optimization. Consider the matrix parameter , whose gradient is , and the flattened vector is . At this point, is an matrix, which is rather cumbersome to think about.

For the matrix setting, we consider preconditioner matrices that can be expressed as Kronecker products, but here we do not intend to introduce the language of Kronecker products; instead, we understand them directly from the perspective of linear operators, that is, directly interpreting as

That is to say, the optimizer's update rule is (written out using Kronecker products, this is ), where are two positive semidefinite preconditioner matrices, and can depend on the current gradient or even historical gradients, so it covers Muon as well as various Shampoo variants (without momentum).

Now, fixing the matrices , we hope to choose appropriate orthogonal matrices and such that the new update becomes a better optimizer (written out using Kronecker products, this is ), and the guiding principle is precisely the "orthogonal slowest descent" discussed in the previous sections, namely

Preliminary Solution #

The full problem is slightly complicated. For simplicity, we might as well first solve the special case of to build some intuition, at which point the problem simplifies to

Notice that , so this is just as in "The Rearrangement Inequality and Its Generalizations", where we derived the von Neumann trace inequality problem, whose minimum value is

denotes the -th largest eigenvalue of the corresponding matrix. Let have the SVD (the full SVD, that is, are both square orthogonal matrices, and the singular values are arranged in descending order), then has the eigenvalue decomposition , and the minimizer satisfies , where is the diagonal matrix formed by arranging 's eigenvalues in ascending order. At this point, the optimal update is

When I first saw this result, I was quite shocked. It tells us that no matter what the original was, after orthogonal slowest descent, at most its eigenvalues can be retained, while its eigenvector matrix completely vanishes. The final update is 's left and right singular matrices sandwiching a diagonal matrix , where this diagonal matrix is formed by multiplying 's eigenvalues and 's singular values in reverse order; this makes all singular values more uniform, consistent with the philosophy of Muon.

This result suggests that no matter how expensive a preconditioning we perform, the best outcome is merely "heading toward Muon." As we will see next, this conclusion still applies to in the general case.

The General Case #

Let , by the invariance of the trace, we have

Let the optimal solution be , and the corresponding be . Fixing respectively to solve for , according to the results of the previous section, we can write down the stationary point conditions

where are the eigenvalue decompositions of respectively ("" indicates that eigenvalues are sorted from largest to smallest), and our task is to analyze the properties of . The first conclusion is completely analogous to that of the previous section: has the form , where is the SVD of , and is some diagonal matrix.The proof is not difficult; calculating directly from the stationary point conditions yields

This indicates that and are both symmetric matrices. Since are both square orthogonal matrices, any can be uniquely written as (i.e., ). Substituting this in yields and . Their symmetry is equivalent, respectively, to the symmetry of and ; written in component form, this is

From this we obtain . Assuming that has pairwise distinct singular values (if not, understand it via the limit of a sequence of matrices), it follows that when , we have , that is, is a diagonal matrix . This result once again shows that even in the general case, the eigenvector matrices of the preconditioners are still eliminated by orthogonal slowest descent, leaving at most their eigenvalues.

Tending Toward Balance #

Unfortunately, we cannot easily write down a closed-form solution for , but we can qualitatively deduce that: has a diagonal that tends toward balance. Specifically, according to , we can write

Comparing this with Eq. , by the uniqueness of the eigenvalue decomposition (note: the uniqueness of the eigenvalue decomposition depends on all eigenvalues being distinct; otherwise, counterexamples could be constructed to complicate the issue, but here we mainly pursue a heuristic derivation without nitpicking the details), we find that and differ by at most a permutation matrix. Thus, we can write

where are two permutation matrices, so

Hence, . Note that every term inside the parentheses is a diagonal matrix. Finding its minimum amounts to finding a pairing between the eigenvalues of that minimizes the sum of their products. This is essentially an extension of the rearrangement inequality to three sequences. From "The Rearrangement Inequality and Its Generalizations", we know that the most ideal outcome occurs when the componentwise products after pairing are equal, which corresponds to (inverting the diagonal elementwise, keeping the shape unchanged).

Of course, since we are only minimizing via pairing, it is hard to achieve equality across all products. We can generally only expect it to be an intermediate state between (the worst case) and (the best case), and their geometric mean is none other than the identity matrix! This points once again to an orthogonalization operation that makes all singular values uniform!

Further Remarks #

To be clear, I have no intention of hyping Muon while bashing Shampoo. On the contrary, I recently spent quite some time benchmarking various Shampoo variants, with the initial intention of finding an optimizer better than Muon. Regrettably, after trying for a long time, I found no Shampoo variant that could outperform Muon. It just so happened that I was recently deriving convergence results for adaptive optimizers, so I combined both trains of thought, which ultimately led to the conclusions of this article.

Frankly speaking, the conclusions of this article rely on the "orthogonal slowest descent" framework, and that framework in turn relies on a series of assumptions, each link of which is open to question. For instance, using a convergence upper bound to guide optimizer design is inherently a pessimistic, worst-case criterion; a smaller upper bound does not guarantee faster performance in practice. As another example, is assumed to vary slowly; this assumption and the first-order approximations used throughout are rather crude, making further precise quantification impossible.

More importantly, although minimizing a convergence upper bound appears more global, it is fundamentally also a greedy solution, and if we are strictly rigorous, the premise itself cannot even hold! This is because it takes a given sequence of and derives the remaining parameters. However, once the learning rate or other parameters are modified, subsequent gradients will change accordingly; having the entire gradient sequence fixed in advance is simply impossible.

Naturally, if we accept these non-rigorous aspects and accept orthogonal slowest descent, we obtain the preceding heuristic conclusion. It tells us that we only need to devote our efforts to adjusting the spectrum (singular values) of the gradient or momentum, without paying a steep price to construct complicated preconditioner matrices. This, at least, is engineering-friendly. Setting aside whether the Shampoo route is effective or not, the engineering cost of its extra state variables and computation is undeniably heavy.

Summary #

Starting from the average convergence upper bound in convex optimization, this article proposed the principle of "orthogonal slowest descent" and applied it to Kronecker-product-based preconditioned optimizers (the Muon and Shampoo families). We found that regardless of the initial preconditioner matrices, orthogonal slowest descent "washes away" their eigenmatrices, leaving at most their eigenvalues to adjust and equalize the singular value spectrum of the gradient (or momentum). All of this is deeply homogeneous with Muon—just as the title suggests.