From Gradient Descent to Momentum: The Evolution of Optimizers in Deep Learning

    Optimizers are the decision-making core of deep learning training, determining both the step size and direction of parameter updates. This article traces the evolution from classic stochastic gradient descent to momentum-based methods and modern adaptive optimizers. It begins by framing optimizers as a navigator that controls step size and avoids local optima, then explains why momentum—inspired by physical inertia—breaks through the efficiency bottleneck of plain SGD in ravines and ill-conditioned loss surfaces. The article also offers practical guidance on choosing and tuning optimizers for real-world training scenarios.

    I. Optimizers: The “Navigator” of Deep Learning Training

    In deep learning, the optimizer is the core component that determines whether a model converges efficiently. To understand its role, consider this analogy: imagine a blindfolded person placed in a mountain range, tasked with finding the lowest point of the valley.

    Two types of critical information are available to them:

    • Loss function: Acts as an altimeter, telling the model how far it currently is from the target.
    • Gradient (computed via backpropagation): Acts as the sensation of the ground’s slope underfoot, indicating which direction is “downhill.”

    The optimizer itself is the walking strategy in the brain—it decides the direction of the next step and how large that step should be. A well-designed optimizer must accomplish two things: control stride length and avoid getting trapped in dead ends.

    II. Two Core Missions of an Optimizer

    1. Learning Rate Control: The Art of Stride Size

    Stride control corresponds to the learning rate problem in deep learning:

    • Step too large: The optimizer may leap over the valley floor and land on the opposite slope, causing the loss to oscillate and preventing convergence;
    • Step too small: Training advances at a painfully slow pace, consuming substantial compute and time without reaching the target.

    Advanced optimizers can adaptively adjust step size: accelerating through flat regions and slowing down to fine-tune as they approach steep valley floors. This adaptability is a defining feature that separates modern optimizers from naive methods.

    2. Escaping Local Optima: Avoiding “False Valleys” on the Hillside

    Real terrain is littered with small pits halfway up the mountain—these mirror local optima in deep learning. If the model always follows the steepest downhill direction from the current point, it can easily fall into one of these pits and mistake it for the true global minimum. An effective optimizer must include a mechanism to “climb out of small pits and keep moving” in order to find better solutions on complex, high-dimensional loss surfaces.

    III. The Evolution of Optimizer Design

    1. Classic Gradient Descent: Simple but Inefficient

    The earliest method, stochastic gradient descent (SGD), traces its conceptual roots to the mid-19th century, when mathematician Augustin-Louis Cauchy first addressed optimization problems. Standard gradient descent is mathematically equivalent to simulating a “massless particle“ sliding along the terrain surface:

    • It can instantly accelerate to full speed at any moment;
    • It can just as instantly come to a complete stop.

    This violates basic physics. In the real world, every object has inertia, and changing velocity takes time. This apparent “defect” is precisely the source of the efficiency bottleneck in classical methods.

    2. The Ravine Terrain Problem

    Classic gradient descent performs poorly on a specific type of terrain: narrow ravines. In such landscapes, the slope along the ravine floor is gentle, while the walls on either side are extremely steep. Since gradient descent updates directly follow the direction of steepest descent at the current point, the training process exhibits two distinct behaviors:

    • Across the ravine’s cross-section, the steep walls cause each update to “bounce” the model to the opposite wall;
    • Along the ravine’s length, the gentle slope makes forward progress extremely slow.

    The net result is a path that oscillates back and forth between the walls, with minimal forward progress along the ravine floor, leading to poor convergence. In high-dimensional parameter spaces, this “ill-conditioned curvature” problem is pervasive, as gradient scales often vary dramatically across different parameter dimensions.

    3. The Momentum Method: Giving the Particle “Mass”

    The breakthrough came from Soviet mathematician Boris Polyak. While working on optimization theory in 1964, he posed a question grounded in physical intuition: what would happen if we forcibly give this sliding particle “mass and inertia”?

    This gave rise to the famous Heavy Ball Method, also known as the momentum optimization method. Its core update logic can be expressed as:

    1. # Momentum method pseudocode
    2. v = beta * v + gradient # Velocity accumulates historical gradients (inertia)
    3. param = param - learning_rate * v # Update parameters along the accumulated velocity

    The introduction of momentum produces two fundamental changes:

    • Oscillation cancellation: Gradient components pointing back and forth across the ravine have opposite signs; they cancel each other out through exponentially weighted accumulation, significantly suppressing lateral oscillation;
    • Directional acceleration: Gradient components along the ravine floor maintain a consistent sign, accumulating into a larger effective step size and accelerating forward progress.

    From a physics perspective, a heavy ball with inertia no longer reverses direction instantly in response to the local slope of the valley wall. Instead, it “pushes through” small pits and oscillatory regions by virtue of its momentum, which also alleviates the problem of getting stuck in local optima.

    4. The Modern Legacy of Momentum

    The momentum method is a cornerstone in the history of optimizer development. Nearly all widely used adaptive optimization algorithms inherit and extend this idea: in addition to first-order momentum (gradient accumulation), they introduce second-order momentum (accumulation of squared gradients) to adaptively scale the step size for each parameter, simultaneously addressing both the “stride size” and “ravine terrain” challenges.

    In recent years, driven by the demands of large-scale model training, the industry has continued to explore new optimizer designs. One direction combines momentum updates with orthogonalization transforms to balance updates across different parameter directions, improving stability and hardware utilization in ultra-large-scale training. These developments show that optimizer research remains an active field, with its underlying logic consistently circling back to those two classic questions: how to take a step, and how to avoid falling into a pit.

    IV. Practical Recommendations

    1. Understand the terrain before choosing your tool: For tasks with highly ill-conditioned loss surfaces (where gradient scales differ significantly across parameter dimensions), prioritize optimizers with adaptive mechanisms and momentum;
    2. The momentum coefficient is a critical hyperparameter: It determines the strength of “inertia”—too large and the optimizer may overshoot the valley floor, too small and it degenerates into plain gradient descent;
    3. Combine with learning rate scheduling: Optimizers paired with warmup and decay strategies deliver better results—stable in early training, precise in later stages;
    4. Monitor gradient norms and loss curves: Severe oscillation is often a sign of an excessively large learning rate or mismatched momentum; adjust dynamically based on these signals.

    V. Conclusion

    From the mathematical origins of optimization in the 19th century, to adding inertia to a “massless particle,” and onward to novel optimizer designs for large-scale training, the evolution of optimizers is, at its core, a history of “reinventing mathematical algorithms through physical intuition.” Understanding these ideas not only helps us tune hyperparameters and debug models with greater confidence, but also enables more informed technical decisions as large-model training becomes increasingly commonplace.