A Faster Interior Point Method for Semidefinite Programming
Haotian Jiang, Tarun Kathuria, Yin Tat Lee, Swati Padmanabhan, Zhao Song
Introduction
Semidefinite programs (SDPs) constitute a class of convex optimization problems that optimize a linear objective over the intersection of the cone of positive semidefinite matrices with an affine space. SDPs generalize linear programs and have a plethora of applications in operations research, control theory, and theoretical computer science [VB96]. Applications in theoretical computer science include improved approximation algorithms for fundamental problems (e.g., Max-Cut [GW95], coloring 3-colorable graphs [KMS94], and sparsest cut [ARV09]), quantum complexity theory [JJUW11], robust learning and estimation [CG18, CDG19, CDGW19], and algorithmic discrepancy and rounding [BDG16, BG17, Ban19]. We formally define SDPs with variable size and constraints:
where is the trace product.
Two prominent methods for solving SDPs, with runtimes depending logarithmically on the accuracy parameter , are the cutting plane method and the interior point method.
The cutting plane method maintains a convex set containing the optimal solution. In each iteration, the algorithm queries a separation oracle, which returns a hyperplane that divides the convex set into two subsets. The convex set is then updated to contain the subset with the optimal solution. This process is repeated until the volume of the maintained set becomes small enough and a near-optimal solution can be found. Since Khachiyan proved [Kha80] that the ellipsoid method solves linear programs in polynomial time, cutting plane methods have played a crucial role in both discrete and continuous optimization [GLS81, GV02].
In contrast, interior point methods add a barrier function to the objective and, by adjusting the weight of this barrier function, solve a different optimization problem in each iteration. The solutions to these successive problems form a well-defined central path. Since Karmarkar proved [Kar84] that interior point methods can solve linear programs in polynomial time, these methods have become an active research area. Their number of iterations is usually the square root of the number of dimensions, as opposed to the linear dependence on dimensions in cutting plane methods.
Since cutting plane methods use less structural information than interior point methods, they are slower at solving almost all problems where interior point methods are known to apply. However, SDPs remain one of the most fundamental optimization problems where the state of the art is, in fact, the opposite: the current fastest cutting plane methods[JLSW20] improves upon the runtime of [LSW15] in terms of the dependence on , while the polynomial factors are the same in both runtimes. of [LSW15, JLSW20] solve a general SDP in time , while the fastest SDP solvers based on interior point methods in the work of [NN92] and [Ans00] achieve runtimes of and , respectively, which are slower in the most common regime of (see Table 1.2). This apparent paradox raises the following natural question:
How fast can SDPs be solved using interior point methods?
1 Our results
We present a faster interior point method for solving SDPs. Our main result is the following theorem, the formal version of which is given in Theorem 4.1.
There is an interior point method that solves a general SDP with variable size and constraints in timeWe use to hide and factors and to hide factors, where is the accuracy parameter. .
Our runtime can be roughly interpreted as follows:
is the iteration complexity of the interior point method with the log barrier function.
is the cost of inverting the Hessian of the log barrier.
is the cost of inverting the slack matrix.
Thus, the terms in the runtime of our algorithm arise as a natural barrier to further speeding up SDP solvers. See Section 1.2.2, 1.2.3, and 1.2.4 for more detail.
Table 1.1 compares our result with previous SDP solvers. The first takeaway of this table and Theorem 1.2 is that our interior point method always runs faster than that in [NN92] and is faster than that in [NN94] and [Ans00] when . A second consequence is that whenever , our interior point method is faster than the current fastest cutting plane method [LSW15, JLSW20]. We note that is satisfied in most SDP applications known to us, such as classical combinatorial optimization problems over graphs, experiment design problems in statistics and machine learning, and sum-of-squares problems. An explicit comparison to previous algorithms in the cases of and is shown in Table 1.2.
2 Technique overview
By removing redundant constraints, we can, without loss of generality, assume in the primal formulation of the SDP (1). Thereafter, instead of solving the primal SDP, which has variable size , we solve its dual formulation, which has dimension :
Interior point methods solve (2) by minimizing the penalized objective function:
Nesterov and Nemirovski [NN92] use the log barrier function,
where is the log barrier function defined in (4). They proved that choosing in (3) makes the interior point method converge in iterations, which is smaller than the iteration complexity of [NN92] when . They also studied the combined volumetric-logarithmic barrier
and showed that taking for yields an iteration complexity of . when , this iteration complexity is lower than of [NN92]. We refer readers to the much simpler proofs in [Ans00] for these results.
However, the volumetric barrier (and thus the combined volumetric-logarithmic barrier) leads to complicated expressions for the gradient and Hessian that make each iteration costly. For instance, the Hessian of the volumetric barrier is
where , , and are matrices such that for each ,
where is the Kronecker product (see Section 2.1for formal definition). Due to the complicated formulas in (1.2.1), efficient computation of Newton step in each iteration of the interior point method is difficult; in fact, each iteration runs slower than the Nesterov-Nemirovski interior point method by a factor of . Since most applications of SDPs known to us have the number of constraints be at least linear in , the total runtime of interior point methods based on the volumetric barrier and the combined volumetric-logarithmic barrier is inevitably slow.
2.2 Our techniques
Given the inefficiency of implementing the volumetric and volumetric-logarithmic barriers discussed above, this paper uses the log barrier in (4). We now describe some of our key techniques that improve the runtime of the Nesterov-Nemirovski interior point method [NN92].
As noted in Section 1.2.1, the runtime bottleneck in [NN92] is computing the inverse of the Hessian of the log barrier function, where the Hessian is described in (5). In [NN92], each of these entries is computed separately, resulting in a runtime of per iteration.
Instead contrast, we show below how to group these computations using rectangular matrix multiplication. The expression from (5) can be re-written as
Thus far, we have reduced the per iteration cost of for Hessian computation down to
The fast rectangular matrix multiplication approach noted above, however, is still not very efficient, because the Hessian must be computed from scratch in each iteration of the interior point method. If there are iterations in total, it then takes time
Specifically, first we prove that whenever is updated in an iteration, the potential function increases by at most (see Lemma 6.2). The proof of this statement crucially uses the structural property of interior point method that slack matrices in consecutive steps are sufficiently close to each other. Formally, for any iteration , we show in Theorem 5.1 that the consecutive slack matrices and satisfy
Given the low-rank update on described above, we show how to efficiently update the approximate Hessian , defined as
for each entry . The approximate slack matrix being a spectral approximation of the true slack matrix implies that the approximate Hessian is also a spectral approximation of the true Hessian (see Lemma 5.3). This approximate Hessian therefore suffices for our algorithm to approximately follow the central path.
To efficiently update the approximate Hessian in (10), we notice that a rank- update on implies a rank- update on via the Woodbury matrix identity (see Fact 2.4). The change in can be expressed as
where is the rank of the update on . Applying Theorem 1.4 with several properties of fast rectangular matrix multiplication that we prove in Section 3 , we upper bound the runtime in (12) by
which implies Theorem 1.2. In Section 1.2.3 and 1.2.4, we discuss bottlenecks to further improving our runtime.
2.3 Bottlenecks of our interior point method
In most cases, the costliest term in our runtime is the per iteration cost of , which corresponds to reading the entire input in each iteration. Our subsequent discussions therefore focus on the steps in our algorithm that require at least time per iteration.
When is updated in each iteration of our interior point method, we need to compute the true slack matrix as
Computing is needed to update the approximate slack matrix so that remains a spectral approximation to . As might suffer from full-rank changes, it naturally requires time to compute in each iteration. This is the first appearance of the cost per iteration.
Recall from (3) that our interior point method follows the central path defined via the penalized objective function
for a parameter and . In each iteration, to perform the Newton step, the gradient of the penalized objective is computed as
for each coordinate . Even if we are given , it still requires time to compute (13) for all . This is the second appearance of the per iteration cost of .
Recall from Section 1.2.2 that updating the approximate slack matrix by rank means the time needed to update the approximate Hessian is dominated by computing the term
2.4 LP techniques unlikely to improve SDP runtime
The preceeding discussion of bottlenecks suggests that reading the entire input in each iteration, which takes time per iteration, stands as a natural barrier to further improving the runtime of SDP solvers based on interior point methods.
In the context of linear programming (LP), several recent results [CLS19, BLSS20] yield faster interior point methods that bypass reading the entire input in every iteration. Two techniques crucial to these results are: (1) showing that the Hessian (projection matrix) admits low-rank updates, and (2) speeding computation of the Hessian via sampling.
We now describe these techniques in the context of SDP and argue that they are unlikely to improve our runtime.
We saw in Section 1.2.2 that constructing an approximate slack matrix that admits low-rank updates in each iterations leveraged the fact that the true slack matrix changes “slowly” throughout our interior point method as described in (9). One natural question that follows is whether a similar upper bound can be obtained for the Hessian. If such a result could be proved, then one could maintain an approximate Hessian that admitted low-rank updates, which would speed up the approximate Hessian computation. Indeed, in the context of LP, such a bound for the Hessian can be proved (e.g., [BLSS20, Lemma 47]).
Unfortunately, it is impossible to prove such a statement for the Hessian in the context of SDP. To show this, it is convenient to express the Hessian using the Kronecker product (Section 2.1)as
This large change indicates that we are unlikely to obtain an approximation to the Hessian that admits low-rank updates, which is a key difference between LP and SDP.
Recall from (8) that the Hessian can be computed as
For SDP, however, sampling is unlikely to speed up the Hessian computation. In general, we must sample at least columns (i.e. ) of to spectrally approximate or the computed matrix will not be full rank. However, this requires computing the entries of that correspond to for all , which requires reading all ’s and thus still takes time.
3 Related work
Linear Programming is a class of fundamental problems in convex optimization. There is a long list of work focused on fast algorithms for linear programming [Dan47, Kha80, Kar84, Vai87, Vai89b, LS14, LS15, Sid15, Lee16, CLS19, Bra20, BLSS20].
Cutting plane method is a class of optimization methods that iteratively refine a convex set that contains the optimal solution by querying a separation oracle. Since its introduction in the 1950s, there has been a long line of work on obtaining fast cutting plane methods [Sho77, YN76, Kha80, KTE88, NN89, Vai89a, AV95, BV02, LSW15, JLSW20].
As the focus of this paper, cutting plane methods and interior point methods solve SDPs in time that depends logarithmically on , where is the accuracy parameter. A third class of algorithms, the first-order methods, solve SDPs at runtimes that depend polynomially on . While having worse dependence on compared to IPM and CPM, these first-order algorithms usually have better dependence on the dimension. There is a long list of work on first-order methods for general SDP or special classes of SDP (e.g. Max-Cut SDP [AK07, GH16, AZL17, CDST19, LP20, YTF+19], positive SDPs [JY11, PT12, ALO16, JLL+20].)
Preliminaries
2 Useful facts
Given a symmetric matrix , a positive semi-definite matrix and , we have
Matrix Multiplication
The main goal of this section is to derive upper bounds on the time to perform the following two rectangular matrix multiplication tasks (Lemma 3.9, 3.10, and 3.11):
Multiplying a matrix of dimensions with one of dimensions ,
Multiplying a matrix of dimensions with one of dimensions .
Besides being crucial to the runtime analysis of our interior point method in Section 7, these results (as well as several intermediate results) might be of independent interest.
We need the following definitions to describe the cost of certain fundamental matrix operations we use.
For any three positive integers , we have
We refer to Table 3 in [GU18] for the latest upper bounds on for different values of . In particular, we need the following upper bounds in our paper.
2 Technical results for matrix multiplication
We assume that and are integers for notational simplicity. Consider multiplying an matrix with an matrix. One can cut the matrix into rectangular blocks of size and the matrix into rectangular blocks of size , and compute the multiplication of the corresponding blocks. This approach takes time , from which the desired inequality immediately follows. ∎
Key to our analysis is the following lemma, which establishes the convexity of .
The fast rectangular matrix multiplication time exponent as defined in Definition 3.2 is convex in .
Let for . For notational simplicity, we assume that , and are all integers. Consider a rectangular matrix of dimensions . Since , we can tile this rectangular matrix with matrices of dimensions . Then, the product of this tiled matrix with another similarly tiled matrix of dimensions can be obtained by viewing it as a multiplication of a matrix of dimensions with one of dimensions , where each “element” of these two matrices is itself a matrix of dimensions . With this recursion in tow, we obtain the following upper bound.
The final step above follows from denoting and observing that multiplying matrices of dimensions costs, by Definition 3.2, , which is exactly . Applying Definition 3.2 and comparing exponents, this implies that
which proves the convexity of the function . ∎
We can upper bound in the following sense
where the first step follows from convexity of (Lemma 3.6), the third step follows from and (Lemma 3.4). ∎
Property II is then an immediate consequence of the following inequality, which we prove next:
Define . Then the desired inequality in (14) can be expressed in terms of as
Notice that the RHS of (15) is a maximum of two linear functions of and these intersect at . By the convexity of as proved in Lemma 3.6, it suffices to verify (15) at the endpoints , and . In the case where for any , (15) follows immediately from the observation that . We next argue about the case . By Lemma 3.4 we have . Using Lemma 3.5, we have . Combining these two facts implies that for any , we have
which again satisfies (15). The final case is , for which (15) is equivalent to
By Lemma 3.4, we have that . Then to prove (16), it is sufficient to show that
By the convexity of as proved in Lemma 3.6, the upper bound of in Lemma 3.4, and recalling that for , we have for ,
In particular, using this inequality for , we have
which is negative on the entire interval . This establishes (17) and finishes the proof. ∎
For any two positive integers and , we have
Case 1: . In this case, we have , where the last inequality follows from Claim 3.7. This implies that
Case 2: . In this case, we have . Consider the linear function
An application of Lemma 3.5 then gives, for any , the inequality
where the last inequality is by definition of from (19). Therefore, combining the convexity of , as proved in Lemma 3.6, with (20), (21), and (22), we conclude that for any , the function is bounded from above by the affine function , expressed as follows.
Combining the results from (18) and (23) finishes the proof of the lemma. ∎
Main Theorem
In this section, we give the formal statement of our main result.
Consider a semidefinite program with variable size and constraints (assume there are no redundant constraints):
where is the exponent of matrix multiplication, is any optimal solution to the semidefinite program in (24), and is the Schatten -norm of matrix .
The proof of Theorem 4.1 is given in the subsequent sections.
Approximate Central Path via Approximate Hessian
Our main result of this section is the following.
where is any optimal solution to the semidefinite program in Definition 1.1, and is the Schatten -norm of matrix . Further, in each iteration of Algorithm 1, the following invariant holds for :
At the start of Algorithm 1, Lemma 9.1 is called to modify the semidefinite program to obtain an initial dual solution for the modified SDP that is close to the dual central path at . This ensures that the invariant holds at the start of the algorithm. Therefore, by Lemma 5.4 and Lemma 5.5, this invariant continues to hold throughout the run of the algorithm. Therefore, after iterations, the step size in Algorithm 1 grows to . It then follows from Lemma 5.6 that
Thus when the algorithm stops, the dual solution has duality gap at most for the modified SDP. Lemma 9.1 then shows how to obtain an approximate solution to the original SDP that satisfies the guarantees in (25).
where we used the fact that . It then follows from Lemma 5.4 and the invariant that
where . Combining Equation (27) with Inequality (5.1) completes the proof of the theorem. ∎
2 Approximate slack update
3 Closeness of slack implies closeness of Hessian
Then both and are positive semidefinite. For any accuracy parameter , if
As the RHS of (30) and (31) are non-negative, both and are positive semidefinite. Since , we have (see Section 2.2), which gives the following inequalities
Combining (32) and (33) with (30) and (31) along with the fact that can be any arbitrary -dimensional vector finishes the proof of the lemma. ∎
4 Approximate Hessian maintenance
In each iteration of Algorithm 1, for , the approximate Hessian satisfies that
where as in Algorithm 2. By definition of operator norm, this implies that in each iteration of Algorithm 1, we have, for ,
The statement of this lemma then follows from Lemma 5.3. ∎
5 Invariance of Newton step size
The following lemma is standard in the theory of interior point methods (e.g. see [Ren01]).
6 Approximate optimality
The following lemma is also standard in interior point method.
Let be an optimal solution to the dual formulation (2). Then we have
Low-rank Update
Crucial to being able to efficiently approximate the Hessian in each iteration is the condition that the rank of the update be not too large. We formalize this idea in the following theorem, essential to the runtime analysis in Section 7.
Let and be the rank of the update to the approximate slack matrix when calling Algorithm 2 in iteration of Algorithm 1. Then, over iterations of Algorithm 1, the ranks satisfy the inequality
and Cauchy-Schwarz inequality. This proves the lemma.
Let denote the ’th (ordered) eigenvalue of a matrix . We then have
where the last inequality is because the first assumption from (36) implies for all . Plugging (40) into the right hand side of (6), we have
Let be the singular value decomposition of , with and being unitary matrices. Because of the invariance of the Frobenius norm under unitary transformation, (40) is then equivalent to
Since and are unitary, the matrix is similar to , and the matrix is similar to . Therefore,
where the last inequality is by Fact 2.3. We rewrite the Frobenius norm as
Case 1. There does not exist an that satisfies the two conditions and . In this case, we have . We consider two sub-cases.
Case (b). There exists a minimum index such that holds for all in the range . In this case, for all in the above range, we have that . In particular, picking gives
where by Table 5.1. Therefore, we can bound, from below, the decrease in potential function as
From Lemma 6.3, we have the following potential decrease:
We note that as we initialized in the beginning of the algorithm, and that the potential function is always non-negative. The theorem then follows by summing up (48) over all iterations. ∎
Runtime Analysis
Our main result of this section is the following bound on the runtime of Algorithm 1.
The total runtime of Algorithm 1 for solving an SDP with variable size and constraints is at most , where is the matrix multiplication exponent as defined in Definition 3.2.
To prove Theorem 7.1, we first upper bound the runtime in terms of fast rectangular matrix multiplication times. The iteration complexity of Algorithm 1 is .
The total runtime of Algorithm 1 over iterations is upper bounded as
The total runtime of Algorithm 1 consists of two parts:
Part 1. The time to compute the approximate Hessian (which we abbreviate as ) in Line 11 - 15.
Part 2. The total cost of operations other than computing the approximate Hessian.
We analyze the cost of computing the approximate Hessian .
We start with computing in the first iteration of the algorithm. Each entry of involves the computation
It first costs to invert . Then the cost of computing the key module of the approximate Hessian, for all , is obtained by stacking the matrices together:
Vectorizing the matrices into row vectors of length , for each , and stacking these rows vertically to form a matrix of dimensions , one observes that . We therefore have,
Combining (50), (51), and the initial cost of inverting gives the following cost for computing for the first iteration:
Part 1b. Accumulating low-rank changes over all the iterations
Using this bound over all iterations, and applying from Theorem 6.1, gives
where we incorporated the bound from (52) into the case.
Observe that there are four operations performed in Algorithm 1 other than computing :
Part 2a. computing the gradient
Part 2b. inverting the approximate Hessian
Part 2b. The cost of inverting the approximate Hessian is per iteration.
The total cost of operations other than computing the Hessian over the iterations is therefore bounded by
Combining (7) and (7) and using finishes the proof of the lemma.
We give only the proof of Property I, as the proof of Property II is similar. Let . For each , let , where . Then
For each number , define the set of iterations
Then our assumption on the sequence can be expressed as . This implies that for each , we have . Next, taking the summation of Eq. (59) over all , we have
where the fourth step follows from . To bound the exponent on above, we define the function ,
This function is convex in due to the convexity of the function (Lemma 3.6). Therefore, over the interval , the maximum of is attained at one of the end points. We simply evaluate this function at the end points.
Case 1. Consider the case . In this case, we have . We consider the following two subcases. Case 1a. If , then we have
Case 1b. If , then we define . It follows from Lemma 3.5 and , that
Combining both Case 1a and Case 1b, we have that
Case 2 Consider the other case of . In this case, .
We now finish the proof by combining Case 1 and Case 2 as follows.
In light of Lemma 7.4, the upper bound on runtime given in Lemma 7.2 can be written as
Combining this with 3.10, we have the following upper bound on the total runtime of Algorithm 1:
This finishes the proof of the theorem. ∎
Comparison with Cutting Plane Method
In this section, we prove Theorem 1.3, restated below.
Since by assumption, Lemma 3.9 and 3.9 further simplify the runtime to
Initialization
Consider a semidefinite program as in Definition 1.1 of dimension with constraints, and assume that it has the following properties.
For any , the following modified semidefinite program
The following are feasible primal and dual solutions:
For any feasible primal and dual solutions with duality gap at most , the matrix , where is the top-left block submatrix of , is an approximate solution to the original semidefinite program in the following sense:
where is any optimal solution to the original SDP and denotes the Schatten -norm of a matrix .
Notice that is a feasible primal solution to the modified SDP, and that
where the first step follows because the modified SDP is a maximization problem, and the final step is because is an optimal solution to the original SDP.
Therefore, we can lower bound the objective value for in the original SDP as
where the last inequality follows from (63). By matrix Hölder inequality, we have
where the final step follows from the upper bound of in (64). Summing the above inequality up over all finishes the proof of the lemma. ∎
Acknowledgment
We thank Aaron Sidford for many helpful discussions and Deeksha Adil, Sally Dong, Sandy Kaplan, and Kevin Tian for useful feedback on the writing. We gratefully acknowledge funding from CCF-1749609, CCF-1740551, DMS-1839116, Microsoft Research Faculty Fellowship, and Sloan Research Fellowship. Zhao Song is partially supported by Ma Huateng Foundation, Schmidt Foundation, Simons Foundation, NSF, DARPA/SRC, Google and Amazon.
References
Appendix A Matrix Multiplication: A Tensor Approach
The main goal of this section is to rederive, using tensors, some of the technical results from Section 3. In particular, we use tensors to derive upper bounds on the time to perform the following two rectangular matrix multiplication tasks (Lemma A.12 and A.13):
Multiplying a matrix of dimensions with one of dimensions ,
Multiplying a matrix of dimensions with one of dimensions .
Our hope is that these techniques will eventually be useful in further improving the results of this paper.
We recall two definitions to describe the cost of certain fundamental matrix operations, along with their properties.
For any three positive integers , we have
A.2 Matrix multiplication tensor
The rank of a tensor , denoted as , is the minimum number of simple tensors that sum up to . For any two tensors and , we write if there exist three matrices and (of appropriate sizes) such that for all . For any , denote the tensor with in the -th entry, and elsewhere.
For any three positive integers , we define
to be the matrix-multiplication tensor corresponding to multiplying a matrix of size with one of size .
It’s not hard to show that for any and where , we have
Let be the identity tensor. For any three tensors and , if , then we have
Tensor rank is monotone under the relation , i.e. if , then we have
For any tensors and , we have
The tensor rank of a matrix multiplication tensor is equal to the cost of multiplying the two correponding sized matrices up to some constant factor, i.e.,
A.3 Implication of matrix multiplication technique
where the last line follows from Lemma A.7. Applying Lemma A.8, we have
Using the definition of , we have
Comparing the exponent on both sides completes the proof. ∎
The next lemma establishes the convexity of as a function of .
The fast rectangular matrix multiplication time exponent as defined in Definition A.2 is convex in .
Let for . We have
where the last line follows from Lemma A.7. By Lemma A.8, we have
By definition of , we have
We only prove the case of , as the other case where is similar. This is an immediate consequence of Lemma A.11 by taking , , and , where is a positive integer because . ∎
Applying the tensor rank on both sides, we have
Let , where . We have
The Property II is then an immediate consequence of the following inequality, which we prove next:
Define . Then the above desired inequality can be expressed in terms of as
Notice that the RHS of (15) is a maximum of two linear functions of and these intersect at . By the convexity of as proved in Lemma A.10, it suffices to verify (15) at the endpoints , and . In the case where for any , (15) follows immediately from the observation that . For the case , by Lemma A.3 we have . It then follows from Lemma A.9 that for any , we have
The final case is where , for which (15) is equivalent to
By Lemma A.3, we have that . Then to prove (66), it is sufficient to show that
By the convexity of as proved in Lemma A.10 and the upper bound of in Lemma A.3, we have for ,
In particular, using this inequality for , we have
which is negative on the entire interval . This establishes (67) and finishes the proof of the lemma. ∎