Optimizer Evolution Behind Large Model API Upgrades: From SGD to Matrix-Based Methods

    This article explains how optimizers work and how they have evolved, using an analogy of navigating a mountain range to cover step size, momentum, and update direction shaping. It traces the progression from plain SGD and the Heavy Ball Method to adaptive methods and newer matrix-based approaches such as Muon, then offers practical guidance on selecting and tuning optimizers. Readers will learn why optimizer advances, rather than API changes, drive model performance, and how to treat optimizers as testable, observable engineering components.

    Introduction: What Lies Beneath the API Surface

    Whenever a large model API’s documentation is updated, the discussion usually centers on parameter formats, invocation methods, and capability boundaries. But the API is only the tip of the iceberg. What truly determines model performance is the invisible machinery of the training stage—and one of its most critical components is the optimizer. A recently discussed class of optimizer ideas introduces “matrix structure information” into parameter updates, and these methods are becoming a research hotspot. This article does not discuss any specific product; it aims to explain optimizers thoroughly.

    1. What Is an Optimizer: The Navigator of Deep Learning

    Imagine you are blindfolded and placed in a rolling mountain range, with the goal of reaching the lowest valley. You have only two tools:

    • Loss: tells you how high your current altitude is;
    • Gradient (computed via backpropagation): lets you probe the slope around you with your feet, telling you which way is downhill.

    The optimizer is the “walking strategy” in your head: it decides which way to step and how large the step should be. It typically answers three questions.

    1. Step Size Control (Learning Rate)

    If the step is too large, you may leap over the valley and land on the opposite slope, showing up as oscillating loss and failure to converge. If the step is too small, training becomes unacceptably slow. A good optimizer adjusts adaptively: speeding up in flat regions and slowing down in steep regions and near the valley bottom.

    2. Escaping Local Minima and Saddle Points

    The mountain range contains many small pits halfway up, corresponding to local minima; in high-dimensional spaces, saddle points are even more common (rising along some directions and falling along others). The strategy needs “inertia” or “perturbation” to avoid getting stuck.

    3. Shaping the Direction of Parameter Updates

    Gradient scales differ enormously across parameter dimensions (such as the embedding layer versus the output layer). The optimizer also needs to recalibrate different dimensions so that the update direction is closer to the true descent direction.

    2. Evolution: From a “Massless Particle” to a “Ball with Inertia”

    The simplest stochastic gradient descent (SGD) idea can be traced back to mathematical work in the mid-19th century. Its physical picture is a massless particle: it can start and stop instantly, which clearly defies intuition.

    What broke this assumption was the Heavy Ball Method, proposed in 1964: it gives the particle mass and inertia, introducing a momentum term based on the “previous velocity” into the update. Intuitively, in a long, narrow canyon terrain, the oscillation of bouncing back and forth between walls is suppressed, and the particle accelerates down along the main axis.

    Illustrative pseudocode:

    1. # v is velocity (momentum), theta is the parameter
    2. v = mu * v - lr * grad(theta)
    3. theta = theta + v

    Here mu is the momentum coefficient and lr is the learning rate. The momentum term gives updates a “memory,” which is the common foundation of nearly all advanced optimizers that followed.

    3. The Adaptive Era: Giving Each Dimension Its Own Step Size

    Plain SGD and the Heavy Ball Method use the same learning rate for all parameters, which is inefficient in networks with large differences in gradient scales. Adaptive methods maintain second-order gradient statistics (such as a moving average of squared gradients) and scale the step size for each dimension separately, achieving “slow in steep areas, fast in flat areas.” These methods have become the default configuration for training large models and intelligent coding tool applications. In engineering, they are usually combined with:

    • Learning rate warmup: taking small steps early on to avoid divergence caused by unstable statistics;
    • Decay scheduling: achieving more stable convergence later;
    • Gradient clipping: limiting the magnitude of a single update to prevent abnormal samples from causing shocks.

    4. Matrix Optimizers: Putting “Shape” to Use

    The core insight of a recently popular class of new optimizers (represented by ideas like Muon) is to treat the parameter gradient of a given layer as a matrix, first applying orthogonalization/spectral normalization to it, and then performing a momentum update. Intuitively, this is equivalent to approximately reshaping the “elliptical contours with extremely uneven scales across directions” into something closer to a sphere, making the descent path straighter and less oscillatory.

    It should be emphasized that these methods usually do not replace all parameters, but are used in combination with adaptive methods (for example, the main matrix parameters use the new method, while embeddings and biases still use traditional adaptive methods). This is a widely public research direction in the industry; specific implementation details and benefits vary by task, and there is no universal “performance multiplier.”

    5. Practical Advice: How to Choose and Tune

    1. Establish a baseline first: use a mature SGD with momentum or an adaptive method as the baseline, and record the convergence curve.
    2. Switch optimizers based on the bottleneck: if the oscillation comes from canyon terrain, prioritize adjusting momentum and the learning rate; if it comes from differences in dimensional scales, consider adaptive or matrix-based methods.
    3. Validate in small steps: validate the stability and throughput overhead of any new optimizer on a small-scale proxy task first (orthogonalization brings additional computation).
    4. Pair with observability: combine logging services and monitoring alerts to track loss, gradient norm, and update norm, so anomalies can be quickly located.
    5. Elastic compute: large-scale training can leverage container platforms and elastic compute scheduling to reduce the cost of optimizer experiments to an acceptable range.

    Conclusion

    Documentation updates are only the result; optimizer evolution is the cause. Understanding these three things—step size, inertia, and direction shaping—gives you the key to reading the next generation of training technology. For developers, treating the optimizer as an engineering component that is testable, observable, and rollback-able is more important than chasing any single “strongest method.”