July 02, 2023
Optimizer is an essential component for the success of deep learning, which guides the neural network to update the parameters according to the loss on the training set. SGD and Adam are two classical and effective optimizers on which researchers have proposed many variants, such as SGDM and RAdam. In this paper, we innovatively combine the backward-looking and forward-looking aspects of the optimizer algorithm and propose a novel Admeta (A Double exponential Moving averagE To Adaptive and non-adaptive momentum) optimizer framework. For backward-looking part, we propose a DEMA variant scheme, which is motivated by a metric in the stock market, to replace the common exponential moving average scheme. While in the forward-looking part, we present a dynamic lookahead strategy which asymptotically approaches a set value, maintaining its speed at early stage and high convergence performance at final stage. Based on this idea, we provide two optimizer implementations, AdmetaR and AdmetaS, the former based on RAdam and the latter based on SGDM. Through extensive experiments on diverse tasks, we find that the proposed Admeta optimizer outperforms our base optimizers and shows advantages over recently proposed competitive optimizers. We also provide theoretical proof of these two algorithms, which verifies the convergence of our proposed Admeta.
The field of training neural network is dominated by gradient decent optimizers for a long time, which use first order method. Typical ones include SGD [1] and SGD with momentum (SGDM) [2], which are simple yet efficient algorithms and enjoy even better resulting convergence than many recently proposed optimizers. However, it suffers the disadvantage of low speed in initial stage and poor performance in sparse training datasets. This shortcoming can not be ignored since with the development of deep learning, the amount of data becomes much larger, and the model becomes much more complex. The time to train a network is also considered an important metric when evaluating an optimizer. To address this issue, optimizers with adaptive learning rate have been proposed which use nonuniform stepsizes to scale the gradient while training, and the usual implementation is scaling the gradient by square roots of some kind of combination of the squared values of historical gradients. By far the most used are Adam [3] and AdamW [4] due to their simplicity and high training speed in early stage. Despite their popularity, Adam and many variants like of it (such as RAdam [5]) is likely to achieve worse generalization ability than non-adaptive optimizers, observing that their performance quickly plateaus on validation sets.
To achieve a better tradeoff, researchers have made many improvements based on SGD and Adam family optimizers. One attempt is switching from adaptive learning rate methods to SGD, based on the idea of complementing each other’s advantages. However, a sudden change from one optimizer to another in a set epoch or step is not applicable because different algorithms make characteristic choices at saddle points and tend to converge to final points whose loss functions nearby have different geometry [6]. Therefore, many optimizers based on this idea seek for a smooth switch. The representative ones are AdaBound [7] and SWATS [8]. The second attempt is proposing new method to further accelerate SGDM, including introducing power exponent (pbSGD [9]), aggregated momentum (AggMo [10]) and warm restarts (SGDR [11]). The third attempt is modifying the process of optimizers with adaptive learning rate to achieve better local optimum, which is the most popular field in recent researches [12], [13]. Due to space constraints, please see more related work in Appendix 7.
We focus in this paper on the use of historical and future information about the optimization process of the model, both of which we argue are important for models to reach their optimal points. To this end, we introduce a bidirectional view, backward-looking and forward-looking. In the backward-looking view, EMA is an exponentially decreasing weighted moving average, which is used as a trend-type indicator in terms of the optimization process. And since the training uses a mini-batch strategy, each batch is likely to have deviations from the whole, so it may mislead the model to the local optimal point. Inspired by stock market indicators, DEMA [14] is an exponential average calculated on the traditional EMA and current input, which can effectively maintain the trend while reducing the impact caused by short-term bias. We thus replace the traditional exponential moving average (EMA) with double exponential moving average (DEMA). It is worth noting that our usage is not equivalent to the original DEMA, but rather a variant of it. In the forward-looking part, since we observe that a constant weight adopted by the original Lookahead optimizer [15] to control the scale of fast weights and slow weights in each synchronization period makes the early stage training slow and lossy, we propose a new dynamic strategy which adopts an asymptotic weight for improvement. By applying these two ideas, we propose Admeta optimizer with AdmetaR and AdmetaS implementations based on RAdam and SGDM respectively.
Extensive experiments have been conducted on computer vision (CV), natural language processing (NLP) and audio processing tasks, which demonstrate that our method achieves better convergence results compared to other recently proposed optimizers. Further analysis shows that AdmetaS achieves higher performance than SGDM and AdmetaR achieves better convergence results and maintains high speed in the initial stage compared to other adaptive learning rate methods. We further find that the DEMA and dynamic looking strategy can improve performance compared to EMA and constant strategy, respectively. In addition, we provide convergence proof of our proposed Admeta in convex and non-convex optimizations. The code is available at https://github.com/Chernyn/Admeta-Optimizer.
The role of the optimizer in model training is to minimize the loss on the training set and thus drive the learning of model parameters. Formally, consider a loss function \(f: \mathbb{R}^d \rightarrow \mathbb{R}\) that is bounded below greater than zero, where \(\mathbb{R}\) represents the field of real numbers, \(d\) denotes the dimension of the parameter and thus \(\mathbb{R}^d\) denotes d-dimensional Euclidean space. The optimization problem can be formulated as: \(\min_{\theta \in \mathcal{F}} f(\theta)\), where \(\theta\) indicates a parameter whose domain is \(\mathcal{F}\) and \(\mathcal{F} \subset \mathbb{R}^d\). If we define the optimum parameter of the above loss function as \(\theta^*\), then the optimization objective can be written as: \[{\theta^*=\mathop{\arg\min}\limits_{\theta \in \mathcal{F}}f(\theta).}\] Optimizers iteratively update parameters to make them close to the optimum as training step \(t\) increases, that is to make: \(\lim_{t \rightarrow \infty}\|\theta_t-\theta^*\|=0\).
The stochastic gradient algorithm SGD [1] optimizes \(f\) by iteratively updating parameter \(\theta_t\) at step \(t\) in the opposite direction of the stochastic gradient \(g(\theta_{t-1};\xi_t)\) where \(\xi_t\) is the input variables of the \(t\)-th mini-batch in training datasets. For the sake of clarity, we abbreviate \(g(\theta_{t-1};\xi_t)\) as \(g_t\) for the rest of the paper unless specified. SGD optimization aims to calculate the updated model parameters based on the previous model parameters, the current gradient and the learning rate. Define the learning rate as \(\alpha_t\), the update process is summarized as follows: \[\begin{align} \theta_t = \theta_{t-1} - \alpha_t g_t. \end{align}\] Original SGD tends to vibrate along the process due to the mini-batch strategy and not using of past gradients. What’s more, this disadvantage also results in its long-time plateaus in valleys and saddle points, thus slowing the speed. To smooth the oscillation and speed up convergence rate, momentum, also known as Polyak’s Heavy Ball [16], is introduced to modify SGD. Momentum at step \(t\) is often denoted as \(m_t\) and obtained by iterative calculation with a dampening coefficient \(\beta\). Thus, the update process of SGD with momentum (SGDM) [2] becomes as follows: \[\begin{align} & m_t=\beta m_{t-1} + (1 - \beta) g_t, \label{eq:sgdm}\\ & \theta_t = \theta_{t-1} - \alpha_t m_t, \end{align}\tag{1}\]
Although momentum works well, the uniform stepsize on every parameter is also another factor to limit the speed, especially in large datasets and sparse datasets. To further accelerate the update, adaptive learning rate optimizer is introduced which adopts an individual stepsize for each parameter based on their unique update process. Since a smoothing mechanism is employed in the calculation of stepsize, two dampening coefficients, \(\beta_1\) and \(\beta_2\), are introduced for balancing the current and historical information. Adam [3], a typical adaptive learning rate optimizer, is implemented as follows: \[\begin{align} & m_t= \beta_1 m_{t-1} + (1 - \beta_1) g_t, \tag{2}\\ & v_t = \beta_2 v_{t-1} + (1 - \beta_2) g_t^2,\\ & \theta_t = \theta_{t-1} - \alpha_t {m_t}/\sqrt{v_t}, \tag{3} \end{align}\] where \(m_t\) indicates the first momentum, corresponding to the momentum in SGDM; \(v_t\) indicates the second momentum.
To emphasize the functionality of \(v_t\), we call it adaptive item for the rest of the paper. Adam may sometimes converge to bad local optimum, partly due to its large variance in the early stage. To fix this issue, RAdam [5] introduces a further rectified item \(r_t\) and splits the update process into two sub-processes sequentially connected: \[\begin{align} &\rho_\infty = 2/(1-\beta_2)-1,\\ &\rho_t=\rho_\infty-2t\beta_2^t/(1-\beta_2^t),\\ &r_t \leftarrow \sqrt{\frac{(\rho_t-4)(\rho_t-2)\rho_\infty}{(\rho_\infty-4)(\rho_\infty-2)\rho_t}},\\ & \theta_t = \left\{ \begin{array}{ll} \theta_{t-1} - \alpha_t m_t, & \rho_t\leq 4 \\ \theta_{t-1} - \alpha_t r_t m_t/\sqrt{v_t}, & \rho_t > 4 \\ \end{array} \right.. \label{eq:radam95bias} \end{align}\tag{4}\]
In fact, the calculation of momentum \(m_t\) in Eq. (1 ) and Eq. (2 ) is an exponential moving average (EMA) on gradient \(g_t\). EMA, also known as exponential weighted moving average, can be used to estimate the local mean value of variables, so that the update of variables is related to historical values over a period of time. Formally, EMA is expressed as: \[S_t = \beta S_{t-1} + (1 - \beta) p_t,\] where the variable \(S\) is denoted as \(S_t\) at time \(t\) and \(p_t\) are the newly assigned values. Particularly, \(S_t = p_t\) without using EMA. In Eq. (1 ), SGDM employs EMA to take a moving average of the past gradients. While in Eq. (2 ), Adam and RAdam further apply EMA on the square of past gradients to construct the adaptive item. In the EMA, the moving average of the variable \(S\) at time \(t\) is roughly equal to the average of the values \(p\) over the past \(1 / (1 - \beta)\) steps. This makes the moving average vary more at the beginning, so a bias correction is proposed and used in Adam (Eq. (3 )) and in RAdam (Eq. (4 )) when \(\rho > 4\).
EMA can be regarded as obtaining the average values of the variables over time. Compared with the direct assignment of values to variables, the change curve of the values obtained by moving average is smoother and less jittery, and the moving average does not fluctuate greatly when inputting outliers, which is very important for the optimization using sampled mini-batch. Although efficient, EMA is not necessarily the best strategy for using historical information when it comes to the backward-looking part. Although it can effectively suppress the vibration caused by mini-batch training by performing the moving average on \(g_t\), it also brings a lag time that affects the convergence speed and increases with the length of the moving average. What’s more, it can result in the overshoot problem [17], one possible reason is that EMA might make the wrong use of historical gradients in the final stage and thus have a “burden" to converge to optimum.
Double Exponential Moving Average (DEMA), first proposed by [14], is a faster moving average strategy and was invented to reduce the lag time of EMA. Thus, motivated by the advantage of DEMA, we developed a DEMA variant for the model optimization. It is worth noting DEMA is not simply taking a moving average of historical gradients twice, instead, it takes the moving average of the linear combination of the current gradient the moving average of past gradients. The form of our DEMA variant can be written as: \[\begin{align} \label{DEMA32form} \mathbf{DEMA}=\mathbf{EMA}^{out}(\mu \mathbf{EMA}^{in} + \kappa g_t), \end{align}\tag{5}\] where \(\mu\) and \(\kappa\) are coefficients that control the scale of current gradient and only depend on \(\beta\).
From the formula \(\mathbf{EMA}=\Sigma_{i=1}^n \beta^{n-i}g_i\), past gradients follow a fixed proportionality, that is, the ratio of gradient weight at one time to gradient weight at the previous time is \(\beta\).
Due to the use of minibatch training strategy, the input is randomly sampled. The effect of each minibatch towards optimization is varied. Therefore, applying a fixed proportionality to past gradients is not a reasonable approach since it does not take into account the changeable situation. The disadvantage of overshoot that EMA usually has may also be caused by the above reasons [17]. Thus, we deal with the relationship between the historical gradients and the current gradient more flexibly by further controlling the proportion of past gradients. Our design of coefficients in DEMA is also for this purpose. Based on Eq. (5 ), our actual implementation on algorithm is: \[\begin{align} &I_t=\lambda I_{t-1} + g_t, \\ &h_t=\kappa g_t + \mu I_t + \nu, \\ &m_t=\beta m_{t-1} + (1 - \beta) h_t, \end{align}\]
where \(I_t\) is the output of \(\mathbf{EMA}^{in}\) with a 0 initial value and \(m_t\) is the output of \(\mathbf{EMA}^{out}\) also initiated with 0. \(\lambda\) and \(\beta\) are dampening coefficients of inner EMA and outer EMA respectively, \(\nu\) is a bias item, which is set to a small amount that decreases exponentially to 0 and chosen as \(\lambda^t g_1\). The bias item does not affect the convergence proof, so for the sake of brevity, it is omitted for the rest of this paper and the details can be seen in the code. Please refer to Appendix 8 for more comparison and discussion between EMA and DEMA.
Focusing on gradient history, that is, backward-looking, the optimizer is conducive to alleviating the vibration problem in the optimization process and preventing it from being misled by local noise information. However, since the optimization problem of the deep neural network is very complex, the optimizer can make the optimization process more robust by pre-exploration, so as to obtain better optimization results, which is called forward-looking.
Based on Reptile algorithm and advances in understanding the loss surface, [15] proposed Lookahead optimizer, which introduces two update processes and averages fast and slow weights periodically. The algorithm can be expressed as the cycle of the following process: \[\begin{align} &\boldsymbol{Pre-exploration}: \theta_t = \mathrm{\small Optim}(\theta_{t-1})\\ &\boldsymbol{Synchronization}: (\textit{every}\;k\;\textit{steps}) \\ &\qquad \phi_t = \phi_{t-k} + \eta (\theta_{t-1} - \phi_{t-k})\\ &\qquad \theta_t = \phi_t \end{align}\]
where \(\mathrm{\small Optim}(\cdot)\) denotes a chosen optimizer, \(k\) denotes the synchronization period, or in other words, the period of forward-looking, \(\phi_t\) denotes the slow weights , \(\theta_t\) denotes the fast weight updated with a chosen optimizer, and \(\eta\) is a constant coefficient controlling the proportion of slow weights and fast weights in each synchronization. Generally, the chosen optimizer can be arbitrary.
We can get an intuitive explanation of Lookahead optimizer from the pseudo code above: Guided by fast weight \(\theta_t\), the slow weight \(\phi_t\) updates by taking linear interpolation between itself and the fast weight. Every time the fast weight updates \(k\) steps, the slow weight updates 1 step. The update direction of slow weight can be regarded as \(\theta_t-\phi_t\) from the equation. Therefore, \(\eta\) can also be interpreted as the stepsize of slow weight in each synchronization. In order not to be confused with the stepsize of fast weight, we rename the stepsize of slow weight as \(stepsize_s\). The recommended value of \(\eta\) in [15] is 0.5 and 0.8.
In the original Lookahead optimizer implementation, the fast and slow optimization processes were synchronized according to a given period, and parameters are fused at a fixed ratio during synchronization. However, optimization is a continuous process. In different optimization stages, fast optimization steps have different guiding effects on parameters. We argue that using fixed \(stepsize_s\) in each synchronization is not an optimal strategy, and may even lead to negative effects. For this consideration, we turn the constant \(\eta\) into a \(\eta_t\) that changes over step monotonously and asymptotically. Generally, \(\eta_t\) is a function that starts from 1 and converges to a set value and depends only on the step \(t\). In this setting, the proportion of slow weights increases and this part gradually turns into the original Lookahead method. In other words, the slow weights in our method adopt a faster \(stepsize_s\) at the beginning, and it asymptotically slows down as processing. Specifically, we define two asymptotic functions for \(\eta_t\): \[\begin{align} \eta_t = 0.5*\left(1+\frac{1}{0.01\sqrt{t}+1}\right), \\ \eta_t = 0.8*\left(1+\frac{1}{0.1\sqrt{t}+3.8}\right), \end{align}\] thus we call this as dynamic asymptotic lookahead. The two functions are designed to turn \(\eta_t\) from 1 to 0.5 and 0.8 respectively. Notably, these asymptotic functions may not be the best. We just find that it works well and maybe future work can be done to investigate a more suitable one. For the sake of clarity, we will use the latter one in the rest of the paper and the results of experiments trained from scratch are based on this function unless specified.
To illustrate the advantages of our dynamic lookahead strategy over no lookahead and the original constant lookahead, we give an optimization example in Figure 1. In region , which is around the early stage, the direction of the update is relatively stable and a large \(stepsize_s\) is needed. \(\theta_1 \rightarrow \theta_4\) denotes the update of fast weights. A constant lookahead method will slow the update process in each synchronization period, as can be seen in \(\theta_1 \rightarrow \theta_2\). In our method, fast weights share more proportion in each synchronization period in early stage, thus updating faster, as can be seen in \(\theta_1 \rightarrow \theta_3\).
In region , which is around the final stage, the direction of the update is relatively oscillated, and a small \(stepsize_s\) is needed. Fast weights tend to overshoot the optimum, as can be seen in \(\theta_5\rightarrow \theta_8\) . Lookahead optimizer can achieve better convergence result than general algorithm as it averages the weights to make them more close to the optimum point, as can be seen in \(\theta_5\rightarrow \theta_6\). In our method, the proportion of fast weights has already been reduced asymptotically to a set value, thus can achieve similar efficacy as Lookahead optimizer as can be seen in \(\theta_5\rightarrow \theta_7\).
From these analyses, we demonstrate that our dynamic lookahead strategy method improves the robustness of training.
Since optimizers of the Adam family and SGD family have their own advantages and disadvantages, and the bidirectional looking optimizer framework and improvement we propose do not have too many restrictions on the basic optimizer, we have implemented improved versions AdmetaR and AdmetaS based on RAdam and SGDM optimizer. The final algorithm forms are shown in Algorithm 2 and 3. Detailed proof of convergence and convergence rate for our AdmetaR and AdmetaS is put in Appendix 9 and 10.
Notations:
\(\alpha_t\): learning rate at step \(t\)
\(\lambda, \beta, \beta_1, \beta_2\): the momentum coefficients
\(\epsilon\): a small value used to avoid a zero denominator
\(k\): synchronization period
\(\prod_{\mathcal{F},M}(y) = \mathrm{argmin}_{x \in \mathcal{F}} \vert \vert M^{1/2} (x-y) \vert \vert\)
\(\mu=25-10\left(\lambda+\frac{1}{\lambda}\right), \kappa=\frac{10}{\lambda}-9\)
In this section, we demonstrate the effectiveness of our optimizer by turning to an empirical exploration of different datasets and different models to compare some popular optimizers. Specifically, we conduct experiments on typical CV, NLP, and audio processing tasks. Influenced by the Transformer structure, models are becoming deeper and larger, and therefore training is becoming more difficult. The current paradigm of pre-training-fine-tuning is mainly used for large models. Therefore, we compare optimizers not only in the training-from-scratch setup, but also in the fine-tuning setup.
In this section, we compare our proposed optimizer with several typical optimizers, including classic SGD [1] and Adam [3], our base, SGDM [2]1 and RAdam [5], the current state-of-the-art AdaBelief [12], and the optimizer combined of many modules, Ranger [19]. Since we should compare these optimizers under the same condition, the model used may be different from the original paper of them, which may lead to different convergence results compared to the results reported in the original paper. Please refer to Appendix 11 for more experimental details.
| Model | CIFAR-10 | CIFAR-100 | ||
|---|---|---|---|---|
| 2-3 (lr)4-5 | ResNet-110 | PyramidNet | ResNet-110 | PyramidNet |
| Adam | 91.89\(\pm\)0.23 | 94.55\(\pm\)0.24 | 68.45\(\pm\)0.43 | 76.72\(\pm\)0.32 |
| RAdam | 93.09\(\pm\)0.05 | 94.58\(\pm\)0.14 | 70.39\(\pm\)0.08 | 76.02\(\pm\)0.53 |
| Ranger | 92.85\(\pm\)0.34 | 94.76\(\pm\)0.03 | 68.96\(\pm\)0.68 | 76.35\(\pm\)0.08 |
| AdaBelief | 92.81\(\pm\)0.26 | 94.70\(\pm\)0.03 | 70.88\(\pm\)0.07 | 76.57\(\pm\)0.04 |
| AdmetaR | 93.63\(\pm\)0.22 | 94.81\(\pm\)0.19 | 71.00\(\pm\)0.05 | 76.82\(\pm\)0.07 |
| SGD | 90.27\(\pm\)0.15 | 91.52\(\pm\)0.03 | 65.70\(\pm\)0.25 | 76.51\(\pm\)0.06 |
| SGDM | 93.68\(\pm\)0.20 | 95.08\(\pm\)0.13 | 72.07\(\pm\)0.28 | 79.49\(\pm\)0.11 |
| AdmetaS | 94.12\(\pm\)0.17 | 95.30\(\pm\)0.08 | 73.74\(\pm\)0.26 | 79.61\(\pm\)0.34 |
Consistent with general optimizer researches [12], we conduct experiments on two image classification tasks, CIFAR-10 and CIFAR-100 [20] in CV field, and the results are presented in Table 1. For model baselines, we choose the popular and leading performance ResNet-110 [21] and PyramidNet [22], respectively. From the experimental results, whether in CIFAR-10 or CIFAR-100 dataset, and based on the ResNet-110 or PyramidNet model, SGDM achieves better results than SGD, indicating that backward-looking improves the optimization effect. EMA with rectified item in RAdam performs better than EMA in Adam, suggesting that a better backward-looking process can lead to performance gains. Comparing SGDM and RAdam, we find that SGDM has a performance advantage, showing that though Adam uses an adaptive learning rate to improve the speed of convergence, it is lossy for performance.
Among optimizers with adaptive learning rate, AdaBelief achieves better results than Adam and RAdam in CIFAR-10 with PyramidNet and CIFAR-100 with ResNet-110 and PyramidNet. Ranger, which combines forward and backward looking, achieves better performance than the backward-looking-only RAdam in CIFAR-10 and CIFAR-100 with PyramidNet. Our AdmetaR achieves consistent improvement over the optimizer baseline RAdam, which also confirms the gain of bidirectional looking for optimization. And AdmetaR has better results than Ranger, indicating that our bidirectional looking is better than Ranger’s simple combination of multiple optimization features. Our AdmetaS also performs better than SGDM, further demonstrating the adaptability of our approach, which not only performs well in Adam family, but also works in SGD family.
| Model | Optim | MNLI | QQP | QNLI | SST-2 | CoLA | STS-B | MRPC | RTE | Average |
| m/mm (Acc) | (F\(_1\)) | (Acc) | (Acc) | (MCC) | (SCC) | (F\(_1\)) | (Acc) | |||
| BERT\(_\text{base}\) | AdamW | 83.85/84.08 | 87.72 | 90.74 | 93.23 | 60.32 | 89.11 | 90.85 | 67.51 | 82.92 |
| Ranger | 83.80/84.24 | 87.83 | 90.76 | 92.32 | 58.87 | 89.19 | 90.05 | 68.59 | 82.68 | |
| AdaBelief | 83.91/84.42 | 86.76 | 90.92 | 92.55 | 58.05 | 88.94 | 90.38 | 67.87 | 82.42 | |
| RAdam | 83.91/84.24 | 87.66 | 90.88 | 92.20 | 59.31 | 89.07 | 90.91 | 70.04 | 83.00 | |
| AdmetaR | 83.90/84.53 | 87.91 | 91.14 | 93.35 | 62.07 | 89.62 | 91.47 | 71.48 | 83.87 | |
| BERT\(_{\text{large}}\) | AdamW | 86.05/86.55 | 88.58 | 92.40 | 93.00 | 59.58 | 89.21 | 91.67 | 71.12 | 83.95 |
| Ranger | 86.53/86.58 | 88.58 | 92.39 | 93.46 | 63.81 | 89.73 | 92.04 | 72.56 | 84.89 | |
| AdaBelief | 85.59/86.25 | 86.99 | 92.42 | 93.00 | 61.11 | 90.17 | 91.28 | 72.92 | 84.19 | |
| RAdam | 86.40/86.72 | 88.36 | 92.35 | 93.69 | 62.61 | 89.64 | 91.29 | 71.48 | 84.48 | |
| AdmetaR | 86.21/86.54 | 88.54 | 92.63 | 93.69 | 64.12 | 89.92 | 92.10 | 73.65 | 85.11 |
Following the previous practice [5], we visualize the optimization process of the ResNet-110 model with Adam, RAdam, SGDM, and our AdmetaS, AdmetaR optimizers on the CIFAR-10 and CIFAR-100 datasets in Figure 2. As can be seen from the training loss figure, the above optimizers can successfully train the model to converge to a stable state, but AdmetaS obtains the lowest training loss on CIFAR-10, while AdaBelief obtains the training loss on CIFAR-100. In terms of performance on the test set, AdmetaS has obtained the best convergence result, which shows that the lower the loss of the training set may not necessarily lead to the better performance on the model. In addition, from the accuracy of the test set, the convergence speed of the SGD family including SGDM and AdmetaS is generally slower than that of the Adam family (Adam, RAdam, Ranger, AdaBelief and AdmetaR), but the final convergence result of the SGD family is better than the Adam family. However, our AdmetaR achieves more comparable performance to the SGD family, while maintaining the advantage of the fast convergence of the Adam family. AdmetaR has the highest results on the test set in the early stage of optimization (\(< 80\) epoch), which demonstrates that bidirectional looking improves both accuracy and speed, making AdmetaR an efficient and effective optimizer implementation.
Compared to ResNet-110, PyramidNet has a more complicated structure and can achieve better results in these tasks. In cases where the model is strong enough, the selection of optimizer will not be the main factor for the final performance. As shown in Table 1, compared to Adam, RAdam and AdaBelief achieve just a bit of improvement on CIFAR-10 task and even achieve worse results on CIFAR-100 task, which also verifies our above claims. It also shows that some recently proposed methods are not always suitable when the structure is complex enough.
| Optim | SQuAD v1.1 | SQuAD v2.0 | NER-CoNLL03 | ||||
|---|---|---|---|---|---|---|---|
| 2-3 (lr)4-5 (lr)6-8 | EM | F\(_1\) | EM | F\(_1\) | P | R | F\(_1\) |
| BERT\(_\text{base}\): | |||||||
| AdamW | 80.87 | 88.39 | 72.63 | 75.99 | 94.65 | 95.24 | 94.94 |
| Ranger | 81.30 | 88.58 | 73.32 | 76.73 | 94.47 | 95.17 | 94.82 |
| AdaBelief | 80.63 | 88.10 | 72.97 | 76.25 | 93.79 | 94.60 | 94.19 |
| RAdam | 80.68 | 88.19 | 73.21 | 76.49 | 94.61 | 95.42 | 95.01 |
| AdmetaR | 81.55 | 88.69 | 73.81 | 77.19 | 94.96 | 95.41 | 95.13 |
| BERT\(_{\text{large}}\): | |||||||
| AdamW | 83.31 | 90.39 | 76.67 | 80.02 | 94.77 | 95.73 | 95.24 |
| Ranger | 84.21 | 90.97 | 77.22 | 80.35 | 95.24 | 95.89 | 95.56 |
| AdaBelief | 83.53 | 90.42 | 77.48 | 80.57 | 94.28 | 95.17 | 94.72 |
| RAdam | 84.17 | 90.90 | 77.39 | 80.72 | 94.80 | 95.64 | 95.22 |
| AdmetaR | 84.25 | 90.92 | 77.08 | 80.36 | 95.38 | 95.93 | 95.65 |
As a general AI component, the general capability for various tasks and various models is a basic requirement for optimizers. We evaluate the adaptability of our Admeta optimizer on the finetune training scenario with current popular pre-trained language models. Specifically, we conduct experiments based on the pre-trained language model BERT [23] on three natural language understanding tasks, GLUE benchmark [24], machine reading comprehension (SQuAD v1.1 and v2.0 [25]) and named entity recognition (NER-CoNLL03 [26]). We report results for two model sizes, BERT\(_\text{base}\) and BERT\(_\text{large}\) to explore whether model size has an effect on the optimizer.
| Optim | SUPERB | Common Language | ||
|---|---|---|---|---|
| 2-3 (lr)4-5 | Acc | Training | Acc | Training |
| AdamW | 98.26 | 10m44s | 79.45 | 8h27m33s |
| AdaBelief | 98.41 | 11m20s | 80.29 | 8h28m25s |
| Ranger | 98.35 | 11m50s | 81.18 | 8h29m55s |
| RAdam | 98.37 | 11m30s | 80.35 | 8h28m38s |
| AdmetaR | 98.50 | 11m54s | 81.57 | 8h30m15s |
| Optim | CIFAR-10 | \(\Delta\) | Optim | CIFAR-10 | \(\Delta\) |
|---|---|---|---|---|---|
| Adam | 91.89 | \(\backslash\) | SGD | 90.22 | \(\backslash\) |
| RAdam | 93.09 | \(\backslash\) | SGDM | 93.68 | \(\backslash\) |
| AdmetaR | 93.63 | AdmetaS | 94.12 | ||
| -DEMA | 93.24 | -0.39 | -DEMA | 89.13 | -4.99 |
| -LB | 92.29 | -0.95 | -LB | 89.88 | -4.24 |
| -LF | 93.14 | -0.10 | -LF | 93.51 | -0.61 |
| -LB-LF | 92.36 | -0.88 | -LB-LF | 89.80 | -4.32 |
| AdmetaR w/ constant LF | 93.03 | -0.60 | AdmetaS w/ constant LF | 93.75 | -0.37 |
In Table 2, we report the results on the development set of 8 datasets of the GLUE benchmark, where Acc, MCC, SCC are abbreviations of accuracy, Matthews Correlation and Spearman Correlation Coefficient, respectively. First, under the BERT-base model, compared with the basic optimizer RAdam, AdmetaR achieves consistent improvement. The most significant improvement is obtained on RTE and CoLA, which indicates that our AdmetaR optimizer exhibits greater stability for low-resource optimization. On the other seven datasets, some of them are slightly improved. This is because most of the parameters of the model in the pre-training-fine-tuning paradigm have converged to a certain extent in the pre-training stage, so the further advantage of the optimizer in finetune is not apparent. And when the model is switched to a larger BERT-large, most tasks receive performance gains, except for CoLA and RTE using AdamW optimizer. Due to the further increase in model parameters, the low-resource dataset is not enough to fine-tune the large model, it will even reduce the model performance. But RAdam with rectified item, Ranger with bidirectional looking, and our AdmetaR handle the low-resource challenge well, continue to improve performance, and take advantage of large models. Our AdmetaR achieves the best results on these two low-resource datasets, demonstrating the effectiveness of our bidirectional looking approach.
In Table 3, we further report the results of machine reading comprehension and named entity recognition. AdmetaR achieved improvements at both model sizes in SQuAD v1.1 dataset, while similar improvements were achieved in SQuAD v2.0 with more complex models, illustrating that our optimizer is model-independent. Named entity recognition has reached a very accurate level with the help of pre-trained language models, and our AdmetaR optimizer also brings performance improvements over such a strong baseline, showing that optimization is also a bottleneck that restricts further performance improvement in addition to model structure and data.
Like images and natural language, speech is one of the mainstream fields of deep learning research. In speech processing, there are also a large number of pre-trained large models, such as Wav2vec [27]. To highlight the input-independent nature of the optimizer, we also conduct experiments on two typical tasks of audio classification, keyword spotting (SUPERB) [28] and language identification (Common Language) [29]. We employ Wav2vec 2.0\(_\text{base}\) as the baseline model and report the results of each optimizer in Table 4. In addition, we also list the training time of each optimizer to evaluate the impact of the bidirectional looking mechanism on the optimizer time overhead2.
AdmetaR shows better classification accuracy than AdamW, RAdam, Ranger and AdaBelief, which is consistent with the experimental conclusions in the image and natural language tasks. Consistent results across image, natural language, and speech modalities verify the task-independence of our optimizer. Comparing the training time of AdmetaR with AdamW, RAdam, Ranger, and AdaBelief, our AdmetaR has different degrees of increase due to the additional computation and storage in the optimization process. Ranger and our AdmetaR increased the time most, but it can still be regarded as slight compared to the overall training time. Therefore, it can be concluded that the bidirectional looking mechanism adopted by Admeta optimizer will bring additional computational overhead and increase the training time, but compared with the overall training cost, it is very small. Admeta achieves better performance without increasing model parameters and training data, and does not have any impact on the inference time of the model, which achieves a better tradeoff.
We perform an ablation study on various designs of Admeta in bidirectional looking in this section. -DEMA means removing the DEMA mechanism in backward-looking and using the original EMA. -LB means complete removal of backward-looking, -LF means complete removal of forward-looking. -LB-LF means to remove bidirectional looking at the same time. w/ constant LF means use the original Lookahead mechanism in the forward-looking. The results are evaluated using the ResNet-110 model on the test set of CIFAR-10. According to the results shown in Table 5, it can be found that the improvement of SGDM compared with SGD initially shows the advantage of backward-looking. And compared with Adam, RAdam reveals that the EMA with the rectified item in backward-looking is more suitable for the training of the model than the original EMA. Our Admeta (including AdmetaR and AdmetaS) achieved the best results. After removing DEMA and replacing dynamic lookahead with constant lookahead, respectively, the performance drops, indicating that both DEMA and dynamic asymptotic lookahead play an important role in stable optimization. After further removing the backward-looking, the forward-looking, and the bidirectional looking, the results drop further, validating our argument that bidirectional looking is beneficial for optimization. Another observation is that backward-looking and DEMA make a more significant contribution to the performance of SGDM compared to RAdam. This may show that our methods have a better complementarity for SGD-family optimizers.
In this paper, we introduce a bidirectional looking optimizer framework, exploring the use of historical and future information for optimization. For backward-looking, we introduce a DEMA scheme to replace the traditional EMA strategy, while for forward-looking, we propose a dynamic asymptotic lookahead strategy to replace the constant lookahead scheme. In this way, we propose the Admeta optimizer, and provide two implement versions, AdmetaR and AdmetaS, which are based on adaptive and non-adaptive momentum optimizers, RAdam and SGDM respectively. We verify the benefits of Admeta with intuitive examinations and various experiments, showing the effectiveness of our proposed optimizer. Please refer to Appendix 12 for future work discussion.
Although improving the performance on different tasks, our method introduces additional computational complexity and requires more hyperparameters than some existing approaches. However, the selection range of hyperparameters can be preliminarily determined through the visual tool we proposed (Figure 5), which can slightly reduce the workload of tuning parameters.
As an important part of machine learning and deep learning, optimizers have received much attention in recent years. The optimizer plays a prominent role in the convergence speed and the convergence effect of the model. To seek good properties like fast convergence, good generalization and robustness, many algorithms have been put forward recently, and they can be divided into four families according to their characteristics and motivation.
In this family, the optimizers adopt the method of update like \[\theta_t = \theta_{t-1} - \alpha_t m_t,\] where \(\theta_t\) denotes the parameter to be optimized at iteration step t and \(m_t\) refers to some combination of past gradients (such as EMA), which can be represented as \(f_1(g_1,g_2,...,g_t)\). Original SGD [1] directly minus the product of global learning rate and the gradient at each step. Despite of its simplicity, it is still widely used in many datasets. However, SGD is blamed for its low convergence rate and high fluctuation, thus many methods have been proposed to accelerate the speed and smooth the update process. One efficient optimizer to tackle this issue is SGDM [2], which uses a exponential moving average (EMA, also known as momentum) to replace the gradient with an exponential weight decay of past gradients. SGDM-Nesterov [18] is a variant of SGDM which modifies the momentum by computing gradient based on the approximation of the next position and thus changing the descent direction. Experiments have shown that Nesterov momentum tends to achieve a higher speed and performance.
The Adam family optimizers usually update parameters by \[\theta_t = \theta_{t-1} - \alpha_t m_t / \sqrt{v_t},\] where \(v_t\) is the adaptive item and can be represented as \(f_2(g_1^2,g_2^2,...,g_t^2)\). Compared to SGD family, instead of using a uniform learning rate, this kind of optimizer computes an individual learning rate for each parameter due to the effect of the denominator \(\sqrt{v_t}\) in the equation. \(v_t\) is usually a dimension-reduction approximation to the matrix which contains the information of second order curvature, such as Fisher matrix [30].
Adadelta [31], Adagrad [32] and RMSprop [33] are early optimizers in this family. A stand out generation is Adam [3] which combines the RMSprop with Adagrad. It has been widely used in a wide range of datasets and works well even with sparse gradients. However, there are problems with Adam with respect to convergence and generalization, thus many methods have been proposed to make improvements
Based on the large variance in the early stage that may lead to a bad optimum, heuristic warmup [34], [35] and RAdam [5] are proposed, of which the former starts with a small initial learning rate and the latter introduces a rectified item. To fix the convergence error, [36] proposed AMSGrad which requires the non-decreasing property of the second momentum. In fact, this method can be interpolated into other Adam family algorithms to guarantee the convergence in convex situations. Considering the curvature of the loss function, AdaBelief [12] and AdaMomentum [37] are proposed. More recently, there are still numerous studies devoted to improving Adam, such as AdaX [13] and AdaFamily [38]. However, we notice that most researchers put a solid emphasis on modifying the second momentum term, i.e., the adaptive item and ignore the possibility to make a relative overall change to the algorithms.
In the stochastic second-order optimizers, parameters are updated using second-order information related to Hessian matrix. The update process is typically written as \[\theta_t=\theta_{t-1}-\alpha_t H^{-1}m_t,\] where \(H\) is the Hessian matrix or approximation matrix to it. Ideally, they can achieve better results than the first order optimizers (like Adam family and SGD family), but their practicality is limited due to the large computational cost of the second order information, like the Fisher / Hessian matrix. Some methods have been proposed using low-rank decomposition and approximating to hessian diagonal to reduce the cost, like Apollo [39], AdHessian [40] and Shampoo [41].
There are some algorithms that are not convenient to be categorized into the above families and we list some examples here. Motivated by PID controller, SGD-PID [17] takes an analogy between the gradient and the input error in an automatic control system. Analysis shows that it can reduce the overshoot problem in SGD and SGD variants. Furthermore, [42] applied PID to Adam and proposed the AdaPID optimizer.
Lookahead [15] optimizer updates two sets of weight wherein "fast weights" function as a guide to search for the direction and "slow weights" follow the guide to achieve better optimization. Ranger [19] optimizer further combines RAdam and Lookahead to get a compound algorithm and shows a better convergence performance.
To show the advantage of bidirectional looking, we propose Admeta optimizer. Specifically, it is based on the idea of considering backward-looking and forward-looking, wherein DEMA plays a important role in the former aspect and dynamic asymptotic forward-looking strategy serves for the latter aspect.
In practical use, we provide two versions, AdmetaS and AdmetaR, using the framework of Admeta and based on SGDM and RAdam respectively. Specifically, AdmetaS replaces the traditionally used EMA in backward-looking part of SGDM with DEMA and adds the forward-looking part which is derived from Lookahead optimizer. AdmetaR is based on RAdam in the same way. The second order family is also introduced above because the framework of Admeta can also be applied in this family, and it is remained as the future work.
To corroborate our analysis of EMA and DEMA, we compared the optimization process of EMA and DEMA on the SGD optimizer according to the practice of [43]. Using the same learning rate \(\alpha\) and starting from the same starting point, the convergence process is shown in Figure 5. The decent surface in the figure is the convex quadratic, which is a useful model despite its simplicity, for it comprises an important structure, the “valleys", which is often studied as an example in momentum-based optimizers. As demonstrated in Figure 5, on the one hand, DEMA achieves faster speed than EMA, which can be easily seen by comparing the distance to the optimal point at the same time; on the other hand, DEMA achieves better convergence results than EMA as can be seen in the distance between the point of convergence and optimum.
In this section, following [44], [45] and [36], we provide detailed proofs of convergence for AdmetaR and AdmetaS optimizers in convex and non-convex situations.
Optimization problem For deterministic problems, the problem to be optimized is \(\mathrm{min}_{\theta\in \mathcal{F}} f(\theta)\), where \(f\) denotes the loss function. For online optimization, the problem is \(\mathrm{min}_{\theta\in \mathcal{F}} \sum_{t=1}^T f_t(\theta)\), where \(f_t\) is the loss function of the model with the given parameters at the \(t\)-th step.
The criteria for judging convergence in convex and non-convex cases are different. For convex optimization, following [36], the goal is to ensure \(R(T)=o(T)\), i.e., \(\lim_{T \rightarrow \infty}R(T)/T=0\). For non-convex optimization, following [44], the goal is to ensure \(\operatorname*{min}_{t \in [T]} \mathbb{E} \Big \vert \Big \vert \nabla f(\theta_t ) \Big \vert \Big \vert^2=o(T)\).
Theorem 1. (Convergence of AdmetaR for convex optimization)
Let \(\{\theta_t\}\) be the sequence obtained from AdmetaR, \(0 \leq \lambda, \beta_1, \beta_2 < 1\), \(\gamma =
\frac{\beta_1^2}{\beta_2} < 1, \alpha_t = \frac{\alpha}{\sqrt{t}}\) and \(v_t \leq v_{t+1}, \forall t \in [T]\). Suppose \(x\in \mathcal{F}\), where \(\mathcal{F} \subset \mathbb{R}^d\) and has bounded diameter \(D_{\infty}\), i.e. \(\vert\vert \theta_t-\theta\vert\vert_\infty \leq D_{\infty}, \forall t \in
[T]\). Assume \(f(\theta)\) is a convex function and \(\vert \vert g_t \vert \vert_\infty\) is bounded. Denote the optimal point as \(\theta\). For
\(\theta_t\) generated, AdmetaR achieves the regret:
Theorem 2. (Convergence of AdmetaR for non-convex optimization)
Under the assumptions:
\(\nabla f\) exits and is Lipschitz-continuous,i.e, \(\vert \vert \nabla f(x) - \nabla f(y) \vert \vert \leq L \vert \vert x-y \vert \vert,\;\forall x,y\); \(f\) is also lower bounded.
At step \(t\), the algorithm can access a bounded noisy gradient \(g_t\), and the true gradient \(\nabla f\) is also bounded.
The noisy gradient is unbiased, and has independent noise, \(i.e.\;g_t = \nabla f(\theta_t ) + \delta_t, \mathbb{E} [\delta_t] = 0\) and \(\delta_i \bot \delta_j, \forall i\neq j\).
Assume \(\operatorname*{min}_{j \in [d]} (v_1)_j \geq c > 0\) and \(\alpha_t = \alpha/\sqrt{t}\), then for any T we have: \[\begin{align} \scalebox{1.0}{\operatorname*{min}_{t \in [T]} \mathbb{E} \Big \vert \Big \vert \nabla f(\theta_t ) \Big \vert \Big \vert^2 \leq \frac{1}{\sqrt{T}} ( Q_1+Q_2 \log T ) \notag} \end{align}\] where \(Q_1\) and \(Q_2\) are constants independent of T.
Theorem 3. (Convergence of AdmetaS for convex optimization)
Let \(\{\theta_t\}\) be the sequence obtained by AdmetaS, \(0 \leq \lambda,\beta < 1\), \(\alpha_t =
\frac{\alpha}{\sqrt{t}}\), \(\forall t \in [T]\). Suppose \(x\in \mathcal{F}\), where \(\mathcal{F} \subset \mathbb{R}^d\) and has bounded diameter
\(D_{\infty}\), i.e. \(\vert\vert \theta_t-\theta\vert\vert_\infty \leq D_{\infty}, \forall t \in [T]\). Assume \(f(\theta)\) is a convex function and \(\vert \vert g_t \vert \vert_\infty\) is bounded. Denote the optimal point as \(\theta\). For \(\theta_t\) generated, AdmetaS
achieves the regret:
Theorem 4. (Convergence of AdmetaS for non-convex optimization)
Under the assumptions:
\(\nabla f\) exits and is Lipschitz-continuous,i.e, \(\vert \vert \nabla f(x) - \nabla f(y) \vert \vert \leq L \vert \vert x-y \vert \vert,\;\forall x,y\); \(f\) is also lower bounded.
At step \(t\), the algorithm can access a bounded noisy gradient \(g_t\), and the true gradient \(\nabla f\) is also bounded.
The noisy gradient is unbiased, and has independent noise, \(i.e.\;g_t = \nabla f(\theta_t ) + \delta_t, \mathbb{E} [\delta_t] = 0\) and \(\delta_i \bot \delta_j, \forall i\neq j\).
Assume \(\alpha_t = \alpha/\sqrt{t}\), then for any T we have: \[\begin{align} \scalebox{1.0}{\operatorname*{min}_{t \in [T]} \mathbb{E} \Big \vert \Big \vert \nabla f(\theta_t ) \Big \vert \Big \vert^2 \leq \frac{1}{\sqrt{T}} ( Q_1^{'}+Q_2^{'} \log T ) \notag} \end{align}\] where \(Q_1^{'}\) and \(Q_2^{'}\) are constants independent of T.
Before formally proving the theorems, here list some remarks and preparations.
Remark 1. For brevity, we omit the rectified item of AdmetaR in the proof. However, it does not influence the proof since it can be integrated into the learning rate.
Remark 2. Following [7], the bias correction \(1/(1-\beta_1^t)\) of the first momentum \(m_t\) is omitted in the convergence of AdmetaR. Since \(1/(1-\beta_1^t)\) is bounded above 1 and below 10, the order of the terms used is not affected, thus hardly affecting the proof.
Remark 3. The forward-looking part is not considered in the proof. On the one hand, explanations and proofs of constant Lookahead have been given in [15] and [46], which can be imitated by our dynamic method. On the other hand, forward-looking part is exactly the interpolation of fast weights and slow weights at each synchronization period, and the fast weights are updated by the given optimizer. Therefore, the convergence proof is equivalent to only proving the convergence of fast weights.
Remark 4. The condition in the theorem that \(v_t \leq v_{t+1}, \forall t \in [T]\) does not necessarily hold in the practice of our method. Dropping this condition may lead to a non-convergence result, which can be seen in [36]. However, the counterexample given by this article is a very artificial design, which may not represent the case in practice. Many optimizers that do not meet this condition can eventually converge in the training process and further exploration may show that this condition is not necessary.
Remark 5. If we fix the number of steps, the training is a finite process over finite data, thus the iteration is bounded.
Lemma 1. if \(\|g_t\|_{\infty}\) is bounded,i.e. \(\|g_t\|_{\infty} \leq G_{\infty}\), \(\forall t\in [T]\), where \(G_{\infty}\) is a constant independent of T, then \(I_t, h_t\) and \(m_t\) are also bounded.
Proof. First of all, we prove \(\|I_t\|_{\infty} \leq (1+\lambda)G_{\infty}\) by induction:
when \(t=1\) \[\begin{align}
\label{eq1} \|I_1\|_{\infty} = \|g_1\|_{\infty}\leq G_{\infty}
\end{align}\tag{6}\] Suppose \(t=k\) satisfies, then for \(t=k+1\) \[\begin{align} \|I_{k+1}\|_{\infty} &= \|\lambda I_{k}+g_{k+1}\|_{\infty}
\leq \lambda \|I_k \|_{\infty} + \|g_{k+1}\|_{\infty} \\&\leq (\lambda +1) \max\{\| I_k\|_{\infty},\|g_{k+1} \|_{\infty}\} \leq (1+\lambda)G_{\infty}
\end{align}\] Next, for \(\| h_k\|_{\infty}\) \[\begin{align} \|h_t\|_{\infty}=\|\kappa g_t + \mu I_t\|_{\infty} \leq \kappa\|g_t\|_{\infty}+\mu \|I_t\|_{\infty} \leq
[\kappa+(1-\lambda)\mu)]G_{\infty}
\end{align}\] Since \(m_t\) is the moving average of \(h_i\) where i=1,...,t, we can get that it is also bounded following the proof of \(I_t\). ◻
In this way, we can redefine \(G_{\infty}\) by enlarging it and the bounded stochastic gradient assumption in the theorem is equivalent to assuming \(\|g_t\|_{\infty}, \|I_t\|_{\infty}, \|h_t\|_{\infty}, \| m_t\|_{\infty} \leq G_{\infty}\).
Remark 6. As for non-convex optimization, in the same way, the bounded noisy gradient assumption is equivalent to \(\|g_t\|, \|I_t\|, \|h_t\|, \| m_t\| \leq H\) where \(H\) is a constant independent of \(T\). This remark will be used in several places in the following proof.
Lemma 2 (Generalized Hölder inequality, [47]). For \(x,y,z\in \mathbb{R}^n_+\) and positive \(p,q,r\) such that \(\frac{1}{p}+\frac{1}{q}+\frac{1}{r}=1\), we have \[\sum_{j=1}^n \theta_j y_j z_j\leq \|x \|_p\|y \|_q\|z \|_r.\]
This is a common mathematical inequality, so the proof is omitted here.
Lemma 3 (nonexpansiveness property of \(\mathop{\arg\min}\limits_{x \in \mathcal{F}}\|.\|\), [48]). For any \(Q \in \mathcal{S}_+^d\),i.e. \(Q\) is a Positive definite matrice and convex feasible set \(\mathcal{F} \subset \mathbb{R}^d\), suppose \(u_1 = \mathop{\arg\min}\limits_{x \in \mathcal{F}} \|Q^{1/2}(x - z_1 )\|\) and \(u_2 = \mathop{\arg\min}\limits_{x \in \mathcal{F}} \|Q^{1/2}(x - z_2)\|\) then we have \(\|Q^{1/2}(u_1 - u_2)\| \leq \|Q^{1/2}(z_1 - z_2)\|\).
Proof. First, we claim that \(\langle u_1-z_1,Q(u_2-u_1)\rangle\geq 0\) and \(\langle u_2-z_2,Q(u_1-u_2)\rangle\geq 0\) (We only prove the former as the proofs are exactly the same). Otherwise, consider a small \(\delta\), we have \(u_1+\delta(u_2-u_1)\in \mathcal{F}\) \[\begin{align} &\frac{1}{2}\langle u_1+\delta(u_2-u_1)-z_1, Q(u_1+\delta(u_2-u_1)-z_1)\rangle\\ =&\frac{1}{2}\langle u_1-z_1,Q(u_1-z_1)\rangle + \frac{1}{2}\delta^2 \langle u_2-u_1,Q(u_2-u_1)\rangle+\delta \langle u_1-z_1,Q(u_2-u_1)\rangle \end{align}\] If there exists \(\langle u_1-z_1,Q(u_2-u_1)\rangle< 0\), \(\delta\) can be chosen so small that it satisfies \(\frac{1}{2}\delta^2 \langle u_2-u_1,Q(u_2-u_1)\rangle+\delta \langle u_1-z_1,Q(u_2-u_1)\rangle < 0\), which contradicts the definition of \(u_1\).
Using the above claim, we further have \[\begin{align} \label{expansiveness1} &\langle u_1-z_1,Q(u_2-u_1)\rangle-\langle u_2-z_2,Q(u_2-u_1)\rangle\geq 0\notag\\ \Rightarrow&\langle z_2-z_1,Q(u_2-u_1)\rangle\geq\langle u_2-u_1,Q(u_2-u_1)\rangle \end{align}\tag{7}\] Also, observing the following \[\begin{align} \label{expansiveness2} &\langle (u_2 - u_1) - (z_2 - z_1), Q((u_2 - u_1) - (z_2 - z_1)) \rangle \geq 0\notag\\ \Rightarrow&\langle u_2 - u_1, Q(z_2 - z_1) \rangle \leq \frac{1}{2}[\langle u_2 - u_1, Q(u_2 - u_1) \rangle + \langle z_2 - z_1, Q(z_2 - z_1) \rangle] \end{align}\tag{8}\] Combining (7 ) and (8 ), we have the required result. ◻
Lemma 4. Consider \[\begin{align} &m_t = \beta_1 m_{t-1} + (1-\beta_1) h_t, ~ \forall t \geq 1. \end{align}\] it follows that \[\begin{align} \langle h_t, \theta_t - \theta \rangle =& \langle m_{t-1}, \theta_{t-1} - \theta \rangle \\&-\frac{\beta_1}{1-\beta_1} \langle m_{t-1}, \theta_t - \theta_{t-1} \rangle \\ &+\frac{1}{1-\beta_1} \left( \langle m_t, \theta_t - \theta\rangle - \langle m_{t-1}, \theta_{t-1} - \theta\rangle \right). \end{align}\]
Proof. By definition of \(m_t\), \(h_t = \frac{1}{1-\beta_1} m_t - \frac{\beta_1}{1-\beta_1} m_{t-1}\). Thus, we have \[\begin{align} \langle h_t, \theta_t - \theta \rangle =& \frac{1}{1-\beta_1} \langle m_t, \theta_t - \theta \rangle - \frac{\beta_1}{1-\beta_1} \langle m_{t-1}, \theta_t - \theta \rangle \\ =&\frac{1}{1-\beta_1} \langle m_t, \theta_t - \theta \rangle - \frac{\beta_1}{1-\beta_1} \langle m_{t-1}, \theta_{t-1} - \theta \rangle - \frac{\beta_1}{1-\beta_1} \langle m_{t-1}, \theta_t - \theta_{t-1} \rangle \\ =&\frac{1}{1-\beta_1}\big( \langle m_t, \theta_t - \theta \rangle - \langle m_{t-1}, \theta_{t-1} - \theta \rangle \big) + \langle m_{t-1}, \theta_{t-1} - \theta \rangle \\&- \frac{\beta_1}{1-\beta_1} \langle m_{t-1}, \theta_t - \theta_{t-1} \rangle. \end{align}\] ◻
Lemma 5 (Bound for \(\sum_{t=1}^{T} \alpha_t \|\hat{v}_t^{-1/4} m_{t}\| ^ 2\)). Under Assumption in Theorem 1, we have \[\label{eq:32sum32of32m95t} \sum_{t=1}^{T} \alpha_t \|\hat{v}_t^{-1/4} m_{t}\| ^ 2\leq\frac{(1-\beta_1)\alpha\sqrt{1+\log T}}{\sqrt{(1-\beta_2)(1-\gamma)}} \sum_{i=1}^d \|h_{1:T, i}\|_2\tag{9}\]
Proof. First, we bound \(\|\hat{v}_t^{-1/4} m_{t}\| ^ 2\). From the definition of \(m_t\) and \(v_t\), it follows that \[\begin{align} m_t =(1-\beta_{1}) \sum_{j=1}^t \beta_1^{t-j} h_j, v_t =(1-\beta_{2}) \sum_{j=1}^t \beta_2^{t-j} h_j^2 \end{align}\] Then we have \[\begin{align} \label{eq:th1:1} \|\hat{v}_t^{-1/4} m_{t}\| ^ 2 &\leq \|v_t^{-1/4} m_{t}\| ^ 2 = \sum_{i=1}^d \frac{m_{t,i}^2}{{v}_{t, i}^{1/2}} = \sum_{i=1}^d \frac{\left(\sum_{j=1}^t(1-\beta_{1}) \beta_{1}^{^{t-j}} h_{j, i} \right)^2}{\sqrt{\sum_{j=1}^t (1-\beta_{2})\beta_{2}^{t-j}h_{j, i}^2}} \notag\\ &= \frac{(1-\beta_1)^2}{\sqrt{1-\beta_2}} \sum_{i=1}^d \frac{\left(\sum_{j=1}^t \beta_{1}^{t-j} h_{j, i} \right)^2}{\sqrt{\sum_{j=1}^t \beta_{2}^{t-j}h_{j, i}^2}} \notag\\ &\leq \frac{(1-\beta_1)^2}{\sqrt{1-\beta_2}}\Bigg( \notag\\ & \sum_{i=1}^d \frac{\bigg[\left(\sum_{j=1}^t (\beta_2^{\frac{t-j}{4}}|h_{j,i}|^{\frac{1}{2}})^4 \right)^{\frac{1}{4}} \left(\sum_{j=1}^t (\beta_1^{1/2}\beta_2^{-1/4})^{4(t-j)}\right)^{\frac{1}{4}} \left(\sum_{j=1}^t(\beta_1^{t-j}|h_{j,i}|)^{\frac{1}{2}\cdot2}\right)^{\frac{1}{2}}\bigg]^2}{\sqrt{\sum_{j=1}^t \beta_{2}^{t-j}h_{j, i}^2}}\Bigg) \notag\\ &=\frac{(1-\beta_1)^2}{\sqrt{1-\beta_2}} \sum_{i=1}^d\left(\sum_{j=1}^t \gamma^{t-j}\right)^{\frac{1}{2}} \sum_{j=1}^t\beta_1^{t-j}|h_{j,i}|\notag\\&\leq\frac{(1-\beta_1)^2}{\sqrt{(1-\beta_2)(1-\gamma)}}\sum_{i=1}^d\sum_{j=1}^t\beta_1^{t-j}|h_{j,i}|, \end{align}\tag{10}\] where the first inequality follows from the fact that \(\hat{v}^{1/2}_{t,i}\geq v^{1/2}_{t,i}\), the second one follows from the generalized Hölder inequality for \[\theta_j=\beta_2^{\frac{t-j}{4}}|h_{j,i}|^{\frac{1}{2}},\quad y_j=(\beta_1\beta_2^{-1/2})^{\frac{t-j}{2}},\quad z_j=(\beta_1^{t-j}|h_{j,i}|)^{\frac{1}{2}} \quad \text{and}\quad p=q=4, \quad r=2,\] and the third one follows from the sum of geometric series and the assumption \(\gamma = \frac{\beta_1^2}{\beta_2}<1\). In this way, we can bound \(\sum_{t=1}^{T} \alpha_t \|\hat{v}_t^{-1/4} m_{t}\| ^ 2\). \[\begin{align} \sum_{t=1}^{T} \alpha_t \|\hat{v}_t^{-1/4} m_{t}\| ^ 2 &\leq \frac{(1-\beta_1)^2}{\sqrt{(1-\beta_2)(1-\gamma)}} \sum_{i=1}^d \sum_{t=1}^T \alpha_t\sum_{j=1}^t \beta_1^{t-j} \vert h_{j,i}\vert\\ &=\frac{(1-\beta_1)^2}{\sqrt{(1-\beta_2)(1-\gamma)}} \sum_{i=1}^d \sum_{j=1}^T \sum_{t=j}^T \alpha_t \beta_1^{t-j} \vert h_{j,i}\vert\\ &\leq \frac{(1-\beta_1)}{\sqrt{(1-\beta_2)(1-\gamma)}} \sum_{i=1}^d \sum_{j=1}^T \alpha_j \vert h_{j,i}\vert\\ &\leq \frac{1-\beta_1}{\sqrt{(1-\beta_2)(1-\gamma)}} \sum_{i=1}^d \sqrt{\sum_{j=1}^T \alpha_j^2}\sqrt{\sum_{j=1}^T h_{j,i}^2 }\\ &\leq\frac{(1-\beta_1)\alpha\sqrt{1+\log T}}{\sqrt{(1-\beta_2)(1-\gamma)}} \sum_{i=1}^d \sqrt{\sum_{t=1}^T h_{t,i}^2}\\ &=\frac{(1-\beta_1)\alpha\sqrt{1+\log T}}{\sqrt{(1-\beta_2)(1-\gamma)}} \sum_{i=1}^d \|h_{1:T, i}\| \end{align}\] where the first inequality follows from (10 ).The first equality is by changing order of summation. The second inequality follows from the fact that \(\sum_{t=j}^T\alpha_t\beta_1^{t-j}\leq\frac{\alpha_j}{1-\beta_1}\). The third inequality is by Cauthy-Schwartz. The last inequality is by using \(\sum_{j=1}^T\frac{1}{j}\leq 1+\log T\) ◻
Theorem 5. (Convergence of AdmetaR for convex optimization) Let \(\{\theta_t\}\) be the sequence obtained from AdmetaR, \(0 \leq \lambda, \beta_1, \beta_2 < 1\), \(\gamma = \frac{\beta_1^2}{\beta_2} < 1, \alpha_t = \frac{\alpha}{\sqrt{t}}\) and \(v_t \leq v_{t+1}, \forall t \in [T]\). Suppose \(x\in \mathcal{F}\), where \(\mathcal{F} \subset \mathbb{R}^d\) and has bounded diameter \(D_{\infty}\), i.e. \(\vert\vert \theta_t-\theta\vert\vert_\infty \leq D_{\infty}, \forall t \in [T]\). Assume \(f(\theta)\) is a convex function and \(\vert \vert g_t \vert \vert_\infty\) is bounded. Denote the optimal point as \(\theta\). For \(\theta_t\) generated, AdmetaR achieves the regret:
Proof. \(\bullet\) Bound for \(\sum_{t=1}^{T} \langle m_t, \theta_t - \theta \rangle\).
As \(x\in\mathcal{F}\), we get \[\begin{align}
\theta_{t+1} = \Pi_{\mathcal{F}, \sqrt{\hat{v}_t}}(\theta_t - \alpha_t \hat{v}_t^{-1/2} m_t) = \min_{x \in \mathcal{F}} \|\hat{v}_t^{1/4}(x - (\theta_t - \alpha_t \hat{v}_t^{-1/2}m_t))\|.
\end{align}\] Furthermore, \(\Pi_{\mathcal{F}, \sqrt{\hat{v}_t}}(x) = x\) for all \(x \in \mathcal{F}\). Using Lemma 3 with \(u_1 = \theta_{t+1}\) and \(u_2 = \theta\), we have the following: \[\begin{align}
\|\hat{v}_t^{1/4}(\theta_{t+1} - \theta) \|^2 &\leq \|\hat{v}_t^{1/4}(\theta_{t} - \alpha_t \hat{v}_t^{-1/2}m_t - \theta)\|^2 \notag\\
&= \|\hat{v}_t^{1/4}(\theta_{t} - \theta)\|^2 + \alpha_t^2 \|\hat{v}_t^{-1/4}m_t\|^2 - 2\alpha_t \langle m_t, \theta_t - \theta \rangle \label{eq:th1:3}
\end{align}\tag{11}\]
we rearrange and divide both sides of (11 ) by \(2\alpha_t\) to get \[\begin{align} \label{eq:th1:2} \langle m_t, \theta_t - \theta\rangle &\leq \frac{1}{2\alpha_t} \|\hat{v}_t^{1/4}(\theta_{t} - \theta) \|^2 - \frac{1}{2\alpha_t} \|\hat{v}_t^{1/4}(\theta_{t+1} - \theta) \|^2 + \frac{\alpha_t}{2} \|\hat{v}_t^{-1/4}m_t \|^2 \notag\\ &= \frac{1}{2\alpha_{t-1}} \|\hat{v}_{t-1}^{1/4}(\theta_{t} - \theta) \|^2 - \frac{1}{2\alpha_t}\|\hat{v}_t^{1/4}(\theta_{t+1} - \theta) \|^2\notag\\ &\quad+ \frac{1}{2}\sum_{i=1}^d \left( \frac{\hat{v}_{t, i}^{1/2}}{\alpha_t} - \frac{\hat{v}_{t-1, i}^{1/2}}{\alpha_{t-1}} \right) ( \theta_{t, i} - \theta_i )^2 + \frac{\alpha_t}{2} \|\hat{v}_t^{-1/4}m_t \|^2 \notag\\ &\leq \frac{1}{2\alpha_{t-1}} \|\hat{v}_{t-1}^{1/4}(\theta_{t} - \theta) \|^2 - \frac{1}{2\alpha_t}\|\hat{v}_t^{1/4}(\theta_{t+1} - \theta) \|^2\notag\\ &\quad+ \frac{D_{\infty}^2}{2} \sum_{i=1}^d \left( \frac{\hat{v}_{t, i}^{1/2}}{\alpha_t} - \frac{\hat{v}_{t-1, i}^{1/2}}{\alpha_{t-1}} \right) + \frac{\alpha_t}{2} \|\hat{v}_t^{-1/4}m_t \|^2 \end{align}\tag{12}\] where the last inequality is due to the fact that \(\hat{v}_{t, i} \geq \hat{v}_{t-1, i}\), \(\frac{1}{\alpha_t}\geq \frac{1}{\alpha_{t-1}}\), and the definition of \(D_{\infty}\). Summing (12 ) over \(t=1,\dots T\) and using that \(\hat{v}_{0} = 0\) yields \[\begin{align} \sum_{t=1}^T \langle m_t, \theta_t - \theta\rangle &\leq \frac{D_{\infty}^2}{2\alpha_T} \sum_{i=1}^d \hat{v}_{T, i}^{1/2} +\frac{1}{2} \sum_{t=1}^T \alpha_t \|\hat{v}_t^{-1/4}m_t \|^2. \end{align}\]
\(\bullet\) Bound for \(\sum_{t=1}^T \langle m_{t-1}, \theta_{t-1} - \theta_t \rangle\). \[\begin{align} \sum_{t=1}^T \langle m_{t-1}, \theta_{t-1} - \theta_t \rangle &= \sum_{t=2}^T \langle m_{t-1}, \theta_{t-1} - \theta_t \rangle=\sum_{t=1}^{T-1} \langle m_{t}, \theta_{t} - \theta_{t+1} \rangle\notag\\ &\leq \sum_{t=1}^{T-1} \|\hat{v}_t^{-1/4}m_t \| \|\hat{v}_t^{1/4}(\theta_{t+1} - \theta)\| \notag \\ &= \sum_{t=1}^{T-1} \|\hat{v}_t^{-1/4} m_{t}\| \Big\|\hat{v}_t^{1/4}[\Pi_{\mathcal{F},\hat{v}_{t}^{1/2}}\left( \theta_{t} - \alpha_{t} \hat{v}_{t}^{-1/2}m_{t}\right)-\Pi_{\mathcal{F},\hat{v}_{t}^{1/2}} (\theta_{t})] \Big\|\notag \\ &\leq \sum_{t=1}^{T-1}\alpha_{t} \|\hat{v}_t^{-1/4} m_{t}\| \| \hat{v}_{t}^{-1/4}m_{t} \|\notag\\ &= \sum_{t=1}^{T-1}\alpha_{t} \|\hat{v}_{t}^{-1/4}m_{t}\|^2 \end{align}\] where the first inequality follows from Hölder inequality and the second inequality is due to lemma 3
\(\bullet\) Bound for \(\langle m_T, \theta_T - \theta \rangle\). \[\begin{align} \langle m_T,\theta_T-\theta\rangle&\leq \|\hat{v}_{t}^{-1/4}{m_T}\| \|\hat{v}_{t}^{1/4}{(\theta_T-\theta)}\|\notag\\ &\leq \alpha_T\|\hat{v}_{t}^{-1/4}{m_T}\|^2 + \frac{1}{4\alpha_T} \|\hat{v}_{t}^{1/4}{(\theta_T-\theta)}\|^2 \notag\\ &\leq \alpha_T\|\hat{v}_{t}^{-1/4}{m_T}\|^2+ \frac{D_{\infty}^2}{4\alpha_T} \sum_{i=1}^d \hat{v}^{1/2}_{T,i} \end{align}\]
where the first inequality follows from Hölder inequality and the second inequality follows from Young’s inequality. The last inequality is due to the definition of \(D_{\infty}\).
After all these preparations, we obtain: \[\begin{align} \sum_{t=1}^T\langle h_t, \theta_t-\theta\rangle&= \frac{\beta_1}{1-\beta_1}\left( \langle m_T, \theta_T - \theta \rangle + \sum_{t=1}^T \langle m_{t-1}, \theta_{t-1} -
\theta_t \rangle\right) + \sum_{t=1}^{T} \langle m_t, \theta_t - \theta \rangle\notag\\ &\leq \frac{\beta_1}{1-\beta_1}\left( \frac{D_{\infty}^2}{4\alpha_T}\sum_{i=1}^d \hat{v}^{1/2}_{T,i} + \sum_{t=1}^{T}\alpha_{t} \|\hat{v}_{t}^{-1/4}
m_{t}\|^2\right) + \frac{D_{\infty}^2}{2\alpha_T} \sum_{i=1}^d \hat{v}_{T, i}^{1/2}\notag\\ &\quad+\frac{1}{2} \sum_{t=1}^T \alpha_t \| \hat{v}_{t}^{-1/4}m_t \|^2 \notag\\ &= \frac{(2-\beta_1)D_{\infty}^2}{4\alpha_T(1-\beta_1)}\sum_{i=1}^d
\hat{v}^{1/2}_{T,i} + \frac{2+\beta_1}{2(1-\beta_1)} \sum_{t=1}^T \alpha_t \| \hat{v}_{t}^{-1/4}m_t \|^2 \notag\\ &\leq \frac{(2-\beta_1)D_{\infty}^2 \sqrt{T}}{4\alpha(1-\beta_1)}\sum_{i=1}^d \hat{v}^{1/2}_{T,i} +\frac{(2+\beta_1)\alpha\sqrt{1+\log
T}}{2\sqrt{(1-\beta_2)(1-\gamma)}} \sum_{i=1}^d \|h_{1:T, i}\|_2
\end{align}\] This proves that \(\sum_{t=1}^T \langle h_t, \theta_t - \theta \rangle = \mathcal{O}(\sqrt{T})\). Suppose the optimizer runs for a long time, the bias of EMA is small [12], thus \(E(I_t)\) approaches \(E(g_t)\) as step increases. Since \(h_t = \kappa g_t + \mu I_t\), \(h_t\) is the same order as \(g_t\) when the time is long enough, thus we have \[\begin{align}
\label{admeta:convex} \sum_{t=1}^T \langle g_t, \theta_t - \theta \rangle = \mathcal{O}(\sqrt{T})
\end{align}\tag{13}\] In addition, due to the convexity of \(f(.)\), we have \[\begin{align} R(T) &= \sum_{t=1}^T (f_t(\theta_t) - f_t(x))\leq \sum_{t=1}^T \langle g_t, \theta_t
- \theta \rangle
\end{align}\] Combined with (13 ), we complete the proof. ◻
Lemma 6. Set \(\theta_0 \triangleq x_1\) in Algorithm (2), and define \(z_t\) as \[\begin{align} \label{eq:z1} &z_t = \theta_{t} + \frac{\beta_{1}}{1-\beta_{1}}(\theta_t - \theta_{t-1}), ~ \forall t \geq 1. \end{align}\tag{14}\] Then the following holds true \[\begin{align} z_{t+1}- z_{t} =-\frac{\beta_{1}}{1-\beta_{1}}\left(\frac{\alpha_t}{\sqrt{\hat{v}_{t}}}-\frac{\alpha_{t-1}}{\sqrt{\hat{v}_{t-1}}} \right) m_{t-1} - \alpha_t h_t/\sqrt{\hat{v}_t} \end{align}\]
Proof. By the update of AdmetaR, we have \[\begin{align} \label{z95t32of32r} \theta_{t+1}- \theta_t &= - \alpha_t m_t / \sqrt{\hat{v}_t} \notag = -\alpha_t (\beta_{1}m_{t-1}+ (1-\beta_{1})h_t) / \sqrt{\hat{v}_t} \notag \\ & = \beta_{1}\frac{\alpha_t}{\alpha_{t-1}}\frac{\sqrt{\hat{v}_{t-1}}}{\sqrt{\hat{v}_{t}}} (\theta_{t} - \theta_{t-1}) - \alpha_t (1-\beta_{1})h_t/\sqrt{\hat{v}_t} \notag \\ &= \beta_{1}(\theta_{t} - \theta_{t-1}) + \beta_{1}\left(\frac{\alpha_t}{\alpha_{t-1}}\frac{\sqrt{\hat{v}_{t-1}}}{\sqrt{\hat{v}_{t}}} - 1 \right) (\theta_{t}-\theta_{t-1}) - \alpha_t (1-\beta_{1})h_t/\sqrt{\hat{v}_t} \notag \\ & = \beta_{1}(\theta_{t} - \theta_{t-1}) - \beta_{1}\left(\frac{\alpha_t}{\sqrt{\hat{v}_{t}}}-\frac{\alpha_{t-1}}{\sqrt{\hat{v}_{t-1}}} \right) m_{t-1} - \alpha_t (1-\beta_{1})h_t/\sqrt{\hat{v}_t} \end{align}\tag{15}\] Since we also have \[\begin{align} \theta_{t+1}- \theta_{t} = (1-\beta_{1}) \theta_{t+1} + \beta_{1}(\theta_{t+1} - \theta_{t}) -(1-\beta_{1}) \theta_{t} \end{align}\] Combined with (15 ), we have \[\begin{align} &(1-\beta_{1}) \theta_{t+1} + \beta_{1}(\theta_{t+1} - \theta_{t}) \\ =& (1-\beta_{1}) \theta_{t} + \beta_{1}(\theta_{t} - \theta_{t-1}) - \beta_{1}\left(\frac{\alpha_t}{\sqrt{\hat{v}_{t}}}-\frac{\alpha_{t-1}}{\sqrt{\hat{v}_{t-1}}} \right) m_{t-1} - \alpha_t (1-\beta_{1})h_t/\sqrt{\hat{v}_t}. \end{align}\] Divide both sides by \(1-\beta_{1}\), we have \[\begin{align} &\theta_{t+1} + \frac{\beta_{1}}{1-\beta_{1} }(\theta_{t+1} - \theta_{t}) \notag \\ =& \theta_{t} + \frac{\beta_{1}}{1-\beta_{1}}(\theta_{t} - \theta_{t-1}) - \frac{\beta_{1}}{1-\beta_{1}}\left(\frac{\alpha_t}{\sqrt{\hat{v}_{t}}}-\frac{\alpha_{t-1}}{\sqrt{\hat{v}_{t-1}}} \right) m_{t-1} - \alpha_t h_t/\sqrt{\hat{v}_t}. \end{align}\] ◻
Lemma 7. Suppose that the conditions in Theorem 2 hold, then \[\begin{align} \label{eq:key95lemma72} E\left[f(z_{t+1}) - f(z_1) \right] \leq \sum_{i=1}^4 T_i, \end{align}\tag{16}\] where \[\begin{align} & T_1 = - E\left[\sum_{i=1}^{t} \langle \nabla f(z_i), \frac{\beta_{1}}{1-\beta_{1}}\left(\frac{\alpha_i}{\sqrt{\hat{v}_{i}}}-\frac{\alpha_{i-1}}{\sqrt{\hat{v}_{i-1}}} \right) m_{i-1} \rangle\right] \\ & T_2 = - E\left[\sum_{i=1}^{t} \alpha_i \langle \nabla f(z_i), h_i/\sqrt{\hat{v}_i}\rangle\right] \\ & T_3 = E\left[\sum_{i=1}^{t}L \left \| \frac{\beta_{1}}{1-\beta_{1}}\left(\frac{\alpha_t}{\sqrt{\hat{v}_{i}}} -\frac{\alpha_{i-1}}{\sqrt{\hat{v}_{i-1}}} \right) m_{i-1} \right\|^2 \right] \\ & T_4 = E\left[\sum_{i=1}^{t}L \left \| \alpha_i h_i/\sqrt{\hat{v}_i}\right \|^2 \right] \end{align}\]
Proof. By the Lipschitz smoothness of \(\nabla f\), \[\begin{align} f(z_{t+1}) \leq f(z_t) + \langle \nabla f(z_t), z_{t+1}-z_t\rangle + \frac{L}{2} \left\|z_{t+1}-z_t\right\|^2, \end{align}\] Based on (11),we have
\[\begin{align} E[f(z_{t+1}) - f(z_1) ] =& E\left[\sum_{i=1}^{t} f(z_{i+1})- f(z_i)\right] \notag \\ \leq & E\left[\sum_{i=1}^{t} \langle \nabla f(z_i), z_{i+1}-z_i\rangle + \frac{L}{2} \|z_{i+1}-z_i\|^2 \right] \notag \\ = & - E\left[\sum_{i=1}^{t} \langle \nabla f(z_i), \frac{\beta_{1}}{1-\beta_{1}}\left(\frac{\alpha_i}{\sqrt{\hat{v}_{i}}}-\frac{\alpha_{i-1}}{\sqrt{\hat{v}_{i-1}}} \right) m_{i-1} \rangle\right] \notag\\ & - E\left[\sum_{i=1}^{t} \alpha_i \langle \nabla f(z_i), h_i/\sqrt{\hat{v}_i}\rangle\right] \notag\\ & + E \bigg[ \sum_{i=1}^t \frac{L}{2} \left\|z_{i+1}-z_i\right\|^2 \bigg] = T_1 + T_2 + E \bigg[ \sum_{i=1}^t \frac{L}{2} \left\|z_{i+1}-z_i\right\|^2 \bigg] , \end{align}\]
Then, using inequality \(\|a+b\|^2\leq2\|a\|^2+2\|b\|^2\) and combined with lemma 6, \[\begin{align} E\left[\sum_{i=1}^{t}\frac{L}{2} \|z_{i+1}-z_i\|^2 \right]\leq T_3+T_4 \end{align}\] ◻
Lemma 8. In this part, we bound \(T_1,T_2,T_3\)
Proof. \(\bullet\) Bound for \(T_1\) \[\begin{align}
T_1 = & -E\left[\sum_{i=2}^{t} \langle \nabla f(z_i), \frac{\beta_{1}}{1-\beta_{1}}\left(\frac{\alpha_i}{\sqrt{\hat{v}_{i}}}-\frac{\alpha_{i-1}}{\sqrt{\hat{v}_{i-1}}} \right) m_{i-1} \rangle\right] \\
\leq & E\left[\sum_{i=1}^{t} \left\| \nabla f(z_i)\right\| \left\|m_{i-1}\right\| \left ( \frac{1}{1-\beta_{1}} -1 \right ) \sum_{j=1}^{d}\bigg|\left(\frac{\alpha_i}{\sqrt{\hat{v}_{i}}}-\frac{\alpha_{i-1}}{\sqrt{\hat{v}_{i-1}}}\right)_j\bigg|\right] \\
\leq & H^2 \frac{\beta_{1}}{1-\beta_{1}} E\left[ \sum_{i=1}^t \sum_{j=1}^{d}\bigg|\left(\frac{\alpha_i}{\sqrt{\hat{v}_{i}}}-\frac{\alpha_{i-1}}{\sqrt{\hat{v}_{i-1}}}\right)_j \bigg| \right]
\end{align}\] \(\bullet\) Bound for \(T_3\) \[\begin{align}
T_3 \leq &L E\left[\sum_{i=2}^{t} \left(\frac{\beta_{1}}{1-\beta_{1}}\right)^2\sum_{j=1}^d \left ( \left(\frac{\alpha_t}{\sqrt{\hat{v}_{i}}} -\frac{\alpha_{i-1}}{\sqrt{\hat{v}_{i-1}}} \right)_j^2
(m_{i-1})_j^2 \right ) \right] \\
\leq & \left(\frac{\beta_1}{1-\beta_1}\right)^2L H^2 E\left[ \sum_{i=2}^t
\sum_{j=1}^d \left(\frac{\alpha_t}{\sqrt{\hat{v}_{i}}} -\frac{\alpha_{i-1}}{\sqrt{\hat{v}_{i-1}}}\right)_j ^2\right]
\end{align}\] \(\bullet\) Bound for \(T_2\) \[\begin{align}
T_2 = &-E\left[\sum_{i=1}^{t} \alpha_i \langle \nabla f(z_i), h_i/\sqrt{\hat{v}_i}\rangle\right] \notag \\
=&-E\left[\sum_{i=1}^{t} \alpha_i \langle \nabla f(\theta_i), h_i/\sqrt{\hat{v}_i}\rangle\right] -E\left[\sum_{i=1}^{t} \alpha_i \langle \nabla f(z_i)-\nabla f(\theta_i), h_i/\sqrt{\hat{v}_i}\rangle\right]. \label{eq:32bias95t1}
\end{align}\tag{17}\] The second term of (17 ) can be bounded as \[\begin{align}
&-E\left[\sum_{i=1}^{t} \alpha_i \langle \nabla f(z_i)-\nabla f(\theta_i), h_i/\sqrt{\hat{v}_i}\rangle\right] \notag\\
\leq & E\left[\sum_{i=2}^{t} \frac{1}{2} \|\nabla f(z_i)-\nabla f(\theta_i)\|^2 + \frac{1}{2} \|\alpha_i h_i/\sqrt{\hat{v}_i}\|^2 \right] \notag \\
\leq & \frac{L^2}{2} E\left[\sum_{i=2}^{t} \left\| \frac{\beta_{1}}{1- \beta_{1}} \alpha_{i-1} m_{i-1}/\sqrt{\hat{v}_{i-1}} \right\|^2 \right]
+\frac{1}{2} E\left[\sum_{i=2}^{t}\|\alpha_i h_i/\sqrt{\hat{v}_i}\|^2 \right]
\\
= & \frac{L^2}{2} \left(\frac{\beta_{1}}{1- \beta_{1}}\right)^2 E\left[\sum_{i=2}^{t} \left\| \alpha_{i-1} m_{i-1}/\sqrt{\hat{v}_{i-1}} \right\|^2 \right]
+\frac{1}{2} E\left[\sum_{i=2}^{t}\|\alpha_i h_i/\sqrt{\hat{v}_i}\|^2 \right]
\end{align}\] where the second inequality is due to \(\|\nabla f(z_i)-\nabla f(\theta_i)\| \leq L\|z_i-\theta_i\|\).
Then consider the first term of (17 ) \[\begin{align} &E\left[\sum_{i=1}^t\alpha_i\langle\nabla f(\theta_i),h_i/\sqrt{\hat{v}_i}\rangle\right]\\ =&\kappa
E\left[\sum_{i=1}^t\alpha_i\langle\nabla f(\theta_i),g_i/\sqrt{\hat{v}_i}\rangle\right]+\mu E\left[\sum_{i=1}^t\alpha_i\langle\nabla f(\theta_i),I_i/\sqrt{\hat{v}_i}\rangle\right]
\end{align}\] Consider the term with \(\kappa\) \[\begin{align}
&E\left[\sum_{i=1}^{t} \alpha_i \langle \nabla f(\theta_i), g_i/\sqrt{\hat{v}_i}\rangle\right] \notag \\
= & E\left[\sum_{i=1}^{t} \alpha_i \langle \nabla f(\theta_i), (\nabla f(\theta_i) + \delta_i)/\sqrt{\hat{v}_i}\rangle\right] \notag \\
= & E\left[\sum_{i=1}^{t} \alpha_i \langle \nabla f(\theta_i), \nabla f(\theta_i) /\sqrt{\hat{v}_i}\rangle\right]
+ E\left[\sum_{i=1}^{t} \alpha_i \langle \nabla f(\theta_i), \delta_i/\sqrt{\hat{v}_i}\rangle\right] \label{eq:32bias95t2}.
\end{align}\tag{18}\]
For the second term in RHS of (18 ), we have \[\begin{align}
\label{eq:32inner95prod95v1}
&E\left[\sum_{i=1}^{t} \alpha_i \langle \nabla f(\theta_i), \delta_i/\sqrt{\hat{v}_i}\rangle\right] \notag \\
= & E\left[\sum_{i=2}^{t} \langle \nabla f(\theta_i), \delta_i (\alpha_i/\sqrt{\hat{v}_i} - \alpha_{i-1}/\sqrt{\hat{v}_{i-1}}) \rangle\right] + E\left[\sum_{i=2}^{t} \alpha_{i-1} \langle \nabla f(\theta_i), \delta_i ( 1/\sqrt{\hat{v}_{i-1}}) \rangle
\right] \notag \\
& + E\left[ \alpha_1 \langle \nabla f(x_1), \delta_1/\sqrt{\hat{v}_1}\rangle\right]
\notag \\
\geq & E\left[\sum_{i=2}^{t} \langle \nabla f(\theta_i), \delta_i (\alpha_i/\sqrt{\hat{v}_i} - \alpha_{i-1}/\sqrt{\hat{v}_{i-1}}) \rangle\right] - 2H^2 E \left[ \sum_{j=1}^d(\alpha_1/\sqrt{\hat{v}_1})_j \right]
\end{align}\tag{19}\] where the last equation is because given \(\theta_i, \hat{v}_{i-1}\), \(E\left[\delta_i ( 1/\sqrt{\hat{v}_{i-1}})| \theta_i, \hat{v}_{i-1}\right] = 0\)
and \(\|\delta_i\| \leq 2H\). Further, we have \[\begin{align}
\label{eq:32inner95prod95v2}
&E\left[\sum_{i=2}^{t} \langle \nabla f(\theta_i), \delta_t (\alpha_i/\sqrt{\hat{v}_i} - \alpha_{i-1}/\sqrt{\hat{v}_{i-1}}) \rangle\right] \notag \\
= & E\left[\sum_{i=2}^{t} \sum_{j=1}^d (\nabla f(\theta_i))_j (\delta_t)_j(\alpha_i/(\sqrt{\hat{v}_i})_j - \alpha_{i-1}/(\sqrt{\hat{v}_{i-1}})_j) \right] \notag \\
\geq &- E\left[\sum_{i=2}^{t} \sum_{j=1}^d \left |(\nabla f(\theta_i))_j \right | \left |(\delta_t)_j \right | \left |(\alpha_i/(\sqrt{\hat{v}_i})_j - \alpha_{i-1}/(\sqrt{\hat{v}_{i-1}})_j) \right | \right] \notag \\
\geq &- 2H^2 E\left[\sum_{i=2}^{t} \sum_{j=1}^d \left |(\alpha_i/(\sqrt{\hat{v}_i})_j - \alpha_{i-1}/(\sqrt{\hat{v}_{i-1}})_j) \right | \right]
\end{align}\tag{20}\] Substitute (19 ) and (20 ) into (18 ), we then get
\[\begin{align}
\label{eq:32first95term95bd95simplify} & - E\left[\sum_{i=1}^{t} \alpha_i \langle \nabla f(\theta_i), g_i/\sqrt{\hat{v}_i}\rangle\right] \notag \\ \leq & 2H^2 E\left[\sum_{i=2}^{t} \sum_{j=1}^d \left |(\alpha_i/(\sqrt{\hat{v}_i})_j -
\alpha_{i-1}/(\sqrt{\hat{v}_{i-1}})_j) \right | \right] + 2H^2 E \left[ \sum_{j=1}^d(\alpha_1/\sqrt{\hat{v}_1})_j \right] \notag \\ & - E\left[\sum_{i=1}^{t} \alpha_i \langle \nabla f(\theta_i), \nabla f(\theta_i) /\sqrt{\hat{v}_i}\rangle\right]
\end{align}\tag{21}\] Then, consider the term with \(\mu\). Suppose the optimizer runs for a long time, the bias of EMA is small [12], thus \(E(I_t)\) approaches \(E(g_t)\) as step increases. In other words, we can bound it the same way as the term with
\(\kappa\).
After all these bounds, we finally get \[\begin{align} T_2&\leq \frac{L^2}{2} E\left[\sum_{i=2}^{t} \left\| \frac{\beta_{1}}{1- \beta_{1}} \alpha_{i-1} m_{i-1}/\sqrt{\hat{v}_{i-1}} \right\|^2 \right]
+\frac{1}{2} E\left[\sum_{i=2}^{t}\|\alpha_i h_i/\sqrt{\hat{v}_i}\|^2 \right] \\&+ 2(\kappa+\mu)H^2 E\left[\sum_{i=2}^{t} \sum_{j=1}^d \left |(\alpha_i/(\sqrt{\hat{v}_i})_j - \alpha_{i-1}/(\sqrt{\hat{v}_{i-1}})_j) \right | \right] \\& +
2(\kappa+\mu)H^2 E \left[ \sum_{j=1}^d(\alpha_1/\sqrt{\hat{v}_1})_j \right] - (\kappa+\mu)E\left[\sum_{i=1}^{t} \alpha_i \langle \nabla f(\theta_i), \nabla f(\theta_i) /\sqrt{\hat{v}_i}\rangle\right]
\end{align}\] ◻
Lemma 9. Suppose the conditions in theorem 2 hold. Then we have \[\begin{align} &E\left[\sum_{i=1}^{t} \alpha_i \langle \nabla f(\theta_i), \nabla f(\theta_i) /\sqrt{\hat{v}_i}\rangle\right]\\ \leq&E\Bigg[C_1 \sum_{i=1}^{t} \left \| \frac{\alpha_t h_t}{\sqrt{\hat{v}_t}}\right \|^2 +C_2 \sum_{i=2}^{t} \left\| \frac{\alpha_{i-1}m_{i-1}}{\sqrt{\hat{v}_{i-1}}} \right\|^2 + C_3 \sum_{i=2}^{t} \left\|\frac{\alpha_t}{\sqrt{\hat{v}_t}} - \frac{\alpha_{t-1}}{\sqrt{\hat{v}_{t-1}}}\right\|_1 \\& + C_4 \sum_{i=2}^{t-1} \left\|\frac{\alpha_{t} }{\sqrt{\hat{v}_{t}}} - \frac{\alpha_{t-1} }{\sqrt{\hat{v}_{t-1}}} \right\|^2 \Bigg] + C_5 \end{align}\] where \(C_1, C_2, C_3, C_4\) and \(C_5\) are independent of the step.
Proof. Combining lemma 7 and lemma 8, we get \[\begin{align} &E\left[f(z_{t+1}) - f(z_1) \right]\\ \leq& H^2 \frac{\beta_{1}}{1-\beta_{1}} E\left[ \sum_{i=1}^t \sum_{j=1}^{d}\bigg|\left(\frac{\alpha_i}{\sqrt{\hat{v}_{i}}}-\frac{\alpha_{i-1}}{\sqrt{\hat{v}_{i-1}}}\right)_j \bigg| \right]\\&+\left(\frac{\beta_1}{1-\beta_1}\right)^2L H^2 E\left[ \sum_{i=2}^t \sum_{j=1}^d \left(\frac{\alpha_t}{\sqrt{\hat{v}_{i}}} -\frac{\alpha_{i-1}}{\sqrt{\hat{v}_{i-1}}}\right)_j ^2\right]\\&+E\left[\sum_{i=1}^{t}L \left \| \alpha_i h_i/\sqrt{\hat{v}_i}\right \|^2 \right]\\&+\frac{L^2}{2} E\left[\sum_{i=2}^{t} \left\| \frac{\beta_{1}}{1- \beta_{1}} \alpha_{i-1} m_{i-1}/\sqrt{\hat{v}_{i-1}} \right\|^2 \right] +\frac{1}{2} E\left[\sum_{i=2}^{t}\|\alpha_i h_i/\sqrt{\hat{v}_i}\|^2 \right] \\&+ 2(\kappa+\mu)H^2 E\left[\sum_{i=2}^{t} \sum_{j=1}^d \left |\left(\frac{\alpha_i}{\sqrt{\hat{v}_i}} - \frac{\alpha_{i-1}}{\sqrt{\hat{v}_{i-1}}}\right)_j \right | \right] \\& + 2(\kappa+\mu)H^2 E \left[ \sum_{j=1}^d(\alpha_1/\sqrt{\hat{v}_1})_j \right] - (\kappa+\mu)E\left[\sum_{i=1}^{t} \alpha_i \langle \nabla f(\theta_i), \nabla f(\theta_i) /\sqrt{\hat{v}_i}\rangle\right] \end{align}\]
By merging similar terms in above inequality and noticing that \(\kappa+\mu>0\), we get \[\begin{align} \label{finish} &E\left[\sum_{i=1}^{t} \alpha_i \langle \nabla f(\theta_i), \nabla f(\theta_i) /\sqrt{\hat{v}_i}\rangle\right]\notag\\ \leq&\left(2H^2+ \frac{\beta_{1}H^2}{(1-\beta_{1})(\kappa+\mu)}\right)E\left[ \sum_{i=1}^t \sum_{j=1}^{d}\bigg|\left(\frac{\alpha_i}{\sqrt{\hat{v}_{i}}}-\frac{\alpha_{i-1}}{\sqrt{\hat{v}_{i-1}}}\right)_j \bigg| \right]\notag\\ &+\left(\frac{\beta_1}{1-\beta_1}\right)^2\frac{L H^2}{\kappa+\mu}E\left[ \sum_{i=2}^t \sum_{j=1}^d \left(\frac{\alpha_t}{\sqrt{\hat{v}_{i}}} -\frac{\alpha_{i-1}}{\sqrt{\hat{v}_{i-1}}}\right)_j ^2\right]\notag\\&+ \left(\frac{2L+1}{2(\kappa+\mu)}\right)E\left[\sum_{i=2}^{t}\|\frac{\alpha_i h_i}{\sqrt{\hat{v}_i}}\|^2 \right]+\frac{L^2}{2(\kappa+\mu)} \left(\frac{\beta_{1}}{1- \beta_{1}}\right)^2 E\left[\sum_{i=2}^{t} \left\| \frac{\alpha_{i-1}m_{i-1}}{\sqrt{\hat{v}_{i-1}}} \right\|^2 \right]\notag\\&+ 2H^2 E \left[ \sum_{j=1}^d(\alpha_1/\sqrt{\hat{v}_1})_j \right]+\frac{1}{\kappa+\mu}E\left[f(z_{1}) - f(z_{t+1}) \right]\notag\\=& E\Bigg[C_1 \sum_{i=1}^{t} \left \| \frac{\alpha_t h_t}{\sqrt{\hat{v}_t}}\right \|^2 +C_2 \sum_{i=2}^{t} \left\| \frac{\alpha_{i-1}m_{i-1}}{\sqrt{\hat{v}_{i-1}}} \right\|^2 + C_3 \sum_{i=2}^{t} \left\|\frac{\alpha_t}{\sqrt{\hat{v}_t}} - \frac{\alpha_{t-1}}{\sqrt{\hat{v}_{t-1}}}\right\|_1 \notag\\& + C_4 \sum_{i=2}^{t-1} \left\|\frac{\alpha_{t} }{\sqrt{\hat{v}_{t}}} - \frac{\alpha_{t-1} }{\sqrt{\hat{v}_{t-1}}} \right\|^2 \Bigg] + C_5 \end{align}\tag{22}\] ◻
Theorem 6. (Convergence of AdmetaR for non-convex optimization)
Under the assumptions:
\(\nabla f\) exits and is Lipschitz-continuous,i.e, \(\vert \vert \nabla f(x) - \nabla f(y) \vert \vert \leq L \vert \vert x-y \vert \vert,\;\forall x,y\); \(f\) is also lower bounded.
At step \(t\), the algorithm can access a bounded noisy gradient \(g_t\), and the true gradient \(\nabla f\) is also bounded.
The noisy gradient is unbiased, and has independent noise, \(i.e.\;g_t = \nabla f(\theta_t ) + \delta_t, \mathbb{E} [\delta_t] = 0\) and \(\delta_i \bot \delta_j, \forall i\neq j\).
Assume \(\operatorname*{min}_{j \in [d]} (v_1)_j \geq c > 0\) and \(\alpha_t = \alpha/\sqrt{t}\), then for any T we have: \[\begin{align} \scalebox{1.0}{\operatorname*{min}_{t \in [T]} \mathbb{E} \Big \vert \Big \vert \nabla f(\theta_t ) \Big \vert \Big \vert^2 \leq \frac{1}{\sqrt{T}} ( Q_1+Q_2 \log T ) \notag} \end{align}\] where \(Q_1\) and \(Q_2\) are constants independent of T.
Proof. We bound non-constant terms in RHS of (22 ), which is given by \[\begin{align}
&E\Bigg[C_1 \sum_{t=1}^{T} \left \| \frac{\alpha_t h_t}{\sqrt{\hat{v}_t}}\right \|^2 +C_2 \sum_{i=2}^{t} \left\| \frac{\alpha_{i-1}m_{i-1}}{\sqrt{\hat{v}_{i-1}}} \right\|^2 + C_3 \sum_{t=2}^{T} \left\|\frac{\alpha_t}{\sqrt{\hat{v}_t}} -
\frac{\alpha_{t-1}}{\sqrt{\hat{v}_{t-1}}}\right\|_1
\\+& C_4 \sum_{t=2}^{T-1} \left\|\frac{\alpha_{t} }{\sqrt{\hat{v}_{t}}} - \frac{\alpha_{t-1} }{\sqrt{\hat{v}_{t-1}}} \right\|^2 \Bigg] + C_5
\end{align}\] \(\bullet\) Bound the term with \(C_1\).
Note that \(\min_{j\in[d]}{(\sqrt{\hat{v}_1})_j} \geq min_{j\in[d]}{|(h_1)_j|} \geq c >0\), thus we have \[\begin{align}
&E\left[\sum_{t=1}^{T} \left \| \frac{\alpha_t h_t}{\sqrt{\hat{v}_t}}\right \|^2 \right]\\
\leq & E\left[\sum_{t=1}^{T} \left \| \frac{\alpha_t h_t}{c}\right \|^2 \right] = E\left[\sum_{t=1}^{T} \left \| \frac{\alpha h_t}{c\sqrt{t}}\right \|^2 \right] = E\left[\sum_{t=1}^{T} \left(\frac{\alpha}{c\sqrt{t}}\right)^2\left\| h_t \right\|^2
\right] \\
\leq & \frac{H^2\alpha^2}{c^2} \sum_{t=1}^{T} \frac{1}{t}
\leq \frac{H^2\alpha^2}{c^2} (1+\log T)
\end{align}\] where the first inequality is due to \((\hat{v}_{t})_j \geq (\hat{v}_{t-1})_j\), and the last inequality is due to \(\sum_{t=1}^T \frac{1}{t} \leq 1 + \log T\).
\(\bullet\) Bound the term with \(C_2\).
Apply the same proof as above, we get \[\begin{align} \sum_{i=2}^{t} \left\| \frac{\alpha_{i-1}m_{i-1}}{\sqrt{\hat{v}_{i-1}}} \right\|^2\leq \frac{H^2\alpha^2}{c^2} (1+\log T)
\end{align}\] \(\bullet\) Bound the term with \(C_3\).
\[\begin{align} \label{eq:corl195dif}
& E\left[\sum_{t=2}^{T} \left\|\frac{\alpha_t}{\sqrt{\hat{v}_t}} - \frac{\alpha_{t-1}}{\sqrt{\hat{v}_{t-1}}}\right\|_1 \right] \notag
= E\left[ \sum_{j=1}^d \sum_{t=2}^{T} \left(\frac{\alpha_{t-1}}{(\sqrt{\hat{v}_{t-1}})_j} - \frac{\alpha_t}{(\sqrt{\hat{v}_t})_j}\right)\right]\notag \\
= & E\left[\sum_{j=1}^d \left( \frac{\alpha_{1}}{(\sqrt{\hat{v}_{1}})_j} -\frac{\alpha_{T}}{(\sqrt{\hat{v}_{T}})_j} \right)\right]
\leq E\left[ \sum_{j=1}^d \frac{\alpha_{1}}{(\sqrt{\hat{v}_{1}})_j} \right]
\leq \frac{d\alpha}{c}
\end{align}\tag{23}\] where the first equality is due to\((\hat{v}_t)_j \geq (\hat{v}_{t-1})_j\) and \(\alpha_t \leq \alpha_{t-1}\), and the second equality is due to telescope
sum.
\(\bullet\) Bound the term with \(C_4\).
\[\begin{align}
&E\left[\sum_{t=2}^{T-1} \left\|\frac{\alpha_{t} }{\sqrt{\hat{v}_{t}}} - \frac{\alpha_{t-1} }{\sqrt{\hat{v}_{t-1}}} \right\|^2 \right] \\=&E\left[\sum_{t=2}^{T-1}\sum_{j=1}^d \left(\frac{\alpha_{t} }{\sqrt{\hat{v}_{t}}} - \frac{\alpha_{t-1}
}{\sqrt{\hat{v}_{t-1}}}\right)_i^2\right]\\ \leq & E\left[\sum_{t=2}^{T-1}\sum_{j=1}^d \frac{\alpha}{c}\left|\frac{\alpha_{t} }{\sqrt{\hat{v}_{t}}} - \frac{\alpha_{t-1} }{\sqrt{\hat{v}_{t-1}}} \right|_i\right]\\ \leq & \frac{d\alpha^2}{c^2}\\
\end{align}\] where the first inequality is due to \(|(\alpha_t/\sqrt{\hat{v}_t} - \alpha_{t-1}/\sqrt{\hat{v}_{t-1}})_j| \leq 1/c\).
Then we have for AdmetaR, \[\begin{align} &E\Bigg[C_1 \sum_{t=1}^{T} \left \| \frac{\alpha_t h_t}{\sqrt{\hat{v}_t}}\right \|^2 +C_2 \sum_{i=2}^{t} \left\| \frac{\alpha_{i-1}m_{i-1}}{\sqrt{\hat{v}_{i-1}}} \right\|^2 + C_3 \sum_{t=2}^{T} \left\|\frac{\alpha_t}{\sqrt{\hat{v}_t}} - \frac{\alpha_{t-1}}{\sqrt{\hat{v}_{t-1}}}\right\|_1 \\+& C_4 \sum_{t=2}^{T-1} \left\|\frac{\alpha_{t} }{\sqrt{\hat{v}_{t}}} - \frac{\alpha_{t-1} }{\sqrt{\hat{v}_{t-1}}} \right\|^2 \Bigg] + C_5 \\ \leq & C_1 \frac{H^2\alpha^2}{c^2} (1+\log T) + C_2 \frac{H^2\alpha^2}{c^2} (1+\log T)+ C_3 \frac{d\alpha}{c} + C_4 \frac{d\alpha^2}{c^2} + C_5 \label{eq:32RHS95thr32} \end{align}\tag{24}\] Furthermore, due to \(\|g_t\|\leq H\), we have \((\hat{v}_t)_j \leq H^2\), then we get \[\begin{align} \alpha/(\sqrt{\hat{v}_t})_j \geq \frac{1}{H\sqrt{t}} \end{align}\] Thus we have \[\begin{align} \label{eq:32LHS95thr32} & E\left[\sum_{t=1}^{T} \alpha_i \langle \nabla f(\theta_t), \nabla f(\theta_t) /\sqrt{\hat{v}_t}\rangle\right] \geq E\left[\sum_{t=1}^{T} \frac{1}{H\sqrt{t}} \|\nabla f(\theta_t)\|^2\right] \geq \frac{\sqrt{T}}{H} \min_{t\in[T]} E\left[ \|\nabla f(\theta_t)\|^2\right] \end{align}\tag{25}\] Combining (24 ) and (25 ), we have \[\begin{align} & \min_{t\in[T]} E\left[ \|\nabla f(\theta_t)\|^2\right] \\ \leq & \frac{H}{\sqrt{T}} \left((C_1+C_2) \frac{H^2\alpha^2}{c^2} (1+\log T) + C_3 \frac{d\alpha}{c} + C_4 \frac{d\alpha^2}{c^2} + C_5\right) \\ = &\frac{1}{\sqrt{T}}\left(Q_1 + Q_2 \log T \right) \end{align}\]
This completes the proof. ◻
Lemma 10 (Bound for \(\sum_{t=1}^{T} \alpha_t \|m_{t}\| ^ 2\)). Under Assumption in Theorem 3, we have \[\sum_{t=1}^{T} \alpha_t \|m_t\| ^ 2\leq2\alpha d G_{\infty}^2 \sqrt{T}\]
Proof. First, we bound \(\|m_t\|\). \[\begin{align} \|m_t\|^2\leq d\|m_t\|_{\infty}^2 \leq dG_{\infty}^2 \end{align}\] Now we can bound \(\sum_{t=1}^{T} \alpha_t \|m_t\| ^ 2\) \[\begin{align} \sum_{t=1}^{T} \alpha_t \|m_t\| ^ 2 \leq dG_{\infty}^2 \sum_{t=1}^T \alpha_t = \alpha d G_{\infty}^2 \sum_{t=1}^T \frac{1}{\sqrt{t}} \leq 2\alpha d G_{\infty}^2 \sqrt{T} \end{align}\] ◻
Theorem 7. (Convergence of AdmetaS for convex optimization)
Let \(\{\theta_t\}\) be the sequence obtained by AdmetaS, \(0 \leq \lambda,\beta < 1\), \(\alpha_t =
\frac{\alpha}{\sqrt{t}}\), \(\forall t \in [T]\). Suppose \(x\in \mathcal{F}\), where \(\mathcal{F} \subset \mathbb{R}^d\) and has bounded diameter
\(D_{\infty}\), i.e. \(\vert\vert \theta_t-\theta\vert\vert_\infty \leq D_{\infty}, \forall t \in [T]\).. Assume \(f(\theta)\) is a convex function and \(\vert \vert g_t \vert \vert_\infty\) is bounded. Denote the optimal point as \(\theta\). For \(\theta_t\) generated, AdmetaS
achieves the regret:
Proof. \(\bullet\) Bound for \(\sum_{t=1}^{T} \langle m_t, \theta_t - \theta \rangle\).
From the update process, we get
\[\begin{align} \|\theta_{t+1}-\theta\|^2=\|\theta_t-\theta-\alpha_t m_t\|^2=\|\theta_t-\theta\|^2-2\alpha_t\langle m_t,\theta_t-\theta\rangle+\alpha_t^2 \|m_t\|^2
\end{align}\] thus we have \[\begin{align} \sum_{t=1}^{T} \langle m_t, \theta_t - \theta \rangle =
\sum_{t=1}^T\frac{1}{2\alpha_t}\left(\|\theta_t-\theta\|^2-\|\theta_{t+1}-\theta\|^2\right)+\sum_{i=1}^T\frac{\alpha_t}{2}\|m_t\|^2
\end{align}\] Consider the left-hand side \[\begin{align}
&\sum_{t=1}^T\frac{1}{2\alpha_t}\left(\|\theta_t-\theta\|^2-\|\theta_{t+1}-\theta\|^2\right)\\=&\frac{1}{2\alpha_1}\|\theta_1-\theta\|^2+\sum_{t=2}^T
\left(\frac{1}{2\alpha_t}-\frac{1}{2\alpha_{t-1}}\right)\|\theta_t-\theta\|^2-\frac{1}{2\alpha_T}\|\theta_{T+1}-\theta\|^2 \\
\leq&\frac{dD_{\infty}^2}{2\alpha_1}+dD_{\infty}^2\sum_{t=2}^T\left(\frac{1}{2\alpha_t}-\frac{1}{2\alpha_{t-1}}\right)+0=\frac{dD_{\infty}^2}{2\alpha_T}
\end{align}\] Finally,we get \[\begin{align} \sum_{t=1}^{T} \langle m_t, \theta_t - \theta \rangle \leq\frac{dD_{\infty}^2}{2\alpha_T}+\sum_{i=1}^T\frac{\alpha_t}{2}\|m_t\|^2
\end{align}\]
\(\bullet\) Bound for \(\sum_{t=1}^T \langle m_{t-1}, \theta_{t-1} - \theta_t \rangle\). \[\begin{align} \sum_{t=1}^T \langle m_{t-1}, \theta_{t-1} - \theta_t \rangle&=\sum_{t=1}^{T-1}\langle m_{t}, \theta_{t} - \theta_{t+1} \rangle\\ &=\sum_{t=1}^{T-1}\langle m_{t}, \alpha_t m_t \rangle \\&=\sum_{t=1}^{T-1}\alpha_t\|m_t\|^2 \end{align}\]
\(\bullet\) Bound for \(\langle m_T, \theta_T - \theta \rangle\). \[\begin{align} \langle m_T, \theta_T - \theta \rangle &\leq\alpha_T\|m_T\|^2+\frac{1}{4\alpha_T}\|\theta_T-\theta\|^2\\&\leq\alpha_T\|m_T\|^2+\frac{dD_{\infty}^2}{4\alpha_T} \end{align}\]
where the first inequality follows from Young’s inequality.
Combining all these preparations, we obtain \[\begin{align} \sum_{t=1}^T \langle h_t, \theta_t - \theta \rangle =& \frac{1}{1-\beta} \big( \langle m_T, \theta_T - \theta \rangle - \langle m_0, \theta_0 - \theta \rangle \big)
+ \langle m_0, \theta_0 - \theta \rangle\\& + \sum_{t=1}^{T-1} \langle m_t, \theta_t - \theta \rangle +\frac{\beta}{1-\beta} \sum_{t=1}^T \langle m_{t-1}, \theta_{t-1} - \theta_t \rangle\\
=& \frac{\beta}{1-\beta} \langle m_T, \theta_T - \theta \rangle+\frac{\beta}{1-\beta} \sum_{t=1}^T \langle m_{t-1}, \theta_{t-1} - \theta_t \rangle+\sum_{t=1}^{T} \langle m_t, \theta_t - \theta \rangle\\
\leq&\frac{\beta}{1-\beta}\left(\frac{dD_\infty}{4\alpha_T}+\sum_{t=1}^{T}\alpha_t\|m_t\|^2\right)+\frac{dD_{\infty}^2}{2\alpha_T}+\sum_{i=1}^T\frac{\alpha_t}{2}\|m_t\|^2\\
\leq&\left(\frac{\beta}{1-\beta}+2\right)\frac{dD_{\infty}}{4\alpha_T}+\left(\frac{2\alpha\beta}{1-\beta}+\alpha\right) d G_{\infty}^2 \sqrt{T}
\end{align}\] This proves that \(\sum_{t=1}^T \langle h_t, \theta_t - \theta \rangle = \mathcal{O}(\sqrt{T})\). Suppose the optimizer runs for a long time, the bias of EMA is small [12], thus \(E(I_t)\) approaches \(E(g_t)\) as step increases. Since \(h_t = \kappa g_t + \mu I_t\), \(h_t\) is the same order as \(g_t\) when the time is long enough, thus we have \[\begin{align}
\label{admetas:convex} \sum_{t=1}^T \langle g_t, \theta_t - \theta \rangle = \mathcal{O}(\sqrt{T})
\end{align}\tag{26}\] In addition, due to the convexity of \(f(.)\), we have \[\begin{align} R(T) &= \sum_{t=1}^T (f_t(\theta_t) - f_t(x))\leq \sum_{t=1}^T \langle g_t, \theta_t
- \theta \rangle
\end{align}\] Combined with (26 ), we complete the proof. ◻
Lemma 11. Set \(\theta_0 \triangleq \theta_1\) in Algorithm (3), and define \(z_t\) as \[\begin{align} \label{eq:z} &z_t = \theta_{t} + \frac{\beta}{1-\beta}(\theta_t - \theta_{t-1}), ~ \forall t \geq 1. \end{align}\tag{27}\] Then the following holds \[\begin{align} z_{t+1}- z_{t} =& -\frac{\beta}{1-\beta}(\alpha_t-\alpha_{t-1})m_{t-1}-\alpha_t h_t \end{align}\]
Proof. By the update rule of AdmetaS, we have \[\begin{align} \label{E1} \theta_{t+1}-\theta_t&=-\alpha_t m_t=-\alpha_t[\beta m_{t-1}+(1-\beta)h_t]\notag\\&=\beta\frac{\alpha_t}{\alpha_{t-1}}(\theta_t-\theta_{t-1})-\alpha_t(1-\beta)h_t\notag\\&=\beta(\theta_t-\theta_{t-1})+\beta\left(\frac{\alpha_t}{\alpha_{t-1}}-1\right)(\theta_t-\theta_{t-1})-\alpha_t(1-\beta)h_t\notag\\&=\beta(\theta_t-\theta_{t-1})-\beta(\alpha_t-\alpha_{t-1})m_{t-1}-\alpha_t(1-\beta)h_t \end{align}\tag{28}\] Since we also have \[\begin{align} \theta_{t+1}-\theta_t=(1-\beta)\theta_{t+1}+\beta(\theta_{t+1}-\theta_t)-(1-\beta) \theta_t \end{align}\] Combined with (28 ), we have \[\begin{align} (1-\beta)\theta_{t+1}+\beta(\theta_{t+1}-\theta_t)=&(1-\beta) \theta_t+\beta(\theta_t-\theta_{t-1})\\&-\beta(\alpha_t-\alpha_{t-1})m_{t-1}-\alpha_t(1-\beta)h_t \end{align}\] Divide both sides by \(1-\beta\) \[\begin{align} \theta_{t+1}+\frac{\beta}{1-\beta}(\theta_{t+1}-\theta_t)=&\theta_{t}+\frac{\beta}{1-\beta}(\theta_{t}-\theta_{t-1})\\&-\frac{\beta}{1-\beta}(\alpha_t-\alpha_{t-1})m_{t-1}-\alpha_t h_t \end{align}\] ◻
Lemma 12. Suppose that the conditions in Theorem 4 hold, then \[\begin{align} E\left[f(z_{t+1}) - f(z_1) \right] \leq \sum_{i=1}^4 T_i, \end{align}\] where \[\begin{align} & T_1 = - E\left[\sum_{i=1}^{t} \langle \nabla f(z_i), \frac{\beta_{1}}{1-\beta_{1}}(\alpha_i-\alpha_{i-1})m_{i-1} \rangle\right] \\ & T_2 = - E\left[\sum_{i=1}^{t} \alpha_i \langle \nabla f(z_i),h_i\rangle\right]\\ & T_3 = E\left[\sum_{i=1}^{t}L \left \| \frac{\beta}{1-\beta}(\alpha_i -\alpha_{i-1})m_{i-1} \right\|^2 \right]\\ & T_4 = E\left[\sum_{i=1}^{t}L \left \| \alpha_i h_i\right \|^2 \right] \end{align}\]
Proof. By the Lipschitz smoothness of \(\nabla f\), \[\begin{align} f(z_{t+1}) \leq f(z_t) + \langle \nabla f(z_t), z_{t+1}-z_t\rangle + \frac{L}{2} \left\|z_{t+1}-z_t\right\|^2, \end{align}\] Based on (11),we have \[\begin{align} E[f(z_{t+1}) - f(z_1) ] =& E\left[\sum_{i=1}^{t} f(z_{i+1})- f(z_i)\right] \\ \leq & E\left[\sum_{i=1}^{t} \langle \nabla f(z_i), z_{i+1}-z_i\rangle + \frac{L}{2} \|z_{i+1}-z_i\|^2 \right] \\ =&- E\left[\sum_{i=1}^{t} \langle \nabla f(z_i), \frac{\beta}{1-\beta}(\alpha_i-\alpha_{i-1})m_{i-1} \rangle\right]\\&- E\left[\sum_{i=1}^{t} \alpha_i \langle \nabla f(z_i),h_i\rangle\right]+E\left[\sum_{i=1}^{t}\frac{L}{2} \|z_{i+1}-z_i\|^2 \right] \end{align}\] Then, using inequality \(\|a+b\|^2\leq2\|a\|^2+2\|b\|^2\) and combined with lemma 11, \[\begin{align} E\left[\sum_{i=1}^{t}\frac{L}{2} \|z_{i+1}-z_i\|^2 \right]\leq T_3+T_4 \end{align}\] ◻
Lemma 13. In this part, we bound \(T_1,T_2,T_3,T_4\). We claim that the order of them is \(\mathcal{O} (\log T)\).
Proof. \(\bullet\)Bound for \(T_1\) \[\begin{align} T_1&\leq E\left[\sum_{i=1}^t\|\nabla
f(z_i)\|\|m_{i-1}\|\frac{\beta}{1-\beta}|\alpha_i-\alpha_{i-1}|\right]\\&\leq H^2\frac{\beta}{1-\beta}E\left[\sum_{i=1}^{t}|\alpha_i-\alpha_{i-1}|\right]\\&\leq H^2\frac{\beta}{1-\beta}\alpha
\end{align}\] where the second and last inequality is due to the monotone decreasing property of \(\alpha_i\)
\(\bullet\)Bound for \(T_3\) \[\begin{align}
T_3&\leq\left(\frac{\beta}{1-\beta}\right)^2LH^2E\left[\sum_{i=1}^{t}(\alpha_i-\alpha_{i-1})^2\right]\\&\leq2\alpha\left(\frac{\beta}{1-\beta}\right)^2LH^2E\left[\sum_{i=1}^{t}|\alpha_i-\alpha_{i-1}|\right]\\&\leq2\alpha^2\left(\frac{\beta}{1-\beta}\right)^2LH^2
\end{align}\] where the monotone decreasing property of \(\alpha_i\) is also used
\(\bullet\)Bound for \(T_4\) \[\begin{align} T_4\leq H^2L\alpha^2 E\left[\sum_{i=1}^t\frac{1}{t}\right]\leq H^2L\alpha^2 (1+\log T)
\end{align}\] where the second inequality is due to \(\sum_{i=1}^t\frac{1}{t}\leq 1+\log T\)
\(\bullet\)Bound for \(T_2\) \[\begin{align}
\label{T952} T_2=&-E\left[\sum_{i=1}^t\alpha_i\langle\nabla f(\theta_i),h_i\rangle\right]\notag\\&-E\left[\sum_{i=1}^t\langle \nabla f(z_i)-\nabla f(\theta_i),h_i\rangle\right]
\end{align}\tag{29}\] The second term of (29 ) can be bounded as \[\begin{align} &-E\left[\sum_{i=1}^t\langle \nabla f(z_i)-\nabla f(\theta_i),h_i\rangle\right]\\
\leq&E\left[\sum_{i=1}^t\frac{1}{2}\|\nabla f(z_i)-\nabla f(\theta_i)\|^2+\frac{1}{2}\|\alpha_i h_i\|^2\right]\\ \leq&\frac{L^2}{2}E\left[\sum_{i=1}^t\|\frac{\beta}{1-\beta}\alpha_{i-1}m_{i-1}\|^2\right]+\frac{1}{2}E\left[\sum_{i=1}^t\|\alpha_i
h_i\|^2\right]\\ \leq&\frac{\alpha^2H^2L^2}{2}\left(\frac{\beta}{1-\beta}\right)^2\sum_{i=1}^t\frac{1}{t}+\frac{\alpha^2H^2}{2}\sum_{i=1}^t\frac{1}{t} \\\leq&\frac{\alpha^2H^2}{2}\left[L^2\left(\frac{\beta}{1-\beta}\right)^2+1\right](1+\log T)
\end{align}\] where the second inequality is due to \(\|\nabla f(z_i)-\nabla f(\theta_i)\| \leq L\|z_i-\theta_i\|\).
Then, consider the first term of (29 ) \[\begin{align} &E\left[\sum_{i=1}^t\alpha_i\langle\nabla f(\theta_i),h_i\rangle\right]\\= &E\left[\sum_{i=1}^t\alpha_i\langle\nabla f(\theta_i),\kappa g_i+\mu
I_i\rangle\right]\\ \approx &\kappa E\left[\sum_{i=1}^t\alpha_i\langle\nabla f(\theta_i),\nabla f(\theta_i)+\delta_i\rangle\right]+\mu E\left[\sum_{i=1}^t\alpha_i\langle\nabla f(\theta_i),\nabla f(\theta_i)+\delta_i\rangle\right]\\= &(\kappa+\mu)
E\left[\sum_{i=1}^t\alpha_i\langle\nabla f(\theta_i),\nabla f(\theta_i)\rangle\right]\\
\end{align}\] The second and third equality holds for the follow reasons: on the one hand, \(g_t = \nabla f(\theta_t) + \delta_t\) in which \(E[\delta_t] = 0\), so according to [44], given \(\theta_i\), \(E[\delta_i|\theta_i]=0\); On the other hand,
suppose the optimizer runs for a long time, the bias of EMA is small [12], thus \(E(I_t)\)
approaches \(E(g_t)\) as step increases. Finally, we can finally bound \(T_2\) \[\begin{align} T_2\leq
&\frac{\alpha^2H^2}{2}\left[L^2\left(\frac{\beta}{1-\beta}\right)^2+1\right](1+\log T)+(\kappa+\mu) E\left[\sum_{i=1}^t\alpha_i\langle\nabla f(\theta_i),\nabla f(\theta_i)\rangle\right]
\end{align}\] ◻
Theorem 8. (Convergence of AdmetaS in non-convex stochastic optimization)
Under the assumptions:
\(\nabla f\) exits and is Lipschitz-continuous,i.e, \(\vert \vert \nabla f(x) - \nabla f(y) \vert \vert \leq L \vert \vert x-y \vert \vert,\;\forall x,y\); \(f\) is also lower bounded.
At step \(t\), the algorithm can access a bounded noisy gradient \(g_t\), and the true gradient \(\nabla f\) is also bounded.
The noisy gradient is unbiased, and has independent noise, \(i.e.\;g_t = \nabla f(\theta_t ) + \delta_t, \mathbb{E} [\delta_t] = 0\) and \(\delta_i \bot \delta_j, \forall i\neq j\).
And \(\alpha_t = \alpha/\sqrt{t}\), then for any T we have: \[\begin{align} \scalebox{1.0}{\operatorname*{min}_{t \in [T]} \mathbb{E} \Big \vert \Big \vert \nabla f(\theta_t ) \Big \vert \Big \vert^2 \leq \frac{1}{\sqrt{T}} ( Q_1^{'}+Q_2^{'} \log T ) \notag} \end{align}\] where \(Q_1^{'}\) and \(Q_2^{'}\) are constants independent of T.
Proof. We combine lemma 11, lemma 12 and lemma 13 to bound the overall expected descent of the objective. First, we have \[\begin{align}
\label{sigma32T95i} E\left[f(z_{t+1}) - f(z_1) \right] \leq&T_1+T_2+T_3+T_4\\ \leq& H^2\frac{\beta}{1-\beta}\alpha+ \frac{\alpha^2H^2}{2}\left[L^2\left(\frac{\beta}{1-\beta}\right)^2+1\right](1+\log T)\\ &-(\kappa+\mu)
E\left[\sum_{i=1}^t\alpha_i\langle\nabla f(\theta_i),\nabla f(\theta_i)\rangle\right]\\&+ 2\alpha^2\left(\frac{\beta}{1-\beta}\right)^2LH^2+ H^2L\alpha^2 (1+\log T)
\end{align}\tag{30}\] Notice that \[\begin{align}
\label{admetas32final} & E\left[\sum_{t=1}^{T} \alpha_i \langle \nabla f(\theta_t), \nabla f(\theta_t)\rangle\right] \geq E\left[\sum_{t=1}^{T} \frac{1}{\sqrt{t}} \|\nabla f(\theta_t)\|^2\right] \geq \sqrt{T} \min_{t\in[T]} E\left[ \|\nabla
f(\theta_t)\|^2\right]
\end{align}\tag{31}\] Rearrange (30 ), combined with (31 ) and notice that \(\kappa+\mu>0\), we have \[\begin{align}
\min_{t\in[T]} E\left[ \|\nabla f(\theta_t)\|^2\right]\leq& \frac{1}{\sqrt{T}}E\left[\sum_{t=1}^{T} \alpha_i \langle \nabla f(\theta_t), \nabla f(\theta_t)\rangle\right]\\
\leq&\frac{1}{\sqrt{T}}\Bigg[\frac{1}{\kappa+\mu}\left(\frac{\alpha^2H^2L^2}{2}\left(\frac{\beta}{1-\beta}\right)^2+\frac{\alpha^2H^2}{2}+H^2L\alpha^2\right)(1+\log T)\\&+\frac{1}{\kappa+\mu}\left(H^2\frac{\beta}{1-\beta}\alpha+
2\alpha^2\left(\frac{\beta}{1-\beta}\right)^2LH^2+E[f(z_1)-f(z^*)]\right)\Bigg]\\ =& \frac{1}{\sqrt{T}}(Q_1^{'} + Q_2^{'} \log T )
\end{align}\] where \(z^*\) is the optimal of \(f\), i.e. \(z^*=\mathop{\arg\min}\limits_{z}f(z)\)
This completes the proof. ◻
In this section, based on [46], we further analysis forward-looking part to complete the convergence proof of Admeta optimizer.
According to [15], Lookahead is an algorithm that can be combined with any standard optimization method. The same is true for dynamic lookahead method in forward-looking part. What’s more, optimizers with forward-looking is essentially processing with two loops as discussed in the main text. The fast weight is updated by optimizers, while the slow weight is updated by interpolating with fast weight every given period. In other words, the slow weight is updated passively. Therefore, though the slow weight is relevant to optimizers, it is almost irrelevant to the selection of optimizers. For this reason, we only prove the convergence of forward-looking of AdmetaS, which can be easily extended to the AdmetaR.
Remarks:(some preliminaries)
Based on the design of the asymptotic dynamic weight \(\eta_t\) of the forward-looking part, it can be concluded that when it runs for a long time, \(\eta_t\) is highly close to the set
point, at which we can safely assume that \(\eta_t\) is a constant and thus we denote it as \(\eta\). In this way, the analysis of a dynamic lookahead is the same as the case of static
lookahead.
According to algorithm of Admeta, the slow weight \(\phi_t\) updates every k steps. We can assume that the slow weight is trained in sync with fast weight. For this purpose, all we should do is to stipulate \(\phi_{\tau k+l}=\phi_{\tau k}\), where \(k\) denotes the synchronization period, \(\tau \in \mathbb{N}^*\) and \(0\leq l <k\).
Define \(y_t=\eta \theta_t +(1-\eta)\theta_t\), then according to the update of \(\theta_t\) and \(\phi_t\), we have \[\begin{align} y_{t+1}=y_t-\eta \alpha_t m_t \end{align}\] and on each period of synchronization, we have \[\begin{align} &y_{\tau k}-\theta_{\tau k}=(1-\eta)(\phi_{\tau k}-\theta_{\tau k})=0\\ &y_{\tau k}-\phi_{\tau k}=\eta(\theta_{\tau k}-\phi_{\tau k})=0 \end{align}\]
Theorem 9. (convergence of forward-looking part)
Suppose \(f(.)\) is L-smooth, i.e, \(\vert \vert \nabla f(x) - \nabla f(y) \vert \vert \leq L \vert \vert x-y \vert \vert,\;\forall x,y\). The bias of noisy gradient is bounded, i.e., \(|\delta_t| \leq \sigma\), where \(\delta_t= \nabla f(\theta_t )- g_t\). Then we have that: \[\begin{align} \frac{1}{T}\sum_{t=0}^T \mathbb{E} \Big \vert \Big \vert
\nabla f(\theta_t ) \Big \vert \Big \vert^2 \leq \mathcal{O} (\frac{1}{\sqrt{T}}) \notag
\end{align}\]
Proof. Following the L-smooth property, we have \[\begin{align} \label{145} f(y_{t+1})-f(y_t)\leq-\eta\alpha_t \langle \nabla f(y_t),m_t \rangle+\frac{\eta^2\alpha_t^2L}{2}\|m_t\|^2 \end{align}\tag{32}\] Taking the expectation of both sides, \[\begin{align} \label{245} &\mathbb{E}[\langle \nabla f(y_t),m_t\rangle] = \mathbb{E}[\langle \nabla f(y_t),\kappa g_t +\mu I_t\rangle]=\kappa\mathbb{E}[\langle \nabla f(y_t), g_t\rangle]+\mu\mathbb{E}[\langle \nabla f(y_t), I_t\rangle] \end{align}\tag{33}\] Consider the term with \(\kappa\), \[\begin{align} \label{666} &\mathbb{E}[\langle \nabla f(y_t), g_t\rangle]=\langle \nabla f(y_t),\nabla f(\theta_t)\rangle\notag\\ =&\frac{1}{2}[\|\nabla f(y_t)\|^2+\|\nabla f(\theta_t)\|^2-\|\nabla f(y_t)-\nabla f(\theta_t)\|^2]\notag\\ \geq&\frac{1}{2}[\|\nabla f(y_t)\|^2+\|\nabla f(\theta_t)\|^2-L^2\|y_t-\theta_t\|^2]\notag\\ =&\frac{1}{2}[\|\nabla f(y_t)\|^2+\|\nabla f(\theta_t)\|^2-(1-\eta)^2L^2\|\phi_t-\theta_t\|^2] \end{align}\tag{34}\] Suppose the optimizer runs for a long time, the bias of EMA is small enough, thus \(E(I_t)\) approaches \(E(g_t)\). For this reason, we can estimate the term with \(\mu\) in (33 ) the same way as (34 ).
Based on the bounded bias gradient assumption and inequality that \((a+b)^2\leq 2a^2+2b^2\), we have: \[\begin{align} \label{345} \mathbb{E}[\|m_t\|^2]\leq 2\mu^2\mathbb{E}[\|I_t\|^2]\|+2\kappa^2\mathbb{E}[\|g_t\|^2]\|\leq 4(\mu^2+\kappa^2)\mathbb{E}\|\nabla f(\theta_t)\|^2 + 4(\mu^2+\kappa^2)\sigma^2 \end{align}\tag{35}\] Combined with (32 ), (33 ), (34 ) and (35 ), rearrange the inequality and take the expectation \[\begin{align} \mathbb{E}[f(y_{t+1})]\leq& \mathbb{E}[f(y_t)]-\frac{\eta\alpha_t(\mu+\kappa)}{2}\mathbb{E}[\|\nabla f(y_t)\|^2]-\frac{\eta\alpha_t(\mu+\kappa)}{2}\mathbb{E}[\|\nabla f(\theta_t)\|^2]\\&+\frac{\eta\alpha_t(1-\eta)^2L^2(\mu+\kappa)}{2}\mathbb{E}[\|\phi_t-\theta_t\|^2]+2(\mu^2+\kappa^2)\eta^2\alpha_t^2L\mathbb{E}[\|\nabla f(\theta_t)\|^2]\\&+2(\mu^2+\kappa^2)\eta^2\alpha_t^2L\sigma^2\\ \end{align}\] Since the learning rate is decreasing to zero, we can safely assume that after several iterations, \(1-\eta \alpha_t L > 0\). Then, summing over one outer loop \[\begin{align} \label{456} &\mathbb{E}[f(y_{(\tau+1)k})]-\mathbb{E}[f(y_{\tau k})]\notag\\\leq& -\frac{\eta\alpha_{(\tau+1)k}(\mu+\kappa)}{2}\sum_{l=0}^{k-1}\mathbb{E}[\|\nabla f(y_{\tau k+l})\|^2] \notag+2(\mu^2+\kappa^2)k\eta^2\alpha_{\tau k}^2L\sigma^2 \\&- \frac{\eta \alpha_{(\tau+1)k}(\mu+\kappa-4(\mu^2+\kappa^2)\eta\alpha_{(\tau+1)k}L)}{2}\sum_{l=0}^{k-1}\mathbb{E}[\|\nabla f(\theta_{\tau k+l})\|^2] \notag\\&+\frac{\eta\alpha_{\tau k}(1-\eta)^2L^2(\mu+\kappa)}{2}\sum_{l=0}^{k-1}\mathbb{E}[\|\phi_{\tau k+l}-\theta_{\tau k+l}\|^2] \end{align}\tag{36}\] Consider the last term of (36 ), we have \[\begin{align} &\mathbb{E}[\|\phi_{\tau k+l}-\theta_{\tau k+l}\|^2] = \mathbb{E}[\|\theta_{\tau k}-\theta_{\tau k+l}\|^2]\leq\alpha_{\tau k}^2\mathbb{E}\left[\|\sum_{j=0}^{l-1}m_{\tau k+j}\|^2\right]\\=&2\kappa^2\alpha_{\tau k}^2\mathbb{E}\left[\|\sum_{j=0}^{l-1}g_{\tau k+j}\|^2\right]+2\mu^2\alpha_{\tau k}^2\mathbb{E}\left[\|\sum_{j=0}^{l-1}I_{\tau k+j}\|^2\right] \\\leq& 4\kappa^2\alpha_{\tau k}^2\mathbb{E}\left[\left\|\sum_{j=0}^{l-1}(g_{\tau k+j}-\nabla f(\theta_{\tau k+j}))\right\|^2\right]+4\kappa^2\alpha_{\tau k}^2\mathbb{E}\left[\left\|\sum_{j=0}^{l-1}\nabla f(\theta_{\tau k+j})\right\|^2\right]\\&+4\mu^2\alpha_{\tau k}^2\mathbb{E}\left[\left\|\sum_{j=0}^{l-1}(I_{\tau k+j}-\nabla f(\theta_{\tau k+j}))\right\|^2\right]+4\mu^2\alpha_{\tau k}^2\mathbb{E}\left[\left\|\sum_{j=0}^{l-1}\nabla f(\theta_{\tau k+j})\right\|^2\right]\\ \leq&4(\kappa^2+\mu^2)\sigma^2 l \alpha_{\tau k}^2+4(\mu^2+\kappa^2)\alpha_{\tau k}^2\mathbb{E}\left[\left\|\sum_{j=0}^{l-1}\nabla f(\theta_{\tau k+j})\right\|^2\right]\\ \leq&4(\kappa^2+\mu^2)\sigma^2 l \alpha_{\tau k}^2+4(\mu^2+\kappa^2)l\alpha_{\tau k}^2\sum_{j=0}^{l-1}\mathbb{E}[\left\|\nabla f(\theta_{\tau k+j})\right\|^2] \end{align}\] where the first equality using the property that \(\theta_{\tau k}=\phi_{\tau k}=\phi_{\tau k+l}\).
Summing from \(l=0\) to \(l=k-1\), we get, \[\begin{align} &\sum_{l=0}^{k-1}\mathbb{E}[\|\phi_{\tau k+l}-\theta_{\tau k+l}\|^2]\\ \leq &2(\kappa^2+\mu^2)\sigma^2 \alpha_{\tau k}^2 k(k-1)+4(\mu^2+\kappa^2)\alpha_{\tau k}^2\sum_{l=0}^{k-1}l\sum_{j=0}^{l-1}\mathbb{E}[\left\|\nabla f(\theta_{\tau k+j})\right\|^2]\\ =&2(\kappa^2+\mu^2)\sigma^2 \alpha_{\tau k}^2 k(k-1) +4(\mu^2+\kappa^2)\alpha_{\tau k}^2\sum_{j=0}^{k-2}\mathbb{E}[\left\|\nabla f(\theta_{\tau k+j})\right\|^2]\sum_{l=j+1}^{k-1}l\\ =&2(\kappa^2+\mu^2)\sigma^2 \alpha_{\tau k}^2 k(k-1) +2(\mu^2+\kappa^2)\alpha_{\tau k}^2\sum_{j=0}^{k-2}\mathbb{E}[\left\|\nabla f(\theta_{\tau k+j})\right\|^2](j+k)(k-j-1) \end{align}\] \((j + k)(k - j - 1)\) achieves its maximal value when \(j\) = 0. Therefore, we have \[\begin{align} &\sum_{l=0}^{k-1}\mathbb{E}[\|\phi_{\tau k+l}-\theta_{\tau k+l}\|^2]\\ \leq&2(\kappa^2+\mu^2)\sigma^2 \alpha_{\tau k}^2 k(k-1) +2(\mu^2+\kappa^2)\alpha_{\tau k}^2k(k-1)\sum_{j=0}^{k-2}\mathbb{E}[\left\|\nabla f(\theta_{\tau k+j})\right\|^2] \end{align}\] Here, we can finally bound the the last term of (36 ) \[\begin{align} \label{789} &\mathbb{E}[f(y_{(\tau+1)k})]-\mathbb{E}[f(y_{\tau k})]\notag\\\leq& -\frac{\eta\alpha_{(\tau+1)k}(\mu+\kappa)}{2}\sum_{l=0}^{k-1}\mathbb{E}[\|\nabla f(y_{\tau k+l})\|^2]+G+M\sum_{l=0}^{k-1}\mathbb{E}[\left\|\nabla f(\theta_{\tau k+l})\right\|^2]\notag\\\leq&-\frac{\eta\alpha_{(\tau+1)k}(\mu+\kappa)}{2}\sum_{l=0}^{k-1}\mathbb{E}[\|\nabla f(y_{\tau k+l})\|^2]+G \end{align}\tag{37}\] where \[\begin{align} G&=2(\mu^2+\kappa^2)k\eta^2\alpha_{\tau k}^2L\sigma^2+(\kappa^2+\mu^2)(\kappa+\mu)\eta(1-\eta)^2L^2\sigma^2k(k-1)\alpha_{\tau k}^3 \end{align}\] and \[\begin{align} M=&- \frac{\eta \alpha_{(\tau+1)k}(\mu+\kappa-4(\mu^2+\kappa^2)\eta\alpha_{(\tau+1)k}L)}{2}\\&+(\kappa^2+\mu^2)(\kappa+\mu)\eta(1-\eta)^2L^2\sigma^2k(k-1)\alpha_{\tau k}^3 \end{align}\] When \(\alpha\) is small enough, \(M\) is below zero, for which the second inequality of (37 ) holds.
Summing from \(\tau=0\) to \(\tau=\Upsilon-1\), we get \[\begin{align} &\mathbb{E}[f(y_{\Upsilon k})]-\mathbb{E}[f(y_0)]\\\leq&-\frac{\eta(\mu+\kappa)}{2}\sum_{\tau=0}^{\Upsilon-1}\alpha_{(\tau+1)k}\sum_{l=0}^{k-1}\mathbb{E}[\|\nabla f(y_{\tau k+l})\|^2]+2(\mu^2+\kappa^2)k\eta^2L\sigma^2\sum_{\tau=0}^{\Upsilon-1}\alpha_{\tau k}^2\notag\\&+(\kappa^2+\mu^2)(\kappa+\mu)\eta(1-\eta)^2L^2\sigma^2k(k-1)\sum_{\tau=0}^{\Upsilon-1}\alpha_{\tau k}^3 \end{align}\] Following [46], we first assume the learning rate \(\alpha\) as a fixed constant, then rearrange the inequality above, we get \[\begin{align} &\frac{1}{\Upsilon k}\sum_{\tau=0}^{\Upsilon-1}\sum_{l=0}^{k-1}\mathbb{E}[\|\nabla f(y_{\tau k+l})\|^2]\leq \frac{2[f(y_0)-f_{inf}]}{\eta\alpha\Upsilon k(\mu+\kappa)}+\frac{4(\mu^2+\kappa^2)\eta\alpha L \sigma^2}{\mu+\kappa} \\&+2(\kappa^2+\mu^2)(1-\eta)^2\alpha^2L^2\sigma^2(k-1) \end{align}\] Define \(T\) as \(\Upsilon k\) and set the learning rate \(\alpha\) to \(1/\sqrt{T}\) \[\begin{align} \frac{1}{T}\sum_{t=0}^{T-1}\mathbb{E}[\|\nabla f(y_{t})\|^2]\leq& \frac{2[f(y_0)-f_{inf}]}{\eta\sqrt{T}(\mu+\kappa)}+\frac{4(\mu^2+\kappa^2)\eta L \sigma^2}{(\mu+\kappa)\sqrt{T}} \\&+\frac{2(\kappa^2+\mu^2)(1-\eta)^2L^2\sigma^2(k-1)}{T}\\=&\mathcal{O} (\frac{1}{\sqrt{T}}) \end{align}\] ◻
| Case | Optim | Source | Convergence rate (a rough estimation) |
|---|---|---|---|
| Convex | SGD | [49] | \(\frac{D_{\infty}^2}{2\alpha_T}+\frac{G_{\infty}^2}{2}\sum_{t=1}^{T}\alpha_t\) |
| AMSGrad | [36] | \(\frac{D_{\infty}^{2}\sqrt{T}}{\alpha(1-\beta_1)}\sum_{i=1}^{d}\hat{v}_{T,i}^1/2+\frac{D_{\infty}}{2(1-\beta_1)}\sum_{t=1}^{T}\sum_{i=1}^{d}\frac{\beta \hat{v}_{t,i}^1/2}{\alpha_t}\) | |
| \(+\frac{\alpha\sqrt{1+\log T}}{(1-\beta_1)^2(1-\gamma)\sqrt{1-\beta_2}}\sum_{i=1}^{d}\|g_{1:T,i}\|\) | |||
| AdmetaS | - | \(\left(\frac{\beta}{1-\beta}+2\right)\frac{dD_{\infty}}{4\alpha_T}+\left(\frac{2\alpha\beta}{1-\beta}+\alpha\right) d G_{\infty}^2 \sqrt{T}\) | |
| AdmetaR | - | \(\frac{(2-\b_1)D_{\infty}^2 \sqrt{T}}{4\a(1-\b_1)}\sum_{i=1}^d \hv^{1/2}_{T,i} +\frac{(2+\beta_1)\alpha\sqrt{1+\log T}}{2\sqrt{(1-\beta_2)(1-\gamma)}} \sum_{i=1}^d \|h_{1:T, i}\|_2\) | |
| Non-convex | SGD | - | - |
| AMSGrad | [44] | \(\frac{H}{\sqrt{T}} \left(C_1 \frac{H^2}{c^2} (1+\log T) + C_2 \frac{d}{c} + C_3 \frac{d}{c^2} +C_4\right)\) | |
| AdmetaS | - | \(\frac{1}{\sqrt{T}}\Bigg[\frac{1}{\kappa+\mu}\left(\frac{\alpha^2H^2L^2}{2}\left(\frac{\beta}{1-\beta}\right)^2+\frac{\alpha^2H^2}{2}+H^2L\alpha^2\right)(1+\log T)\) | |
| \(+\frac{1}{\kappa+\mu}\left(H^2\frac{\beta}{1-\beta}\alpha+ 2\alpha^2\left(\frac{\beta}{1-\beta}\right)^2LH^2+E[f(z_1)-f(z^*)]\right)\Bigg]\) | |||
| AdmetaR | - | \(\frac{H}{\sqrt{T}} \left((K_1+K_2) \frac{H^2\alpha^2}{c^2} (1+\log T) + K_3 \frac{d\alpha}{c} + K_4 \frac{d\alpha^2}{c^2} + K_5\right)\) |
For convex situation, we adopt the regret function to estimate the convergence rate. And for non-convex situation, we adopt the minimum of the expectation of the squared gradient to estimate the convergence, which are corresponding to the proof of convergence since the process of the convergence proof is actually the process of finding the convergence rate.
From Table 6, we notice that the convergence rates for all optimizers for convex case are of magnitude of \(\mathcal{O}(1/\sqrt{T})\) and for non-convex are of \(\mathcal{O}(\text{log} T/\sqrt{T})\) , which means in essence, algorithms based on gradient decent follow a similar rate constraint. However, the convergence speed of different optimizers may attribute to many other factors, such as on the implementation. Therefore additional statistical experiments are needed for analysis, as we did in Table 4.
For Admeta optimizer, we first determined a rough value range for learning rate and lambda with the toy model according to the visualization as in Figure 8. While for other baseline optimizers, we refer to the recommended/default hyperparameter settings in the original paper. In this way, we get the rouge range of the hyperparameter in optimizers. Then, we search the hyperparameters in the adjacent interval, which is listed in the following three subsections.
We conduct image classification experiments on CIFAR-10 and CIFAR-100 datasets, which are trained on a single NVIDIA RTX-3090 GPU. Typical architectures like ResNet-110 and PyramidNet are employed as the baseline models. In the ResNet-110 architecture, there are 54 stacked identical \(3 \times 3\) convolutional layers with 54 two-layer Residual Units [21].
While in the PyramidNet architecture, there are 110 layers with a widening factor of 48 [22]. We set the training batch size to 128 and the validation batch size to 256. Both models are trained with 160 epochs. Milestone schedule is adopted as the learning rate decay strategy, with learning rate decaying at the end of \(80\)-th and \(120\)-th epochs by 0.1.
We report the hyperparameters tuning for our proposed Admeta and other optimizers for reproduction of our experiments. For all optimizers, the weight decay is fixed as \(1e-4\). The searching scheme of hyperparameter settings for each optimizer is concluded as follows:
For SGD and SGDM, the momentum is fixed as \(0.9\), and the best-performing learning rate is searched from \(\{0.01, 0. 05, 0.1\}\) and recommended values in original paper. For our AdmetaS, the \(\lambda\) is set to fixed \(0.9\) and we search the best-performing \(\beta\) from \(\{0.1, 0.2, 0.3, 0.4\}\) and learning rate from \(\{0.01, 0.05, 0.1\}\).
For all adaptive learning rate optimizers, hyperparameters \(\beta_1\), \(\beta_2\) and \(\epsilon\) are set to \(\beta_1=0.9\), \(\beta_2=0.999\) and \(\epsilon=\text{1e-9}\) respectively. For Adam, RAdam and AdaBelief optimizer, the learning rate is searched from \(\{0.1, 0.01, 0.001\}\). For Ranger, \(\eta\) and \(k\) are set to \(\eta=0.5\) and \(k=6\) according to [19]. The learning rate is searched from \(\{0.1, 0.01, 0.001\}\). And for our AdmetaR, the setting of \(k\) is the same as Ranger, and we search \(\lambda\) from \(\{0.05, 0.1, 0.2, 0.3, 0.4\}\) and learning rate from \(\{0.1, 0.05, 0.01\}\).
| Model | task | SGD | SGDM | Adam | RAdam | Ranger | AdaBelief | AdmetaR | AdmetaS | ||
| LR | LR | LR | LR | LR | LR | LR | \(\lambda\) | LR | \(\beta\) | ||
| ResNet-110 | CIFAR-10 | 0.1 | 0.1 | 0.001 | 0.01 | 0.01 | 0.001 | 0.05 | 0.1 | 0.05 | 0.2 |
| CIFAR-100 | 0.1 | 0.1 | 0.001 | 0.01 | 0.01 | 0.01 | 0.05 | 0.05 | 0.05 | 0.1 | |
| PyramidNet | CIFAR-10 | 0.1 | 0.1 | 0.001 | 0.01 | 0.01 | 0.001 | 0.01 | 0.1 | 0.05 | 0.4 |
| CIFAR-100 | 0.5 | 0.5 | 0.001 | 0.01 | 0.01 | 0.001 | 0.01 | 0.1 | 0.05 | 0.1 | |
The resulting hyperparameters reported in the paper are shown in Table 7, where \(LR\) is the abbreviation of learning rate.
In the NLU experiments, we employ a pre-trained language model BERT [23], [50] as our backbone. There are two model sizes for BERT: BERT\(_\text{base}\) and BERT\(_\text{large}\), where the base model size has 12 Transformer layers with 768 hidden size, 12 self-attention heads and 110M model parameters and the large model size has 24 Transformer layers with 1024 hidden size, 16 self-attention heads and 340M parameters [51].
In natural language understanding, we perform experiments on three modeling types of tasks: text classification, machine reading comprehension and token classification. The text classification uses the GLUE benchmark as the evaluation data set, the machine reading comprehension uses SQuAD v1.1 and v2.0, and the token classification uses the NER-CoNLL03 named entity recognition data set [52].
We train the eight tasks in GLUE benchmark for 3 epochs on a single NVIDIA RTX-3090 GPU, except for MRPC, which is trained for 5 epochs due to its relatively small data size [53]. The maximum sequence length is set to 128 and the training batch size is set to 32. SQuAD v1.1 and SQuAD v2.0 are trained for 2 epochs with two GPUs. The maximum sequence length is set to 384 and the training batch size per device is set to 12. And NER-CoNLL03 is trained for 3 epochs on a single GPU. The training batch size per device is set to 8.
Because of the pre-training-fine-tuning paradigm, we only employ the adaptive learning rate optimizer. We set \(\beta_1\), \(\beta_2\), \(\epsilon\) and weight decay of these optimizers to 0.9, 0.999, and 0.0 respectively. \(\eta\) and \(k\) are set to 0.5 and 6 in the Ranger optimizer and Admeta uses the same value of \(k\) as Ranger. We perform hyperparameter tuning on the learning rate and \(\lambda\), and the resulting hyperparameters reported in the paper are shown in Table 8 and 9.
| Model | Optim | MNLI | QQP | QNLI | SST-2 | CoLA | STS-B | MRPC | RTE | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 3-4 (lr)5-6 (lr)7-8 (lr)9-10 (lr)11-12 (lr)13-14 (lr)15-16 (lr)17-18 | LR | \(\lambda\) | LR | \(\lambda\) | LR | \(\lambda\) | LR | \(\lambda\) | LR | \(\lambda\) | LR | \(\lambda\) | LR | \(\lambda\) | LR | \(\lambda\) | |
| BERT\(_\text{base}\) | AdamW | 2e-5 | \(-\) | 3e-5 | \(-\) | 3e-5 | \(-\) | 2e-5 | \(-\) | 5e-5 | \(-\) | 5e-5 | \(-\) | 4e-5 | \(-\) | 6e-5 | \(-\) |
| RAdam | 2e-5 | \(-\) | 2e-5 | \(-\) | 6e-5 | \(-\) | 4e-5 | \(-\) | 1e-4 | \(-\) | 4e-4 | \(-\) | 1.5e-4 | \(-\) | 5e-4 | \(-\) | |
| Ranger | 5e-5 | \(-\) | 5e-5 | \(-\) | 1e-4 | \(-\) | 8e-5 | \(-\) | 2e-4 | \(-\) | 5e-4 | \(-\) | 4e-4 | \(-\) | 1e-3 | \(-\) | |
| AdaBelief | 5e-4 | \(-\) | 5e-4 | \(-\) | 5e-4 | \(-\) | 8e-4 | \(-\) | 4e-4 | \(-\) | 6e-4 | \(-\) | 5e-4 | \(-\) | 6e-4 | \(-\) | |
| AdmetaR | 1.5e-4 | 0.08 | 1e-4 | 0.36 | 2e-4 | 0.03 | 1e-4 | 0.03 | 7e-4 | 0.02 | 1e-3 | 0.08 | 1.2e-3 | 0.3 | 1.8e-3 | 0.36 | |
| BERT\(_\text{large}\) | AdamW | 2e-5 | \(-\) | 2e-5 | \(-\) | 2e-5 | \(-\) | 2e-5 | \(-\) | 6e-5 | \(-\) | 5e-5 | \(-\) | 4e-5 | \(-\) | 2e-5 | \(-\) |
| RAdam | 2e-5 | \(-\) | 2e-5 | \(-\) | 5e-5 | \(-\) | 4e-5 | \(-\) | 1e-4 | \(-\) | 2e-4 | \(-\) | 8e-5 | \(-\) | 5e-4 | \(-\) | |
| Ranger | 5e-5 | \(-\) | 5e-5 | \(-\) | 5e-5 | \(-\) | 6e-5 | \(-\) | 6e-5 | \(-\) | 5e-4 | \(-\) | 5e-4 | \(-\) | 5e-4 | \(-\) | |
| AdaBelief | 2e-4 | \(-\) | 4e-4 | \(-\) | 5e-4 | \(-\) | 2e-4 | \(-\) | 6e-4 | \(-\) | 2e-4 | \(-\) | 4e-4 | \(-\) | 8e-4 | \(-\) | |
| AdmetaR | 1.5e-4 | 0.08 | 8e-5 | 0.2 | 8e-5 | 0.03 | 9e-5 | 0.3 | 7e-4 | 0.02 | 1e-3 | 0.03 | 6e-4 | 0.08 | 8e-4 | 0.1 | |
| Model | Optim | SQuAD v1.1 | SQuAD v2.0 | NER-CoNLL03 | |||
|---|---|---|---|---|---|---|---|
| 3-4 (lr)5-6(lr)7-8 | LR | \(\lambda\) | LR | \(\lambda\) | LR | \(\lambda\) | |
| BERT\(_\text{base}\) | AdamW | 5e-5 | \(-\) | 5e-5 | \(-\) | 6e-5 | \(-\) |
| RAdam | 1e-4 | \(-\) | 5e-5 | \(-\) | 5e-5 | \(-\) | |
| Ranger | 1e-4 | \(-\) | 8e-5 | \(-\) | 1e-4 | \(-\) | |
| AdaBelief | 1e-3 | \(-\) | 8e-4 | \(-\) | 5e-4 | \(-\) | |
| AdmetaR | 4e-4 | 0.05 | 3e-4 | 0.2 | 2e-4 | 0.3 | |
| BERT\(_{\text{large}}\) | AdamW | 2e-5 | \(-\) | 5e-5 | \(-\) | 2e-5 | \(-\) |
| RAdam | 6e-5 | \(-\) | 5e-5 | \(-\) | 3e-5 | \(-\) | |
| Ranger | 1e-4 | \(-\) | 8e-5 | \(-\) | 5e-5 | \(-\) | |
| AdaBelief | 8e-4 | \(-\) | 8e-4 | \(-\) | 4e-4 | \(-\) | |
| AdmetaR | 4e-4 | 0.05 | 3e-4 | 0.2 | 1.5e-4 | 0.2 | |
Based on Wav2vec [27], the Wav2vec 2.0 [54] is a framework for self-supervised learning of speech representations which is composed of 3 modules: feature encoder, contextualized representations and quantization module. In the feature encoder, there are 7 blocks with temporal convolutions that have 512 channels for each block and the relative positional embeddings of the convolutional layer modeling has kernel size of 128 and 16 groups.
Among the configurations of Wav2vec 2.0, we choose Wav2vec 2.0\(_\text{base}\) model, which has 12 Transformer blocks, 95M parameters and 8 attention heads, with model dimension of 768 and inner dimension (FFN) of 3072. We finetune Wav2vec 2.0\(_\text{base}\) for keyword spotting and language identification on SUPERB dataset [28] and Common Language [29] dataset respectively. The dataset size of keyword spotting is smaller than that of language identification, so we use a single NVIDIA RTX-3090 GPU for training on the SUPERB dataset, and use four GPUs for parallel training on the Common Language dataset. The keyword spotting model is trained for 5 epochs with training batch size 32 and language identification model for 10 epochs with training batch size 8 per device.
Due to the same reason as in NLU experiments, i.e. the pre-training-fine-tuning paradigm, we only employ adaptive learning rate optimizers here. For all optimizers chosen, we fix \(\beta_1=0.9, \beta_2=0.999, \epsilon=1e-8\) and set weight decay to 0.0. The learning rate is searched from {5e-5, 8e-5, 1e-4, 3e-4, 5e-4, 8e-4}, and for AdmetaR, \(\lambda\) is searched from {0.05, 0.1 0.2}. The resulting hyperparameters reported in the paper are shown in Table 10.
| Optim | SUPERB | Common Language | ||
|---|---|---|---|---|
| 2-3 (lr)4-5 | LR | \(\lambda\) | LR | \(\lambda\) |
| AdamW | 3e-5 | \(-\) | 3e-4 | \(-\) |
| AdaBelief | 8e-4 | \(-\) | 2e-3 | \(-\) |
| Ranger | 3e-4 | \(-\) | 5e-4 | \(-\) |
| RAdam | 8e-5 | \(-\) | 5e-4 | \(-\) |
| AdmetaR | 5e-4 | 0.05 | 2e-3 | 0.2 |
In the future work, for backward-looking part, though DEMA provides a more flexible way to deal with past gradients, it is still unable to intelligently judge the value of certain historical gradient information, such as discarding some obviously unreasonable gradients caused by noise. A better optimizer may have the ability to forget these wrong information and take advantage of what works, just working like human brains. For forward-looking part, our method takes the constant coefficient into a dynamic one. It is kind of like milestone scheme of learning rate decay strategies to some extent. However, several experiments [39], [55] have shown that cosine strategy [11] works better. Therefore, we will follow the cosine scheme and propose a new forward-looking strategy that may work even better.
In this section, we test the performance of SGDM and AdmetaS on fintune setting and the results are shown in Table 11. For keyword spotting (SUPERB) [28] task, we train the models for 5 epochs and use Wav2vec\(_\text{base}\) [27] as the baseline model. And for CIFAR-10 [20] task, we train the model for 40 epochs from the checkpoint already trained with Adam using learning rate of 0.001 for 160 epochs. The baseline model of CIFAR-10 is ResNet-110 [21] with deep CNN architecture. We report the results of best hyperparameter settings for SGD and AdmetaS via grid searching.
From Table 11, we notice that in SUPERB task, compared to adaptive learning rate methods, SGDM achieves worse results in SUPERB task, but not by much, which shows that SGDM can also be used in finetune setting. While AdmetaS can achieve better result than any other learning rate methods used in our experiment, demonstrating the advantage of our approach. This phenomenon contradicts the mainstream view that SGD family is not suitable for finetune task. While for CIFAR-10 task, SGDM and AdmetaS both improve the performance compared to the start point. However, they are both obviously worse than the performance of training the task from scratch using SGDM and AdmetaS respectively, which shows that pre-training is a very strong approach that makes the model achieve a good state.
The reason why AdmetaS performs better than SGDM in finetune setting may lie in two aspects. On the one hand, DEMA scheme in the backward-looking part reduces the overshoot problem that may do harm especially near convergence. On the other hand, the forward-looking part improves the stability of the training process.
| Optimizer | SUPERB | CIFAR-10 |
|---|---|---|
| SGDM | 98.25 | 91.71 |
| AdmetaS | 98.54 | 91.87 |
| Optim | CIFAR-10 | CIFAR-100 |
|---|---|---|
| AdmetaS | 94.12 | 73.74 |
| SGDM | 93.68 | 72.07 |
| SGDM (lr=0.5) | 93.65 | 73.48 |
Since the learning rate of 0.5 for SGDM is a recommended value in [22] but not in [21], to alleviate the influence of different learning rates, we also try the performance of SGDM with a learning rate of 0.5 in the ResNet-110 network and the results are listed in Table 12.
The results show that choosing a large learning rate for SGDM may increase the performance, as shown that when setting the learning rate to 0.5 instead of 0.1, the recommended value in ResNet-110. However, this is not always true since the performance on CIFAR-10 when using the learning rate of 0.5 does not get prompted.