skip to content
← Scientific Spaces English

Steepest Descent on Manifolds, Part 7: An Analytical Solution for Stiefel

For the orthogonal manifold, our previous conclusion was: in the square matrix case, we can write out the analytical solution for the corresponding steepest descent completely (refer to Steepest Descent on Manifolds, Part 2: Muon + Orthogonality); but for non-square Stiefel manifolds, the steepest descent problem requires solving a system of nonlinear equations, and its analytical solution cannot be written down directly (refer to Steepest Descent on Manifolds, Part 3: Muon + Stiefel).

Recently, however, 《Muon on the Stiefel Manifold Admits an Exact Closed-Form Update》 overturned this assertion, pointing out that an explicit solution can likewise be written out on the Stiefel manifold without having to solve a system of equations. In this post, I will retrace the entire derivation using my own line of reasoning.

Problem Recap #

We will not spend too much time repeating the problem background, but directly state the problem to be solved: let be the current parameter, be the gradient of the objective function at , and under the orthogonality constraint, what we want to find with step size is the steepest descent direction , namely

Following the principle that "a first-order approximation is good enough", we expand the last constraint and omit the term, simplifying it to

where is the spectral norm, and is the identity matrix. Here, changing to yields completely equivalent results (the optimum of a linear objective function can always be attained on the boundary), but here we keep , because is a convex set, leaving more room for maneuver in the argument. Our previous solution was

where is a symmetric matrix satisfying the following matrix equation:

is a case whose solution we already derived in Steepest Descent on Manifolds, Part 2: Muon + Orthogonality, but for standard Stiefel manifolds, solving this equation is not trivial, and even solving it numerically is somewhat troublesome; hence the assertion that "there is no analytical solution in the Stiefel case".

Weakened Version #

The key to breaking the impasse is to use some explicit representation to eliminate the equality constraint . To this end, we first introduce a weakened version of the original problem: let , be an arbitrary skew-symmetric matrix satisfying , then we consider solving

The reason this is said to be a weakened version of the original problem is that the constructed this way clearly satisfies both constraints of the original proposition:

Thus, the new problem is solved over a subset of the feasible region of the original problem, and the maximum value obtained does not exceed that of the original problem. Furthermore, using trace identities and the skew-symmetry of , the objective function can be transformed into

where . Therefore, the new problem is equivalent to

This is already in the form of a standard Muon problem; directly from the Muon result, we obtain

In fact, this is precisely the form of the solution in the square matrix case, and is also Steepest Descent on Manifolds, Part 6: Muon + Double Rotation's left rotation. Here, one point is worth explaining: why do we go through this series of identity transformations before applying Muon's ? This mainly exploits the conclusion that "the of a skew-symmetric matrix is still a skew-symmetric matrix" to ensure that the final result satisfies 's skew-symmetry requirement.

Complete Equivalence #

Next, what we are going to prove is that the weakened problem we solved in the previous section actually has the exact same optimal solution as the original problem!

The proof idea is also very straightforward: the reason the weakened problem is "weak" is that the current parameterization is only a subset of the feasible region of the original problem; it might miss some search regions and thus fail to reach the optimal solution of the original problem. But if we can prove that for any feasible of the original problem, we can always find a qualifying such that , then it means their search spaces are completely identical, and therefore their optimal solutions also coincide.

The subsequent proof proceeds in three steps. (Note: In hindsight, given appropriate prompts, K3 could also independently complete the derivation and proof; see here and here.)

Solving the Equations #

The first thing to do is, given , to solve the equations

Without loss of generality, we consider only , and then we can complete into an orthogonal matrix . Since is skew-symmetric, must also be, so we can write as

where are both skew-symmetric matrices, and . Next, multiplying both sides on the right by yields

Multiplying both sides on the left by , we can directly read off , that is, can both be uniquely solved for, leaving as a degree of freedom. Note that is a skew-symmetric matrix, which gives rise to the compatibility condition

which is precisely one of the conditions of the original problem. Therefore, up to this point, all the results are self-consistent.

Spectral Norm #

Now the remaining question is whether we can find a skew-symmetric matrix such that . The answer is yes, but the proof requires "Parrott's Lemma" (the original paper cites Davis–Kahan–Weinberger, but research shows that Parrott's Lemma came earlier):

Given a block matrix , with fixed, we can always find a matrix such that

Returning to our problem, to make , it suffices to have . For this block matrix, we have

As for , which is the negative transpose of , its spectral norm is unchanged (likewise not exceeding 1). Therefore, according to Parrott's Lemma, we can find a matrix such that .

Skew-Symmetry #

However, we are not done yet. For , we also have a skew-symmetry requirement, which Parrott's lemma does not guarantee.

Fortunately, this fix is not difficult. Suppose the matrix given by Parrott's lemma is , and we directly take . Since the remaining blocks already satisfy the skew-symmetry requirement, we have

The key point here is that skew-symmetrization does not increase the spectral norm: by the triangle inequality, we have

Therefore, is precisely the skew-symmetric matrix we were seeking.

At this point, we have proved the result we originally hoped to prove: for every in the original problem, there exists an skew-symmetric matrix with spectral norm not exceeding 1, , such that , so the search space of the relaxed version is identical to that of the original problem. In other words, Eq. is the exact solution to the original problem!

Efficient Computation #

From a theoretical point of view, the problem is completely solved; in practice, however, there is still an efficiency issue worth discussing. Muon needs to take an matrix and apply , whereas the exact solution on the Stiefel manifold, , requires taking an matrix and applying . If computed directly, when , it is obviously much more expensive than Muon, so it is necessary to explore schemes to reduce computation.

In fact, it is not hard to conceive: first rewrite the core operation into a low-rank form

It can be seen that has rank at most . Assuming , first take and perform a QR decomposition (using for a polar decomposition also works) to obtain , where satisfies , and is an upper triangular matrix, so the part to be computed becomes . Note that the operation is covariant with respect to orthogonal matrices, namely,

So in practice, for the matrix , we only need to perform a single , which brings a noticeable speedup for scenarios. But if and do not differ by more than an order of magnitude, it is still more convenient to compute according to the original formula, since QR decomposition also comes with a cost.

In addition, how to switch to the momentum setting is also worth discussing. We have two schemes to consider: the first is , where we only need to replace with , leaving the rest unchanged; the other is , where is replaced with . This form can preserve more information, at the cost of larger memory consumption, and after a long-term moving average, even if , will generally not be low-rank either, so it cannot be accelerated.

Of course, under mainstream model architectures, scenarios are not very common (only in Per-Head Muon does the matrix of each head barely count), so the practical significance of this acceleration trick is limited, and a brief understanding suffices.

Open Problem #

Here I pose an open problem: if we drop the orthogonality constraint and only consider steepest descent on the tangent manifold, what does the optimal solution look like? That is, consider

This problem can be viewed as an extension of the "Stiefel version of Muon" to general matrices; it does not rely on itself being orthogonal, and thus holds promise for more general scenarios. At present, the only result I can obtain is that Eq. and Eq. still apply; that is, the optimal solution takes the following form:

where is a symmetric matrix satisfying the following matrix equation:

As for , how to solve it is currently unknown (assuming also does not seem to simplify it). In addition, the weakened problem's construction also holds for it, requiring only a slight modification:

However, since the earlier equivalence proof relies heavily on , it appears that this weakened solution really is merely a weakened solution rather than an optimal one. Everyone is welcome to share further progress!

Summary #

In this article, we successfully found an analytical solution for manifold steepest descent with "Muon + Stiefel", bringing this problem to a satisfying conclusion. From now on, whether dealing with square matrices or not, the Muon optimizer under orthogonality constraints can be computed analytically, and finding the solution itself will no longer be a hurdle.