The theme of this series is "streaming power iteration." As the name implies, it consists of two parts: "streaming" and "power iteration." Here, "power iteration" is a classic multi-step iterative scheme for computing matrix SVD, while "streaming" refers to amortizing an algorithm that originally required multi-step iterations across every training step, bringing the computational cost down to an acceptable level. Its core idea is: rather than completing a complex computation all at once, it is better to continuously approach the target throughout the training process.
As an extension of this series, this article will introduce some other applications of the "streaming" idea, further demonstrating how relatively expensive operations can be cleverly integrated into the training process via streaming conversion.
Orthogonal Projection #
In some scenarios, we want to constrain the orthogonality of certain parameter matrices. Orthogonal matrices possess good numerical stability, which can prevent some numerical explosion or vanishing issues, while also providing better theoretical guarantees in certain designs. Of course, as to where it is appropriate to constrain parameters to be orthogonal matrices, we need to analyze specific scenarios individually, and we will not expand on that here.
In the articles Steepest Descent on Manifolds, Part 2: Muon + Orthogonality and Steepest Descent on Manifolds, Part 3: Muon + Stiefel, we did some exploration of the orthogonal (Stiefel) manifold, but back then the idea was to combine it with steepest descent to derive new update rules, which was overall quite complicated. Here, we only consider a simpler approach: re-projecting (retracting) the parameters back onto the orthogonal manifold after each update step.
Without loss of generality, let the parameter be
Here,
that is, finding the orthogonal matrix closest to
Streaming Iteration #
That is to say, after completing each update step, we need to execute
It can be proven that
However, on the parameter side, is it really necessary for us to execute the full iteration at every step? Suppose
From an asymptotic perspective, this also achieves the effect of
Spectral Constraints #
In general, orthogonality constraints can only be imposed on certain special matrices because they are overly restrictive, halving the degrees of freedom of the matrix—or in other words, halving the parameter count. Often, we may prefer looser spectral constraints, such as the singular value clipping mentioned in "Higher-Order MuP: Simpler yet Smarter Spectral Condition Scaling".
If
However,
It requires two evaluations of
Clipping One by One #
From another perspective, let us understand
The advantage of this 'clipping one by one' strategy is that computing only the leading singular value and leading singular vectors (which we might call
to converge to
Over long-term training, this can keep the singular values of
Other Examples #
When is the streaming idea applicable? A typical scenario is: when we can anticipate that over long-term training, a certain variable changes slowly, we can try performing only a few iterations at each training step, expecting that this will suffice to correct for the changes brought by parameter updates. In addition to the two new examples above, we have also used the 'streaming' idea in some previous articles; let us briefly review them here.
In Steepest Descent on Manifolds, Part 3: Muon + Stiefel and Steepest Descent on Manifolds, Part 4: Muon + Spectral Sphere, when solving for steepest descent on the corresponding manifolds, we needed to solve a nonlinear equation. At that time, we proposed a fixed-point iteration method to solve it, and later in Steepest Descent on Manifolds, Part 5: Dual Gradient Descent, we discussed the dual gradient descent solution and proposed using the streaming idea to amortize the solving process across each training step.
Coincidentally, in MoE Journey, Part 6: Optimal Allocation Promotes Balance, we viewed the load balancing problem in MoE from the perspective of optimal allocation. When solving the dual problem of optimal allocation, we originally needed to alternately optimize
In summary, when we realize that a variable changes slowly, we can consider executing only a small number of iteration steps at each step to amortize the computational cost. To achieve this, we sometimes need to add extra cache variables (such as
Summary #
This article mainly introduced two other examples of applying the "streaming" idea: projecting parameters onto the orthogonal (Stiefel) manifold, or clipping parameter spectral norms to not exceed 1, both at minimal extra cost. These examples once again demonstrate the beauty of the streaming idea: many complex calculations that seemingly must be completed in one shot can be broken down into gradual, fine-tuning operations and integrated into every step of training.