Revisiting the Polyak step size
Elad Hazan, Sham Kakade
Introduction
Scaleable optimization for machine learning is based entirely on first order gradient methods. Besides the age-old method of stochastic approximation , three accelerated methods have proved their practical and theoretical significance: Nesterov acceleration , variance reduction and adaptive learning-rate/regularization .
Adaptive choices of step sizes allow optimization algorithms to accelerate quickly according to the local curvature and smoothness of the optimization landscape. However, in theory, there are few parameter free algorithms, and, in practice, there are many search heuristics utilized.
Let us examine this question of parameter free, adaptive learning rates for one of the most standard algorithms, namely the gradient descent method:
Although this class of algorithms is not optimal in all settings (i.e. the aforementioned accelerations can be applied), it is fundamental, and we may ask what are optimal known rates along with the optimal step size choices are for this particular algorithm. Here, Table 1 shows the best known rates for gradient descent in the standard regimes: general convex (non-smooth with bounded sub-gradients); -smooth; -strongly-convex; and -smooth&-strongly convex (see for more details).
From a practical perspective these step size settings are unfortunately disparate in various regimes: ranging from rapidly decaying at to moderately decaying at to a constant (see for more details).
This work: We show that a single (and simple) choice of a step size schedule gives, simultaneously, the optimal convergence (among the class of gradient descent algorithms) in all these regimes, without knowing these parameters in advance. Perhaps surprisingly, this choice is that prescribed by , who argued that this choice was optimal for the non-smooth, convex case (marked as “convex” in Table 1, see also ).
Convexity Preliminaries
We say that is smooth if and only if :
The following notation is used throughout:
- sub-optimality gap of the iterate
- Euclidean distance of the iterate.
- gradient of the iterate.
denotes squared Euclidean norm.
The following are basic properties for -strongly-convex functions and/or -smooth functions (proved for completeness in Lemma 4):
The following standard lemma is at the heart of much of the analysis of first order convex optimization.
The sequence of iterates produced by projected gradient descent (equation 1) satisfies:
where we have used properties of convexity in the last step. ∎
Main Results
argued that, in a sense, the optimal step size choice of should decrease the upper bound on as fast as possible. This choice is:
which leads to a decrease of by:
Note that this choice utilizes knowledge of , since .
showed that this choice was optimal for non-smooth convex optimization (i.e. for bounded gradients). Our first result shows that this step size schedule (which knows ) achieves the min of the best known bounds in all the standard parameter regimes (among the class of projected gradient descent algorithms). Assume , and define:
(GD with the Polyak Step Size) Algorithm 1 attains the following regret bound after steps:
Theorem 1 directly follows from the following lemma. It is helpful for us to state this lemma in a more general form, where, for , we define as follows:
For , suppose that a sequence satisfies:
then for , where ,
For convex functions with gradient bound ,
Summing up over iterations, and using Cauchy-Schwartz, we have
For smooth functions, equation (2) implies:
For strongly convex functions, equation (2) implies:
In other words, Defining , we have:
This implies that , which can be seen by inductionThat follows from equation (2). For , since and . For the induction step, .. The proof is completed as followsThis assumes is even. odd leads to the same constants. :
Thus, there exists a for which . Taking the square root completes the claim.
2 Analysis: the adaptive case
The proof of Theorem 2 rests on the following lemma which shows that, given a lower bound on the objective, the subroutine in Algorithm 3 either returns a near-optimal point with desired precision or a tighter lower bound.
We will consider two cases. First, suppose that
held for steps. For this case, by Lemma 1,
using the assumed upper bound on in the second step and the lower bound in the last step. By Lemma 2, we can take and we have that .
Now suppose there exists a time where Equation 5 fails to hold. Hence, for some iteration,
Acknowledgements
We thank Yair Carmon for pointing out a sign error and for teaching this material. Elad Hazan acknowledges funding from NSF award Number 1704860. Sham Kakade acknowledges funding from the Washington Research Foundation for Innovation in Data-intensive Discovery, the DARPA award FA8650-18-2-7836, and the ONR award N00014-18-1-2247.
References
Appendix A Elementary properties of convex analysis
The following properties hold for -strongly-convex functions and/or -smooth functions.
Claim 1:
where the last inequality holds by optimality conditions for .
where the last inequality follows since the gradient at the global optimum is zero.
Claim 3:
Claim 4:
In particular, taking , we have