The Muon Optimizer in Next-Generation LLM Training: From Gradient Descent to Momentum Methods
An accessible deep dive into why the optimizer matters in large language model training. This article traces the evolution from plain gradient descent to momentum-based methods and adaptive optimizers, then explains how the Muon optimizer introduces orthogonalization into matrix updates, why it can improve training efficiency, and what practitioners should consider when selecting and tuning optimizers for large-scale training.
Why Optimizers Deserve More Attention
As large model training keeps breaking records, most attention goes to model architecture, data quality, and compute scale. Yet one equally critical component is often overlooked: the optimizer. Recent disclosures about the training details of new-generation large models have sparked widespread discussion around Muon, a novel optimizer. Muon is not a simple engineering tweak—it represents a rethinking of the fundamental question of how gradients should be used.
To appreciate Muon’s value, we need to step back and ask: what problem does an optimizer actually solve?
The Optimizer: Deep Learning’s “Navigation Strategy”
A classic analogy helps: imagine you are blindfolded and dropped into rolling terrain, with the goal of reaching the lowest point of a valley. You have three sources of information:
- Loss function: tells you your current “altitude”—the model’s current error level;
- Gradient: probes the slope and steepness of the ground around you, telling you which direction is “downhill”;
- Optimizer: your walking strategy—the policy that decides which direction to step and how far.
The first two are determined by the data and model architecture, while the optimizer is the part algorithm engineers can directly “design.” A good optimizer generally needs to handle two things well.
2.1 Controlling Step Size (The Learning Rate Problem)
Going downhill, steps that are too large may leap across the valley floor and up the opposite slope—in training, this shows up as a loss that oscillates wildly and fails to converge. Steps that are too small make training painfully slow and waste compute. The ideal is to move faster on flat, open ground and slow down on steep slopes near the valley bottom. This is the origin of the “adaptive learning rate” idea.
2.2 Escaping Local Optima and Narrow Terrain
The landscape is littered with small pits on the hillsides—corresponding to local optima or saddle points on the loss surface. Relying only on local slope directions, it is easy to get stuck in a pit and mistake it for the valley bottom. Moreover, neural network loss surfaces often take a “canyon” shape: extremely steep in some directions and very flat in others, which poses a serious challenge for optimizers.
From Plain Gradient Descent to Momentum Methods
3.1 The Historical Roots of Gradient Descent
The most basic optimization method is stochastic gradient descent (SGD), with roots going back to the 19th-century mathematician Augustin-Louis Cauchy’s work on optimization. Its update rule is remarkably simple:
# Plain gradient descentw = w - lr * grad
Over more than a century of development, standard gradient descent essentially simulates a “massless particle” sliding on a surface—it can instantly reach top speed and brake to a stop at will. While mathematically valid, this defies physical intuition and leads to poor performance on complex terrain.
3.2 Heavy Ball: Adding “Inertia” to Optimization
The person who broke this assumption was the Soviet mathematician Boris Polyak. In 1964, while studying optimization theory, he noticed that in narrow “canyon” terrain, standard gradient descent is extremely inefficient because it bounces back and forth between the canyon walls. He proposed a highly physical idea: what happens if we give this sliding particle “mass” and “inertia”?
This is the famous heavy ball method, the precursor of momentum:
# Momentum methodv = beta * v + gradw = w - lr * v
Momentum brings two direct benefits:
- Crossing canyons: along the canyon walls, the oscillating gradient components cancel each other out due to inertia; along the flat valley floor, gradients accumulate and accelerate, dramatically increasing travel speed.
- Escaping small pits: even when entering a local pit, accumulated inertia can push the parameters “out of it,” partially mitigating the local optima problem.
This idea of “accumulating historical gradient directions” became the foundation of nearly every modern optimizer that followed.
3.3 Adaptive Optimizers: Custom Step Sizes per Parameter
Momentum solved the “direction” problem but not the problem of “inconsistent step sizes across parameters.” In neural networks, gradient scales can differ by orders of magnitude across parameters. To address this, the community developed a family of adaptive methods: maintain a second-moment estimate of the gradient for each parameter (an exponentially weighted average of approximately squared gradients), and use it to scale the update step, so parameters with small gradients get relatively larger steps. Combined with momentum correction and bias correction, this family of adaptive optimizers has become the default for large model training.
# Core idea of adaptive methods (illustrative)m = beta1 * m + (1 - beta1) * grad # First moment: momentumv = beta2 * v + (1 - beta2) * grad ** 2 # Second moment: gradient scalew = w - lr * m / (sqrt(v) + eps) # Per-parameter step scaling
These methods train stably and are insensitive to hyperparameters, making them the default choice for large model training. But they come at a cost: per-parameter normalization flattens gradient scale differences across directions, which on certain loss surface geometries can be less efficient than the more “physical” momentum approach.
Muon: Bringing Orthogonalization into the Optimizer
4.1 The Core Idea
Muon represents a路线 different from traditional adaptive methods. Its starting point can be summarized as: imposing geometric constraints on the update direction itself. Specifically, Muon operates on the two-dimensional weight matrices of neural networks, roughly as follows:
- Accumulate a momentum estimate of the gradients, just like the momentum method;
- Apply orthogonalization to this momentum matrix—using a matrix approximation algorithm (such as Newton–Schulz iteration) to project it onto more “balanced” directions;
- Update the weights with the orthogonalized matrix using a uniform learning rate.
# Conceptual sketch of a Muon-style updateO = orthogonalize(momentum_buffer) # Orthogonal approximation of the momentumW = W - lr * O # Update with uniform step size
4.2 Why Does Orthogonalization Work?
Intuitively: the singular value distribution of an ordinary momentum update matrix can be highly uneven—update components in some directions are far larger than in others, effectively meaning “some parameters take big steps while others stand still.” Orthogonalization brings the effective step size in every direction to the same magnitude, doing something like “normalization” in matrix parameter space while preserving the geometric structure of the directions.
Compared with traditional element-wise adaptive methods, this approach offers several advantages:
- Preserves the overall matrix structure: element-wise normalization breaks the correlations between parameters, while orthogonalization operates at the matrix level, respecting the low-dimensional geometry of the weights;
- Reduces hyperparameter tuning burden: with balanced step sizes across directions, the learning rate has a wider usable range and training is more robust;
- Controllable computational overhead: orthogonalization requires only a few iterations of matrix multiplications, negligible compared with the cost of attention computation itself.
Note that Muon is typically applied only to two-dimensional hidden-layer weight matrices; parameters such as embedding layers and output layers still use traditional optimizers. This hybrid strategy is common in current practice.
4.3 Implications for Training Efficiency
Large model training is billed in GPU hours, so every bit of convergence speedup from the optimizer translates directly into real money. Public practice and research show that, under comparable compute budgets, methods incorporating orthogonalized momentum can achieve better loss curves than traditional adaptive optimizers in some training scenarios. Of course, the effect depends heavily on model architecture, parameter scale, and training configuration—there is no one-size-fits-all conclusion, which is exactly why optimizer research remains so active.
Practical Advice on Optimizer Selection and Tuning
Based on the evolution outlined above, here are some general recommendations:
- Baseline first: for new projects, start with a mature adaptive optimizer to establish a baseline and confirm the data and model are sound before experimenting at the optimizer level.
- Learning rate warmup and decay: regardless of the optimizer, small-step warmup early in training and learning rate scheduling later are crucial for large model training stability.
- Momentum and second-moment hyperparameters: the first-moment decay coefficient is typically around 0.9; in large-scale training, the second-moment decay coefficient is often set close to 1 to smooth long-horizon gradient scale estimates.
- Hybrid strategies: for new methods (such as orthogonalized momentum), experiment on a subset of modules first, mixing with the baseline optimizer, and decide on a full switch only after observing convergence behavior.
- Monitor gradient norms and update norms: periodically logging per-layer gradients and actual update magnitudes is the most direct way to diagnose whether the optimizer is “healthy.”
- Gradient clipping as insurance: when training is unstable, global gradient norm clipping is a low-cost, high-value safety net.
Conclusion
From first-order descent methods in Cauchy’s era, to Polyak injecting inertia into the particle, to adaptive methods tailoring step sizes per parameter, and finally to Muon bringing orthogonalization into matrix updates—the history of optimizer evolution is, at its core, humanity’s ever-deepening understanding of “how to navigate complex terrain efficiently.” It lacks the glamour of flashy model architectures, yet it quietly determines whether every training run reaches the valley floor quickly and stably. For engineers who want to go deep into large model training, understanding the physical and geometric intuition behind these fundamental methods offers far more long-term value than memorizing any specific formula.
