An optimal first order method based on optimal quadratic averaging
Dmitriy Drusvyatskiy, Maryam Fazel, Scott Roy
Introduction
Classically, one step of the steepest descent algorithm decreases the squared distance of the iterate to the minimizer of by the fraction . This linear convergence rate is suboptimal from a computational complexity viewpoint. Optimal first-order methods, originating in Nesterov’s work achieve the superior (and the best possible) linear rate ; see also the discussion in [10, Section 2.2]. Such accelerated schemes, on the other hand, are notoriously difficult to analyze. Numerous recent papers (e.g. ) have aimed to shed new light on optimal algorithms.
This manuscript is motivated by the novel geometric descent algorithm of Bubeck, Lee, and Singh . Their scheme is highly geometric, sharing some aspects with the ellipsoid method, and it achieves the optimal linear rate of convergence. Moreover, the geometric descent algorithm often has much better practical performance than accelerated gradient methods; see the discussion in . Motivated by their work, in this paper we propose an intuitive method that maintains a quadratic lower model of the objective function, whose minimal value converges to the true minimum at an optimal linear rate. We will show that the two methods are indeed equivalent in the sense that they produce the same iterate sequence. The quadratic averaging viewpoint, however, has important advantages. First, it immediately yields a comparison with the original accelerated gradient method and cutting plane techniques. Secondly, quadratic averaging motivates a simple strategy for significantly accelerating the method in practice by utilizing accumulated information – a limited memory version of the scheme.
The outline of the paper is as follows. In Section 2, we describe the optimal quadratic averaging framework (Algorithm 1) – the focal point of the manuscript. In Section 3, we propose a limited memory version of Algorithm 1, based on iteratively solving small dimensional quadratic programs. In Section 4, we show that our Algorithm 1 and the geometric descent method of produce the same iterate sequence. Section 5 is devoted to numerical illustrations, in particular showing that the optimal quadratic averaging algorithm with memory can be competitive with L-BFGS. We finish the paper with Section 6, where we discuss the challenges that must be overcome in order to derive proximal extensions. In the final stages of revising this paper, a new manuscript appeared explaining how to overcome exactly these challenges.
Setting in the quadratic bound yields the standard inequality
Optimal quadratic averaging
The starting point for our development is the elementary observation that every point provides a quadratic under-estimator of the objective function, having a canonical form. Indeed, completing the square in the strong convexity inequality yields
Suppose we have now available two quadratic lower-estimators:
Clearly, the minimal values of and of lower-bound the minimal value of . For any , the average is again a quadratic lower-estimator of . Thus we are led to the question:
What choice of yields the tightest lower-bound on the minimal value of ?
To answer this question, observe the equality
In particular, the average has the same canonical form as and . A quick computation now shows that (the minimum of ) is maximized by setting
With this choice of , we call the quadratic function the optimal averaging of and . See Figure 1 for an illustration.
An algorithmic idea emerges. Given a current iterate , form the quadratic lower-model in (2) with . Then let be the optimal averaging of and the quadratic lower model from the previous step. Finally define to be the minimizer of , and repeat. Though attractive, the scheme does not converge at an optimal rate. Indeed, this algorithm is closely related to the suboptimal method in ; see Section 4.1 for a discussion. The main idea behind acceleration, natural in retrospect, is a separation of roles: one must maintain two sequences of points and . The points will generate quadratic lower models as above, while will be the minimizers of the quadratics. We summarize the proposed method in Algorithm 1. The rule for determining the iterate by a line search is entirely motivated by the geometric descent method in .
When implementing Algorithm 1, we set . This does not impact the analysis as still satisfies the key inequality (1). With this modification, the algorithm does not require as part of the input, and we have observed that the algorithm performs better numerically.
To aid in the analysis of the scheme, we record the following easy observation.
Suppose that is the optimal averaging of the quadratics and . Then the quantity is nondecreasing in both and . Moreover, whenever the inequality holds, we have
Define . Notice that we have
If lies in $\bar{\lambda}=\hat{\lambda}$ holds, and then from (3) we deduce
If does not lie in $\bar{v}v_{A}\hat{\lambda}(0,1)$, then we compute
which is nonnegative because . Since is clearly continuous, it follows that is nondecreasing in , and by symmetry also in . ∎
We now show that Algorithm 1 achieves the optimal linear rate of convergence.
In Algorithm 1, for every index , the inequalities hold and we have
Since in each iteration, the algorithm only averages quadratic minorants of , the inequalities hold for every index . Set and define the quantities . We will show by induction that the inequality holds for all . The base case is immediate, and so assume we have
for some index . Next set and . Then the function
is the optimal averaging of and . An application of (1) yields the lower bound on :
The induction hypothesis and the choice of yield a lower bound on :
Define the quantities and . We now split the proof into two cases. First assume . Then we deduce
where the third line follows since holds. Hence in this case, the proof is complete.
Next suppose and let be the optimal average of the two quadratics and . By Lemma 2.2, the inequality holds. We claim that equality
This follows immediately from Lemma 2.2, once we show . To this end, note first the equality . The choice ensures:
Thus we have . Finally, the assumption implies
Hence we can be sure that (4) holds. Plugging in and yields
Hence the proof is complete once we show the inequality
After rearranging, our task simplifies to showing the inequality
Taking derivatives and using inequality (5), one can readily verify that the right-hand-side is nondecreasing in on the interval . Thus plugging in the endpoint we deduce
Minimizing the right-hand-side over all satisfying yields the inequality
It is instructive to compare optimal averaging (Algorithm 1) with Nesterov’s optimal methods in . For convenience, we record the optimal gradient method following , in Algorithm 2.
Comparing Algorithms 1 and 2, we see that
is some point on the line between and , and
is an average of the previous quadratic and the strong convexity quadratic lower bound based at .
As we discuss in Appendix A, we can modify Nesterov’s method so that like in optimal quadratic averaging, we set in each iteration. After this change, only two differences remain between the schemes:
the initial quadratic is different, and
the averaging parameter is computed differently.
These differences, however, are fundamental. In Algorithm 1, the quadratic lower bounds and therefore optimal averaging makes sense; in the accelerated gradient method, does not lower bound , and the idea of optimal averaging does not apply.
Optimal quadratic averaging with memory
Each iteration of Algorithm 1 forms an optimal average of the current lower quadratic model with the one from the previous iteration; that is, as stated the scheme has a memory size of one. We next show how the scheme easily adapts to maintaining limited memory, i.e. by averaging multiple quadratics in each iteration. We mention in passing that the authors of left open the question of efficiently speeding up their geometric descent algorithm in practice. One approach of this flavor has recently appeared in [4, Section 4]. The optimal averaging viewpoint, developed here, provides a direct and satisfying alternative. Indeed, computing the optimal average of several quadratics is easy, and amounts to solving a small dimensional quadratic optimization problem.
maintains the same canonical form as each .
Define the matrix and vector . Then we have
The Hessian of is simply , and therefore the quadratic has the form
for some and . Notice that is the minimizer of , and by differentiating, we determine that . We then compute
Naturally, we define the optimal averaging of the quadratics , with , to be , where is the maximizer of the concave quadratic over the simplex:
There is no closed form expression for , but one can quickly find it by solving a quadratic program in variables, for example by an active set method. Moreover, some thought shows that the matrix can be efficiently updated if one of the centers changes; we omit the details.
We propose an optimal averaging scheme with memory in Algorithm 3. As we see in Section 5, the method performs well numerically. Moreover, the scheme enjoys the same convergence guarantees as Algorithm 1; that is, Theorem 2.3 applies to Algorithm 3, with nearly the same proof (which we omit).
In other words, the scheme iteratively minimizes the (piecewise linear) lower-models of . Coming back to the optimal averaging viewpoint, suppose that is an optimal average of the lower-bounding quadratics , for . Then we may write
Thus is the minimal value of the now different lower-model, , of . Kelley’s method is known to have poor numerical performance and convergence guarantees (e.g. [10, Section 3.3.2]), while Algorithm 3 achieves the optimal linear convergence rate. This disparity is of course based on the two key distinctions: (1) using quadratic lower-models coming from strong convexity instead of linear functions, and (2) maintaining two separate sequences (centers) and (sources of lower model updates).
Equivalence to geometric descent
Algorithm 1 is largely motivated by the geometric descent method introduced by Bubeck, Lee, and Singh . In this section, we show the two methods (Algorithm 1 and Algorithm 4) indeed generate an identical iterate sequence.
In turn, taking into account (1) yields the guarantee
A crude upper estimate of the radius above is obtained simply by ignoring the nonnegative term . The suboptimal geometric descent method proceeds as follows. Suppose we have available some ball containing . As discussed, the quadratic lower bound at the center , namely , yields another ball containing . Geometrically it is clear that the intersection of these two balls must be significantly smaller than either of the individual balls. The following lemma from makes this observation precise; see Figure 2 for an illustration.
An application of Lemma 4.1 yields a new center with
Repeating the procedure with the new ball yields a sequence of centers satisfying
We note that the centers and of the minimal enclosing balls in Lemma 4.1 are easy to compute; see Algorithm 1 in .
There is a very close connection between finding the minimal enclosing ball of the intersection of two balls and of optimally averaging quadratics. To see this, consider again two quadratics
Let be the optimal average of and . Notice that since , , and lower bound , the minimizer of is guaranteed to lie in the three balls:
where is any upper bound on . We observe the following elementary fact.
The ball is precisely the minimal enclosing ball of the intersection .
Define the quantity . If lies in the unit interval $$, then a quick computation using Lemma 2.2 shows the expressions
Comparing with the recipe [5, Algorithm 1] for computing the minimal enclosing ball, we see that is the minimal enclosing ball of the intersection . ∎
2 Optimal geometric descent method
To obtain an optimal method, the authors of observe that the term in the inclusion (6) cannot be ignored. Exploiting this term will require maintaining two sequences (the centers of the balls) and (points for generating new balls). Suppose in iteration , we know that lies in the ball
Consider now an arbitrary point, denoted suggestively by . Then (6) implies the inclusion
If we choose to satisfy and apply inequality (1) with , we can get a new upper estimate of the initial ball,
It seems clear that if the centers and of the two balls in (7) and (8) are “sufficiently far apart”, then their intersection is contained in an even smaller ball. This is the content of following lemma from .
A quick application of this result shows that provided
holds, there exists a new center with
One way to ensure that satisfies the two key conditions, and inequality (9), is to simply let be the minimizer of along the line between and . Trivially this guarantees the inequality , while the univariate optimality condition means the triangle with vertices , , and is a right triangle and inequality (9) becomes “the hypotenuse is longer than a leg.” This is exactly the motivation for the line-search procedure in Algorithm 1. Repeating the process yields iterates that satisfy the optimal linear rate of convergence
The precise method is described in Algorithm 4.
When applying an iterative method to compute , one can use the following termination criterion. Check if satisfies , then stop and set . Notice (9) holds trivially with this choice of . Else stop with a trial point on the line joining and satisfying and
We claim that the line search will terminate in finite time, unless is the true minimizer of . Indeed, since (otherwise we would have terminated in the if clause), one can easily check that satisfies the above inequality strictly.
The following theorem shows that Algorithm 1 and Algorithm 4 indeed produce the same iterate sequence.
Given the same initial point , Algorithm 1 and Algorithm 4 produce the same iterates and . Moreover, we have , where is the minimum value of the quadratic in Algorithm 1 and is the radius of the ball in Algorithm 4.
Let and denote the iterates in Algorithm 1, and let and be the iterates in Algorithm 4. We proceed by induction on . It follows immediately from the definition of the algorithms that , , and . Now suppose, as an inductive assumption, , , and . To see the equality , observe
Let , , , and define the quantities
Notice that is the optimal averaging of and , and that is the minimum enclosing ball of the intersection of and . Simple algebra shows the relation
and from the inductive assumption , we also have
Thus, by Proposition 4.2 and the discussion preceding it, we have and . This completes the induction. ∎
As we saw in Section 3, computing the optimal averaging of several quadratic functions is simple. On the other hand, it is far from clear how to find the minimum radius ball that encloses the intersection of more than two balls. Indeed, instead the authors of Algorithm 4 in the follow-up work considered a “relaxation” that involves minimizing a self-concordant barrier for the intersection. While revising the current manuscript, we became aware that Beck in [3, Theorem 3.2] proved that the minimum enclosing ball of the intersection of finitely many balls can be computed by solving a convex quadratic program (QP). Namely, Beck showed that the squared radius of the minimal ball enclosing the intersection is exactly equal to
provided and the intersection of the balls has nonempty interior. This QP is exactly the one we derived in Section 3 for the optimal quadratic averaging method with memory. Note that our derivation of the QP in Section 3 was completely elementary; the proof of [3, Theorem 3.2], on the other hand, is much more sophisticated relying on an S-lemma-type result.
Let be the optimal averaging of quadratics for with . Fix a real number for all and define the balls . Then provided that the intersection has a nonempty interior, the ball is the minimal enclosing ball of the intersection .
Let be the square radius of and let be the square radius of , for . Using Proposition 3.1, we deduce
The center of is where is the minimizer of the expression above. Comparing with [3, Theorem 3.2], we see that is exactly the minimum radius ball enclosing the intersection . ∎
Numerical examples
In this section, we numerically illustrate optimality gap convergence in Algorithm 1, and explore how Algorithm 3, the variant of Algorithm 1 with memory, aids performance. To this end, we focus on minimizing two functions: the regularized logistic loss function
(see [10, Section 2.1.2 and Section 2.1.4]). For the logistic regression examples, we use the LIBSVM data sets a1a (, ) and colon-cancer (, ).
From inequality (2), we get the well-known optimality gap estimate for strongly convex functions
How does this estimate compare with the gaps generated by Algorithm 1? Obviously the answer depends on the point where we evaluate the gap estimate in (10). Nonetheless, we can say that the gaps are tighter than the gaps . Indeed, by the definition of , we trivially have and thus
On a relative scale, the difference between and is striking; see Figure 3. Notice that is an optimality gap estimate before averaging, and is an optimality gap estimate after averaging; the plots in Figure 3 show that optimal quadratic averaging makes great relative progress per iteration.
In Figure 4, we plot , the true gaps , and the gap estimate in (10) at , , and for the “world’s worst” function and the logistic loss function. The true gaps are the tightest, albeit unknown at runtime. Surprisingly, the gaps are quite bad: several orders of magnitude larger than . So even though the centers may appear to be the focal points of the algorithm, the points are the ones to monitor in practice. Finally we note that the gaps and are comparable, even though does not rely on gradient information at .
2 Optimal quadratic averaging with memory
To demonstrate the effectiveness of optimal quadratic averaging with memory, we use it to minimize the logistic loss (see Figure 5). The speedup over the memoryless method is significant, even when taking into account the extra work per iteration needed to solve the small dimensional quadratic subproblems. In Figure 6, we compare Algorithm 3 with L-BFGS. The two schemes are on par with each other, and neither is better than the other in all cases.
We noticed that the small dimensional quadratic program in Algorithm 3 must be solved to high accuracy, especially on poorly conditioned problems; an active-set method works well. Accuracy in the line search is less important. Minimizing the one-dimensional function , with , to within accuracy in works well in general. In Figure 9, we show how line search accuracy affects Algorithm 1.
Comments on proximal extensions
It is natural to try to extend geometric descent and optimal quadratic averaging to a proximal setting. For the sake of concreteness, let us focus on geometric descent. We can easily extend the suboptimal version of the algorithm to the proximal setting, but some difficulties arise when accelerating the method. Suppose we are interested in solving the problem
is easily computable. In the analysis of first-order methods for such problems, the gradient mapping plays the role of the usual gradient. The following is a standard estimate; see for example [10, Section 2.2.3]. We provide a proof for completeness.
Appealing to -smoothness of , we deduce
Furthermore, strong convexity of implies
Finally, using the observation that belongs to , we have
If we let in Lemma 6.1 and rearrange we get
How should we choose the step length ? A simple approach is to choose to minimize the quantity , i.e., set . With this choice of , we deduce the inclusion
where is a long step and is a short step. A proximal version of the suboptimal geometric descent follows easily from Lemma 4.1.
To accelerate the proximal geometric descent algorithm we assume in iteration that lies in some ball
We then consider a second minimizer enclosing ball derived from information at some point :
Following the same pattern as in Section 4.2, if we choose to satisfy and appeal to the smoothness inequality , we deduce the inclusion
By Lemma 4.3 there is a new center with
provided the old centers and are far apart; specifically, we must be sure that the inequality
How do we choose to satisfy both and ? The desired does exist; for example, is such a point. In the proximal setting, it is not clear how to choose to ensure these two inequalities (even for specific problem classes). This is an interesting topic for future research.
We thank the anonymous referee for useful suggestions, which undoubtedly improved the quality of the paper. We also thank Stephen J. Wright for pointing out an important typo in the proof of Theorem 2.3 in an early version of the manuscript.
References
Appendix A Exact line search in accelerated gradient descent
Nesterov’s method is based on an estimate sequence; that is, a sequence of functions and nonnegative numbers with
that is, approaches with error proportional to , see .
The quadratics in Algorithm 2 (with appropriately chosen ) form an estimate sequence. To explain, for , pick vectors and numbers with . Next, recursively define
Then the quadratics and numbers are an estimate sequence for . Nesterov’s method is designed to ensure the inequality with the added optimal rate condition .
The scheme in Algorithm 2 with also guarantees these conditions. Trivially we have . Assume, for induction, that we have . From [10, Lemma 2.2.3], we know
Since , we have and , and therefore
Provided we set , we get the optimal rate condition .