TL;DR
This paper investigates the theoretical underpinnings of AdamW, a popular optimizer in deep learning, and reveals that it implicitly performs $l_\infty$ norm constrained optimization. This finding helps explain AdamW's superior performance over Adam with $l_2$ regularization by showing it converges to KKT points of a constrained problem, rather than just stationary points of a regularized loss.
What Problem Does This Paper Address?
AdamW, a variant of the Adam optimizer that decouples weight decay from the gradient update, has demonstrated superior empirical performance in deep learning, particularly for large language models. However, a clear theoretical understanding of why it works so well, especially compared to Adam with standard $l_2$ regularization, has been lacking. While Adam with $l_2$ regularization is understood to optimize a regularized loss, it's unclear what objective AdamW actually optimizes. This paper aims to bridge this gap by characterizing the implicit bias of AdamW, i.e., determining what kind of solutions it converges to.
Methods
The core of the paper's contribution lies in its theoretical analysis of AdamW's convergence properties. The authors establish that AdamW, under certain conditions (full-batch setting, non-increasing learning rate schedule with a diverging partial sum), implicitly performs $l_\infty$ norm constrained optimization. This is achieved by:
- Connecting AdamW to SignGD: They show that AdamW can be viewed as a smoothed version of SignGD (normalized steepest descent with respect to the $l_\infty$ norm).
- Relating to Frank-Wolfe: They demonstrate a connection between normalized steepest descent with weight decay and the Frank-Wolfe algorithm, which is known for constrained optimization.
- Proving convergence to KKT points: The main theoretical result (Theorem 1.1) states that if AdamW converges, it converges to a KKT point of the original loss function under the constraint that the $l_\infty$ norm of the parameters is bounded by the inverse of the weight decay factor.
- Deriving an upper bound on update size: A crucial technical contribution is a tight upper bound on the average update size of Adam-like updates, which is essential for proving the $l_\infty$ norm constraint.
Datasets
- Penn Treebank (PTB): Used for training a small two-layer transformer language model in the experiments. The training was performed in a full-batch setting.
Key Insights and Ideas
- AdamW as $l_\infty$ Norm Constraint: The most significant insight is that AdamW implicitly enforces an $l_\infty$ norm constraint on the learned parameters, effectively bounding them by $1/\lambda$ (where $\lambda$ is the weight decay factor). This is a departure from Adam with $l_2$ regularization, which optimizes a regularized loss.
- AdamW's Connection to SignGD: The paper highlights that AdamW can be seen as a smoothed version of SignGD. This connection is key to understanding its behavior, especially in the absence of noise.
- Weight Decay's Role in Constrained Optimization: The work reveals that weight decay, when implemented in AdamW, acts as a mechanism to enforce a norm constraint, rather than simply penalizing large weights in the objective function.
- Importance of $\beta_1 < \beta_2$: The paper demonstrates that the condition $\beta_1 < \beta_2$ is crucial for AdamW to converge to the $l_\infty$ norm constrained solution. Without it, convergence to an undesirable region can occur.
- $l_\infty$ Geometry Advantage: The findings suggest that for certain loss landscapes, like those encountered in language modeling, the $l_\infty$ geometry might be more beneficial for optimization, leading to better properties than the $l_2$ geometry.
Key Results
- Theorem 1.1: For a full-batch setting and a non-increasing learning rate schedule with a diverging partial sum, AdamW converges to a KKT point of the $l_\infty$ norm constrained optimization problem. If the loss is convex, it converges to the constrained minimizer.
- Experimental Validation: Experiments on the PTB dataset show that the $l_\infty$ norm of AdamW iterates is indeed bounded, especially when $\beta_1 \approx \beta_2$ or $\lambda\eta \ll 1 - \beta_2 < 1 - \beta_1$. This aligns with the theoretical predictions.
- Synthetic Problem: A synthetic quadratic loss function demonstrates that steepest descent with $l_\infty$ norm outperforms $l_2$ norm, especially when weight decay is applied, supporting the idea that $l_\infty$ geometry can be advantageous.
Limitations and Future Work
- Full-Batch Assumption: The primary theoretical result is derived for the full-batch setting. While experiments suggest the $l_\infty$ norm bound might hold even with stochastic gradients, a formal proof for the stochastic case is missing.
- Understanding $l_\infty$ Geometry: The paper conjectures that language modeling loss functions might have better properties under $l_\infty$ geometry. Further investigation into this conjecture and its implications for real-world applications is suggested.
- Non-Asymptotic Convergence Rates: Providing non-asymptotic convergence rates for AdamW in both convex and non-convex settings is identified as an important future direction.
- Hyperparameter Tuning: The derived upper bound on the average update size could potentially guide hyperparameter tuning in empirical studies.
Summary updated