skip to content
← Scientific Spaces English

Beyond MuP, Part 4: Maintaining Parameter Stability

Through the derivations and calculations in the previous articles, we can see that the three stability metrics proposed in the first article, Beyond MuP, Part 1: Three Characteristics of a Good Model, can generally be divided into two parts: "parameter stability" and "increment stability". Meanwhile, in Beyond MuP, Part 2: Linear Layers and Steepest Descent and Beyond MuP, Part 3: Special Treatment for Special Cases, we demonstrated the process of combining increment stability with steepest descent to obtain new update rules (optimizers).

However, for parameter stability, we previously only stopped at initialization. The task of this article is precisely to explore how to maintain parameter stability throughout the entire training process, bringing the practical implementation of the theory to completion.

Problem Background #

Taking Beyond MuP, Part 2: Linear Layers and Steepest Descent as an example, the three stability metrics are:

where is the parameter of the linear layer. We want all three of these metrics to be , which means we want the parameters and their increments to satisfy and respectively. In Beyond MuP, Part 3: Special Treatment for Special Cases, we carried out calculations for layers such as Embedding and LM Head, and the conclusions were similar, except that the corresponding norms were different.

We use the increment condition as a stability metric, deriving theoretically optimal update rules based on the steepest descent principle of "seeking speed through stability"—for instance, the linear layer corresponds to the Muon optimizer:

As for parameter stability, previously we only required that the parameter initialization satisfy , but how to ensure that the model maintains the same parameter stability throughout the entire training process remains unknown.

General Framework #

How can we ensure that maintains ? More generally, given a parameter , which may be a vector, a matrix, or even a higher-order tensor, and then given a norm , which is typically a metric induced by forward stability or dependency stability, and finally specifying a scale , the question is: how can we make maintain during training?

Initial Thoughts #

A naive idea is simply to enforce ( can also be replaced by a constant multiple of it, but this does not affect the subsequent discussion); the simplest implementation is to rescale the norm back to via normalization after each optimization step (such as Hyperball and Nemotron-Flash). Another approach is to directly reparameterize the original model using normalization, that is, changing to , which theoretically can achieve a similar effect.

A further step is to adjust the update rule by incorporating the idea of steepest descent, as discussed in the articles Steepest Descent on Manifolds, Part 1: SGD + Hypersphere, Steepest Descent on Manifolds, Part 4: Muon + Spectral Sphere, and the paper 《Controlled LLM Training on Spectral Sphere》. While this approach is methodologically more elegant, it is practically more complex and typically requires solving a nonlinear equation to obtain the exact update.

However, should we really strictly constrain a certain norm of a parameter to a fixed value? Intuitively, the norm of a parameter should be determined by the training process itself; at most, we should set a prior range for it. Although some work shows that, when properly configured, fixing the parameter norm to a preset value does not hurt performance, it still disrupts the original training dynamics and may require much more effort to understand and adapt to.

Therefore, the point this article proposes is that we only need to ensure ; specifically, we aim to ensure that every step satisfies . As for what value it specifically takes, and whether it is guaranteed to reach , that is left for the training algorithm itself to decide, without further intervention.

Post-Clipping #

The next question is naturally: how do we achieve ? More specifically, assuming originally has the update rule

how should we modify it to ensure that always satisfies ? There are certainly many methods; for example, the normalization mentioned in the previous section can also be regarded as one scheme. That being the case, we hope to choose a scheme that has the minimal impact on the optimization process—that is, given a parameter and a norm , we hope to make its norm no greater than with minimal change, formally defined as

Readers familiar with convex optimization should easily recognize that this is essentially a projection operation that projects inside a norm ball of radius at most . The crux here is that while we aim to satisfy the objective that the norm does not exceed , we also want to minimize the impact on the original parameter , which leads to minimizing the difference metric , thereby inducing a specific projection or clipping operation.

As for , how to compute it requires case-by-case analysis depending on the specific norm, which we will elaborate on later. With this operation in hand, one scheme we can consider is to truncate the parameter norm via this operation after each update step—that is, modifying Eq. to

We tentatively call this scheme "Post Clip" (post-clipping). It is simple and intuitive, but it may feel somewhat "non-smooth." This is easy to understand: suppose the radius at initialization is less than , and then as training begins, the parameter radius slowly increases; once it reaches , clipping is "suddenly" triggered. Although this process is continuous, it is not smooth, much like the function.

Pre Decay #

If you mind this lack of smoothness, you can consider mimicking weight decay by spreading the penalty across every update step. Still starting from the update rule , assume satisfies ; then, according to the triangle inequality, we have , which means that in the extreme case, the norm increases by at each step, and over long-term accumulation it will get "out of control".

To prevent this phenomenon, before , we can perform a bit of preprocessing on to shrink its norm, just enough to offset the growth brought by the update. Following the intuition of weight decay, what we can consider is

That is to say, we first find a way to reduce the norm of to times its original value, and then perform the update. In this way,

Carrying this all the way through, we have , which means that as long as the initialization satisfies , the entire update chain automatically satisfies . This conclusion is independent of which specific norm is used; it relies only on the triangle inequality of the norm. Moreover, the operation that reduces the norm with minimal modification is precisely the clipping operator defined in Equation , so using it to reduce the norm is entirely natural.

We call this scheme "Pre Decay". The difference between it and "Post Clip" is that the threshold of the latter is a static , so clipping will not necessarily be triggered; whereas the threshold of the former is a dynamic , and clipping will definitely be triggered. This process is smoother, so we call it decay rather than clipping; it is a general extension of weight decay.

Basic Results #

So far, we have established a general framework for constraining parameter norms, divided into two schemes: "Post Clip" and "Pre Decay". The core operation in them is defined in Equation as the clipping operator , which currently has only a formal definition. In practice, specific calculations are needed for specific norms. Below, we give some basic calculation results.

A Simple Example #

In this section, we first compute a simple example where the chosen norm is , which is equivalent to the L2 norm for vectors and the Frobenius norm for matrices. It is not difficult to obtain

The proof is left to the reader (if you really cannot figure it out, you can ask Kimi). In particular, substituting yields

Then substituting into Equation yields

It is easy to see that this is regular Weight Decay. In other words, Pre Decay under the RMS norm is precisely our commonly used weight decay; it is the Pre Decay scheme that makes the most minimal modification to the original parameters while maintaining the RMS norm (or equivalently, the vector L2 norm or matrix Frobenius norm) constraint.

Singular Value Clipping #

We now move to the "main event" of this post—matrix parameters and Muon. Here we return to the notation , writing Muon's original update rule as

Let , then we have , and to make satisfy , the two schemes are:

The next task is to compute , which, by the equivalence of the RMS and Frobenius norms, is also equal to

The optimal solution to this problem should be familiar to some readers; it is what we referred to in "Higher-Order MuP: A Simpler yet More Ingenious Spectral Condition Scaling" as "singular value clipping (SVC)", while in "Computing Singular Value Clipping mclip via msign (Part 1)" and "Computing Singular Value Clipping mclip via msign (Part 2)", it was called :

where is the SVD of , and truncates the singular values to not exceed ; we will demonstrate the proof in the next section. With this notation, the two schemes can be written respectively as

Derivation #

In this section, we prove conclusion . Let have the SVD , where , , and ; then

The last equality holds because orthogonal matrices do not change the Frobenius norm. Meanwhile, orthogonal matrices do not change the spectral norm either, so setting , the objective can be equivalently simplified to

Note that here, is a diagonal matrix, and let its diagonal elements be , but is temporarily undetermined, and in the proof it must be set as a general matrix. Writing it in component form yields

Looking at it term by term, is merely a quadratic function of , whose minimum is attained at . But we also have the constraint , and since the spectral norm is greater than or equal to the absolute value of any matrix entry, we at least have the constraint , under which the minimum of is attained at .

To make all equalities hold simultaneously, we obtain , which shows that is also a diagonal matrix, which can be concisely written as , which in turn corresponds to ; thus conclusion is proven.

Clipping the Leading Term #

Then, how should be computed efficiently? Performing an SVD at every training step is clearly too expensive. In the articles "Computing Singular Value Clipping mclip via msign (Part 1)" and "Computing Singular Value Clipping mclip via msign (Part 2)", we actually explored this problem systematically; the approach at the time was to implement it with the help of , but this requires 2–3 evaluations of , which comes at a significant cost. For instance, an identity discovered in the second part is

It requires two evaluations of . Since parameter computations are often performed in FP32, performing two evaluations of is still quite expensive, making it not particularly feasible.

Here, we primarily consider the idea of term-by-term clipping discussed in Implementing Muon with Streaming Power Iteration, Part 5: Extensions. Specifically, turns all singular values greater than into , so a necessary operation is to turn the leading singular value into (if it is greater than ). After clipping the leading singular value, if there are still singular values greater than , the largest among them will become the new leading singular value. Therefore, as long as we repeatedly "clip the leading singular value to ", we can implement .

Since the leading singular value and leading singular vector can be computed efficiently via power iteration (denoted as ), leading singular value clipping can be considered efficient. Furthermore, assuming that training is sufficiently smooth, we can perform leading singular value clipping only once at each step, which can also approximately achieve the same effect. Based on this strategy, the two schemes for bounding singular values can be further written as

Among them, the "Pre Decay" version is precisely the spectral weight decay introduced in Reflections from Spectral Norm Gradients to Novel Weight Decay; after more than a year, we have arrived at the same result through another route. As for the "Post Clip" version, @_arohan_ had previously mentioned it on X, referring to it at the time as "Wion". In practice, because only one singular value is clipped at each step, there may be some rather "ambitious" matrices whose spectral norms noticeably deviate from the specified threshold; this is normal and will gradually decrease during the LR decay phase.

Other Details #

If we want more accurate clipping, we can also use power iteration to simultaneously obtain the top- singular values and singular vectors, clipping at most singular values at each step. The price is that the L2 normalization in power iteration must be replaced by QR decomposition, which itself admits some acceleration techniques; for the relevant principles, one can refer to the streaming power iteration series, such as Implementing Muon with Streaming Power Iteration, Part 1: A First Encounter.

In addition to the spectral norm of linear layer matrices, in Beyond MuP, Part 3: Special Treatment for Special Cases, we encountered different norms for other layers: for example, Embedding and LM Head correspond to the maximum row and column RMS, respectively, while the gamma parameter of the RMS Norm layer corresponds to the maximum absolute value, also known as the infinity norm of a vector.

Fortunately, the clipping operator under these norms, , is relatively easy to compute. For example, the norm for an Embedding layer is the maximum of the row RMS values, and the clipping operator simply clips the RMS of each row vector so that it does not exceed ; the same applies to the LM Head, except rows are replaced by columns; as for the gamma parameter, it is even simpler, being straightforward elementwise clipping .

These conclusions are all intuitive, and their proofs are relatively simple, so we will not elaborate on them further and leave them as exercises for the reader.

A Necessary Guarantee #

Some readers might wonder: does it really have to be so complicated? Wouldn't it work to simply use ordinary weight decay as in 《Training Deep Learning Models with Norm-Constrained LMOs》? For example,

can likewise constrain the spectral norm to within ; why not use such a simple form?

The answer is: to avoid excessive intervention. From Definition , we can see that our defined clipping operator is the operation that modifies the original parameters the least while achieving the same effect. For the spectral norm, directly multiplying by can indeed make the spectral norm of no greater than , but since it differs from the minimal-modification , it inevitably involves some degree of "excessive intervention".

There are two consequences of over-intervention: either, to ensure performance, we choose a smaller , in which case is too large, meaning we cannot guarantee that the spectral norm stays within our desired range; or, to ensure control over the spectral norm, we choose a larger , but this noticeably degrades performance. For example, if and we want the spectral norm not to exceed , then according to the formula, , for the Muon in Equation , a weight decay coefficient of 0.2 is enormous (typical values are around 0.01).

Notice that we repeatedly emphasize "guarantee"—this is crucial. Suppose we use weight decay with the coefficient set to 0.01; theoretically, the spectral norm could reach up to 100, but running experiments on small models shows that it might not even reach 5, which is very common. However, being safe on small models does not mean being safe on large models. As we said before, large models are powerful—powerful enough to amplify any subtle bug. If the theoretical upper bound is 100, small models have no chance of reaching it, but large models truly might.

Therefore, having a reasonable theoretical bound on the key norms of the parameters is very necessary, which also reflects the "stability" aspect in the principle of "seeking speed from stability". Meanwhile, the clipping operator defined by Equation is the most "lightweight" operation that guarantees boundedness; in other words, it is likely the operation that incurs the smallest performance loss while ensuring the same bound.

Summary #

Based on the idea of minimal modification, this post proposes a general framework for maintaining parameter stability during training, encompassing two schemes: Post Clip and Pre Decay. Under the spectral norm, they can further evolve into singular value clipping and spectral weight decay. These operations aim to guarantee the boundedness of key parameter norms while minimizing intervention in training dynamics.