Year: 2019

Abstract:
From a simplified analysis of adaptive methods, we derive AvaGrad, a new optimizer which outperforms SGD on vision tasks when its adaptability is properly tuned. We observe that the power of our method is partially explained by a decoupling of learning rate and adaptability, greatly simplifying hyperparameter search. In light of this observation, we demonstrate that, against conventional wisdom, Adam can also outperform SGD on vision tasks, as long as the coupling between its learning rate and adaptability is taken into account. In practice, AvaGrad matches the best results, as measured by generalization accuracy, delivered by any existing optimizer (SGD or adaptive) across image classification (CIFAR, ImageNet) and character-level language modelling (Penn Treebank) tasks. This later observation, alongside of AvaGrad’s decoupling of hyperparameters, could make it the preferred optimizer for deep learning, replacing both SGD and Adam.

heading: 1 INTRODUCTION
text: Deep network architectures are becoming increasingly complex, often containing parameters that can be grouped according to multiple functionalities, such as gating, attention, convolution, and generation. Such parameter groups should arguably be treated differently during training, as their gradient statistics might be highly distinct. Adaptive gradient methods designate parameter-wise learning rates based on gradient histories, treating such parameters groups differently and, in principle, promise to be better suited for training complex neural network architectures.
Nonetheless, advances in neural architectures have not been matched by progress in adaptive gradient descent algorithms. SGD is still prevalent, in spite of the development of seemingly more sophisticated adaptive alternatives, such as RMSProp (Dauphin et al., 2015) and Adam (Kingma & Ba, 2015). Such adaptive methods have been observed to yield poor generalization compared to SGD in classification tasks (Wilson et al., 2017), and hence have been mostly adopted for training complex models (Vaswani et al., 2017; Arjovsky et al., 2017). For relatively simple architectures, such as ResNets (He et al., 2016a) and DenseNets (Huang et al., 2017), SGD is still the dominant choice.
At a theoretical level, concerns have also emerged about the current crop of adaptive methods. Recently, Reddi et al. (2018) has identified cases, even in the stochastic convex setting, where Adam (Kingma & Ba, 2015) fails to converge. Modifications to Adam that provide convergence guarantees have been formulated, but have shortcomings. AMSGrad (Reddi et al., 2018) requires non-increasing learning rates, while AdamNC (Reddi et al., 2018) and AdaBound (Luo et al., 2019) require that adaptivity be gradually eliminated during training. Moreover, while most of the recently proposed variants do not provide formal guarantees for non-convex problems, the few current convergence rate analyses in the literature (Zaheer et al., 2018; Chen et al., 2019) do not match SGD’s. Section 3 fully details the convergence rates of the most popular Adam variants, along with their shortcomings.
Our contribution is marked improvements to adaptive optimizers, from both theoretical and practical perspectives. At the theoretical level, we focus on convergence guarantees, deriving new algorithms:
• Delayed Adam. Inspired by Zaheer et al. (2018)’s analysis of Adam, Section 4 proposes a simple modification for adaptive gradient methods which yields a provable convergence rate ofO(1/ √ T )
in the stochastic non-convex setting – the same as SGD. Our modification can be implemented by swapping two lines of code and preserves adaptivity without incurring extra memory costs. To illustrate these results, we present a non-convex problem where Adam fails to converge to
a stationary point, while Delayed Adam – Adam with our proposed modification – provably converges with a rate of O(1/ √ T ).
• AvaGrad. Inspecting the convergence rate of Delayed Adam, we show that it would improve with an adaptive global learning rate, which self-regulates based on global statistics of the gradient second moments. Following this insight, Section 5 proposes a new adaptive method, AvaGrad, whose hyperparameters decouple learning rate and adaptability.
Through extensive experiments, Section 6 demonstrates that AvaGrad is not merely a theoretical exercise. AvaGrad performs as well as both SGD and Adam in their respectively favored usage scenarios. Along this experimental journey, we happen to disprove some conventional wisdom, finding adaptive optimizers, including Adam, to be superior to SGD for training CNNs. The caveat is that, excepting AvaGrad, these methods are sensitive to hyperparameter values. AvaGrad is a uniquely attractive adaptive optimizer, yielding near best results over a wide range of hyperparameters.

heading: 2 PRELIMINARIES

heading: 2.1 NOTATION
text: For vectors a = [a1, a2, . . . ], b = [b1, b2, . . . ] ∈ Rd, we use the following notation: 1a for elementwise division ( 1a = [ 1 a1 , 1a2 , . . . ]), √ a for element-wise square root ( √ a = [ √ a1, √ a2, . . . ]), a+ b for element-wise addition (a+ b = [a1 + b1, a2 + b2, . . . ]), a b for element-wise multiplication (a b = [a1b1, a2b2, . . . ]). Moreover, ‖a‖ is used to denote the `2-norm: other norms will be specified whenever used (e.g., ‖a‖∞). For subscripts and vector indexing, we adopt the following convention: the subscript t is used to denote an object related to the t-th iteration of an algorithm (e.g., wt ∈ Rd denotes the iterate at time step t); the subscript i is used for indexing: wi ∈ R denotes the i-th coordinate of w ∈ Rd. When used together, t precedes i: wt,i ∈ R denotes the i-th coordinate of wt ∈ Rd.

heading: 2.2 STOCHASTIC NON-CONVEX OPTIMIZATION
text: In the stochastic non-convex setting, we are concerned with the optimization problem:
min w∈Rd
f(w) = Es∼D [fs(w)] (1)
whereD is a probability distribution over a set S of “data points”. We also assume that f isM -smooth in w, as is typically done in non-convex optimization:
∀ w,w′ f(w′) ≤ f(w) + 〈∇f(w), w′ − w〉+ M 2 ‖w − w′‖2 (2)
Methods for stochastic non-convex optimization are evaluated in terms of number of iterations or gradient evaluations required to achieve small loss gradients. This differs from the stochastic convex setting where convergence is measured w.r.t. suboptimality f(w) − minw∈Rd f(w). We assume that the algorithm takes a sequence of data points S = (s1, . . . , sT ) from which it deterministically computes a sequence of parameter settingsw1, . . . , wT together with a distributionP over {1, . . . , T}. We say an algorithm has a convergence rate of O(g(T )) if E S∼DT
t∼P(t|S)
[ ‖∇f(wt)‖2 ] ≤ O(g(T ))
where, as defined above, f(w) = Es∼D [fs(w)].
We also assume that the functions fs have bounded gradients: there exists some G∞ such that ‖∇fs(w)‖∞ ≤ G∞ for all s ∈ S and w ∈ Rd. Throughout the paper, we also let G2 denote an upper bound on ‖∇fs(w)‖.

heading: 3 RELATED WORK
text: Here we present a brief overview of optimization methods commonly used for training neural networks, along with their convergence rate guarantees for stochastic smooth non-convex problems.
We consider methods which, at each iteration t, receive or compute a gradient estimate:
gt := ∇fst(wt), st ∼ D (3)
and perform an update of the form:
wt+1 = wt − αt · ηt mt (4)
where αt ∈ R is the global learning rate, ηt ∈ Rd are the parameter-wise learning rates, and mt ∈ Rd is the update direction, typically defined as:
mt = β1,tmt−1 + (1− β1,t)gt and m0 = 0. (5)
Non-momentum methods such as SGD, AdaGrad, and RMSProp (Dauphin et al., 2015; Duchi et al., 2011) have mt = gt (i.e., β1,t = 0), while momentum SGD and Adam (Kingma & Ba, 2015) have β1,t ∈ (0, 1). Note that while αt can always be absorbed into ηt, representing the update in this form will be convenient throughout the paper.
SGD uses the same learning rate for all parameters, i.e., ηt = ~1. Although SGD is simple and offers no adaptation, it has a convergence rate of O(1/ √ T ) with either constant, increasing, or decreasing learning rates (Ghadimi & Lan, 2013), and is widely used when training deep networks, especially CNNs (He et al., 2016a; Huang et al., 2017). At the heart of its convergence proof is the fact that Est [αt · ηt gt] = αt · ∇f(wt). Popular adaptive methods such as RMSProp (Dauphin et al., 2015), AdaGrad (Duchi et al., 2011), and Adam (Kingma & Ba, 2015) have ηt = 1√vt+ , where vt ∈ R d is given by:
vt = β2,tvt−1 + (1− β2,t)g2t and v0 = 0. (6)
As vt is an estimate of the second moments of the gradients, the optimizer designates smaller learning rates for parameters with larger uncertainty in their stochastic gradients. However, in this setting ηt and st are no longer independent, hence Est [αt · ηt gt] 6= αt · Est [ηt] ∇f(wt). This “bias” can cause RMSProp and Adam to present convergence issues, even in the stochastic convex setting (Reddi et al., 2018).
Recently, Zaheer et al. (2018) showed that, with a constant learning rate, RMSProp and Adam have a convergence rate of O(σ2 + 1/T ), where σ2 = supw∈Rd Es∼D [ ‖∇fs(w)−∇f(w)‖2 ] , hence
their result does not generally guarantee convergence. Chen et al. (2019) showed that AdaGrad and AMSGrad enjoy a convergence rate of O(log T/ √ T ) when a decaying learning rate is used. Note that both methods constrain ηt in some form, the former with β2,t = 1− 1/t (adaptability diminishes with t), and the latter explicitly enforces vt ≥ vj for all j < t (ηt is point-wise non-increasing). In both cases, the method is less adaptive than Adam, and yet analyses so far have not delivered a convergence rate that matches SGD’s.

heading: 4 SGD-LIKE CONVERGENCE WITHOUT CONSTRAINED RATES
text: Algorithm 1 DELAYED ADAM Input: w1 ∈ Rd, αt, > 0, β1,t, β2,t ∈ [0, 1)
1: Set m0 = 0, v0 = 0 2: for t = 1 to T do 3: Draw st ∼ D 4: Compute gt = ∇fst(wt) 5: mt = β1,tmt−1 + (1− β1,t)gt 6: ηt =
1√ vt−1+
7: wt+1 = wt − αt · ηt mt 8: vt = β2,tvt−1 + (1− β2,t)g2t 9: end for
We first take a step back to note the following: to show that Adam might not converge in the stochastic convex setting, Reddi et al. (2018) provide a stochastic linear problem where Adam fails to converge w.r.t. suboptimality. Since non-convex optimization is evaluated w.r.t. norm of the gradients, a different instance is required to characterize Adam’s behavior in this setting.
The following result shows that even for a quadratic problem, Adam indeed does not converge to a stationary point:
Theorem 1. For any ≥ 0 and constant β2,t = β2 ∈ [0, 1), there is a stochastic convex optimization problem for which Adam does not converge to a stationary point.
Proof. The full proof is given in Appendix A. The argument follows closely from Reddi et al. (2018), where we explicitly present a stochastic optimization problem:
min w∈[0,1]
f(w) := Es∼D [fs(w)] fs(w) =
{ C w 2
2 , with probability p := 1+δ C+1
−w, otherwise (7)
We show that, for large enough C (as a function of δ, , β2), Adam will move towards w = 1 where ∇f(1) = δ, and that the constraint w ∈ [0, 1] does not make w = 1 a stationary point.
This result, like the one in Reddi et al. (2018), relies on the fact that ηt and st are correlated: upon a draw of the rare sample C w 2
2 , the learning rate ηt decreases significantly and Adam takes a small step in the correct direction. On the other hand, a sequence of common samples increases ηt and Adam moves faster towards w = 1.
Instead of enforcing ηt to be point-wise non-increasing in t (Reddi et al., 2018), which forces the optimizer to take small steps even for a long sequence of common samples, we propose to simply have ηt be independent of st. As an extra motivation for this approach, note that successful proof strategies (Zaheer et al., 2018) to analyzing adaptive methods include the following step:
Est [ηt gt] = Est [(ηt−1 + ηt − ηt−1) gt] = ηt−1 ∇f(wt) + Est [(ηt − ηt−1) gt] (8) where bounding Est [(ηt − ηt−1) gt], seen as a form of bias, is a key part of recent convergence analyses. Replacing ηt by ηt−1 in the update equation of Adam removes this bias and can be implemented by simply swapping lines of code (updating η after w), yielding a simple convergence analysis without hindering the adaptability of the method in any way. Algorithm 1 provides pseudocode when applying this modification, highlighted in red, to Adam, yielding Delayed Adam. The following Theorem shows that this modification is enough to guarantee a SGD-like convergence rate of O(1/ √ T ) in the stochastic non-convex setting for general adaptive gradient methods.
Theorem 2. Consider any optimization method which updates parameters as follows: wt+1 = wt − αt · ηt gt (9)
where gt := ∇fst(wt), st ∼ D, and αt, ηt are independent of st. Assume that f(w1) − f(w?) ≤ D, f(w) = Es∼D [fs(w)] is M -smooth, and ‖∇fs(w)‖∞ ≤ G∞ for all s ∈ S, w ∈ Rd. Moreover, let Z = ∑T t=1 αt mini ηt,i.
For αt = γt √
2D TMG2∞ , if p(Z|st) = p(Z) for all st ∈ S, then:
E S∼DT t∼P(t|S)
[ ‖∇f(wt)‖2 ] ≤ √ MDG2∞
2T · ES∼DT
[∑T t=1 1 + γ 2 t ‖ηt‖
2∑T t=1 γt mini ηt,i
] (10)
where P assigns probabilities p(t) ∝ αt ·mini ηt,i.
Proof. The full proof is given in Appendix B, along with analysis for the case with momentum β1,t ∈ (0, 1) in Appendix B.1, and in particular β1,t = β1/ √ t, which yields a similar rate.
The convergence rate depends on ‖ηt‖ and mini ηt,i, which are random variables for Adam-like algorithms. However, if there are constants H and L such that 0 < L ≤ ηt,i ≤ H < ∞ for all i and t, then a rate of O(1/ √ T ) is guaranteed. This is the case for Delayed Adam, where 1/(G2 + ) ≤ ηt,i ≤ 1/ for all t and i. Theorem 2 also requires that αt and ηt are independent of st, which can be assured to hold by applying a “delay” to their respective computations, if necessary (i.e., replacing ηt by ηt−1, as in Delayed Adam).
Additionally, the assumption that p(Z|st) = p(Z), meaning that a single sample should not affect the distribution of Z = ∑T t=1 αt mini ηt,i, is required since P is conditioned on the samples S (unlike in
standard analysis, where Z = ∑T t=1 αt and αt is deterministic), and is expected to hold as T →∞. Practitioners typically use the last iterate wT or perform early-stopping: in this case, whether the assumption holds or not does not affect the behavior of the algorithm. Nonetheless, we also show in Appendix B.2 a similar rate that does not require this assumption to hold, which also yields a O(1/ √ T ) convergence rate taken that the parameter-wise learning rates are bounded from above and below.

heading: 5 AVAGRAD: AN ADAPTIVE METHOD WITH ADAPTIVE VARIANCE
text: Algorithm 2 AVAGRAD Input: w1 ∈ Rd, αt, > 0, β1,t, β2,t ∈ [0, 1)
1: Set m0 = 0, v0 = 0 2: for t = 1 to T do 3: Draw st ∼ D 4: Compute gt = ∇fst(wt) 5: mt = β1,tmt−1 + (1− β1,t)gt 6: ηt =
1√ vt−1+
7: wt+1 = wt − αt · ηt‖ηt/ √ d‖
2 mt 8: vt = β2,tvt−1 + (1− β2,t)g2t 9: end for
Now, we consider the implications of Theorem 2 for Delayed Adam, where ηt = 1√vt−1+ , and hence 1/(G2 + ) ≤ ηt,i ≤ 1/ for all t and i. For a fixed γt = γ, chosen a-priori (that is, without knowledge of the realization of {ηt}Tt=1), we can optimize γ to minimize the worst-case rate using ‖ηt‖2 ≤ d/ 2 and mini ηt,i ≥ G2 + . This yields γ∗ = O( ), and a convergence rate of O(1/ ), suggesting that, at least in the worst case, should be chosen to be as large as possible, and the learning rate α should scale linearly with (hence, also being large).
What if we allow γt to vary in each time step? For example, choosing γt = √ d/ ‖ηt‖ yields a convergence rate with a linear dependence on(
1 T ∑T t=1 mini ηt,i ‖ηt‖ )−1 ≤ ( 1 T √ d ∑T t=1 mini ηt,i maxi ηt,i )−1 . While using 1/(G2 + ) ≤ ηt,i ≤ 1/ we see that in the worst-case this is also O(1/ ), this dependence differs from the one with fixed γt = γ in a few aspects. Most notably, if we consider different scalings of ηt = 1√vt−1+ (e.g., small and varying vt−1), the convergence rate with fixed γ can get arbitrarily worse, while for γt = √ d/ ‖ηt‖ it
remains unchanged. In particular, for the case d = 1, we have (
1 T ∑T t=1 mini ηt,i ‖ηt‖ )−1 = 1, while for
fixed γ we get a dependence on ∑T t=1 1+γ 2η2t∑T
t=1 γηt , which again can be large if ηt is either large or small.
Lastly, multiplying the learning rate by √ d/ ‖ηt‖ removes its dependence on in the worst-case setting, making the two hyperparameters more separable. The choice of γt = √ d/ ‖ηt‖, motivated by the above facts, yields a method which we name AvaGrad – Adaptive VAriance Gradients, presented as pseudo-code in Algorithm 2 with the proposed scaling highlighted in red. We call it an “adaptive variance” method since, if we scale up or down the variance of the gradients, and hence also vt and ηt, the convergence guarantee in Theorem 2 does not change, while for a fixed learning rate (as is not uncommonly done in practice, except for discrete decays during training (Zagoruyko & Komodakis, 2016; Merity et al., 2018)) it can get arbitrarily bad.

heading: 6 EXPERIMENTS

heading: 6.1 SYNTHETIC DATA
text: To illustrate empirically the implications of Theorem 1 and Theorem 2, we set up a synthetic stochastic optimization problem with the same form as the one used in the proof of Theorem 1:
min w∈[0,1]
f(w) := E [fs(w)] fs(w) =
{ 999w 2
2 , with probability 0.002 −w, otherwise
(11)
This function has a stationary point w? = 1−0.002999·0.002 ≈ 1 2 , and it satisfies Theorem 1 for β1 = 0, β2 = 0.99, = 10−8. We proceed to perform stochastic optimization with Adam, AMSGrad, and Delayed Adam, with constant learning rate αt = 10−5. For simplicity, we let P be uniform over (1, . . . , T ), since αt is constant.
Figure 1 shows the progress of 1t ∑t t′=1 wt′ and 1 t ∑t t′=1 ‖∇f(wt′)‖
2 for each iteration t: as expected, Adam fails to converge to the stationary point w?, while both AMSGrad and Delayed Adam converge. Note that Delayed Adam converges significantly faster, likely because it has no constraint on the learning rates.

heading: 6.2 IMAGE CLASSIFICATION WITH CNNS
text: Our theory suggests that, in the worst case, should be chosen as large as possible, at which point the learning rate α should scale linearly with it. As a first experiment to assess this hypothesis, we analyze the interaction between α and when training a Wide ResNet 28-4 (Zagoruyko & Komodakis, 2016) on the CIFAR-10 dataset (Krizhevsky, 2009). Our training follows Zagoruyko & Komodakis (2016): images are channel-wise normalized, randomly cropped, and horizontally flipped during training. The learning rate is decayed by a factor of 5 at epochs 60, 120 and 160, and the model is trained for a total of 200 epochs with a weight decay of 0.0005. Appendix C describes additional experimental details.
We use a validation set of 5,000 images to evaluate the performance of SGD and different adaptive gradient methods: Adam, AMSGrad, AdaBound (Luo et al., 2019), AdaShift (Zhou et al., 2019), and our proposed algorithm, AvaGrad. Additionally, we also assess whether performing weight decay as proposed in Loshchilov & Hutter (2019) instead of standard L2 regularization positively impacts the performance of adaptive methods: we do this by also evaluating AdamW and AvaGradW.
We run each adaptive method with different powers of 10 for , from its default value = 10−8 up to = 100, which is large enough such that adaptability should be almost completely removed from the algorithm. We also vary the learning rate α of each method with different powers of 10, multiplied by 1 and 5 (e.g., 0.05, 0.1, 0.5, 1.0, . . . ). Figure 2 shows the results for Adam and AvaGrad. Our main findings are twofold:
• The optimal for every adaptive method is considerably larger than the values typically used in practice, ranging from 0.1 (Adam, AMSGrad, AvaGradW) to 10.0 (AvaGrad, AdamW). For Adam and AMSGrad, the optimal learning rate is α = = 0.1, a value 100 times larger than the default.
• All adaptive methods, except for AdaBound, outperform SGD in terms of validation performance. Note that for SGD the optimal learning rate is α = 0.1, matching the value used in work such as He et al. (2016a); Zagoruyko & Komodakis (2016); Xie et al. (2017), which presented state-of-the-art results at time of publication.
However, the fact that adaptive methods outperform SGD in this setting is not conclusive, since they are executed with more hyperparameter settings (varying as well as α). Moreover, the main motivation for adaptive methods is to be less sensitive to hyperparameter values; performing an extensive grid search defeats their purpose.
Aiming for a fair comparison between SGD and adaptive methods, we also train a Wide ResNet 28-10 on both CIFAR-10 and CIFAR-100, evaluating the test performance of each adaptive method with its optimal values for α and found in the previous experiment. For SGD, we confirmed that
the learning rate α = 0.1 still yielded the best validation performance with the new architecture, hence the fact that we transfer hyperparameters from the Wide ResNet 28-4 runs does not unfairly advantage adaptive methods in the comparison with SGD. With a larger network and a different task (CIFAR-100), this experiment should also capture how hyperparameters of adaptive methods transfer between tasks and models.
On CIFAR-10, SGD achieves 3.86% test error (reported as 4% in Zagoruyko & Komodakis (2016)) and is outperformed by both Adam (3.64%) and AvaGrad (3.80%). On CIFAR-100, SGD (19.05%) is outperformed by Adam (18.96%), AMSGrad (18.97%), AdaShift (18.88%), AvaGrad (18.76%), and AvaGradW (19.04%). We believe these results are surprising, as they show that adaptive methods can yield state-of-the-art performance when training CNNs as long as their adaptability is correctly controlled with .
As a final evaluation of the role of adaptability when training convolutional networks, we repeat the previous experiment on the ImageNet dataset (Russakovsky et al., 2015), training a ResNet 50 (He et al., 2016b) with SGD and different adaptive methods, transferring the hyperparameters from our original CIFAR-10 results. Training follows Gross & Wilber (2016): the network is trained for 100 epochs with a batch size of 256, the learning rate is decayed by a factor of 10 at epochs 30, 60 and 90, and a weight decay of 0.0001 is applied. SGD yields 24.01% top-1 validation error, underperforming Adam (23.45%), AMSGrad (23.46%), AvaGrad (23.58%) and AvaGradW (23.49%). Again, note that the hyperparameters used for SGD match the ones in He et al. (2016a), He et al. (2016b) and Gross & Wilber (2016): an initial learning rate of 0.1 with a momentum of 0.9. Table 1 summarizes.

heading: 6.3 LANGUAGE MODELLING WITH RNNS
text: It is perhaps not very surprising that to perform optimally in the image classification tasks studied previously, adaptive gradient methods required large values of , and hence were barely adaptive. Here, we consider a task where state-of-the-art results are typically achieved by adaptive methods with low values for : language modelling with recurrent networks. In particular, we perform character-level language modelling on Penn Treebank dataset (Marcus et al., 1994; Mikolov et al., 2010) with LSTMs, following Merity et al. (2018). The model is trained for 500 epochs, and the learning rate is decayed by 10 at epochs 300 and 400. A batch size of 128, a BPTT length of 150, and weight decay of 1.2× 10−6 are used, along with dropout. We evaluate the validation performance of SGD, Adam, AMSGrad, AdaShift, AdaBound, AdamW, AvaGrad and AvaGradW with varying learning rate α and adaptability parameter , when training a 3-layer LSTM with 300 hidden units in each layer. Figure 3 shows that, in this task, smaller values for are indeed optimal: Adam, AMSGrad and AvaGrad performed best with = 10−8. The optimal learning rates for both Adam and AMSGrad, α = 0.002, agree with the value used in Merity et al. (2018). Both AvaGrad and AvaGradW performed best with α = 200: the former with = 10−8, the latter with = 10−5.
Next, we train a 3-layer LSTM with 1000 hidden units per layer (the same model used in Merity et al. (2018), where it was trained with Adam), choosing values for α, which yielded the best validation performance in the previous experiment. For SGD, we again confirmed that a learning rate of 20 performed best on the validation set. Table 1 (right column) reports all results.
In this setting, AvaGrad and AvaGradW outperform Adam, achieving bit-per-characters of 1.179 and 1.175 compared to 1.182.

heading: 6.4 HYPERPARAMETER SEPARABILITY AND DOMAIN-INDEPENDENCE
text: One of the main motivations behind AvaGrad is that it removes the dependence between the learning rate α and the adaptability parameter , at least in the worst-case rate of Theorem 2. Observing the heatmaps in Figure 2 and 3, we can see that indeed AvaGrad offers more separability between α and , when compared to Adam. For example, for ≥ 0.0001, it has little to no interaction with the learning rate α, as opposed to Adam where the optimal α increases linearly with . For language modelling on Penn Treebank, the optimal learning rate for AvaGrad was α = 200 for every choice of , while for image classification on CIFAR-10, we had α = 1.0 for all values of except for ∈ {10−5, 100}. This suggests that AvaGrad enables a grid search over α and (with quadratic complexity) to be broken into two line searches over α and separately (linear complexity).

heading: 7 CONCLUSION
text: As neural architectures become more complex, with parameters having highly heterogeneous roles, parameter-wise learning rates are often necessary for training. However, adaptive methods have both theoretical and empirical gaps, with SGD outperforming them in some tasks and having stronger theoretical convergence guarantees. In this paper, we close this gap, by first providing a convergence rate guarantee that matches SGD’s, and by showing that, with proper hyperparameter tuning, adaptive methods can dominate in both computer vision and natural language processing tasks. Key to our finding is AvaGrad, our proposed optimizer whose adaptability is decoupled from its learning rate.
Our experimental results show that proper tuning of the learning rate together with the adaptability of the method is necessary to achieve optimal results in different domains, where distinct neural network architectures are used across tasks. By enabling this tuning to be performed in linear time, AvaGrad takes a leap towards efficient domain-agnostic training of general neural architectures.

heading: A PROOF OF THEOREM 1
text: Proof. Consider the following stochastic optimization problem:
min w∈[0,1]
f(w) := Es∼D [fs(w)] fs(w) =
{ C w 2
2 , with probability p := 1+δ C+1
−w, otherwise (12)
where C > 1−pp > 1 + w1 √ 1−β2 . Note that ∇f(w) = pCw − (1 − p), and f is minimized at w? = 1−pCp = C−δ C(1+δ) .
The proof follows closely from Reddi’s linear example for convergence in suboptimality. We assume w.l.o.g. that β1 = 0. Consider:
∆t = wt+1 − wt = −η gt√ vt + = −η gt√ β2vt−1 + (1− β2)g2t +
(13)
E [∆t] η = E [wt+1 − wt] η = −E
[ gt√
β2vt−1 + (1− β2)g2t +
]
= pE  −Cwt√β2vt−1 + (1− β2)C2w2t + ︸ ︷︷ ︸ T1 + (1− p)E  1√β2vt−1 + (1− β2) + ︸ ︷︷ ︸ T2  (14)
where the expectation is over all the randomness in the algorithm up to time t, as all expectations to follow in the proof. Note that T1 = 0 for wt = 0. For wt > 0 we bound T1 as follows:
T1 ≥ −Cwt√
(1− β2)C2w2t = −1√ 1− β2
(15)
Hence, T1 ≥ min(0, −1√1−β2 ) = −1√ 1−β2 .
As for T2, we have, from Jensen’s inequality:
E [T2] ≥ 1√
β2E [vt−1] + 1− β2 + (16)
Now, remember that vt−1 = (1− β2) ∑t−1 i=1 β t−i−1 2 g 2 i , hence:
E [vt−1] = (1− β2) t−1∑ i=1 βt−i−12 E [ g2i ]
= (1− β2) t−1∑ i=1 βt−i−12 ( 1− p+ pC2E [ w2t ])
≤ (1− β2) t−1∑ i=1 βt−i−12 ( 1− p+ pC2 ) ≤ (1− βt−12 ) ( 1− p+ pC2 ) ≤ (1 + δ)C2
(17)
and thus:
E [T2] ≥ 1√
β2(1 + δ)C + 1− β2 + (18)
Plugging in the bounds for T1 and T2 in Equation 14:
E [∆t] η ≥ 1 + δ C + 1 −1√ 1− β2 +
( 1− 1 + δ
C + 1
) 1√
β2(1 + δ)C + 1− β2 + (19)
Hence, for large enough C, and C δ, w? ≈ 11+δ while the above quantity becomes nonnegative, and hence E [wt] ≥ w1. In other words, Adam will, in expectation, drift away from the stationary point, towards w = 1, at which point ‖∇f(1)‖2 = δ. For example, δ = 1 implies that limT→∞ 1 T ∑T t=1 E [ ‖∇f(wt)‖2 ] = 1. To see that w = 1 is not a stationary point due to the feasibility constraints, check that∇f(1) = 1 > 0: that is, the negative gradient points towards the feasible region.

heading: B PROOF OF THEOREM 2
text: Proof. Throughout the proof we use the following notation for clarity:
Ht = max i ηt,i Lt = min i ηt,i (20)
We start from the fact that f is M -smooth:
f(wt+1) ≤ f(wt) + 〈∇f(wt), wt+1 − wt〉+ M
2 ‖wt+1 − wt‖2 (21)
and use the update wt+1 = wt − αt · ηt mt:
f(wt+1) ≤ f(wt)− αt 〈∇f(wt),mt ηt〉+ α2tM
2 ‖mt ηt‖2
≤ f(wt)− αt 〈∇f(wt),mt ηt〉+ α2tMG 2 ∞ ‖ηt‖
2
2
≤ f(wt)− αtβ1,t 〈∇f(wt),mt−1 ηt〉 − αt(1− β1,t) 〈∇f(wt), gt ηt〉+ α2tMG 2 ∞ ‖ηt‖
2
2
≤ f(wt) + αtβ1,t ‖∇f(wt)‖ · ‖mt−1 ηt‖ − αt(1− β1,t) 〈∇f(wt), gt ηt〉+ α2tMG 2 ∞ ‖ηt‖
2
2
≤ f(wt) + αtβ1,tG22Ht − αt(1− β1,t) 〈∇f(wt), gt ηt〉+ α2tMG 2 ∞ ‖ηt‖
2
2 (22)
where in the first step we used the fact that ‖mt ηt‖2 = ∑d i=1m 2 t,iη 2 t,i ≤ maxjm2t,j ∑d i=1 η 2 t,i ≤ G2∞ ‖ηt‖ 2, in the second we usedmt = β1,tmt−1+(1−β1,t)gt, in the third we used Cauchy-Schwarz,
and in the fourth we used ‖∇f(wt)‖ ≤ G2, along with ‖mt−1 ηt‖ = √∑d i=1m 2 t−1,iη 2 t,i ≤
maxj ηt,j √∑d i=1m 2 t−1,i ≤ G2Ht.
Now, taking the expectation over st, and using the fact that Est [gt] = ∇f(wt), and that ηt, αt are both independent of st:
Est [f(wt+1)] ≤ f(wt) + αtβ1,tG22Ht − αt(1− β1,t) 〈∇f(wt),∇f(wt) ηt〉+ α2tMG 2 ∞ ‖ηt‖
2
2
≤ f(wt) + αtβ1,tG22Ht − αt(1− β1) ‖∇f(wt)‖ 2 Lt +
α2tMG 2 ∞ ‖ηt‖
2
2 (23)
where in the second step we used β1,t ≤ β1 and 〈∇f(wt),∇f(wt) ηt〉 = ∑d i=1∇f(w)2i ηt,i ≥
minj ηt,j ∑d i=1∇f(w)2i = Lt ‖∇f(w)‖ 2.
Re-arranging, we get:
αtLt(1− β1) ‖∇f(wt)‖2 ≤ f(wt)− Est [f(wt+1)] + αtβ1,tG22Ht + α2tMG 2 ∞ ‖ηt‖
2
2 (24)
Now, defining p(t) = αtLtZ , where Z = ∑T t=1 αtLt, dividing by Z(1− β1) and summing over t: T∑ t=1 p(t) ‖∇f(wt)‖2 ≤ 1 Z(1− β1) T∑ t=1 ( f(wt)− Est [f(wt+1)] + αtβ1,tG22Ht + α2tMG 2 ∞ ‖ηt‖ 2 2 ) (25)
Now, taking the conditional expectation over all samples S given Z:
ES [ T∑ t=1 p(t) ‖∇f(wt)‖2 ∣∣∣Z] ≤ 1 Z(1− β1) ( T∑ t=1 ( ES [f(wt)|Z]− ES [Est [f(wt+1)] |Z] ) +
T∑ t=1 E
[ αtβ1,tG 2 2Ht + α2tMG 2 ∞ ‖ηt‖ 2
2 ∣∣∣Z]) ≤ 1 Z(1− β1) ( T∑ t=1 ( ES [f(wt)|Z]− ES [f(wt+1)|Z]
) +
T∑ t=1 E
[ αtβ1,tG 2 2Ht + α2tMG 2 ∞ ‖ηt‖ 2
2 ∣∣∣Z]) = 1
Z(1− β1)
( f(w1)− ES [f(wT+1)|Z]
+ T∑ t=1 E
[ αtβ1,tG 2 2Ht + α2tMG 2 ∞ ‖ηt‖ 2
2
∣∣∣Z])
(26)
where in the second step we used ES [Est [f(wt+1)] |Z] = ES [f(wt+1)] which follows from the assumption that p(Z|st) = p(Z), and the third step follows from a telescoping sum, along with the fact that ES [f(w1)] = f(w1). Now, using f(w1)− ES [f(wT+1)|Z] ≤ f(w1)− f(w?) ≤ D:
ES [ T∑ t=1 p(t) ‖∇f(wt)‖2 ∣∣∣Z] ≤ 1 Z(1− β1) ( D + T∑ t=1 ES [ αtβ1,tG 2 2Ht + α2tMG 2 ∞ ‖ηt‖ 2 2 ∣∣∣Z]) (27)
Then, taking the expectation over Z:
ES [ T∑ t=1 p(t) ‖∇f(wt)‖2 ] ≤ E [ 1 Z(1− β1) T∑ t=1 ( D T + αtβ1,tG 2 2Ht + α2tMG 2 ∞ ‖ηt‖ 2 2 )] (28)
Now, let αt = γt √
2D TMG2∞ :
ES [ T∑ t=1 p(t) ‖∇f(wt)‖2 ] ≤ ES [ 1 Z(1− β1) T∑ t=1 ( D T + γtβ1,tG 2 2Ht √ 2D TMG2∞ + D T γ2t ‖ηt‖ 2 )]
≤ E
[ D
T · Z(1− β1) T∑ t=1
( 1 + γtβ1,tHt √ 2dTG22 MD + γ2t ‖ηt‖ 2 )] (29)
where we used the fact that G2 ≤ G∞ √ d.
Now, recall that Z = ∑T t=1 αtLt = √ 2D
TMG2∞
∑T t=1 γtLt:
ES [ T∑ t=1 p(t) ‖∇f(wt)‖2 ] ≤ ES  1(1− β1) √ MDG2∞ 2T · ∑T t=1 ( 1 + γtβ1,tHt √ 2dTG22 MD + γ 2 t ‖ηt‖ 2 ) ∑ t=1 γtLt 
= 1
(1− β1)
√ MDG2∞
2T · ES
 ∑T t=1 ( 1 + γtβ1,tHt √ 2dTG22 MD + γ 2 t ‖ηt‖ 2 ) ∑ t=1 γtLt  (30)
Setting β1,t = β1 = 0 and checking that ∑T t=1 p(t) ‖∇f(wt)‖ 2 = Et∼P(t|S) [ ‖∇f(wt)‖2 ] :
E S∼DT t∼P(t|S)
[ ‖∇f(wt)‖2 ] ≤ √ MDG2∞
2T · ES∼DT
[∑T t=1 1 + γ 2 t ‖ηt‖
2∑ t=1 γtLt
] (31)
Recalling that Lt = mini ηt,i proves the claim.
B.1 THE CASE WITH FIRST-ORDER MOMENTUM
For the case β1,t > 0, assume that β1,t = β1√t in Equation 30:
ES [ T∑ t=1 p(t) ‖∇f(wt)‖2 ] ≤ 1 (1− β1) √ MDG2∞ 2T · ES  ∑T t=1 ( 1 + γtHt β1√ t √ 2dTG22 MD + γ 2 t ‖ηt‖ 2 ) ∑ t=1 γtLt  ≤ 1
(1− β1)
√ MDG2∞
2T · ES
β1 √ 2dTG22 MD (maxt γtHt) ∑T t=1 1√ t + ∑T t=1 ( 1 + γ2t ‖ηt‖ 2 )
∑ t=1 γtLt  ≤ 1
(1− β1)
√ MDG2∞
2T · ES
2Tβ1 √ 2dG22 MD (maxt γtHt) + ∑T t=1 ( 1 + γ2t ‖ηt‖ 2 )
∑ t=1 γtLt
 (32)
where in the last step we used ∑T t=1 1√ t ≤ 2 √ T . Similarly to the guarantee in Equation 31, we can show a O(1/ √ T ) convergence rate if we further assume that there exist constants H and L such that 0 < L ≤ ηt,i ≤ H < ∞ for all i and t (i.e., the parameter-wise learning rates are bounded away from zero and also from above), and that γt is bounded similarly. For example, having γt = γ yields:
ES [ T∑ t=1 p(t) ‖∇f(wt)‖2 ] ≤ 1 (1− β1) √ MDG2∞ 2T · ES 2THγβ1 √ 2dG22 MD + ∑T t=1 ( 1 + γ2dH2 )∑ t=1 γL  = 1
L(1− β1)
√ MDG2∞
2T ·
( γ−1 + 2Hβ1 √ 2dG22 MD + γdH2 ) (33)
where in the first step we used ‖ηt‖2 ≤ dH2, Ht ≤ H , and Lt ≥ L. Note that for any constant γ the above is O(1/ √ T ).
B.2 THE CASE WITH UNCONDITIONAL DISTRIBUTION OVER ITERATES
To show a similar bound without the assumption that p(Z|st) = p(Z), we can alternatively bound Lt and ‖ηt‖ using the worst case over possible samples S. From (24) we have, with β1,t = 0:
( inf S Lt ) αt(1− β1) ‖∇f(wt)‖2 ≤ f(wt)− Est [f(wt+1)] + α2tLG 2 ∞
( supS ‖ηt‖ 2 )
2 (34)
Now, define p(t) = αt (infS Lt) /Z with Z = ∑T t=1 αt (infS Lt) instead. As long as αt does not depend on S, Z is no longer a random variable. Following the same steps as above leads to the following:
ES∼DT t∼P(t)
[ ‖∇f(wt)‖2 ] ≤ √ MDG2∞
2T ·
∑T t=1 1 + γ 2 t ( supS ‖ηt‖ 2 )
∑ t=1 γt (infS Lt)
(35)
In particular, if there are constants H and L such that 0 < L ≤ ηt,i ≤ H < ∞ for all i and t, can bound supS ‖ηt‖ 2 ≤ dH2 and infS Lt ≥ L, yielding:
ES∼DT t∼P(t)
[ ‖∇f(wt)‖2 ] ≤ √ MDG2∞ 2T · ∑T t=1 1 + γ 2 t dH 2 L ∑ t=1 γt
(36)
Hence a O(1/ √ T ) follows as long as γt can be upper and lower bounded accordingly by constants.

heading: C EXPERIMENTAL DETAILS
text: C.1 CIFAR
The CIFAR-10 and CIFAR-100 datasets (Krizhevsky, 2009) consist of 60,000 RGB images with 32× 32 pixels, with a standard split of 50,000 and 10,000 training and test images, sampled from 10 and 100 classes, respectively. We pre-process the dataset with channel-wise normalization using statistics from the training set, and for data-augmentation we flip each image horizontally with 50% probability, along with a random cropping, achieved by first padding 4 black pixels to each edge of the image and then extracting a random 32× 32 crop. For the hyperparameter exploration with a Wide ResNet 28-4, we measure performance on a validation set of 5,000 images sampled from the training set, while for the final results with the Wide ResNet 28-10, we report results on the test set.
Each Wide ResNet is trained with a batch size of 128 for a total of 200 epochs on a single GPU, with the learning rate being decayed by a factor of 5 at epochs 60, 120 and 160. A weight decay of 0.0005 is used with every optimization method. For SGD, we use a momentum of 0.9, while for adaptive methods, we use β1 = 0.9, β2 = 0.999, as suggested in their respective papers. For AdaBound, we use the default α∗ = 0.1 and γ = 10−3. For AdaShift, we use the default n = 10.
C.2 IMAGENET
The ILSVRC 2012 datasets (Russakovsky et al., 2015) is composed of 1.2M training and 50,000 validation RGB images, sampled from a total of 1,000 classes. We train a ResNet 50 (He et al., 2016b), and report results using single-crops of 224× 224 images for evaluation. We follow Gross & Wilber (2016) for data-augmentation and training specifics: in particular, we decay the learning rate by a factor of 10 at epochs 30, 60 and 90, and use a weight decay of 0.0001. We use 4 GPUs for training, with a total batch size of 256 (64 per GPU).
C.3 PENN TREEBANK
We follow Merity et al. (2018) for both the model and optimization details for the Penn Treebank dataset (Marcus et al., 1994) for character-level language modelling (Mikolov et al., 2010). Again,
we measure validation performance for the small-scale experiments, and test performance for the large-scale ones.
More specifically, we train a 3-layer LSTM (Hochreiter & Schmidhuber, 1997) with an embedding size of 200, and decay the learning rate by a factor of 10 at epochs 300 and 400, while the model is trained for a total of 500 epochs. We use a batch size of 128 and BPTT length of 150. The model is regularized with a weight decay of 1.2 × 10−6, a weight dropout (Merity et al., 2017) of p = 0.5, and a dropout (Srivastava et al., 2014) of p = 0.1 for the input and output layers and p = 0.25 for the hidden-layer.

Review summaries:
In this paper the authors develop variants of Adam which corrects for the relationship of the gradient and adaptive terms that causes convergence issues, naming them Delayed Adam and AvaGrad. They also provide proofs demonstrating they solve the convergence issues of Adam in O(1/sqrt(T)) time. They also introduce a convex problem where Adam fails to converge to a stationary point.

This paper proposes a new adaptive method, which is called AvaGrad. The authors first show that Adam may not converge to a stationary point for a stochastic convex optimization in Theorem1, which is closely related to [1]. They then show that by simply making $eta_t$ to be independent of the sample $s_t$, Adam is able to converge just like SGD in Theorem2. Theorem2 follows the standard SGD techniques. Next, they propose AVAGRAD, which is based on the idea of getting rid of the effect of $\epsilon$.