Evolution of Large Model Training Optimizers: From Momentum to Adaptive Methods
This article systematically reviews the evolution of optimizers in large model training, detailing their core responsibilities from learning rate control to escaping local optima. It explores the progression from standard SGD and momentum mechanisms to modern adaptive methods, highlights new design trends for large-scale models, and offers practical selection guidelines for developers.
Evolution of Large Model Training Optimizers: From Momentum to Adaptive Methods
Recently, the technical details of the training process in the newly released API documentation of a large model have sparked widespread discussion. Among the noteworthy technical points, the choice and design of the optimizer are particularly striking—they directly determine whether the model can converge efficiently, escape local optima, and ultimately achieve ideal generalization performance. This article takes this opportunity to systematically review the core responsibilities and evolutionary context of optimizers, helping developers build a comprehensive cognitive framework.
1. What Does an Optimizer Actually Do?
To understand optimizers, let’s return to a classic analogy: imagine you are blindfolded and placed in a vast, rolling mountain range, with the goal of reaching the deepest valley. What tools do you have at your disposal?
- Loss Function: Tells you the altitude of your current position.
- Gradient (Backpropagation): You use your feet to probe the slope of the surrounding terrain and determine which direction is downhill.
- Optimizer: The decision-making strategy in your brain—determining which direction to step next and how large that step should be.
This strategy typically needs to solve three core problems.
First, controlling the step size. In deep learning, this is known as learning rate control. If the steps are too large, you might stride right across the valley and up the opposite slope, causing the loss to oscillate and preventing model convergence. If the steps are too small, the training process becomes exceedingly slow, dramatically increasing computational costs. An excellent optimizer should have the ability to adaptively adjust its step size: accelerating in flat regions and decelerating when steep and approaching extrema.
Second, escaping local optima. The mountains are dotted with small pits halfway up—corresponding to local minima in the loss function. If you blindly descend based solely on the current gradient direction, it is easy to fall into these traps and mistakenly believe you have reached the global optimum. The optimizer needs to introduce some form of “inertia” or “randomness” to help parameters jump out of these traps.
Third, handling scale differences across parameter dimensions. In actual models, the gradient magnitudes of different parameters can differ by several orders of magnitude. If the same learning rate is applied to all parameters, some may update too quickly and oscillate, while others barely move. The optimizer needs some form of normalization or adaptive mechanism.
2. From “Massless Particles” to Momentum Mechanisms
The earliest concept of gradient descent can be traced back to mathematical theories from the mid-19th century. The update rule for standard gradient descent (SGD) is extremely concise:
# Standard SGD updatefor param in model.parameters():param -= learning_rate * param.grad
However, in more than a century of subsequent theoretical research, standard gradient descent was described as a process of a “massless particle sliding on a surface”—it can start at maximum speed at any time and brake to a stop instantly. This clearly violates physical intuition: real objects have mass and inertia, and their state of motion does not change abruptly.
This perception was broken in the 1960s. Researchers analyzed the inefficiency of standard gradient descent in narrow “canyon” terrains: in a canyon, the gradient bounces back and forth between the two walls, resulting in minimal effective progress in the forward direction. This led to a highly intuitive physical idea—what if we add “mass” and “inertia” to this sliding particle?
This is the core concept of the Heavy Ball Method. Its update rule introduces a velocity variable, where the current update direction depends not only on the current gradient but also retains a portion of the previous step’s update direction:
# General expression of the momentum method (Heavy Ball Method concept)velocity = momentum * velocity + learning_rate * gradparam -= velocity
Here, the momentum coefficient controls the degree of inertia retained. This modification brought two direct benefits:
- Acceleration in dimensions with consistent directions. When the gradient direction remains consistent, the velocity term gradually accumulates, increasing the effective step size and leading to faster convergence.
- Suppression of oscillations. In dimensions where the gradient direction repeatedly changes, the alternating positive and negative gradient components cancel each other out during velocity accumulation, thereby reducing the back-and-forth bouncing in canyon terrains.
The introduction of the momentum mechanism is an important milestone in the history of optimizer development. For the first time, it incorporated “historical information” into update decisions, giving the optimization process a form of memory.
3. Evolution of Adaptive Step Sizes
While the momentum method solved the problem of directional stability, the issue of all parameters sharing the same learning rate persisted. Subsequent research continued to advance in the direction of “adaptively adjusting the step size for each parameter.”
A representative approach is scaling the learning rate by accumulating squared gradients: parameters that are updated frequently and have large gradients will have their effective learning rate lowered, while parameters with sparse updates and small gradients will receive a relatively larger step size. Its simplified expression is:
# General schematic of the adaptive step size conceptsquared_accumulator += grad ** 2adaptive_lr = learning_rate / (sqrt(squared_accumulator) + epsilon)param -= adaptive_lr * grad
This approach is particularly effective for sparse gradient scenarios, but in the later stages of training, the monotonically increasing accumulation will lead to excessive decay of the learning rate. Improved schemes introduce the Exponential Moving Average (EMA) to replace full accumulation, allowing the accumulator to “forget” distant historical gradients, thereby performing more stably on non-stationary objectives.
Building on this, further research combined the momentum mechanism with adaptive step sizes, simultaneously utilizing the first moment (mean) and second moment (uncentered variance) of the gradient to dynamically adjust the update magnitude for each parameter. The default hyperparameter configurations of this class of methods generally exhibit good robustness in practice, making them one of the most widely used general optimizers for a long time.
4. Design Trends of New-Generation Optimizers
As model scales continue to increase, optimizer design faces new constraints: memory overhead, communication efficiency in distributed training, and sensitivity to hyperparameters. Recent research trends have focused on the following directions.
First, reducing the memory overhead of optimizer states. Traditional adaptive methods require maintaining two state variables (first and second moments) for each parameter, resulting in a memory overhead twice the size of the parameters. At the scale of hundreds of billions of parameters, this overhead is substantial. Consequently, solutions have emerged to compress optimizer memory through low-rank decomposition, block-wise quantization, or periodic state resets.
Second, improving the calculation of second-order approximations. Some new methods attempt to use more efficient matrix operations to approximate curvature information, obtaining more accurate update directions without excessively increasing computational load. For example, utilizing specific structures of the gradient matrix for orthogonalization, making the update direction more evenly distributed in the parameter space.
Third, communication optimization for large-scale distributed training. In data parallelism scenarios, optimizer states need to be synchronized across devices. Some methods reduce bandwidth pressure by sharding optimizer states across different devices or using low-precision communication.
It is worth noting that optimizer design always faces a trade-off between convergence speed and generalization ability. Adaptive methods often converge faster in the early stages of training, but some research indicates that their final generalization performance may not be as good as carefully tuned momentum SGD. Therefore, in practical applications, choices should be made based on specific tasks, model scales, and training budgets, rather than blindly pursuing the “latest” methods.
5. Practical Selection Guidelines
For developers facing numerous optimizer options, the following guidelines can be referenced:
- Default Scenarios: Adaptive methods (such as adaptive step size schemes combined with momentum) are usually a good starting point. They are insensitive to hyperparameters and suitable for quick validation.
- Large-Scale Training: Pay close attention to the memory overhead and communication cost of optimizer states, and consider using state compression or sharding schemes.
- Pursuing Ultimate Generalization: Under conditions where the training budget is sufficient and fine-grained tuning is possible, SGD with momentum combined with a learning rate scheduling strategy remains a competitive choice.
- Sparse Gradient Scenarios: Prioritize methods with adaptive step size capabilities to avoid manually setting learning rates for different parameter groups.
Regardless of which optimizer is chosen, supporting measures such as learning rate scheduling strategies (like cosine annealing, linear warm-up, etc.) and gradient clipping are equally critical. An optimizer does not exist in isolation; together with model architecture, data distribution, and batch size, it determines the dynamic behavior of training.
Conclusion
From the “massless particle” model of standard gradient descent, to the Heavy Ball Method that introduced inertia, to modern methods utilizing per-parameter adaptive step sizes and moment estimates, the evolution of optimizers is essentially answering one question: how to walk the most efficient and robust descent path in an unknown loss landscape with limited computing power. Understanding the design motivations and trade-offs behind these methods is more valuable than memorizing a specific name—because the landscape of the next training task might be entirely different.
