Stochastic Recursive Gradient Descent Ascent for Stochastic Nonconvex-Strongly-Concave Minimax Problems
Luo Luo, Haishan Ye, Zhichao Huang, Tong Zhang
Introduction
This paper considers the following minimax optimization problem
In this paper, we focus on a more general case of (1), where is -strongly-concave in but possibly nonconvex in . This case is referred to as stochastic nonconvex-strongly-concave minimax problems, and it is equivalent to the following problem
Formulation (2) contains several interesting examples in machine learning such as robust optimization and adversarial training .
One insight of SGDA is that the algorithm selects an appropriate ratio of learning rates for and . Concretely, the learning rate for updating is times that of . Using this idea, it can be shown that the nested loop of SGDmax is unnecessary, and SGDA eliminates the logarithmic term in the complexity result. In addition, Rafique et al. presented some nested-loop algorithms that also achieved complexity. Recently, Yan et al. proposed Epoch-GDA which considered constraints on both two variables.
Lin et al. proposed a deterministic algorithm called minimax proximal point algorithm (Minimax PPA) to solve nonconvex-strongly-concave minimax problem whose complexity has square root dependence on . Thekumparampil et al. , Barazandeh and Razaviyayn , Ostrovskii et al. also studied the non-convex-concave minimax problems, however, these methods do not cover the stochastic setting in this paper and only work for a special case of problem (2) when the stochastic variable is finitely sampled from (a.k.a. finite-sum case). That is,
In this paper, we propose a novel algorithm called Stochastic Recursive gradiEnt Descent Ascent (SREDA) for stochastic nonconvex-strongly-concave minimax problems. Unlike SGDmax and SGDA, which only iterate with current stochastic gradients, our SREDA updates the estimator recursively and reduces its variance.
The variance reduction techniques have been widely used in convex and nonconvex minimization problems and convex-concave saddle point problems . However, the nonconvex-strongly-concave minimax problems have two variables and and their roles in the objective function are quite different. To apply the technique of variance reduction, SREDA employs a concave maximizer with multi-step iteration on to simultaneously balance the learning rates, gradient batch sizes and iteration numbers of the two variables. We prove SREDA reduces the number of stochastic gradient evaluations to , which is the best known upper bound complexity. The result gives optimal dependency on since the lower bound of stochastic first order algorithms for general nonconvex optimization is . For finite-sum cases, the gradient cost of SREDA is when , and when . This result is sharper than Minimax PPA in the case of is larger than . We summarize the comparison of all algorithms in Table 1.
The paper is organized as follows. In Section 2, we present notations and preliminaries. In Section 3, we review the existing work for stochastic nonconvex-strongly-concave optimization and related techniques. In Section 4, we present the SREDA algorithm and the main theoretical result. In Section 5, we give a brief overview of our convergence analysis. In Section 6, we demonstrate the effectiveness of our methods on robust optimization problem. We conclude this work in Section 7.
Notation and Preliminaries
We first introduce the notations and preliminaries used in this paper. For a differentiable function , we denote the partial gradient of with respect to and at as and respectively. We use to denote the Euclidean norm of vectors. For a finite set , we denote its cardinality as . We assume that the minimax problem (2) satisfies the following assumptions.
The component function is concave in . That is, for any , , and random vector , we have .
The function is -strongly-concave in . That is, there exists a constant such that for any , and , we have .
Under the assumptions of Lipschitz-gradient and strongly-concavity on , we can show that also has Lipschitz-gradient.
Since is differentiable, we may define -stationary point based on its gradient. The goal of this paper is to establish a stochastic gradient algorithm that output an -stationary point in expectation.
We call an -stationary point of if .
We also need the notations of projection and gradient mapping to address the constraint on .
We define the projection of on to convex set by .
We define the gradient mapping of at with respect to as follows
Related Work
In this section, we review recent works for solving stochastic nonconvex-strongly-convex minimax problem (2) and introduce variance reduction techniques in stochastic optimization.
2 Variance Reduction Techniques
Variance reduction techniques has been widely used in stochastic optimization . One scheme of this type of methods is StochAstic Recursive grAdient algoritHm (SARAH) . Nguyen et al. first proposed it for convex minimization and established a convergence result. For nonconvex optimization, a closely related method is Stochastic Path-Integrated Differential EstimatoR (SPIDER) . The algorithm estimates the gradient recursively together with a normalization rule, which guarantees the approximation error of the gradient is at each step. As a result, it can find -stationary point of the nonconvex objective in complexity, which matches the lower bound . This idea can also be extended to nonsmooth cases .
It is also possible to employ variance reduction to solve minimax problems. Most of the existing works focused on the convex-concave case. For example, Palaniappan and Bach , Chavdarova et al. , extend SVRG and SAGA to solving strongly-convex-strongly-concave minimax problem in the finite-sum case, and established a linear convergence. One may also use the Catalyst framework and proximal point iteration to further accelerate when the problem is ill-conditioned. Du et al. , Du and Hu pointed out that for some special cases, the strongly-convex and strongly-concave assumptions of linear convergence for minimax problem may not be necessary. Additionally, Zhang and Xiao solved multi-level composite optimization problems by variance reduction, but the oracles in their algorithms are different from our settings.
Algorithms and Main Results
In this section, we propose a novel algorithm for solving problem (2), which we call Stochastic Recursive gradiEnt Descent Ascent (SREDA). We show that the algorithm finds an -stationary point with a complexity of stochastic gradient evaluations, and this result may be extended to the finite-sum case (3).
SREDA uses variance reduction to track the gradient estimator recursively. Because there are two variables and in our problem (2), it is not efficient to combine SGDA with SPIDER or (inexact) SARAH directly. The algorithm should approximate the gradient of with small error, and keep the value of sufficiently close to . To achieve this, in the proposed method SREDA, we employ a concave maximizer with stochastic variance reduced gradient ascent on . The details of SREDA and the concave maximizer are presented in Algorithm 3 and Algorithm 4 respectively. In the rest of this section, we show SREDA can find an -stationary point in stochastic gradient evaluations.
SREDA estimates the gradient of by . As illustrated in Algorithm 4, we evaluate the gradient of with a large batch size at the beginning of each period, and update the gradient estimate recursively in concave maximizer with a smaller batch size .
For variable , we adopt a normalized stochastic gradient descent with a learning rate for theoretical analysis:
With this step size, the change of is not dramatic at each iteration, which leads to accurate gradient estimates. To simplify implementations of the algorithm, we can also use a fixed learning rate in practical.
2 Complexity Analysis
As shown in Algorithm 3, SREDA updates variables with a large batch size per iterations. We choose as a balance between the number of large batch evaluations with samples and the concave maximizer with iterations and samples.
Under Assumptions 1-5 with the following parameter choices:
We should point out the complexity shown in Theorem 1 gives optimal dependency on . We consider the special case of minimax problem whose objective function has the form
where is possibly nonconvex and is strongly-concave, which leads to minimizing on and maximizing on are independent.
Consequently, finding -stationary point of the corresponding can be reduced to finding -stationary point of nonconvex function , which is based on the stochastic first order-oracle (this equality holds for any since and are independent). Hence, the analysis of stochastic nonconvex minimization problem based on can directly lead to the lower bound for our minimax problem. We can prove it by constructing the separate function as where is the nonconvex function in Arjevani et al.’s lower bound analysis of stochastic nonconvex minimization, and is an arbitrary smooth, -strongly concave function. It is obvious that the lower bound complexity of finding an -stationary point of is no smaller than that of finding an -stationary point of , which requires at least stochastic gradient evaluations .
3 Extension to Finite-sum Case
SREDA also works for nonconvex-strongly-concave minimax optimization in the finite-sum case (3) with little modification of Algorithm 3. We just need to replace line 5-7 of Algorithm 3 with the full gradients, and use projected SARAH (PSARAH)PSARAH extends SARAH to constrained case, which requires stochastic gradient evaluation to achieve sufficient accuracy for our initialization. Please see Appendix E.1 for details to initialization. We present the details in Algorithm 5. The algorithm is more efficient than Minimax PPA when . We state the result formally in Theorem 2.
Suppose Assumption 1-4 hold. In the finite-sum case with , we set the parameters
In the case of , we set the parameters
Sketch of Proofs
We present the briefly overview of the proof of Theorem 1. The details are shown in appendix. Different from Lin et al.’s analysis of SGDA which directly considered the value of and the distance , our proof mainly depends on and its gradient. We split the change of objective functions after one iteration on into and as follows
Numerical Experiments
, is the nonconvex regularizer :
We evaluate compared the performance of SREDA with baseline algorithms GDAmax, GDA, SGDA and Minimax PPA on six real-world data sets “a9a”, “w8a”, “gisette”, “mushrooms”, “sido0” and “rcv1”, whose details are listed in Table 2. The dataset “sido0” comes from Causality Workbenchhttps://www.causality.inf.ethz.ch/challenge.php?page=datasets and the others can be downloaded from LIBSVM repositoryhttps://www.csie.ntu.edu.tw/~cjlin/libsvmtools/datasets/. Our experiments are conducted on a workstation with Intel Xeon Gold 5120 CPU and 256GB memory. We use MATLAB 2018a to run the code and the operating system is Ubuntu 18.04.4 LTS.
The parameters of the algorithms are chosen as follows: The stepsizes of all algorithms are tuned from and we keep the stepsize ratio is . For stochastic algorithms SGDA and SREDA, the mini-batch size is set with . For SREDA, we use the finite-sum version (Algorithm 5 with the first case of Theorem 2) and let heuristically. The initialization of SREDA is based on PSARAH with , and . For Minimax PPA, we tune the proximal parameter from and momentum parameter from . Each inner loop of Minimax PPA has five times Maximin-AG2 which contains five AGD iterations. The results are shown in Figure 1. It is clear that SREDA converges faster than the baseline algorithms.
Conclusion
In this paper, we studied stochastic nonconvex-strongly-concave minimax problems. We proposed a novel algorithm called Stochastic Recursive gradiEnt Descent Ascent (SREDA). The algorithm employs variance reduction to solve minimax problems. Based on the appropriate choice of the parameters, we prove SREDA finds an -stationary point of with a stochastic gradient complexity of . This result is better than state-of-the-art algorithms and optimal in its dependency on . We can also apply SREDA to the finite-sum case, and show that it performs well when is larger than .
There are still some open problems left. The complexity of SREDA is optimal with respect to , but weather it is optimal with respect to is unknown. It is also possible to employ SREDA to reduce the complexity of stochastic nonconvex-concave minimax problems without the strongly-concave assumption.
Broader Impact
This paper studied the theory of stochastic minimax optimization. The proposed method SREDA is the first stochastic algorithm which attains the optimal dependency on . This observation help us to understand the minimax optimization without convex-concave assumption. It is interesting to apply SREDA to more machine learning applications in future.
Acknowledgments and Disclosure of Funding
The authors would like to thank Min Tao and Jiahao Xie to point out that the first version of this paper on arXiv has a mistake in the original proof of Theorem 1. This work is supported by GRF 16201320 and the project of Shenzhen Research Institute of Big Data (named “Automated Machine Learning”).
References
Supplementary Materials
This supplementary materials are organized as follows. Appendix A provide several technique lemmas for later analysis. Appendix B give some properties for our concave maximizer. Then, Appendix C proposes projected inexact SARAH (PiSARAH), which generalizes SARAH to constrained optimization and we use it for the initialization of SREDA. Appendix D presents the proof of our main results Theorem 1 and we extend it to prove finite-sum case Theorem 2 in Appendix E.
Appendix A Technical Tools
We first present some useful inequalities in convex optimization, martingale variance bound and gradient mapping.
Let be estimator of as
where satisfies
and is -Lipschitz continuous for any . Then for all , we have
Under assumptions of Lemma 5, we have .
where the first inequality use Lemma 5 and the last one is based on Cauchy-Schwarz inequality. Then we obtain the desired result. ∎
Appendix B Some Results of Concave Maximizer
In this section, we present some results of concave maximizer Algorithm 4. The analysis of SREDA is based on the following two auxiliary quantities:
The main target is to prove both and can be bounded by .
where is defined as . We also denote the gradient mapping with respect to as
We first introduce some lemmas for our iteration and gradient mapping.
Let , then for all , we have
Let and \overline{{\bf{y}}_{k,t}}:=\Pi_{{\mathcal{Y}}}\big{(}{\bf{y}}-\lambda\nabla g_{k}({\bf{y}})\big{)}, then we have .
Using Lemma 4 and smoothness of , we have
Let . We have and
for any . Then
We can now present the key lemma for the concave maximizer, which upper bounds the magnitude of gradient mapping after one epoch iterations on .
Sum over inequalities (7) and (8), we have
where the second inequality uses Young’s inequality as follows
and the last inequality holds due to Lemma 7. Take the expectation on above result, we have
where the second inequality is based on Lemma 3. Summing over (9) with from to and relax the upper bound of to , we obtain
where the first inequality is based on Lemma 9 and the second one is due to assumption . ∎
Using the notations of Algorithm 4, we define . Then, we have
The fact means
We use Lemma 4 and Lemma 8 to bound the first and the second term respectively, that is
The third term is because of the definition. Hence, we have
Then we can establish the recursive relationship of and .
where the first inequality comes from Lemma 3 by letting and .
where the first inequality is due to Lemma 3; the second inequality comes from Lemma 11 and the third one is due to basic property of geometric sequence.
Combining above results and Lemma 12, we have
Summing over the above inequality from to , we can prove the first part of this theorem as follows
where the first inequality is according to Lemma 10, the second inequality is based on Young’s inequality and Lemma 12, the third inequality is due to Lemma 8 and the other steps are based on definitions. ∎
Now we can provide the upper bound of and .
Then we have and for all .
Firstly, we let be the number of round satisfies in Algorithm 3 and be the one defined in Lemma 10, such that
for all . Then we prove the statement by induction.
The choice of and Assumption 5 means
Combing the assumptions of , we obtain the induction base.
Induction step:
For any , we suppose and holds for all . Let be the largest integer such that and . Using Lemma 10, and inequalities (11) and (12), we have
Appendix C Initialization via Projected Inexact SARAH
The initialization of SREDA (line 2 of Algorithm 3) can be regarded as solving a stochastic constrained convex minimization (concave maximization) problem. Hence, we consider the following formulation
The component function is convex. That is, for any , and random vector , we have
The function is -strongly-convex. That is, there exists a constant such that for any and , we have
The gradient of each component function has bounded variance. That is, there exists a constant such that for and and random vector , we have
We propose projected inexact SARAH (PiSARAH) to solve problem (15), whose detailed procedure is presented in Algorithm 6.
We are interested in the convergence behavior of the gradient mapping, that is
The remain of this section provide the convergence analysis of PiSARAH.
Note that each epoch of PiSARAH can be regarded as using ConcaveMaximizer (Algorithm 4) on . Hence, we can follow the analysis of Lemma 10 to achieve the result as follows.
Using Lemma 10 in the view of , we have
We finish the proof by combining (16) and (17). ∎
Then we provide the main result in this section to show the convergence of the gradient mapping.
Using Corollary 3 with and we have
The result of Corollary 3 indicate that we hope the PiSARAH as initialization to make the gradient mapping is no larger than . The following statement shows we can implement it within stochastic gradient evaluations.
Appendix D The Proof of Theorem 1
Our proof mainly depends on and its gradient mapping with respect to , which is different from Lin et al.’s analysis that directly considered the value of and the distance . We split the change of objective functions after one iteration on into and as follows
We provide two lemmas for preparing the proof of our main results, Theorem 1. The first lemma is to upper bound .
where the inequalities are based on Young’s inequality and Lemma 8.
where the second inequality is based on Lemma 12 and the third inequality is due to Corollary 3.
We bound the second term of (18) as follows:
where the first inequality is based on Lemma 3 and the last one is due to Corollary 3.
By connecting inequalities (18), (19) and (20), we have
Then we show the estimate error of approximating by .
Consider that we have defined , then we have
where the first equality is based on Lemma 1, the second inequality comes from Corollary 1 and the last inequality is due to Lemma 10.
Similarly, we can use Jensen’s inequality and Lemma 10 to prove
By combining the inequalities (21) and (22), we obtain
Now we can present the proof of Theorem 1.
Based on the update of in Algorithm 3, we have
where the first inequality is due to the average smoothness of , and second comes from the Cauchy-Schwartz inequality.
The choice of step size implies that
where the first inequality is based on and the definition of ; the second one uses the fact that holds for all .
The definition of and Assumption 1 implies
By combining inequalities (25), (26), Lemma 14 and Corollary 3; and taking the average over , we obtain
where the second inequality uses Corollary 3 to bound .
Appendix E The proof of Theorem 2
In the finite-sum case, we use the full gradient to replace the large batch sample size in stochastic case. Similar to previous section, we extend SARAH to constrained case as the initialization of . We can prove Theorem 2 with minor modifications on the analysis of Theorem 1.
We present the detailed procedure of projected SARAH (PSARAH) in Algorithm 7, which is used to initialize in SREDA for problem (3) (line 2 of Algorithm 5). The algorithm considers the following convex optimization problem
Similar to stochastic case, we directly obtain the following result.
The total complexity of stochastic gradient evaluation is