skip to content
← Scientific Spaces English

Why Does the Official Muon Have an Extra max(1, ⋅) Compared to the MuP Version?

In the article "A Guide to the Muon Optimizer: Quick Start and Key Details", we listed several versions of Muon, whose difference lies in having different matrix-shape-dependent scaling factors for the learning rate, where the "official version (KellerJordan version)" differs from the "MuP version" only by an extra truncation operation. In this post, we will specifically discuss: where does this truncation operation come from?

Several Versions #

The update rule of Muon can be written in a unified form as

The difference among several distinct versions lies in , which are specifically:

where the matrix represents the trainable parameters of the linear layer , where the input is a row vector.

This post is mainly concerned with the "KellerJordan version" and the "MuP version". The former adds an extra on top of the latter. According to our analysis in articles such as "Higher-Order MuP: A Simpler yet Smarter Spectral Condition Scaling", Beyond MuP, Part 2: Linear Layers and Steepest Descent, under the spectral condition constraints related to MuP, steepest descent should precisely yield the MuP version of Muon. How should the extra be explained?

Feature Increments #

For simplicity, the subscript is omitted in the discussion below. Without loss of generality, we assume that the momentum is of full rank. Then all singular values of are 1, so when , , and when , .

Denoting , what we want to do is to find the relationship between and . From "Why Do We Prefer Isotropy? An Understanding Based on Steepest Descent", we know that parameters are actually just byproducts of the model, and changes at the feature level may be more fundamental. Translating to the feature level gives , so .

Next, we need to discuss case by case. First, when , can be written in the form , where are both orthogonal matrices, so

Note that equalities hold throughout, so we only need to set to ensure that 'every' has an RMS of , meaning that the relative update scale across all tokens is consistent.

Isotropy #

Unfortunately, for the second case where , the above goal of 'complete consistency' cannot be achieved. Specifically, in this case, the SVD of must be written as , and thus

is a -dimensional vector, and , so only truncates to the first dimensions to compute the RMS. At this point, its RMS is indeterminate, reaching up to (worst case), and can be as small as 0.

We know that orthogonal matrices do not change the RMS, so . When the distribution of is sufficiently isotropic, we can take this to mean that the average scale of each component of is , so taking the first components to compute the RMS is, on average, also approximately equal to , that is, , and therefore we only need to set to achieve an effect similar to that of the previous section.

Anisotropy #

Combining the results of the previous two sections, we obtain

This is precisely where the KellerJordan version of Muon gets its .

However, the conclusion of the previous section relies on the assumption that the input is sufficiently isotropic. This may hold approximately in the early stages of training, but as training progresses, the distribution of features gradually becomes anisotropic, concentrating on the 'worst case' that maximizes . At this point, the average approximation is no longer accurate enough, and the maximum value will be more accurate.

In this case, to make , is , consistent with the conclusion when , recovering the MuP version result. That is to say, for the middle and late stages of training, the MuP version of Muon is more scientific. For this inconsistency, we have two strategies: one is to always use the MuP version of Muon, which will slightly reduce the initial convergence speed, but after all, the middle and late stages are the "top priority" of training; the other is to change the scaling factor to

where monotonically decays from 1 to 0, which achieves a gradual transition from the KellerJordan version to the MuP version, at the cost of having one more schedule to tune.

Summary #

In this post, we have mainly explained, from the perspective of "feature increment" uniformity, where the in the KellerJordan version comes from.