Optimizers Explained: The Evolution and Key Technical Ideas Behind LLM Training Methods
This article traces the evolution of optimizers in deep learning, from gradient descent and momentum methods to Adam and AdamW. It also explains the design ideas behind a recently highlighted optimizer that uses matrix orthogonalization, and offers practical guidance on choosing an optimizer for different training tasks.
A recently released technical document from a large model project highlights a new optimizer for the training stage, one based on matrix orthogonalization. This choice prompts developers to revisit a basic question: when training models with hundreds of billions of parameters, what does the optimizer actually do, and what problem does each generation of optimizers solve? This article reviews how optimizers have evolved and explains the design ideas behind the new method.
1. The Optimizer as a Navigator for Deep Learning
A useful analogy is walking down a mountain while blindfolded. You stand somewhere in a range of hills and want to reach the lowest valley. You have two tools. The loss function tells you the altitude of your current position. The gradient, obtained through backpropagation, is like probing the ground with your foot to find which direction slopes downward. The optimizer is the decision strategy that determines which direction to step next and how large that step should be.
An optimizer typically needs to answer three core questions:
- Step size control (learning rate adjustment): Steps that are too large can carry you past the valley floor and up the opposite slope, causing the loss to oscillate or diverge. Steps that are too small make training take far too long, which is nearly unacceptable in the large model era, where compute is cost. An ideal optimizer moves quickly across flat regions and slows down on steep slopes or near a minimum.
- Escaping local optima: Real loss surfaces contain many small pits along the slopes, and plain steepest descent can easily get trapped in them. The optimizer needs a mechanism that helps parameters cross shallow pits, saddle points, and similar traps.
- Adapting to the geometry of the surface: Curvature differs greatly across parameter dimensions. A single learning rate for all dimensions often helps some and hurts others, so the optimizer must adjust differently based on local geometric information.
2. From Massless Particles to Momentum
The earliest approach was stochastic gradient descent (SGD), whose origins go back to the steepest descent method proposed by Augustin-Louis Cauchy in 1847. For more than a century afterward, standard gradient descent effectively modeled a massless particle sliding across a surface. Such a particle can start and stop instantly, which contradicts physical intuition. In a long, narrow valley, the particle bounces between the two walls and makes very slow progress along the valley floor.
In 1964, Soviet mathematician Boris Polyak proposed the Heavy Ball Method. It gives the particle mass and inertia, so the current update direction is a weighted combination of the present gradient and the previous update direction. The physical intuition is that a rolling heavy ball absorbs oscillations from the valley walls, because the momentum in those directions cancels out, while it keeps accelerating along the valley floor. This idea later evolved into momentum SGD and Nesterov accelerated gradient in deep learning. Both remain common baseline choices for many training tasks. The key contribution of momentum methods is that they gave optimizers memory, so the update direction no longer depends only on the gradient at the current point.
3. Adam: A Mature Method for Adaptive Learning Rates
Momentum addresses direction, and adaptive methods address step size. Adam evolved from AdaGrad and RMSProp. It combines a first-order moment estimate (an exponential moving average of gradients) with a second-order moment estimate (an exponential moving average of squared gradients). It then scales the learning rate separately for each parameter dimension. Dimensions with consistently small gradients take larger steps, and dimensions with highly volatile gradients take smaller steps. With bias correction, Adam performs robustly across most deep learning tasks and became the de facto standard for training large models over the past decade. Its variant AdamW improves generalization by decoupling weight decay from the gradient update.
Adam has costs, however. It keeps two additional state tensors per parameter, the first and second moments. At the scale of hundreds of billions of parameters, the memory used by optimizer states often matches the size of the model parameters themselves. This places a heavy burden on the memory budget and communication overhead of distributed training. In addition, element-wise learning rate scaling is flexible, but it ignores the structure within parameter matrices in a sense. This gap is where the new method starts.
4. A New Approach: Matrix Orthogonalized Momentum
The recently highlighted optimizer takes a very different approach from element-wise scaling. It targets the large number of two-dimensional weight matrices in neural networks. It applies an approximate orthogonalization to the update matrix accumulated through momentum. One way to picture this is that, before taking a step, the method reshapes the step toward a form closer to an orthogonal matrix, so that the update has roughly even strength across its singular directions.
This design offers several benefits:
- Higher update quality: Orthogonalization prevents a few dominant singular directions from monopolizing the update. This helps avoid rapid rank collapse in parameter matrices and supports feature diversity, which is especially useful for deep networks.
- Lower sensitivity to the learning rate: Because updates are normalized, the tolerable range for hyperparameters becomes noticeably wider. This reduces the trial-and-error cost of tuning at large scale. A full hyperparameter search for a large model training run can consume millions of compute units.
- Lower state overhead: The method usually keeps only one momentum state, compared with two for Adam. This significantly reduces memory use, which is a practical engineering advantage for very large training jobs that use tensor parallelism and pipeline parallelism.
- Compatibility with hybrid strategies: A common practice is to divide the work. The orthogonalized momentum method handles the matrix parameters in hidden layers, while AdamW handles special parameters such as embedding layers and output heads. This combines the strengths of both approaches.
5. Practical Guidance for Choosing an Optimizer
For developers, the following framework can guide optimizer selection. For small or medium tasks and rapid prototyping, AdamW remains a reliable default. When the goal is the best possible convergence quality and there is budget for hyperparameter tuning, momentum SGD still has advantages on some vision tasks. For large model pretraining and large-scale fine-tuning, hybrid strategies that combine orthogonalized momentum with AdamW are worth trying, with attention to how memory savings can allow larger batch sizes.
Regardless of which optimizer you choose, supporting techniques such as learning rate warmup, cosine annealing, and gradient clipping are essential. An optimizer’s performance depends on the full training recipe it operates within.
From Cauchy’s steepest descent to Polyak’s heavy ball, then to Adam and today’s matrix orthogonalization methods, optimizer design over nearly two centuries has followed one theme: reaching deeper valleys with less computation and more stable trajectories. In the large model era, each improvement to this navigator can mean savings of millions in training costs, which is why developers should keep following its development.
