How Does Adaptive Optimization Impact Local Neural Network Geometry?

Kaiqi Jiang, Dhruv Malik, Yuanzhi Li

If you’ve trained a Transformer model recently, you likely reached for the Adam optimizer without a second thought. It’s common knowledge that adaptive methods like Adam, Adagrad, and RMSprop often converge much faster than standard Stochastic Gradient Descent (SGD) on complex tasks like Natural Language Processing (NLP).

But why? The textbook answer is that adaptive methods mimic second-order optimization by adjusting to the global geometry of the loss function. However, a recent paper from researchers at Princeton and CMU argues that this explanation is incomplete. They suggest that adaptive optimizers don't just adapt to the landscape—they actively steer the training process toward "nicer" local regions that SGD simply fails to find.

The Importance of Local Geometry

In traditional convex optimization, the landscape is a fixed bowl; you just need an algorithm that can navigate it efficiently. But deep neural networks are high-dimensional, non-convex, and notoriously messy.

The authors argue that the "global" properties of a neural network's loss function are often meaningless. Instead, what matters is the local geometry along the specific path (trajectory) the optimizer takes. This paper asks a deeper question: Do different optimizers actually "see" different landscapes because they choose different paths? Specifically, does Adam’s success come from its ability to find regions where the local geometry is inherently more amenable to fast optimization?

Measuring Curvature: The $R^{\text{OPT}}_{\text{med}}$ Metric

To test this hypothesis, the authors introduced a new statistic: $R^{\text{OPT}}_{\text{med}}(t)$.

Think of this as a "stability-friendly" version of a condition number that measures the uniformity of the diagonal of the Hessian (the matrix of second derivatives).

  • A high $R_{\text{med}}$ means the curvature is highly variable across different coordinates—some directions are very sharp, while others are very flat. This makes it hard to pick a single effective step size.
  • A low $R_{\text{med}}$ (closer to 1) means the curvature is uniform, creating a "rounder" landscape that is much easier to descend.

The researchers tracked this metric across various architectures (Transformers, BERT) and compared Adam against SGD with Momentum (SGD+M).

Key Insights: The Optimizer as a "Scout"

The most striking finding is that the optimizer is not a passive traveler. Adam acts like a scout, actively biasing the trajectory toward regions with low $R_{\text{med}}$. SGD, by contrast, tends to wander into regions with much higher, non-uniform curvature.

To prove this, the authors performed a clever "swap" experiment. They took a point reached by Adam and a point reached by SGD that had the exact same loss value, then ran SGD from both points. If the geometry were the same, the results should be identical. Instead, SGD performed significantly better when starting from the point Adam had found, proving that Adam had located a "better neighborhood" in the loss landscape.

Swap experiment and curvature metric comparison

Theoretical analysis supports this: in a two-layer linear network, Adam induces weight matrices that are low-rank and have "uniform" leading singular vectors, leading directly to the uniform Hessian diagonal seen in experiments. Interestingly, on image tasks like CIFAR-10 where Adam doesn't provide a massive speedup over SGD, Adam also failed to find a more uniform geometry. This strongly suggests that the "uniformity bias" is the secret sauce behind Adam's dominance in NLP.

Key Results

  • Curvature Gap: In Transformer training, the $R_{\text{med}}$ for SGD+M was often 1.4x to 2x higher than for Adam. In some layers, the difference was even more extreme.
  • Convergence Speed: Adam reached lower loss levels significantly faster across all tested NLP tasks (IMDB, Multi30k, Wikitext-2).
Training loss comparison between SGD+M and Adam
  • Robustness and Recovery: This uniformity bias held true across different initialization schemes. Furthermore, when researchers switched from SGD to Adam mid-training, the $R_{\text{med}}$ metric immediately began to drop, and the model's convergence speed improved, "catching up" to the geometry found by Adam-only runs.

Limitations and Future Work

While the empirical evidence is strong, the theoretical proof is currently limited to two-layer linear networks. Real-world Transformers are highly non-linear and much deeper, so extending this theory to multi-layer non-linear settings is a major next step.

Additionally, the authors noted that strong weight decay (L2 regularization) can sometimes interfere with this phenomenon. Under heavy regularization, Adam still converged faster, but the $R_{\text{med}}$ values were sometimes higher, suggesting that other mechanisms might be at play in highly regularized regimes. Future work will likely explore how these geometric biases interact with generalization and the "edge of stability" in deep learning.

Summary updated

BibTeX
@inproceedings{jiang2023how,
  author = {Kaiqi Jiang and Dhruv Malik and Yuanzhi Li},
  title = {{How Does Adaptive Optimization Impact Local Neural Network Geometry?}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2023},
  url = {https://openreview.net/forum?id=gIG8LvTLuc},
}
Figure