skip to content
← Scientific Spaces English

A New Understanding of Momentum: Approximating Gradient Descent at the Feature Level

An optimizer that uses momentum as a state variable has the following basic form:

The differences between various optimizers are mainly reflected in the update function , such as SGDM, SignSGD, Muon, etc., and new explorations have also basically centered on , because the momentum in the first equation is so simple that people don't think there is much room to modify it.

Yet the protagonist of this post is precisely momentum. We will bring a new perspective to the momentum mechanism: momentum can be seen not only as an average of gradients, but also as the solution to an online regression problem. Starting from this, we can naturally arrive at several recent works.

Basic Concepts #

As with Muon, this post mainly considers matrix parameters in linear layers: suppose we have a linear layer , where is the input, is the weight, and is the output. Denoting the loss function as , then

The simplest optimizer is gradient descent (at the parameter level)

However, following the ideas in "Why Do We Prefer Isotropy? An Understanding Based on Steepest Descent", we believe that parameters are essentially by-products of the model, and changes at the model feature level are what correlate most directly with model performance. Ideally, we would like to achieve gradient descent at the feature level

The problem is that is not a variable that can be modified arbitrarily; all we can directly modify is , so we can only try modifying to indirectly achieve this effect.

Regression Objective #

How can we achieve this indirectly? Let the final update rule be , so that , and we want it to be as close as possible to the effect of Eq. , that is, we want , so we consider minimizing

where is a regularization coefficient. In fact, this is nothing more than a linear regression problem, which can be solved directly as

Notice that is precisely , and is a preconditioner based on the input data. To synthesize the contributions of different batches, we consider taking an EMA of both and , which yields an SGDM variant:

Switching Perspectives #

Now we know that through the adjusted gradient , we can achieve gradient descent at the feature level, so we can regard it as a kind of "more reliable gradient"; similarly, the corresponding can be regarded as a "more reliable momentum".

From this perspective, we can try using to replace the momentum in various momentum optimizers, such as Muon:

This is roughly the Newton-Muon optimizer. The reason I say "roughly" is that the original Newton-Muon actually uses a scheme of preconditioning first and then applying EMA (that is, performing EMA on as momentum), which in principle can save a set of state variables. As for matrix inversion, one can refer to Efficient Computation of Matrix r-th Roots and Inverse r-th Roots.

If the input is isotropic, then we can expect , in which case Newton-Muon reduces to Muon. In other words, Muon can be understood as feature-level gradient descent under the isotropy assumption, which circles back to the conclusion of the article Why Do We Prefer Isotropy? An Understanding Based on Steepest Descent. Furthermore, when , Newton-Muon also reduces to Muon, so we can adjust to tune its degree of approximation to Muon.

Incremental Updates #

A more general and more playful approach is: instead of trying to find an analytical solution, directly optimize objective ! First, we can find that the gradient of Eq. with respect to is:

If we update using gradient descent, we will get

where is the learning rate of this "inner" optimization. Continuing the idea from the previous section, if is a more reliable momentum of sorts, then the above equation is a "more reliable momentum update rule" derived from the idea of gradient descent! This is precisely DeltaMomentum, which introduces the Delta Rule into momentum. Compared with the old momentum, this is akin to the difference between GDN and Vanilla Linear Attention, while corresponds to MesaNet.

Of course, to get DeltaMomentum running, there are also some details to keep in mind, mainly regarding the normalization of and the choice of ; please refer to the original paper. I do not particularly agree with some of the treatments in the original paper either, so I suggest reading them with discretion. Nonetheless, DeltaMomentum offers a fresh direction to explore for the momentum mechanism without requiring expensive operations like matrix inversion, making it well worth pondering.

Related Work #

In fact, recently there have been more and more explorations of constructing preconditioners based on inputs. Besides Newton-Muon and DeltaMomentum, Tian Xie previously published another slightly different result in Steepest Descent in Feature Space; in our notation here, it is roughly

That is, acts in the form of the power both inside and outside , and its derivation principle is precisely steepest descent under a spectral norm constraint at the feature level, which aligns with the central idea of this post.

There may be other similar works, but I really cannot recall any others; readers are welcome to add them in the comments section (note: a reader pointed out DoPr). From the experimental results, some attempts have indeed achieved positive outcomes—for example, Newton-Muon performs better than Muon on Speedrun (see here), so overall, this direction still has some merit.

Further Thoughts #

However, this input-oriented preconditioner design also has some unsatisfactory aspects.

First, at the implementation level: it requires us to record the autocorrelation matrix , and then pass it to the optimizer. This breaks the independence of the optimizer—the optimizer is no longer a 'black box' that can do its job as soon as it receives gradients; instead, it must couple with details at the model definition level. The implementation can hardly be called elegant, not to mention the additional communication and computational overhead it introduces.

Second, at the theoretical level: constructing the preconditioner from actual inputs may restrict the optimizer's exploration to the subspace spanned by the inputs, leading to insufficient exploration of the remaining directions and thus suboptimal performance. A relatively simple mitigation strategy is to increase to reduce the strength of preconditioning—since is equivalent to having no preconditioning, choosing an appropriate always gives a chance to optimize performance, but this also adds an extra hyperparameter that requires careful tuning.

Overall, this direction is still in its infancy—an early outline has emerged, but both engineering and theoretical issues remain far from completely resolved, with no fewer open questions than conclusions.

Summary #

Starting from the idea of having 'parameter gradient descent' approximate 'feature gradient descent', this post reinterprets momentum as the solution to an online regression problem, which in turn leads to several related works. Interestingly, this trajectory aligns remarkably well with the evolution of linear attention from Vanilla to DeltaNet and then to MesaNet; the two appear to have much they can borrow from each other.