Extending AdamW by Leveraging Its Second Moment and Magnitude

Abstract

Recent work [4] analyses the local convergence of Adam in a neighbourhood of an optimal solution for a twice-differentiable function. It is found that the learning rate has to be sufficiently small to ensure local stability of the optimal solution. The above convergence results also hold for AdamW. In this work, we propose a new adaptive optimisation method by extending AdamW in two aspects with the purpose to relax the requirement on small learning rate for local stability, which we refer to as Aida. Firstly, we consider tracking the 2nd moment rt of the pth power of the gradient-magnitudes. rt reduces to vt of AdamW when p=2. Suppose mt is the first moment of AdamW. It is known that the update direction mt+1/(vt+1+epsilon)0.5 (or mt+1/(vt+10.5+epsilon) of AdamW (or Adam) can be decomposed as the sign vector sign(mt+1) multiplied elementwise by a vector of magnitudes |mt+1|/(vt+1+epsilon)0.5 (or |mt+1|/(vt+10.5+epsilon)). Aida is designed to compute the qth power of the magnitude in the form of |mt+1|q/(rt+1+epsilon)(q/p) (or |mt+1|q/((rt+1)(q/p)+epsilon)), which reduces to that of AdamW when (p,q)=(2,1). Suppose the origin 0 is a local optimal solution of a twice-differentiable function. It is found theoretically that when q>1 and p>1 in Aida, the origin 0 is locally stable only when the weight-decay is non-zero. Experiments are conducted for solving ten toy optimisation problems and training Transformer and Swin-Transformer for two deep learning (DL) tasks. The empirical study demonstrates that in a number of scenarios (including the two DL tasks), Aida with particular setups of (p,q) not equal to (2,1) outperforms the setup (p,q)=(2,1) of AdamW.

0

Turn this paper into a full lesson

ArcXiv compiles a staged curriculum from this paper: 8-12 lessons across beginner → advanced, synthesised section guides, visuals, flashcards, a quiz, exercises, and on-demand deep dives per section. Grounded in the abstract, never invented.

Discussion (0)

Sign in to join the discussion.

Loading comments…