This paper, presented at ICML 2021, provides a theoretical deep dive into why some adaptive optimizers generalize better than others. By analyzing the "implicit bias" of algorithms like Adam, RMSProp, and AdaGrad, the authors show that the way an optimizer handles historical gradients determines whether it will find a "wide" margin that generalizes well to new data.
Introduction
Deep neural networks are notoriously over-parameterized; they have enough capacity to memorize training data perfectly while failing to generalize. Yet, in practice, they often work remarkably well. This mystery is usually explained by implicit regularization: the optimization algorithm itself "prefers" certain types of solutions (global minima) over others.
While previous research showed that standard Gradient Descent (GD) maximizes the margin (the distance between data points and the decision boundary), the behavior of adaptive optimizers remained a black box. Adaptive methods are the industry standard because they train faster, but they often suffer from a "generalization gap" compared to GD. This paper seeks to provide a rigorous theoretical framework to explain these differences.
Methodology
The authors introduce a unified framework called Adaptive Gradient Flow to analyze the continuous-time limits of these algorithms. Their approach involves:
- Reparameterization: Transforming the parameter space into a normalized space to isolate the "convergent direction" of the weights.
- Surrogate Margin Construction: Defining a novel "surrogate margin" to track how the optimizer pushes parameters toward the boundary of the feasible set.
- Homogeneity Assumption: Focusing on homogeneous neural networks (like those using ReLU activations without biases), where scaling the weights by a factor $\alpha$ scales the output by $\alpha^L$.
- KKT Analysis: Proving that the limit points of these optimization flows correspond to Karush-Kuhn-Tucker (KKT) points of specific margin-maximization problems.
Key Insights: The Power of Forgetting
The key difference lies in the conditioner (the part of the algorithm that scales the learning rate for each parameter). Adam and RMSProp use an Exponential Moving Average (EMA). This allows the algorithm to "forget" early, noisy gradients. Asymptotically, the conditioner becomes isotropic (uniform), allowing the optimizer to maximize the $L_2$ margin just like Gradient Descent.
In contrast, AdaGrad's "infinite memory" of historical gradients creates an anisotropic bias. Because it sums all historical squared gradients, the very first steps of training permanently warp the optimization landscape. This prevents it from finding the optimal margin and makes it highly sensitive to initialization.
Empirical Results
The authors validated their findings using MNIST and synthetic datasets. The experiments showed that Adam and RMSProp achieved significantly higher normalized margins than AdaGrad, which correlated directly with higher test accuracy.
Key results include:
- Theorem 1: For Adam and RMSProp, limit points of normalized weights are KKT points of the standard $L_2$ max-margin problem. For AdaGrad, they are KKT points of a weighted margin problem dependent on the final state of the conditioner ($h_\infty$).
- Directional Convergence: In toy experiments, the "limit conditioner" for Adam and RMSProp always converged to the same isotropic vector, whereas AdaGrad's varied wildly across different random seeds.
- The Role of Epsilon ($\epsilon$): The small constant $\epsilon$ added for numerical stability actually plays a crucial role in ensuring the conditioner eventually becomes isotropic, aiding generalization.
Limitations and Future Work
While the paper provides a strong theoretical foundation, some areas remain for future exploration. The proofs focus on a variant of Adam without momentum, and the analysis is performed on continuous-time "gradient flow" rather than the discrete mini-batch training used in practice. Additionally, the theory currently focuses on homogeneous architectures, leaving non-homogeneous components like Batch Normalization for future study.
Summary updated