Optimizer Evolution in Deep Learning: From Gradient Descent to Momentum

    This article traces how optimizers for training large models have developed, from basic gradient descent and Polyak's heavy ball method to adaptive methods and recent orthogonalized-update optimizers. It explains how optimizers control step size and escape local minima and saddle points, and it offers practical guidance on choosing and tuning optimizers.

    1. Why Optimizers Deserve a Closer Look

    In discussions of large model training, attention often goes to model architecture, data scale, and compute clusters. Yet one of the key components that determines whether the same compute can produce a better model is the optimizer. Recently, a new generation of optimizers has drawn wide attention, in part because it challenges the dominance of adaptive moment estimation methods, which have long led deep learning training.

    To understand what these new optimizers solve, start with the basic definition. An optimizer is the navigation strategy of training. It uses the altitude information from the loss function and the slope information from the gradient to decide which direction each parameter moves at each step, and how far it moves.

    2. The Two Core Responsibilities of an Optimizer

    2.1 Controlling Step Size: Adaptive Learning Rates

    Think of training as walking down a mountain while blindfolded. The loss function tells you your current altitude, and the gradient tells you the slope under your feet. The step size is the learning rate.

    • Steps that are too large may carry you across the valley floor and up the opposite slope, causing the loss to oscillate without converging.
    • Steps that are too small make training extremely slow and may stall on flat regions.

    Advanced optimizers do two things. First, they scale the step size globally and adaptively. Second, they adjust the step size separately for each parameter dimension. Gradient magnitudes across different parameters can differ by several orders of magnitude, so a single shared step size is unreasonable. This is the fundamental reason adaptive optimizers have replaced plain stochastic gradient descent.

    2.2 Escaping Dead Ends: Local Minima and Saddle Points

    High-dimensional loss surfaces are full of small local pits (local minima) and a large number of saddle points. Decisions based only on the current slope can easily trap training. Modern optimizers use momentum accumulation, random noise, and related techniques to help training move past these small pits.

    3. A Key Breakthrough: Giving “Massless Particles” Inertia

    3.1 The Physical Limitation of Classic Gradient Descent

    The idea behind standard stochastic gradient descent traces back to the steepest descent method proposed by the 19th-century mathematician Cauchy. Physically, this method models a “massless particle” sliding down a slope. Such a particle can instantly go from rest to top speed and instantly stop. This is impossible in the physical world, and it makes the method very inefficient on certain terrains.

    3.2 Narrow Valleys and the Heavy Ball Method

    Imagine the loss surface as a long, narrow valley. The slope along the valley floor is gentle, while the slope perpendicular to the floor is very steep. Plain gradient descent bounces back and forth between the valley walls, oscillating strongly across the valley while advancing very slowly along it.

    In the 1960s, the Soviet mathematician Polyak, while studying optimization theory, proposed a physically intuitive approach: give the sliding particle mass and inertia. This is the well-known heavy ball method. Its update rule is shown below.

    1. # Core idea of the heavy ball method (pseudocode)
    2. velocity = beta * velocity - lr * gradient
    3. params = params + velocity

    Inertia helps in two ways:

    1. Damping oscillations: Gradients that point in opposite directions across the valley cancel out in the velocity, so oscillation is naturally suppressed.
    2. Speeding up convergence: Gradients along the valley floor that share the same sign keep accumulating, so the velocity grows, like a ball rolling faster along the bottom.

    This idea is the common ancestor of nearly all mainstream optimizers that followed.

    4. From Momentum to Adaptivity: Maturing Modern Optimizers

    After the heavy ball method, optimizer development followed two main lines:

    • Refining momentum: Exponential moving averages track the history of gradients, making update directions smoother and more stable.
    • Adaptive scaling: First- and second-moment estimates of gradients dynamically adjust the effective step size for each parameter dimension, easing the problem of uneven gradient scales.

    The recently popular new-generation optimizers take a different angle. They focus on the direction of updates. Instead of computing moment estimates on raw gradients, they first apply an orthogonalization-like transform to the gradient, which makes updates more balanced across parameter directions. Then they apply momentum accumulation. Empirically, these optimizers show the following advantages:

    1. For matrix-shaped parameters, such as attention weights and feed-forward weights, updates have a better condition number, which makes training more stable.
    2. GPU memory usage is lower than in traditional adaptive methods, because the full second-moment state does not need to be maintained.
    3. They show better sample efficiency and hyperparameter robustness in large language model training.
    1. # Abstract logic of the new-generation optimizer (pseudocode)
    2. momentum = beta * momentum + gradient
    3. ortho_update = orthogonalize(momentum) # Orthogonalize the update direction
    4. params = params - lr * ortho_update

    5. Practical Guidance: Choosing and Tuning Optimizers

    Based on common industry experience, consider the following:

    1. Baseline choice: For small and medium tasks, momentum-based adaptive methods remain a safe choice with low tuning cost.
    2. Large model training: The GPU memory and convergence speed advantages of new-generation optimizers are worth evaluating. However, they need to be coordinated with weight decay and learning rate warmup and decay strategies.
    3. Hyperparameter sensitivity: The momentum coefficient and learning rate usually need to be tuned together. Scan them in small-scale experiments first, then scale up to full training.
    4. Monitoring: Besides the loss curve, track trends in gradient norm and update norm. These help detect oscillation or stalling earlier.

    6. Conclusion

    From Cauchy’s steepest descent to Polyak’s heavy ball method, then to the fusion of momentum and adaptive mechanisms, and finally to the rise of orthogonalized update approaches, each stage of optimizer evolution answers the same question more deeply: how to descend efficiently across complex terrain. Understanding this technical lineage helps engineers make better training decisions. It also gives them the ability to judge the real value of the many new methods that keep appearing.