Title: PADAM: CLOSING THE GENERALIZATION GAP OF ADAPTIVE GRADIENT METHODS IN TRAINING DEEP NEURAL NETWORKS

Abstract: Adaptive gradient methods, which adopt historical gradient information to automatically adjust the learning rate, despite the nice property of fast convergence, have been observed to generalize worse than stochastic gradient descent (SGD) with momentum in training deep neural networks. This leaves how to close the generalization gap of adaptive gradient methods an open problem. In this work, we show that adaptive gradient methods such as Adam, Amsgrad, are sometimes "over adapted". We design a new algorithm, called Partially adaptive momentum estimation method (Padam), which unifies the Adam/Amsgrad with SGD by introducing a partial adaptive parameter p, to achieve the best from both worlds. Experiments on standard benchmarks show that Padam can maintain fast convergence rate as Adam/Amsgrad while generalizing as well as SGD in training deep neural networks. These results would suggest practitioners pick up adaptive gradient methods once again for faster training of deep neural networks.

1. INTRODUCTION:

Stochastic gradient descent (SGD) is now one of the most dominant approaches for training deep neural networks (Goodfellow et al., 2016) . In each iteration, SGD only performs one parameter update on a mini-batch of training examples. SGD is simple and has been proved to be efficient, especially for tasks on large datasets. In recent years, adaptive variants of SGD have emerged and shown their successes for their convenient automatic learning rate adjustment mechanism. Adagrad (Duchi et al., 2011) is probably the first along this line of research, and significantly outperforms vanilla SGD in the sparse gradient scenario. Despite the first success, Adagrad was later found to demonstrate degraded performance especially in cases where the loss function is nonconvex or the gradient is dense. Many variants of Adagrad, such as RMSprop (Hinton et al., 2012) , Adam (Kingma & Ba, 2015) , Adadelta (Zeiler, 2012) , Nadam (Dozat, 2016) , were then proposed to address these challenges by adopting exponential moving average rather than the arithmetic average used in Adagrad. This change largely mitigates the rapid decay of learning rate in Adagrad and hence makes this family of algorithms, especially Adam, particularly popular on various tasks. Recently, it has also been observed (Reddi et al., 2018) that Adam does not converge in some settings where rarely encountered large gradient information quickly dies out due to the "short momery" problem of exponential moving average. To address this issue, Amsgrad (Reddi et al., 2018) has been proposed to keep an extra "long term memory" variable to preserve the past gradient information and to correct the potential convergence issue in Adam.

On the other hand, people recently found that for largely over-parameterized neural networks, e.g., more complex modern convolutional neural network (CNN) architectures such as VGGNet (He et al., 2016) , ResNet (He et al., 2016) , Wide ResNet (Zagoruyko & Komodakis, 2016) , DenseNet (Huang et al., 2017) , training with Adam or its variants typically generalizes worse than SGD with momentum, even when the training performance is better. In particular, people found that carefullytuned SGD, combined with proper momentum, weight decay and appropriate learning rate decay strategies, can significantly outperform adaptive gradient algorithms eventually (Wilson et al., 2017) . As a result, even though adaptive gradient methods are relatively easy to tune and converge faster at the early stage, recent advances in designing neural network structures are all reporting their performances by training their models with SGD-momentum (He et al., 2016; Zagoruyko & Komodakis, 2016; Huang et al., 2017; Simonyan & Zisserman, 2014; Ren et al., 2015; Xie et al., 2017; Howard et al., 2017) . Moreover, it is difficult to apply the same learning rate decay strategies that work well in SGD with momentum to adaptive gradient methods, since adaptive gradient methods usually require a much smaller base learning rate that will soon die out after several rounds of decay. We refer to it as the "small learning rate dilemma" (see more details in Section 3). With all these observations, a natural question is:

Can we take the best from both Adam and SGD-momentum, i.e., design an algorithm that not only enjoys the fast convergence rate as Adam, but also generalizes as well as SGD-momentum?

In this paper, we answer this question affirmatively. We close the generalization gap of adaptive gradient methods by presenting a new algorithm, called partially adaptive momentum estimation (Padam) method, which unifies Adam/Amsgrad with SGD-momentum to achieve the best of both worlds.

In particular, we make the following contributions:

• We propose a new algorithm, Padam, which unifies Adam/Amsgrad and SGD with momentum by a partially adaptive parameter. We show that Adam/Amsgrad can be seen as a special fully adaptive instance of Padam. The intuition behind our algorithm is that, by controlling the degree of adaptiveness, the learning rate in Padam does not need to be as small as other adaptive gradient methods to prevent the gradient update from exploding. This resolves the "small learning rate dilemma" for adaptive gradient methods and allows for faster convergence, hence closing the gap of generalization.

• We show that the Padam's performance is also theoretically guaranteed. We provide a convergence analysis of Padam in the convex setting, based on the analysis of Kingma & Ba (2015) ; Reddi et al. (2018) , and prove a data-dependent regret bound.

• We also provide thorough experiments about our proposed Padam method on training modern deep neural architectures. We empirically show that Padam achieves the fastest convergence speed while generalizing as well as SGD with momentum. These results suggest that practitioners should pick up adaptive gradient methods once again for faster training of deep neural networks.

Notation: Scalars are denoted by lower case letters, vectors by lower case bold face letters, and matrices by upper case bold face letters. For a vector θ ∈ R d , we denote the 2 norm of θ by

θ 2 = d i=1 θ 2 i , the ∞ norm of θ by θ ∞ = max d i=1 |θ i |.

For a sequence of vectors {θ j } t j=1 , we denote by θ j,i the i-th element in θ j . We also denote θ 1:t,i = [θ 1,i , θ 2,i , . . . , θ t,i ] . With slightly abuse of notation, for any two vectors a and b, we denote a 2 as the element-wise square, a p as the element-wise power operation, a/b as the element-wise division and max(a, b) as the element-wise maximum. We denote by diag(a) a diagonal matrix with diagonal entries a 1 , . . . , a d . Let S d ++ be the set of all positive definite d × d matrices. We denote by Π

X ,A (b) the projection of b onto a convex set X , i.e., argmin a∈X A 1/2 (a -b) 2 for b ∈ R d , A ∈ S d ++ . Given two sequences {a n } and {b n }, we write a n = O(b n ) if there exists a constant 0 < C < +∞ such that a n ≤ C b n . We use notation O(•) to hide logarithmic factors. We write a n = o(b n ) if a n /b n → 0 as n → ∞.

2. REVIEW OF ADAPTIVE GRADIENT METHODS:

Various adaptive gradient methods have been proposed in order to achieve better performance on various stochastic optimization tasks. Adagrad (Duchi et al., 2011) is among the first methods with adaptive learning rate for each individual dimension, which motivates the research on adaptive gradient methods in the machine learning community. In detail, Adagrad 1 adopts the following update form:

θ t+1 = θ t -α t g t √ v t , where v t = 1 t t j=1 g 2 j (Adagrad)

Here g t stands for the stochastic gradient ∇f t (θ t ), and α t = α/ √ t is the step size (a.k.a., learning rate). Adagrad is proved to enjoy a huge gain in terms of convergence especially in sparse gradient situations. Empirical studies also show a performance gain even for non-sparse gradient settings. RMSprop (Hinton et al., 2012) follows the idea of adaptive learning rate and it changes the arithmetic averages used for v t in Adagrad to exponential moving averages. Even though RMSprop is an empirical method with no theoretical guarantee, the outstanding empirical performance of RMSprop raised people's interests in exponential moving average variants of Adagrad. Adam (Kingma & Ba, 2015)2 is the most popular exponential moving average variant of Adagrad. It combines the idea of RMSprop and momentum acceleration, and takes the following update form:

θ t+1 = θ t -α t m t √ v t , where m t = β 1 m t-1 + (1 -β 1 )g t , v t = β 2 v t-1 + (1 -β 2 )g 2 t (Adam)

Adam also requires α t = α/ √ t for the sake of convergence analysis. In practice, any decaying step size or even constant step size works well for Adam. Note that if we choose β 1 = 0, Adam basically reduces to RMSprop. Reddi et al. ( 2018) identified a non-convergence issue in Adam. Specifically, Adam does not collect long-term memory of past gradients and therefore the effective learning rate could be increasing in some cases. They proposed a modified algorithm namely Amsgrad. More specifically, Amsgrad adopts an additional step to ensure the decay of the effective learning rate α t / √ v t , and its key update formula is as follows:

θ t+1 = θ t -α t m t √ v t , where v t = max( v t-1 , v t ) (Amsgrad)

The definitions of m t and v t are the same as Adam. Note that the modified v t ensures the convergence of Amsgrad. Reddi et al. (2018) also corrected some mistakes in the original proof of Adam and proved an O(1/ √ T ) convergence rate of Amsgrad for convex optimization. Note that all the theoretical guarantees on adaptive gradient methods (Adagrad, Adam, Amsgrad) are only proved for convex functions.

3. THE PROPOSED ALGORITHM:

In this section, we propose a new algorithm that not only inherits the O(1/ √ T ) convergence rate from Adam/Amsgrad, but also has comparable or even better generalization performance than SGD with momentum. Specifically, we introduce the a partial adaptive parameter p to control the level of adaptivity of the optimization procedure. The proposed algorithm is displayed in in Algorithm 1.

Algorithm 1 Partially adaptive momentum estimation method (Padam) input: initial point θ 1 ∈ X ; step sizes {α t }; momentum parameters {β 1t }, β 2 ; partially adaptive parameter p

∈ (0, 1/2] set m 0 = 0, v 0 = 0, v 0 = 0 for t = 1, . . . , T do g t = ∇f t (θ t ) m t = β 1t m t-1 + (1 -β 1t )g t v t = β 2 v t-1 + (1 -β 2 )g 2 t v t = max( v t-1 , v t ) θ t+1 = Π X ,diag( v p t ) θ t -α t • m t / v p t end for

In Algorithm 1, g t denotes the stochastic gradient and v t can be seen as a moving average over the second order momentum of the stochastic gradients. As we can see from Algorithm 1, the key difference between Padam and Amsgrad (Reddi et al., 2018) is that: while m t is still the first order momentum as in Adam/Amsgrad, it is now "partially adapted" by the second order momentum, i.e.,

θ t+1 = θ t -α t m t v p t , where v t = max( v t-1 , v t ) (Padam)

We call p ∈ (0, 1/2] the partially adaptive parameter. Note that 1/2 is the largest possible value for p and a larger p will result in non-convergence in the proof (see the details of the proof in the appendix). When p → 0, Algorithm 1 reduces to SGD with momentum3 and when p = 1/2, Algorithm 1 is exactly Amsgrad. Therefore, Padam indeed unifies Amsgrad and SGD with momentum. Now the question is, what value for p should we choose? Or in another way, is p = 1/2 the best choice? The answer is negative. The intuition behind this is simple: it is very likely that Adam/Amsgrad is "over-adaptive". One notable fact that people found when using adaptive gradient methods to train deep neural networks is that the learning rate needs to be much smaller than that of SGD-momentum (Keskar & Socher, 2017; Wilson et al., 2017) . For many tasks, the base learning rate for SGD-momentum is usually set to be 0.1 while that of Adam is usually set to be 0.001. In fact, the key reason that prohibits Adam from adopting a more aggressive learning rate is the large adaptive term 1/ √ v t . The existence of such a large adaptive term makes the effective learning rate (α t / √ v t ) easily explode with a larger α t . Moreover, the learning rate decaying strategy used in modern deep neural network training makes things worse. More specifically, after several rounds of decaying, the learning rates of the adaptive gradient methods are too small to make any significant progress in the training process. We call it "small learning rate dilemma". This explains the relatively weak performances of adaptive gradient methods at the later stage of the training process, where the non-adaptive gradient methods like SGD start to outperform them.

The above discussion suggests that we should consider using Padam with a proper adaptive parameter p, which will enable us to adopt a larger learning rate to avoid the "small learning rate dilemma". And we will show in our experiments (Section 5) that Padam can adopt an equally large base learning rate as SGD with momentum. Figure 1 shows the comparison of test error performances under the different partial adaptive parameter p for ResNet on both CIFAR-10 and CIFAR-100 datasets. We can observe that a larger p will lead to fast convergence at early stages and worse generalization performance later, while a smaller p behaves more like SGD with momentum: slow in early stages but finally catch up. With a proper choice of p (e.g., 1/8 in this case), Padam can obtain the best of both worlds.

Note that besides Algorithm 1, our partially adaptive idea can also be applied to other adaptive gradient methods such as Adagrad, Adadelta, RMSprop, AdaMax (Kingma & Ba, 2015) . For the sake of conciseness, we do not list the partially adaptive versions for other adaptive gradient methods here. We also would like to comment that Padam is totally different from the p-norm generalized version of Adam in Kingma & Ba (2015) , which induces AdaMax method when p → ∞. In their case, p-norm is used to generalize 2-norm of their current and past gradients while keeping the scale of adaptation unchanged. In sharp contrast, we intentionally change (reduce) the scale of the adaptive term in Padam to get better generalization performance.

Finally, note that in Algorithm 1 we remove the bias correction step used in the original Adam paper following Reddi et al. (2018) . Nevertheless, our arguments and theory are applicable to the bias correction version as well.

4. CONVERGENCE ANALYSIS OF THE PROPOSED ALGORITHM:

In this section, we establish the theory of convergence for our proposed algorithm in the online optimization setting (Zinkevich, 2003) , where we try to minimize the cumulative objective value of a sequence of loss functions: f 1 , f 2 , . . . , f T . In particular, at each time step t, the optimization algorithm picks a point θ t ∈ X , where X ∈ R d is the feasible set. A loss function f t is then revealed, and the algorithm incurs loss f t (θ t ). Let θ * be optimal solution to the cumulative objective function as follows

θ * ∈ argmin θ∈X T t=1 f t (θ),

where X is a feasible set for all steps. We evaluate our algorithm using the regret, which characterizes the sum of all previous loss function values f t (θ t ) relative to the performance of the best fixed parameter θ * from a feasible set. Specifically, the regret is defined as

R T = T t=1 f t (θ t ) -f t (θ * ) ,

and our goal is to predict the unknown parameter θ t and minimize the overall regret R T . Our theory is established for convex loss functions, where the following assumption holds.

Assumption 4.1 (Convex function). All f t (θ) are convex functions on X for 1 ≤ t ≤ T , i.e., for all x, y ∈ X ,

f t (y) ≥ f t (x) + ∇f t (x) (y -x).

Assumption 4.1 is a standard assumption in online learning and the same assumption has been used in the analysis of Adagrad (Duchi et al., 2011 ), Adam (Kingma & Ba, 2015) and Amsgrad (Reddi et al., 2018) .

Next we provide the main convergence rate result for our proposed algorithm.

Theorem 4.2. Under Assumption 4.1, if the convex feasible set X has bounded diameters, i.e., θθ * ∞ ≤ D ∞ for all θ ∈ X , and f t has bounded gradients, i.e., 

EQUATION

√:

d. Also, from the proof of Theorem 4.2 in Appendix A, we can see that the regret bound can remain in the same order even with a more modest momentum decay

β 1t = β 1 /t.

The following corollary demonstrates that our proposed algorithm enjoys a regret bound of O( √ T ), which is comparable to the best known bound for general convex online learning problems. Corollary 4.4. Under the same conditions of Theorem 4.2, for all T ≥ 1, the regret of Algorithm 1 satisfies R T = O √ T .

Corollary 4.4 suggests that Padam attains R T = o(T ) for all situations (no matter whether the data features are sparse or not). This suggests that Algorithm 1 indeed converges to the optimal solution when the loss functions are convex, as shown by the fact that lim T →∞ R T /T → 0.

5. EXPERIMENTS:

In this section, we empirically evaluate our proposed algorithm for training various modern deep learning models and test them on several standard benchmarks4 . We show that for nonconvex loss functions in deep learning, our proposed algorithm still enjoys a fast convergence rate, while its generalization performance is as good as SGD with momentum and much better than existing adaptive gradient methods such as Adam and Amsgrad.

5.1. ENVIRONMENTAL SETUP:

All experiments are conducted on Amazon AWS p3.8xlarge servers which come with Intel Xeon E5 CPU and 4 NVIDIA Tesla V100 GPUs (16G RAM per GPU). All experiments are implemented in Pytorch platform version 0.4.1 within Python 3.6.4.

5.2. BASELINE ALGORITHMS:

We compare our proposed algorithm against several state-of-the-art algorithms, including: (1) SGD with momentum, (2) Adam (Kingma & Ba, 2015), (3) Amsgrad (Reddi et al., 2018) , and ( 4) AdamW (Loshchilov & Hutter, 2017) .

Note that we do not perform the projection step explicitly in all experiments as in Reddi et al. (2018) . Also both Amsgrad and Padam will perform the bias correction step as in Adam for a fair comparison.

5.3. DATASETS / PARAMETER SETTINGS / CNN ARCHITECTURES:

We use several popular datasets for image classifications: CIFAR-10 ( Krizhevsky & Hinton, 2009) , CIFAR-100 (Krizhevsky & Hinton, 2009) , ImageNet dataset (ILSVRC2012) (Deng et al., 2009) . We adopt three popular CNN architectures to evaluate the performance of our proposed algorithms: VGGNet (Simonyan & Zisserman, 2014) , Residual Neural Network (ResNet) (He et al., 2016) , Wide Residual Network (Zagoruyko & Komodakis, 2016) . We test CIFAR-10 and CIFAR-100 tasks for 200 epochs. For all experiments, we use a fixed multi-stage learning rate decaying scheme: we decay the learning rate by 0.1 at the 50th, 100th and 150th epochs. We test ImageNet tasks for 100 epochs with the same multi-stage learning rate decaying scheme at the 30th, 60th and 80th epochs.

We perform grid search on validation set to choose the best base learning rate for all algorithms and also the second order momentum parameter β 2 for all the adaptive gradient methods. In terms of the choice of p, we recommend doing binary search from 1/4 to 1/8, to 1/16, etc. Yet in most cases we tested, 1/8 is a stable and reliable choice of p.

Details about the datasets, CNN architectures and all the specific model parameters used in the following experiments can be found in the supplementary materials.

5.4. EXPERIMENTAL RESULTS:

We compare our proposed algorithm with other baselines on training the aforementioned three modern CNN architectures for image classification on the CIFAR-10, CIFAR-100 and also ImageNet datasets. Due to the paper length limit, we leave all our experimental results regarding CIFAR-100 dataset in the supplementary materials. Figure 2 plots the train loss and test error (top-1 error) against training epochs on the CIFAR-10 dataset. As we can see from the figure, at the early stage of the training process, (partially) adaptive gradient methods including Padam, make rapid progress lowing both the train loss and the test error, while SGD with momentum converges relatively slowly.

After the first learning rate decaying at the 50-th epoch, different algorithms start to behave differently. SGD with momentum makes a huge drop while fully adaptive gradient methods (Adam and Amsgrad, AdamW) start to generalize badly. Padam, on the other hand, maintains relatively good generalization performance and also holds the lead over other algorithms. After the second decaying at the 100-th epoch, Adam and Amsgrad basically lose all the power of traversing through the parameter space due to the "small learning dilemma", while the performance of SGD with momentum finally catches up with Padam. AdamW improves the performance compared with original Adam but there are still generalization gaps left behind, at least in our test settings. Overall we can see that Padam indeed achieves the best of both worlds (i.e., Adam and SGD with momentum): it maintains faster convergence rate while also generalizing as well as SGD with momentum in the end. Table 1 shows the test accuracy of VGGNet on CIFAR-10 dataset, from which we can also observe the fast convergence of Padam. Specifically, Padam achieves the best test accuracy at 100th, 150th and 200th epochs for CIFAR-10, except for the 50th, where fully adaptive methods like Adam, Amsgrad and AdamW still enjoy their fast early stage convergence performances. This suggests that practitioners should once again, use fast to converge partially adaptive gradient methods for training deep neural networks, without worrying about the generalization performances. 

6. RELATED WORK:

We briefly review the related work in this section. There are only several studies closely related to improving the generalization performance of Adam. Zhang et al. (2017) proposed a normalized direction-preserving Adam (ND-Adam), which changes the adaptive terms from individual dimensions to the whole gradient vector. This makes it more like a SGD-momentum with learning rate adjusted in each iteration, rather than an adaptive gradient algorithm. The empirical result also shows that its performance resembles SGD with momentum. Keskar & Socher (2017) proposed to improve the generalization performance by switching from Adam to SGD. Yet the empirical result shows that it actually sacrifices some of the convergence speed for better generalization rather than achieving the best from both worlds. Also deciding the switching learning rate and the best switching point requires extra efforts on parameter tuning since they can be drastically different for different tasks according to the paper. Loshchilov & Hutter (2017) proposed to fix the weight decay regularization in Adam by decoupling the weight decay from the gradient update and this improves the generalization performance of Adam.

7. CONCLUSIONS AND FUTURE WORK:

In this paper, we proposed Padam, which unifies Adam/Amsgrad with SGD-momentum. With an appropriate choice of the partially adaptive parameter, we show that Padam can achieve the best from both worlds, i.e., maintaining fast convergence rate while closing the generalization gap. We also provide a theoretical analysis towards the convergence rate of Padam and show a similar datadependent regret bound as in Duchi et al. (2011); Reddi et al. (2018) .

It would be interesting to see how well Padam performs in other types of neural networks, such as recurrent neural networks (RNNs) (Hochreiter & Schmidhuber, 1997) and generative adversarial networks (GANs) (Goodfellow et al., 2014) . We leave it as a future work.

A PROOF OF THE MAIN RESULTS:

A.1 PROOF OF THEOREM 4.2

The proof of Theorem 4.2 needs the following lemmas.

Lemma A.1. Under the same conditions as in Theorem 4.2, we have

T t=1 d i=1 α t • m 2 t,i v p t,i ≤ αG (1-2p) ∞ √ 1 + log T (1 -β 1 )(1 -γ)(1 -β 2 ) p d i=1 g 1:T ,i 2 .

(A.1) Lemma A.1 basically describes the bound of the key quantity (

T t=1 d i=1 α t •m 2 t,i / v p t,i

) in the convergence analysis of Algorithm 1. Its proof is inspired by Lemma 2 in Reddi et al. (2018) . Note that the original proof in Kingma & Ba (2015) for the corresponding quantity contains some mistakes, which result in a bound without the logarithmic term in (A.1). Here we follow the corrected version in Reddi et al. (2018) .

Lemma A.2. For any V ∈ S d ++ and convex feasible set X ⊂ R d , suppose a 1 = Π X ,V p (b 1 ), a 2 = Π X ,V p (b 2 ) for p ∈ (0, 1/2], we have V p (a 1 -a 2 ) 2 ≤ V p (b 1 -b 2 ) 2 , (A.2)

where p ∈ (0, 1/2] is an absolute constant. Proof of Theorem 4.2. By Assumption 4.1, all f t 's are convex, we have

T t=1 f t (θ t ) -f t (θ * t ) ≤ T t=1 g t , θ t -θ * . (A.3)

Consider the update rule for Algorithm 1, let

V t = diag( v t ), then we have θ t+1 = Π X , V p t θ t - α t V -p t • m t . Since Π X , V p t (θ * ) = θ * for all θ * ∈ X , by Lemma A.2 we have V p/2 t (θ t+1 -θ * ) 2 2 ≤ V p/2 t (θ t -α t V -p t • m t -θ * ) 2 2 . (A.4)

Now expand the square term on the right hand side of (A.4), we have

V p/2 t (θ t+1 -θ * ) 2 2 ≤ V p/2 t (θ t -θ * ) 2 2 + α 2 t V -p/2 t m t 2 2 -2α t m t , θ t -θ * = V p/2 t (θ t -θ * ) 2 2 + α 2 t V -p/2 t m t 2 2 -2α t β 1t m t-1 + (1 -β 1t )g t , θ t -θ * , (A.5)

where the second equality follows from the definition for m t . Rearrange the items in (A.5), we have

g t , θ t -θ * = 1 2α t (1 -β 1t ) V p/2 t (θ t+1 -θ * ) 2 2 -V p/2 t (θ t -θ * ) 2 2 + α t 2(1 -β 1t ) • V -p/2 t m t 2 2 - β 1t 1 -β 1t m t-1 , θ t -θ * ≤ 1 2α t (1 -β 1t ) V p/2 t (θ t+1 -θ * ) 2 2 -V p/2 t (θ t -θ * ) 2 2 + α t 2(1 -β 1t ) • V -p/2 t m t 2 2 + β 1t α t-1 2(1 -β 1t ) • V -p/2 t-1 m t-1 2 2 + β 1t 2α t-1 (1 -β 1t ) V p/2 t-1 (θ t -θ * ) 2 2 , (A.6)

where the inequality holds due to Young's inequality. Summing over (A.6) for all 1 ≤ t ≤ T and submitting it back into (A.3), we obtain

T t=1 f t (θ t ) -f t (θ * t ) ≤ T t=1 1 2α t (1 -β 1t ) V p/2 t (θ t+1 -θ * ) 2 2 -V p/2 t (θ t -θ * ) 2 2 + T t=2 β 1t 2α t-1 (1 -β 1t ) V p/2 t-1 (θ t -θ * ) 2 2 + T t=2 β 1t α t-1 2(1 -β 1t ) • V -p/2 t-1 m t-1 2 2 + T t=1 α t 2(1 -β 1t ) • V -p/2 t m t 2 2 ≤ T t=1 d i=1 v p t,i 2α t (1 -β 1 ) (θ t+1,i -θ * i ) 2 -(θ t,i -θ * i ) 2 I1 + T t=1 d i=1 β 1t • v p t,i 2α t (1 -β 1 ) (θ t+1,i -θ * i ) 2 I2 + 1 + β 1 2(1 -β 1 ) T t=1 d i=1 α t • m 2 t,i v p t,i I3 , (A.7)

where the last inequality holds due to the fact that β 1t = β 1 λ t-1 is monotonically decreasing with t. For term I 1 , we have

T t=1 d i=1 v p t,i 2α t (1 -β 1 ) (θ t+1,i -θ * i ) 2 -(θ t,i -θ * i ) 2 = 1 2(1 -β 1 ) d i=1 v p 1,i • (θ 1,i -θ * i ) 2 α 1 + 1 2(1 -β 1 ) T t=2 d i=1 v p t,i α t - v p t-1,i α t-1 (θ t,i -θ * i ) 2 ≤ D 2 ∞ 2(1 -β 1 ) d i=1 v p 1,i α 1 + T t=2 d i=1 v p t,i α t - v p t-1,i α t-1 = D 2 ∞ 2(1 -β 1 ) d i=1 v p T,i α T = D 2 ∞ 2α(1 -β 1 ) d i=1 √ T • v p T,i , (A.8)

where the inequality follows from the bounded diameter condition and the definition of v t ensures that v p t,i /α t -v p t-1,i /α t-1 > 0, and the second equality holds due to simple telescope sum. For term I 2 , note that simple calculation yields that v p t,i ≤ G 2p ∞ , we have

T t=1 d i=1 β 1t v p t,i 2α t (1 -β 1 ) (θ t+1,i -θ * i ) 2 ≤ β 1 dD 2 ∞ G 2p ∞ 2α(1 -β 1 ) T t=1 √ tλ t-1 ≤ β 1 dD 2 ∞ G 2p ∞ 2α(1 -β 1 )(1 -λ) 2 , (A.9)

where the last inequality follows from first relaxing √ t to t and then using the geometric series summation rule. For term I 3 , by Lemma A.1 we have

1 + β 1 2(1 -β 1 ) T t=1 d i=1 α t • m 2 t,i v p t,i ≤ αG (1-2p) ∞ √ 1 + log T (1 -β 1 ) 2 (1 -γ)(1 -β 2 ) p d i=1 g 1:T ,i 2 .

(A.10) Submitting (A.8), (A.9) and (A.10) back into (A.7) yields the desired result.

A.2 PROOF OF COROLLARY 4.4

Proof of Corollary 4.4. By Theorem 4.2, we have

R T ≤ D 2 ∞ 2α(1 -β 1 ) d i=1 √ T • v p T,i + αG (1-2p) ∞ √ 1 + log T (1 -β 1 ) 2 (1 -γ)(1 -β 2 ) p d i=1 g 1:T ,i 2 + β 1 dD 2 ∞ G 2p ∞ 2α(1 -β 1 )(1 -λ) 2 .

Note that we have

d i=1 g 1:T ,i 2 ≤ d i=1 T t=1 g 2 t,i ≤ dG ∞ √ T ,

and by definition we also have

v p t,i = (1 -β 2 ) T j=1 β T -j 2 g 2 j,i p ≤ (1 -β 2 ) p • G 2p ∞ T j=1 β T -j 2 p ≤ G 2p ∞ .

Combine the above results we can easily have

R T = O √ T .

This completes the proof.

B PROOF OF TECHNICAL LEMMAS:

IN APPENDIX A B.1 PROOF OF LEMMA A.1 Proof. Consider T t=1 d i=1 α t • m 2 t,i v p t,i = T -1 t=1 d i=1 α t • m 2 t,i v p t,i + d i=1 α T • m 2 T,i v p T,i ≤ T -1 t=1 d i=1 α t • m 2 t,i v p t,i + d i=1 α T • m 2 T,i v p T,i ≤ T -1 t=1 d i=1 α t • m 2 t,i v p t,i + α √ T d i=1 T j=1 (1 -β 1j )β T -j 1 g j,i 2 (1 -β 2 ) T j=1 β T -j 2 g 2 j,i p , (B.1)

where the first inequality holds due to the definition of v T,i and the second inequality follows from the fact that β 1t = β 1 λ t-1 and λ ∈ (0, 1). (B.1) can be further bounded as:

T t=1 d i=1 α t • m 2 t,i v p t,i ≤ T -1 t=1 d i=1 α t • m 2 t,i v p t,i + α √ T (1 -β 2 ) p d i=1 T j=1 β T -j 1 g (1-2p) j,i T j=1 β T -j 1 g (1+2p) j,i T j=1 β T -j 2 g 2 j,i p ≤ T -1 t=1 d i=1 α t • m 2 t,i v p t,i + αG (1-2p) ∞ √ T (1 -β 1 )(1 -β 2 ) p d i=1 T j=1 β T -j 1 g (1+2p) j,i T j=1 β T -j 2 g 2 j,i p ≤ T -1 t=1 d i=1 α t • m 2 t,i v p t,i + αG (1-2p) ∞ √ T (1 -β 1 )(1 -β 2 ) p T j=1 d i=1 β T -j 1 g (1+2p) j,i β T -j 2 g 2 j,i p ≤ T -1 t=1 d i=1 α t • m 2 t,i v p t,i + αG (1-2p) ∞ √ T (1 -β 1 )(1 -β 2 ) p T j=1 d i=1 γ T -j |g j,i |,

where the first inequality holds due to Cauchy-Schwarz inequality and the fact that 0 ≤ β 1j < 1, the second inequality follows from the bounded gradient condition and

T j=1 β T -j 1 ≤ 1/(1 -β 1 ),

Under review as a conference paper at ICLR 2019 and the last inequality is due to the fact that β 1 /β p 2 ≤ β 1 / √ β 2 = γ. Now repeat the above process for 1 ≤ t ≤ T , we have

T t=1 d i=1 α t • m 2 t,i v p t,i ≤ αG (1-2p) ∞ (1 -β 1 )(1 -β 2 ) p T t=1 1 √ t t j=1 d i=1 γ t-j |g j,i | = αG (1-2p) ∞ (1 -β 1 )(1 -β 2 ) p d i=1 T t=1 |g t,i | T j=t γ j-t √ j ≤ αG (1-2p) ∞ (1 -β 1 )(1 -β 2 ) p d i=1 T t=1 |g t,i | √ t T j=t γ j-t ≤ αG (1-2p) ∞ (1 -β 1 )(1 -β 2 ) p d i=1 T t=1 |g t,i | (1 -γ) √ t , (B.2)

where the equality holds due to the change of the order of summation, the last inequality follows from the fact that T j=t γ j-t ≤ 1/(1 -γ). By Cauchy-Schwarz inequality , (B.2) can be further written as

T t=1 d i=1 α t • m 2 t,i v p t,i ≤ αG (1-2p) ∞ (1 -β 1 )(1 -γ)(1 -β 2 ) p d i=1 g 1:T ,i 2 T t=1 1 t ≤ αG (1-2p) ∞ √ 1 + log T (1 -β 1 )(1 -γ)(1 -β 2 ) p d i=1 g 1:T ,i 2 .

This completes the proof. • CIFAR-10 ( Krizhevsky & Hinton, 2009) : it consists of a training set of 50, 000 32 × 32 color images from 10 classes, and also 10, 000 test images. • CIFAR-100 (Krizhevsky & Hinton, 2009) : it is similar to CIFAR-10 but contains 100 image classes with 600 images for each. • ImageNet dataset (ILSVRC2012) (Deng et al., 2009) : ILSVRC2012 contains 1.28 million training images, and 50k validation images over 1000 classes.

EQUATION

C.2 PARAMETER SETTINGS:

We perform grid searches to choose the best base learning rate for all algorithms over {0.0001, 0.001, 0.01, 0.1, 1}, the partial adaptive parameter p from {1/4, 1/8, 1/16} and the second order momentum parameter β 2 from {0.9, 0.99, 0.999}. For SGD with momentum, the base learning rate is set to be 0.1 with a momentum parameter of 0.9. For Adam and Amsgrad, we set the base learning rate as 0.001. For Padam, the base learning rate is set to be 0.1 and the partially adaptive parameter p is set to be 1/8 due to its best empirical performance. We also tune the momentum parameters for all the adaptive gradient methods. After tuning, for Adam, Amsgrad, the momentum parameters are set to be β 1 = 0.9, β 2 = 0.99. And for Padam, we set β 1 = 0.9, β 2 = 0.999. Padam and SGD with momentum use a weight decay factor of 5 × 10 -4 and for Adam/ Amsgrad we use a weight decay factor of 1 × 10 -4 . For AdamW, the normalized weight decay weight decay factor is set to 2.5 × 10 -2 for CIFAR and 5 × 10 -2 for ImageNet. All experiments use cross-entropy as the loss function. The minibatch sizes for CIFAR-10 and CIFAR-100 are set to be 128 and for ImageNet dataset we set it to be 256.

C.3 CNN ARCHITECTURES:

VGGNet (Simonyan & Zisserman, 2014) : We use a modified VGG-16 architecture for this experiment. The VGG-16 network uses only 3 × 3 convolutional layers stacked on top of each other for increasing depth and adopts max pooling to reduce volume size. Finally, two fully-connected layers6 are followed by a softmax classifier.

ResNet (He et al., 2016) : Residual Neural Network (ResNet) introduces a novel architecture with "skip connections" and features a heavy use of batch normalization. Such skip connections are also known as gated units or gated recurrent units and have a strong similarity to recent successful elements applied in RNNs. We use ResNet-18 for this experiment, which contains 2 blocks for each type of basic convolutional building blocks in He et al. (2016) .

Wide ResNet (Zagoruyko & Komodakis, 2016) : Wide Residual Network further exploits the "skip connections" used in ResNet and in the meanwhile increases the width of residual networks. In detail, we use the 16 layer Wide ResNet with 4 multipliers (WRN-16-4) in our experiments.

D ADDITIONAL EXPERIMENTS:

Figure 4 plots the train loss and test error (top-1 error) against training epochs on the CIFAR-100 dataset. We can see that Padam achieves the best from both worlds by maintaining faster convergence rate while also generalizing as well as SGD with momentum in the end. Table 2 shows the test accuracy of VGGNet on CIFAR-100 dataset. We can see that for CIFAR-100 dataset, Padam achieves the best test accuracy at 100th, and also keep really close to SGD with momentum at 150th and 200th epochs (differences less than 0.1%).

As a side product of our experiments, we also examine the distance that θ t has traversed in the parameter space, i.e., θ t -θ 0 2 , as shown in many other studies (Hoffer et al., 2017; Xing et al., 

:

The formula here is equivalent to the one from the original paper(Duchi et al.,

2011) after simple manipulations.

Here for simplicity and consistency, we ignore the bias correction step in the original paper of Adam. Yet adding the bias correction step will not affect the argument in the paper.

The only difference between Padam with p = 0 and SGD with momentum is an extra constant factor (1 -β1), which can be moved into the learning rate such that the update rules for these two algorithms are identical.

The code to reproduce the experimental results is available online. The URL is removed for double-blind review

We did not conduct WideResNet experiment on Imagenet dataset due to GPU memory limits.

For CIFAR experiments, we change the ending two fully-connected layers from 2048 nodes to 512 nodes. For ImageNet experiments, we use batch normalized version (vgg16 bn) provided in Pytorch official package

We did not compare with AdamW here since it changes the definition of weight decay and thus have a way larger distance compared with other baselines.

Figures and Tables:

Figure 1: Performance comparison of Padam with different choices of p for training ResNet on CIFAR-10 / CIFAR-100 dataset.

Figure 2: Train loss and test error (top-1 error) of three CNN architectures on Cifar-10. In all cases, Padam achieves the fastest training procedure among all methods and generalizes slightly better than SGD-momentum.

Figure 3: Top-1 and Top-5 error for VGGNet and ResNet on ImageNet dataset. In all cases, Padam achieves the fastest training speed and generalizes as well as SGD with momentum.

Lemma A.2 is an adaptation of Lemma 5 in McMahan & Streeter (2010) (or Lemma 4 in Reddi et al. (2018)). Now we are ready to prove Theorem 4.2.

PROOF OF LEMMA A.2 Proof. The proof is inspired from Lemma 4 in Reddi et al. (2018) and Lemma 5 in McMahan & Streeter (2010). Since a 1 = argmin x∈X V p (x -b 1 ) 2 and a 2 = argmin x∈X V p (x -b 2 ) 2 , by projection property we have

popular datasets for image classifications.

Test accuracy of VGGNet on CIFAR-10. Bold number indicates the best result.Figure3plots the Top-1 and Top-5 error against training epochs on the ImageNet dataset for both VGGNet and ResNet 5 . We can see that on ImageNet, all methods behave similarly as in our CIFAR-10 experiments. Padam method again obtains the best from both worlds by achieving the fastest convergence while generalizing as well as SGD with momentum. Even though Amsgrad and AdamW have greatly improve the performance comparing with standard Adam, it still suffers from the generalization gap on ImageNet.

Table content: <table><tr><td>Methods</td><td/><td colspan="2">Test Accuracy (%)</td><td/></tr><tr><td/><td>50th Epoch</td><td>100th Epoch</td><td>150th Epoch</td><td>200th Epoch</td></tr><tr><td colspan="2">SGD Momentum 84.83 ± 0.43</td><td>91.18 ± 0.14</td><td>93.27 ± 0.10</td><td>93.32 ± 0.08</td></tr><tr><td>Adam</td><td>89.37 ± 0.37</td><td>91.83 ± 0.23</td><td>92.17 ± 0.20</td><td>92.21 ± 0.06</td></tr><tr><td>Amsgrad</td><td colspan="2">90.25 ± 0.39 92.25 ± 0.18</td><td>92.36 ± 0.11</td><td>92.36 ± 0.09</td></tr><tr><td>AdamW</td><td>89.36 ± 0.29</td><td>90.23 ± 0.22</td><td>92.86 ± 0.15</td><td>92.97 ± 0.08</td></tr><tr><td>Padam</td><td>88.47 ± 0.55</td><td colspan="3">92.49 ± 0.16 93.28 ± 0.12 93.45 ± 0.12</td></tr></table>

Test accuracy of VGGNet on CIFAR-100. Bold number indicates the best result.

Table content: <table><tr><td>Methods</td><td/><td colspan="2">Test Accuracy (%)</td><td/></tr><tr><td/><td>50th Epoch</td><td>100th Epoch</td><td>150th Epoch</td><td>200th Epoch</td></tr><tr><td colspan="2">SGD Momentum 57.37 ± 0.55</td><td>68.63 ± 0.35</td><td colspan="2">72.89 ± 0.18 73.03 ± 0.13</td></tr><tr><td>Adam</td><td>62.62 ± 0.41</td><td>66.73 ± 0.23</td><td>66.99 ± 0.20</td><td>67.17 ± 0.20</td></tr><tr><td>Amsgrad</td><td>63.54 ± 0.29</td><td>66.92 ± 0.33</td><td>67.24 ± 0.17</td><td>67.11 ± 0.18</td></tr><tr><td>AdamW</td><td colspan="2">63.88 ± 0.38 67.97 ± 0.20</td><td>68.75 ± 0.19</td><td>69.00 ± 0.10</td></tr><tr><td>Padam</td><td>61.92 ± 0.22</td><td colspan="2">70.52 ± 0.30 72.84 ± 0.25</td><td>72.95 ± 0.07</td></tr></table>

Peer review (iclr2019):
 This paper proposes a small modification to current adaptive gradient methods by introducing a partial adaptive parameter, showing improved generalization performance in several image classification benchmarks. Pros: - The modification is simple and easy to implement. - The proposed method shows improved performance across different datasets, including ImageNet. Cons: - Missing an important baseline - AdamW (https://arxiv.org/pdf/1711.05101.pdf) which shows that Adam can generalize as well as SGD and retain faster training. Basically, the poor generalization performance of Adam is due to the incorrect implementation of weight decay. - The experimental results for Adam are not convincing. It*s well-known that Adam is good at training but might perform badly on the test data. However, Adam performs much worse than SGD in terms of training loss in all plots, which is contrary to my expectation. I doubt that Adam is not tuned well. One possible explanation is that the training budget is not enough, first-order methods typically require 200 epochs to converge. So I suggest the authors training the networks longer (make sure the training loss levels off before the first drop of learning rate.). - Mixing the concept of generalization and test performance. Note that generalization performance typically measures the gap between training and test error. To make the comparison fair, please make sure the training error is zero (I expect both training error and training loss should be close to 0 on CIFAR). - In terms of optimization (convergence) performance, I cannot think of any reason that the proposed method would outperform Adam (or Amsgrad). The convergence analysis doesn*t say anything meaningful.