Deep Learning Optimizers: From Classical Momentum to Modern Algorithmic Advances

    This article examines the role of optimizers in deep learning training, traces the evolution from SGD and Polyak’s heavy-ball momentum to adaptive and matrix-orthogonalization methods, and discusses engineering practices for running optimizer-driven training efficiently in cloud environments.

    Deep Learning Optimizers: From Classical Momentum to Modern Algorithmic Advances

    Recently, technical details of a large model training process attracted widespread industry attention, with one particularly notable element being the use of a new type of optimizer. In the training pipeline of deep learning models, optimizers play a critical role. Setting aside the spotlight on specific products, this article returns to the technical fundamentals and explores the core mechanisms of optimizers, their historical evolution, and the technical advances brought by new optimization algorithms.

    1. The Core Role of Optimizers: The “Navigation System” of Deep Learning Training

    In deep learning engineering practice, the optimizer updates model weight parameters during training to minimize the loss function. A classic “downhill” metaphor remains useful for intuitive understanding: imagine you are blindfolded and placed in a rolling mountain range, with the goal of finding the valley with the lowest elevation. The clues and tools you rely on include:

    • Loss (loss function): like an altimeter, telling you your current elevation.
    • Gradient (backpropagation): like using your feet to feel the slope of the ground, indicating which direction is downhill.

    The optimizer is the decision-making center in your brain. It determines the direction and distance of your next step. A mature optimizer usually needs to solve two core tasks.

    1.1 Step Size and Learning Rate Control

    The first task is to determine the step size for parameter updates, namely learning rate control. On the way downhill, if the stride is too large, you may cross the valley entirely and rush up the opposite slope, preventing the model from converging and causing the error curve to oscillate sharply. If the stride is too small, the time to reach the valley becomes extremely long, making training very slow.

    Advanced optimizers can perform adaptive step adjustment: moving faster in flat areas and slowing down cautiously in steep areas near the valley bottom. This dynamic adjustment mechanism is key to improving training efficiency in modern optimizers.

    1.2 Escaping Local Optima and Adapting to Terrain

    The second task is to avoid dead ends, that is, to escape local optima. In non-convex loss function landscapes, depressions on the mountainside (local optima) are everywhere. If an optimizer acts blindly based only on local gradients, it can easily fall into these small pits and mistakenly believe it has reached the destination.

    2. Algorithm Evolution: From Massless Particles to the Heavy-Ball Method

    Looking back at the history of optimization algorithms, we can clearly see how mathematicians used physical intuition to address local optima and convergence efficiency.

    2.1 Limitations of Early SGD

    Early deep learning widely adopted stochastic gradient descent (SGD), whose basic idea can be traced back to the French mathematician Cauchy in 1847. However, for more than a century afterward, standard gradient descent essentially simulated a “massless particle” sliding on a surface. Such a particle can instantly reach maximum speed and also brake instantly, which completely violates physical common sense. When encountering narrow “canyon” terrain, standard gradient descent lacks inertia and bounces back and forth between the canyon walls, resulting in very low convergence efficiency.

    2.2 Polyak’s Heavy-Ball Method

    The Soviet mathematician Boris Polyak broke this assumption. In 1964, while studying optimization theory, Polyak proposed a highly physically intuitive idea for the inefficiency of canyon terrain: what if “mass” and “inertia” were forcibly added to this sliding particle?

    Based on this idea, he proposed the famous heavy-ball method. By introducing a momentum term, the heavy-ball method makes parameter updates depend not only on the current gradient but also retain part of the inertia from the previous update direction. This mechanism enables the optimizer to accelerate when crossing flat regions and, when entering a canyon, use inertia to pass through shallow local pits, greatly improving convergence speed.

    1. # Pseudocode: core logic of an optimizer with momentum
    2. def update_with_momentum(weights, grads, velocity, lr, momentum):
    3. velocity = momentum * velocity + lr * grads
    4. weights = weights - velocity
    5. return weights, velocity

    3. Technical Advances and Evolution Directions of New Optimization Strategies

    From the introduction of momentum in the heavy-ball method to the later Adam algorithm, which combines adaptive learning rates, optimizer development has continually sought the best balance between “step size” and “direction control.” Recently discussed new optimization algorithms such as Muon have taken another step forward in matrix updates and orthogonalization.

    Breakthroughs in new algorithms are often reflected in the following aspects:

    1. Lightweight approximation of second-order information: Traditional second-order optimizers such as Newton’s method converge quickly, but computing the Hessian matrix is too expensive. New algorithms attempt to use mathematical techniques such as matrix orthogonalization or low-rank approximation to obtain more accurate descent directions without significantly increasing computational complexity.
    2. Fine-grained control for large-scale parameters: In large-scale Transformer architectures, weight matrix updates require more stable strategies. New optimizers control the orthogonality of update matrices, effectively avoiding gradient explosion or vanishing, and making the training process more robust on large-scale clusters.

    4. Engineering Practice: Building Efficient Training Flows in Cloud Environments

    Theoretical advances need strong engineering infrastructure to be implemented. In enterprise-level model training, choosing the right optimizer is only the first step. How to run the algorithm efficiently on distributed clusters is a greater challenge for developers. In this process, leveraging mature cloud platform capabilities is essential.

    For example, when conducting large-scale deep learning training on Baidu AI Cloud, developers can use its container platform for elastic scheduling of computing resources and use distributed storage to achieve low-latency reading of massive training data. At the same time, with log services and monitoring and alerting systems, developers can track changes in the loss curve in real time and accurately determine whether the optimizer has fallen into a local optimum or is diverging.

    Best practice recommendations:

    1. Staged learning rate scheduling: Use a larger base learning rate in the early stage of training for fast convergence, and later combine strategies such as Cosine annealing to smoothly reduce the learning rate, helping the optimizer find a precise optimum.
    2. Gradient clipping and monitoring: Under new optimization strategies, although the algorithms have a certain degree of stability, it is still recommended to set gradient norm thresholds in cloud monitoring alerts to prevent numerical overflow in extreme cases.

    5. Conclusion

    As the navigation system of deep learning training, every theoretical evolution of optimizers directly pushes upward the performance ceiling of models. From Cauchy’s basic gradient descent to Polyak’s momentum method that gives particles mass, and then to today’s new optimization algorithms that explore matrix orthogonal properties, the combination of mathematical and physical intuition has always been the source of algorithmic innovation. For developers and enterprises, deeply understanding the underlying logic of optimizers and combining it with efficient computing platforms and monitoring tools such as Baidu AI Cloud is essential for building truly reliable training pipelines in intense AI technology competition.