Optimizer Evolution in Large Model Training: From SGD to Next-Generation Methods
This article traces the evolution of optimizers in deep learning and large model training, from vanilla SGD and momentum methods to adaptive optimizers such as RMSProp and Adam, and newer orthogonalized Muon-style approaches. It explains the core problems optimizers address—learning-rate control, escaping local optima, and handling narrow ravines—then compares the trade-offs and offers practical selection guidance for small experiments, general vision and sequence models, large language model training, and memory-constrained settings.
1. Optimizers: The Navigation System for Deep Learning Training
Training a deep learning model is essentially a search in a high-dimensional parameter space for the point that minimizes the loss function. A classic analogy helps explain the process: imagine you are blindfolded in a rolling mountain range and your goal is to reach the deepest valley.
In this process, you have three tools:
- Loss function: tells you your current elevation, meaning the model’s error level under the current parameters.
- Gradient: computed by backpropagation, like probing the slope of the ground around you and indicating which direction is downhill.
- Optimizer: the navigation strategy in your brain, deciding which direction to move next and how large a step to take.
The gradient only answers the question of direction. The optimizer must answer a more complex strategy question. A mature optimizer usually needs to handle three things.
1.1 Step Size Control: Learning Rate Management
If you take too large a step downhill, you may cross the valley floor and climb the opposite slope. In training, this appears as the loss oscillating back and forth and failing to converge. If the step is too small, it may take a very long time to reach the valley floor, resulting in extremely slow training and wasted compute.
Advanced optimizers adapt the step size: moving faster across flat regions and slowing down in steep areas near the valley floor. This is the core problem addressed by learning rate schedules such as warmup and cosine decay, as well as adaptive learning rate mechanisms.
1.2 Escaping Local Optima
The terrain is full of small pits halfway up the mountain, corresponding to local minima or saddle points on the loss surface. If direction is determined only by the current gradient, it is easy to fall into a small pit and stop, mistakenly believing the true valley floor has been reached. The optimizer needs some ability to move past small pits, for example by using inertia to carry through them or by using random perturbations to escape traps.
1.3 Handling Long, Narrow Ravines
Real loss surfaces often have steep slopes in some dimensions and gentle slopes in others, forming long, narrow ravines. In this terrain, plain gradient descent bounces back and forth between the walls of the ravine while making very slow net progress along the valley floor. How to eliminate this zigzag oscillation has been one of the most important themes in the history of optimizer design.
2. From SGD to Momentum: Giving the Particle Mass
2.1 Limitations of Vanilla Gradient Descent
The earliest optimization method is stochastic gradient descent (SGD), whose basic idea can be traced back to the 19th-century mathematician Cauchy’s work on optimization problems. Its update rule is very simple: move a small step along the negative gradient direction.
$\theta_{t+1} = \theta_t - \eta \nabla L(\theta_t)$
From a physics perspective, standard gradient descent simulates a massless particle sliding on a surface. It can reach maximum speed instantly and brake instantly, which contradicts physical intuition. This makes it extremely inefficient in ravine terrain: every step is determined entirely by the current gradient, with no accumulation of historical information.
2.2 Heavy-Ball Method: Introducing Momentum
In the 1960s, Soviet mathematician Boris Polyak proposed the well-known heavy-ball method while studying optimization theory. His physical intuition was: what if we forcibly give this sliding particle mass and inertia?
The update rule with momentum can be expressed as:
v = beta * v + gradient # velocity accumulates historical gradientstheta = theta - lr * v # update parameters with accumulated velocity
The momentum term is equivalent to an exponentially weighted average of historical gradients:
- On the two walls of a ravine, gradient directions alternate and cancel each other out. After momentum averaging, the transverse component becomes smaller and oscillation is significantly suppressed.
- Along the valley floor, the gradient direction remains consistent, momentum accumulates, and progress speeds up.
This alleviates two problems mentioned earlier at the same time: suppressing oscillation and accelerating through flat regions. It can even use inertia to escape shallow local minima.
2.3 Nesterov Momentum: Look Ahead One Step
Building on momentum, Nesterov accelerated gradient (NAG) makes a clever improvement: first use the current momentum to look ahead one step, compute the gradient at that hypothetical position, and then use it to correct the direction. This is like sliding forward a short distance according to inertia while going downhill, then adjusting the route based on the slope ahead. It has better theoretical convergence rates on convex problems and often brings more stable training in practice.
3. Adaptive Optimizers: A Separate Step Size for Each Parameter
Momentum solves the problem of direction history, but all parameters still share the same learning rate. In practice, gradient scales vary enormously across model parameters. For example, the gradient magnitude of an embedding layer and a deep layer may differ by several orders of magnitude. A single unified learning rate is bound to fail some parameters while suiting others.
3.1 RMSProp and Adagrad
The core idea of this class of methods is to maintain a moving average of the second moment of gradients (squared gradients) for each parameter, and scale the update by the square root of the second moment to achieve per-parameter step size scaling:
v = beta * v + (1 - beta) * g**2 # moving average of squared gradientstheta = theta - lr * g / (sqrt(v) + eps)
Parameters with persistently large gradients are automatically braked, while parameters with small gradients are accelerated. As a result, the optimizer takes small steps in steep dimensions and large steps in flat dimensions, greatly improving convergence in ravine terrain.
3.2 Adam: Combining Momentum and Adaptivity
Adam can be viewed as a combination of momentum, adaptive scaling, and bias correction. It maintains exponential moving averages of both the first moment (momentum) and the second moment (adaptive scaling), and applies bias correction to both early in training. Thanks to its robustness to hyperparameters and strong out-of-the-box performance, Adam and its variants have long held a mainstream position in large model training, so much so that many engineers have formed the habit of using it by default for large model training.
But Adam is not without cost. It needs to store two additional states for each parameter, and the memory overhead of optimizer states can reach twice that of the model parameters themselves. In addition, some research suggests that its adaptive mechanism may generalize worse than carefully tuned SGD with momentum in certain scenarios. These pain points have left room for a new generation of optimizers.
4. Exploring New Optimizers: Orthogonalization and the Geometric Perspective
In recent years, a notable new line of optimizer research has emerged. Its representative is a class of methods based on orthogonalized gradient updates, often referred to collectively as Muon-style optimizers, which have recently attracted widespread discussion in the large model training community.
4.1 Core Idea
Traditional first-order optimizers scale gradients element by element, treating coordinates independently. This new class of methods treats the parameter matrix as a whole and applies an orthogonalization transformation to the gradient matrix, for example by using matrix approximation algorithms to project the update onto a direction that is as isotropic as possible. Intuitively:
- Element-wise methods allow updates in some directions to be much stronger than in others, worsening the imbalance of update magnitudes.
- After orthogonalization, updates are more uniform across singular directions. This is similar to regularizing a zigzag gait into a straighter path, reducing ineffective oscillation and improving convergence efficiency per unit of compute.
4.2 Mixed Use with AdamW
A common practice is to divide the work between two types of optimizers: use orthogonalized updates for two-dimensional matrix parameters such as attention and feed-forward layer weights, and continue using AdamW-style methods for one-dimensional parameters such as biases and normalization layer parameters. This hybrid strategy gains the convergence benefits of the new method while retaining the stability of mature methods on non-matrix parameters.
4.3 Engineering Trade-offs
Engineering factors to consider when adopting new optimizers include:
- Memory overhead: Some new methods use fewer states than Adam, which can help reduce optimizer state memory usage and free up space for larger batches or model sizes.
- Hyperparameter transfer: The scale of updates after orthogonalization differs from traditional methods, so the learning rate usually needs to be recalibrated rather than directly reusing old empirical values.
- Ecosystem maturity: Compared with decades of practical accumulation around Adam, the long-term stability of new methods at large scale is still being continuously validated by the community.
5. How to Choose an Optimizer for Training Tasks
Based on the evolution above, a practical selection reference can be given:
- Small-scale experiments and rapid prototyping: AdamW is a robust default option, with hyperparameter robustness and low debugging cost.
- General vision and sequence models: SGD with momentum, or Nesterov momentum, combined with a good learning rate schedule still has generalization advantages on some tasks.
- Large-scale language model training: Prioritize evaluating a hybrid strategy in which matrix parameters use orthogonalized updates and the remaining parameters use AdamW. Calibrate the learning rate in small proxy experiments before scaling up.
- Memory-constrained settings: Pay attention to optimizer state overhead, choose methods with leaner state requirements, or combine them with state sharding and low-precision optimizer state techniques.
6. Summary
The history of optimizer evolution is a history of continuously injecting physical intuition into mathematical optimization: from the massless particle of vanilla gradient descent, to the inertia given by the heavy-ball method, to adaptive methods that give each parameter its own step size, and now to new-generation exploration centered on geometric orthogonalization. Understanding this main line not only helps us make more reasonable selection decisions in large model training, but also allows us to quickly grasp the design motivation and applicable boundaries of new methods as they emerge. Whatever the choice, remember three things: control the step size, avoid traps, and overcome ravine terrain. This is the shared mission of all optimizers.
