Optimizer Evolution: From Gradient Descent to Orthogonalized Momentum

    Optimizers act as the navigation system for deep learning training. This article traces their evolution from basic SGD and Polyak's momentum to adaptive methods like Adam/AdamW, and finally to orthogonalized momentum optimizers such as Muon. It explains how each method addresses step size, escaping local minima, and ill-conditioned loss surfaces, and offers practical guidance on diagnosing common training issues and choosing the right optimizer for your workload.

    1. Optimizers Are the Navigation System of Training

    Training a deep learning model is like hiking down a mountain blindfolded. The goal is to reach the bottom of the valley, which corresponds to the point of minimum loss. We have two tools at hand:

    • Loss function: tells us our current altitude, i.e., how large the model’s error is right now.
    • Gradient: computed via backpropagation, it is like probing the ground with your foot to feel which direction slopes downward.

    The optimizer is the strategy that decides which direction to step in and how far to step. Together, the tools and the strategy determine whether each step is efficient.

    How should you choose an optimizer? What is the difference between Adam and SGD? And what exactly is orthogonalized momentum? We answer these questions in turn below.

    2. The Core Responsibilities of an Optimizer

    2.1 Learning Rate Control: How Big Should Each Step Be?

    If the step is too large, you may jump right over the valley floor and up the opposite slope, which shows up as oscillating training loss that never converges. If the step is too small, training becomes extremely slow, burning compute for little gain.

    Advanced optimizers adjust the step size adaptively: they move faster on flat regions and slow down on steep terrain or near the valley floor. Learning rate schedules and adaptive methods are both designed around this goal.

    2.2 Escaping Local Optima: Don’t Get Stuck in a Halfway Pothole

    Loss surfaces contain many local minima and saddle points. Relying only on the current gradient makes it easy for parameters to get trapped in a small pit, mistaking it for the global optimum. Optimizers need extra mechanisms, such as inertia, noise, or multi-scale exploration, to help the model climb over small ridges.

    2.3 Common Training Symptoms and How to Diagnose Them

    When training goes wrong, use the table below to decide what to check first before touching hyperparameters.

    Training symptom Common cause Check first
    Loss oscillates and does not decrease Learning rate too large Lower the learning rate; add learning rate warmup
    Sudden loss spikes Abnormally large gradients on certain batches, or numerical instability Enable gradient clipping; check data and mixed-precision settings
    Convergence too slow Learning rate too small, or stuck in a flat region Raise the learning rate moderately; review the schedule
    Training loss drops but validation worsens Overfitting, or overly aggressive optimization Add regularization; run a comparison with another optimizer

    3. The Historical Evolution of Optimizers

    3.1 Stochastic Gradient Descent: The Simplest Starting Point

    The idea behind SGD (stochastic gradient descent) dates back to Cauchy’s work on optimization in 1847. Its update rule is very simple:

    1. # SGD update rule
    2. w = w - lr * grad

    The problem with SGD is that it models a massless particle sliding on a surface: it can instantly accelerate from rest to top speed and stop instantly. On a narrow, canyon-shaped loss surface, SGD oscillates back and forth between the two walls and converges very inefficiently.

    3.2 Momentum: Giving the Particle Inertia

    In the 1960s, Soviet mathematician Polyak proposed the Heavy Ball method, which adds mass and inertia to the sliding particle.

    1. # Momentum update rule
    2. v = beta * v + grad
    3. w = w - lr * v

    A ball with mass rolling downhill can power through small potholes using its inertia. In canyon-shaped terrain, the oscillating components cancel each other out due to inertia, while the component along the valley floor keeps accumulating. As a result, momentum is usually much faster than plain SGD on ill-conditioned surfaces.

    3.3 Adaptive Methods: A Custom Learning Rate per Parameter

    Adaptive optimizers introduce first-moment and second-moment estimates, with Adam being the most widely used:

    • First moment (exponential moving average of the gradient): acts as a direction with inertia;
    • Second moment (moving average of squared gradients): measures how much the gradient fluctuates per parameter, assigning each parameter its own effective learning rate.

    Full Adam also includes bias correction. Early in training, both moment estimates are close to zero, and bias correction scales them up to avoid distorted step sizes in the first few steps.

    1. # Adam update rule (t is the current step, starting from 1)
    2. m = beta1 * m + (1 - beta1) * grad
    3. v = beta2 * v + (1 - beta2) * grad**2
    4. m_hat = m / (1 - beta1**t) # first-moment bias correction
    5. v_hat = v / (1 - beta2**t) # second-moment bias correction
    6. w = w - lr * m_hat / (sqrt(v_hat) + eps)

    Common defaults are beta1=0.9, beta2=0.999, and eps=1e-8. In practice, AdamW is more commonly used; it decouples weight decay from the gradient update, making regularization more controllable. By combining momentum with adaptive scaling, Adam became the default choice for deep learning training for many years.

    4. Orthogonalized Momentum: A New Direction for Optimizers

    Large model training raises the bar for optimizers: training stability, memory efficiency, and convergence speed can all become bottlenecks. In recent years, a noteworthy family of methods has emerged: momentum optimizers based on orthogonalization. The core idea has two parts:

    1. Treat each layer’s weight gradient as a matrix, rather than flattening it into a vector;
    2. Approximately orthogonalize the momentum update, making the update strength more uniform across directions.

    With plain momentum, the step size in certain directions can be amplified or suppressed due to an uneven gradient spectrum. Orthogonalization equalizes the update matrix so that step sizes across singular directions become more similar, reducing the case where one direction dominates the entire step.

    A representative implementation is Muon (proposed by Keller Jordan and colleagues in 2024). It is typically applied only to 2D hidden-layer weights, while embeddings and output heads still use AdamW. The idea can be sketched as follows:

    1. # Orthogonalized momentum (Muon-style sketch)
    2. m = beta * m + grad # grad is the gradient matrix of a 2D weight
    3. O = orthogonalize(m) # approximate the orthogonal factor, often via Newton-Schulz iteration
    4. w = w - lr * O

    Potential benefits of orthogonalization include:

    • Possibly more stable training: reduced sensitivity to the learning rate and potentially fewer loss spikes;
    • Possibly faster convergence: a chance to reach lower loss under the same compute budget;
    • Potentially easier tuning: some methods rescale the update so that learning rate and weight decay values similar to AdamW’s can be reused. This needs to be verified on your own model and should not be taken for granted.

    The costs are equally clear. Orthogonalization relies on extra matrix iterations, which increases computation and some memory overhead. In distributed training, the matrix operations must handle parameter sharding and multi-device communication, adding engineering complexity. Stability at very large scale and ecosystem support are still being validated.

    This also shows that there is no universal optimizer, only optimizers that match your model architecture, data, and compute budget.

    5. Practical Advice: How to Choose an Optimizer

    The table below compares the three families of methods in terms of applicable scenarios, main risks, and tuning priorities.

    Method Best suited for Main risks Tuning priority
    SGD + momentum Baseline models, vision tasks, when generalization and interpretability matter Slower convergence, sensitive to learning rate Learning rate, then momentum, then weight decay
    Adam / AdamW NLP tasks, rapid iteration, uncertain hyperparameters Generalization may be weaker than SGD; weight decay must be implemented correctly Learning rate, then weight decay, then betas
    Orthogonalized momentum (e.g., Muon) 2D hidden-layer weights in large models Extra compute and engineering complexity; ecosystem still maturing Validate learning rate and stability on small models first

    In vision tasks, SGD with momentum sometimes generalizes better than Adam, but this depends on dataset size and augmentation strategy and should not be generalized blindly.

    A practical rollout can follow three steps:

    1. Get a baseline running first: train a small model with AdamW or SGD + momentum and record the loss curve.
    2. Tune only the learning rate: keep everything else fixed, and pair it with warmup and cosine annealing. An example setup: linear warmup for the first 1,000 steps, then cosine decay to 10% of the peak, with gradient norm clipped to 1.0. The exact values need to be adjusted for your model and data.
    3. Then introduce orthogonalized momentum: run controlled comparisons in small-scale proxy experiments, measuring the steps and wall-clock time each method needs to reach the same loss. Scale up to larger models only when the benefit is clear.

    Very often, when training “just won’t tune,” the root cause is not the optimizer itself but the learning rate schedule, gradient clipping, or the data pipeline.

    6. Conclusion

    From Cauchy’s gradient descent, to Polyak’s Heavy Ball method, to Adam and orthogonalized momentum, every evolution of the optimizer answers the same question: how to descend the mountain more intelligently. Understanding the motivation behind each method is more useful than memorizing the formulas. Next time you face oscillating non-convergence or painfully slow training, start by checking step size, inertia, and directional balance before deciding whether to switch optimizers.