From Gradient Descent to Muon: The Evolution and Practical Notes of Optimizers for Large Model Training

    This article traces the evolution of optimizers in deep learning, from classic gradient descent to the momentum method and the adaptive learning rate era dominated by Adam, and then provides an in-depth look at the newly popularized Muon optimizer. It explains the core ideas behind Muon—orthogonalizing the momentum update matrix—and discusses its practical advantages, including better update directions, more controllable learning rates, and lower memory overhead. The article also offers engineering recommendations for applying Muon in large-scale training, such as parameter grouping, learning rate calibration, distributed implementation, and stability monitoring.

    From Gradient Descent to Muon: The Evolution and Practical Notes of Optimizers for Large Model Training

    Introduction: An API Document Sparks a New Optimizer Discussion

    When a major model vendor recently published the technical documentation for its next-generation model, the training details quickly became a hot topic in the developer community. Among the many innovations, the most attention-grabbing component was not the network architecture itself, but a seemingly “behind-the-scenes” element: the large-scale adoption of a novel optimizer called Muon. Optimizers often receive less limelight than model architectures, yet they directly determine whether training converges, how fast it converges, and the upper bound of final model quality. This article takes the opportunity to systematically review the technical evolution of optimizers and dive into the design philosophy and engineering value of Muon.

    1. The Essence of Optimizers: A “Navigation System” for Deep Learning

    The most intuitive way to understand an optimizer is to imagine being blindfolded and placed on a rolling mountain range, with the goal of reaching the deepest valley. You have three items at your disposal:

    • Loss function: acts as an altimeter, telling you your current elevation.
    • Gradient: acts as your feet probing the slope of the surrounding ground, indicating which direction is downhill.
    • Optimizer: acts as the walking strategy in your brain, determining where to step next and how large a step to take.

    A good optimizer strategy typically must address three core challenges.

    1. Step Size Control: Dynamic Adjustment of Learning Rate

    If the steps are too large, you might jump over the valley floor and land on the opposite slope, causing the training error to oscillate or even diverge. If the steps are too small, you will take an impractically long time to reach the bottom, resulting in poor training efficiency. One of the key capabilities of advanced optimizers is adaptive step-size control: move faster on flat terrain and slow down in steep, near-valley regions.

    2. Escaping Local Optima: Avoiding “Shallow Pits on the Mountainside”

    Real loss surfaces contain numerous local minima. If the strategy is simply “always go downhill,” the optimizer can easily fall into a shallow pit and mistake it for the final destination. The optimizer must provide a mechanism that allows parameter updates to cross shallow valleys and continue exploring toward more globally optimal regions.

    3. Handling Ill-Conditioned Curvature: Efficient Movement Through Narrow Canyons

    When the loss surface takes the shape of a narrow, elongated canyon, naive gradient descent will oscillate back and forth between the canyon walls while making painfully slow progress along the canyon floor. This is a classic problem in optimizer design and the direct motivation behind the momentum mechanism.

    2. A Century of Optimizer Evolution: From Cauchy to Momentum

    The idea of gradient descent traces back to the method of steepest descent proposed by the French mathematician Augustin-Louis Cauchy in 1847. For more than a hundred years afterward, standard gradient descent essentially simulated a “massless particle”—it could start and stop instantly, which went against physical intuition.

    That paradigm was broken by the Soviet mathematician Boris Polyak. In 1964, while studying optimization theory, he observed that gradient descent was extremely inefficient in narrow canyon terrains. He proposed a physically intuitive idea: what if the particle were given “mass” and “inertia”? This led to the famous Heavy Ball Method—the update direction depends not only on the current gradient but also retains a portion of the previous movement direction. This became the theoretical origin of the momentum mechanism widely used in deep learning today.

    Momentum provides two key benefits. First, in canyon-shaped terrains, the oscillating components perpendicular to the canyon direction cancel each other out, while the component along the canyon direction accumulates, significantly speeding up convergence. Second, inertia allows parameters to “roll over” shallow local minima, alleviating the problem of getting stuck.

    3. The Adaptive Era: From AdaGrad to Adam

    Momentum solved the “direction” problem, but all parameters still shared a single global learning rate. For sparse feature scenarios, frequently updated parameters and rarely updated parameters clearly need different step sizes. Adaptive learning rate methods emerged in response:

    • AdaGrad: accumulates the squared historical gradients for each parameter; the more frequently a parameter is updated, the smaller its step size becomes. It suits sparse data, but the learning rate continuously decays toward zero.
    • RMSProp: replaces the full accumulation with an exponentially weighted moving average, mitigating the problem of overly fast learning-rate decay.
    • Adam: combines momentum (first moment estimate) with adaptive learning rates (second moment estimate) and introduces bias correction. It became the de facto default optimizer for deep learning over the past decade.

    An intuitive way to understand Adam is: the momentum term determines “which direction to go,” and the second moment term determines “how fast each parameter moves individually.” Combined with learning rate warmup and cosine annealing schedules, Adam delivers robust performance across a wide range of tasks.

    However, as model sizes grew to hundreds of billions or even trillions of parameters, Adam’s shortcomings became apparent. It requires storing two extra state variables per parameter—the first moment and the second moment—so the optimizer state occupies roughly twice the memory of the model parameters, placing enormous pressure on GPU memory. Moreover, its per-parameter normalization ignores the overall geometric structure of parameter matrices. This opened the door for a new generation of optimizers.

    4. Muon: A New Optimization Direction Based on Matrix Orthogonalization

    The core idea of Muon can be summarized as: apply orthogonalization to the momentum update matrix, then apply the result to the parameters. Unlike Adam, which adjusts parameters element-by-element, Muon treats each layer’s parameters as a single matrix and uses the matrix’s geometric structure to shape the update direction.

    The process works roughly as follows:

    1. Accumulate a moving average of the gradients, just like momentum, to obtain an update matrix $M$.
    2. Apply approximate orthogonalization to $M$. In practice, the Newton-Schulz iteration is often used, which requires only a few matrix multiplications to approximate an orthogonal factor and is efficient on accelerators.
    3. Scale the orthogonalized matrix by the learning rate to achieve the desired update norm, then apply it to the parameters.

    The significance of orthogonalization is that it “flattens” the singular values of the update matrix, making the update magnitude roughly uniform across all directions. This yields several practical benefits:

    • Higher-quality update directions: it eliminates the problem of a few directions dominating the update due to ill-conditioned curvature, often leading to faster early convergence.
    • More controllable learning rate: the update norm is explicitly constrained, so hyperparameters transfer better. A learning rate tuned on a small model can more easily be extrapolated to a large model.
    • Lower state overhead: only the momentum state needs to be maintained, so memory consumption is lower than Adam.
    • Good compatibility with large-scale distributed training: the Newton-Schulz iteration consists of dense matrix multiplications, which are easy to parallelize and relatively friendly to low-precision computation.

    It is worth noting that in engineering practice, Muon is typically applied only to 2D matrix parameters (such as weights in attention and fully connected layers). One-dimensional tensors, such as biases and normalization layer parameters, are still handled by Adam-style optimizers, resulting in a “hybrid optimization” configuration.

    5. Practical Engineering Recommendations

    For teams currently building or fine-tuning large models, the following experience may be useful:

    1. Parameter grouping strategy: use Muon-style updates for matrix parameters and Adam-style updates for vector parameters, with independent learning rates and schedulers.
    2. Learning rate calibration: the effective step size of orthogonalized updates depends on the shape of the parameter matrix. It is recommended to apply norm scaling based on matrix dimensions and to determine the base learning rate through a small-scale grid search.
    3. Distributed implementation: orthogonalization iterations involve global matrix operations. When tensor parallelism is used, ensure that the full matrix is available. If necessary, aggregate parameters before the optimizer step.
    4. Stability monitoring: pay attention to the relationship between gradient norm, update norm, and the loss curve. Combine with gradient clipping and warmup to avoid numerical oscillations in early training.
    5. Infrastructure support: in large-scale training, the storage and I/O of optimizer states can become a bottleneck. Consider using generic object storage for checkpoint management, combined with container platforms for elastic scheduling of training resources. Use logging services and monitoring/alerting systems to track convergence metrics, ensuring observability of long-running training tasks.

    Conclusion

    From Cauchy’s steepest descent, to Polyak’s heavy ball with inertia, to the adaptive dominance of Adam, and finally to Muon reshaping update directions from a matrix-geometry perspective, the history of optimizers is essentially a story of “how to descend a mountain more intelligently.” Understanding the motivations and limitations of these methods is more important than memorizing the formulas—because at the next scale of model size, today’s mainstream solutions will inevitably be surpassed by new insights. For developers, mastering the design philosophy of optimizers is the long-term competitive edge when dealing with the uncertainty of large-model training.