The Evolution of LLM Training Optimizers: From SGD to Muon-Style Matrix Orthogonalization

    This article traces how training optimizers evolved from plain stochastic gradient descent to momentum methods and adaptive per-parameter learning rates, then explains the core intuition behind the newer matrix-orthogonalization approach discussed as Muon-style updates. It covers why ultra-long-context training renewed interest in optimizers, the trade-offs of each generation, practical deployment concerns such as parameter grouping, numerical precision, memory budgeting, observability, and distributed consistency, and ends with guidance on choosing an optimizer for different training scales.

    1. Background: Why a Model Release Turned Attention to Optimizers

    When a preview model supporting million-character ultra-long context appeared alongside published interface documentation, the discussion usually centered on context length, inference cost, and API shape. Yet what actually determines whether such capabilities can be trained is the underlying mechanism on the training side, and the optimizer is one of the most overlooked yet most influential components.

    Think of training as descending a mountain blindfolded: the loss function tells you your current altitude, the gradient tells you the slope under your feet, and the optimizer is the strategy in your head that decides the direction and length of each step. That strategy typically has to solve three things at once: whether the step size is reasonable, whether it can escape local depressions, and whether different parameter dimensions are treated fairly.

    It is worth stressing that ultra-long context brings more than memory and communication pressure. It also significantly changes gradient statistics: longer sequences raise the effective correlation between samples, alter the structure of gradient noise, and make parameter updates more prone to directional jitter. This is the technical root of the renewed interest in optimizers.

    2. Three Generations of Optimizer Evolution

    2.1 Plain Gradient Descent: The Massless Particle Assumption

    The basic idea of stochastic gradient descent traces back to nineteenth-century research on finding extrema. Its implicit assumption is a “massless particle” that can reach top speed instantly and stop instantly. In a narrow, canyon-shaped loss landscape, this assumption makes updates repeatedly cross between the two walls, resulting in very low convergence efficiency.

    2.2 Momentum: Adding Inertia to the Update

    In the 1960s, researchers pointed out this inefficiency in canyon-shaped landscapes in optimization theory and proposed giving the particle mass and inertia, known as the heavy-ball method. The engineering meaning is direct: the update is no longer determined by the current gradient alone but by a sliding accumulation of historical gradients, accelerating along consistent directions and canceling out along oscillating ones.

    A schematic form of the update looks like this (illustrative only, not a specific implementation):

    1. # v is the momentum accumulator, g is the current gradient
    2. v = beta * v + g
    3. theta = theta - lr * v

    The key hyperparameter of the momentum term is the decay coefficient: too large makes the response sluggish and unable to track a new data distribution; too small degenerates into plain descent. In practice it is often paired with gradient clipping to prevent extreme batches from polluting the momentum.

    2.3 Adaptive Learning Rates: Allocating Step Size per Dimension

    The later mainstream approach maintains second-order gradient statistics for each parameter dimension and uses them to scale the step size, giving sparse parameters or those with vastly different scales a more reasonable effective learning rate. These methods greatly reduce tuning cost but bring two side effects: the second-order statistics require extra memory, and in late training the effective step size may become too small, hurting generalization. Common engineering mitigations include decoupled weight decay, bias correction for the second-order statistics, and learning-rate warmup.

    3. Matrix Orthogonalization Updates: The Core Intuition of the New Optimizer

    The recently discussed new optimizer upgrades “element-wise scaling” to “geometric constraints on the parameter matrix as a whole.” Intuitively, it aims for a more uniform directional distribution of the update matrix, preventing a few singular directions from dominating, so each update is closer to the “steepest but not overly concentrated” direction.

    A minimal sketch of its form:

    1. # G is a matrix gradient of shape (m, n)
    2. # Step 1: normalize to remove the effect of overall scale
    3. G = G / (G.norm() + 1e-7)
    4. # Step 2: orthogonalize (iterative approximation used here to convey the idea)
    5. for _ in range(k):
    6. G = 1.5 * G - 0.5 * (G @ G.T @ G)
    7. # Step 3: restore scale and update
    8. theta -= lr * G

    Its technical value is mainly threefold. First, the spectrum of the update is more balanced, mitigating directional bias during training. Second, it is less sensitive to the scale of the learning rate, so hyperparameters transfer better. Third, it naturally fits matrix-shaped parameters and can leverage tensor parallelism and efficient matrix multiplication.

    The costs are equally clear: the orthogonalization iterations add computation; different parameter shapes require grouped handling; and when mixed with element-wise adaptive methods, clear dispatch rules must be designed.

    4. Engineering Implementation Notes

    • Parameter grouping: send matrix-shaped parameters through the orthogonalization path, and keep one-dimensional parameters such as biases and normalization scales on the adaptive path to avoid pointless overhead.
    • Precision strategy: the orthogonalization iterations are sensitive to numerical precision, so complete that step in higher precision and use lower precision elsewhere as needed.
    • Memory budget: this route is friendlier on memory than maintaining second-order statistics, but the intermediate tensors of the iterative computation must be counted toward peak usage.
    • Observability: log gradient norms, the ratio of update norm to gradient norm, and loss spikes; when anomalies appear, check warmup length and clipping thresholds first.
    • Distributed consistency: ensure that after parallel splitting, orthogonalization aggregates along the correct dimension, otherwise the spectral constraint is broken.

    5. Selection Guidance and Conclusion

    There is no universally optimal optimizer. Small and medium-scale training can favor mature adaptive methods for stability; very large-scale training with obvious matrix structure can evaluate the orthogonalization route in exchange for better hyperparameter transfer and memory efficiency. Either way, learning-rate warmup, decoupled weight decay, and gradient clipping should be part of the baseline configuration.

    Over a longer timeline, the main thread of optimizer evolution runs from scalar step sizes, to vectorized inertia, to matrix-level geometric constraints. Understanding this thread is more valuable than memorizing any specific name. If an organization wants to reproduce a similar training pipeline in its own business, it can schedule training jobs on a container platform, manage data and checkpoints with object storage, and build a closed observability loop for training with logging and monitoring alerting services. These general capabilities have corresponding offerings in Baidu AI Cloud and mainstream cloud environments.