A Faster Small Treewidth SDP Solver
Yuzhou Gu, Zhao Song
Introduction
Semidefine programming is one fundamental problem in optimization and theoretical computer science. It has many applications in computer science, such as verifying the robustness of neural network [RSL18], solving the discrepancy problems [Ban10], sparse matrix factorization [CSTZ22], sparsest cut [ARV09], -colorable graph [KMS94], terminal embeddings [CN21], quantum complexity theory [JJUW11], obtaining tight approximation ratio for MAXCUT [GW95], solving sum of squares programs [BS16, FKP19], and so on.
Mathematically, a semidefinite program can be defined as follows.
Over the last century, many efforts have been put into optimizing the running time of semidefinite programming [Sho77, YN76, Kha80, KTE88, NN89, Vai89, KM03, BV02, LSW15, JLSW20, JLSW20, JKL+20, HJS+22]. Based on how many iterations you need to solve semi-definite programming, the previous work of solving semi-definite programming can be splitted into three lines: cutting plane method [LSW15, JLSW20], log barrier function [JKL+20, HJS+22], volumetric/hybrid barrier function [HJS+22].
Many graph problems can be written as semidefinite programs with certain structure. For example, the famous Goemans-Williamson algorithm [GW95] relaxes problem to a semidefinite program. When the underlying graph has low treewidth, the corresponding SDP also has small treewidth. While the problem takes exponential time in treewidth [LMS11] (under plausible hyposthesis like Exponetial Time Hypothesis [IP01]), when treewidth is constant, it can be easily solved in linear time; on the other hand, before our work, it was not known whether SDP can be solved in nearly linear time even when treewidth is constant. Another graph problem is Lovász theta function [Lov79], it is an important quantity in noisy communication and is naturally defined as a semidefinite program.
In practice, data sets on graphs often have small treewidth, see e.g. [ZL18, Table 1], and [DLY21, Appendix B]. Therefore SDP with small treewidth is a problem of practical interest.
In this work, we consider SDP for which the treewidth is small. Formally,
Given an SDP (Definition 1.1), we define its SDP graph as a graph where and
Treewidth of an SDP is defined as treewidth of the SDP graph.
Let denote the treewidth of the SDP graph. The best previous work on small treewidth semidefinite programming is due to [ZL18], which runs in time. A natural question to consider is,
Can we solve SDP much faster under treewidth assumption, i.e., in particular can we solve SDP in nearly linear time in ?
In this work, we answer the above question in affirmative.
We make the following linear independence assumption on our SDP. This assumption is standard in IPM literature, and is also present previous works [ZL18].
Under Assumption 1.3, the total number of constraints is bounded by .
For the standard semidefinite programming (without low-treewidth assumptions), the best previous algorithms are due to [JKL+20, HJS+22]. Those algorithms are based on dual-only central path algorithms. Due to technical reasons, even with small treewidth assumption, those techniques lead to algorithm with running time at least ,Here denotes the exponent of matrix multiplication, i.e., multiplying an matrix with another matrix takes time. Currently, [Wil12, AW21]. and cannot solve semidefinite programming with time only linear in .
There is an algorithm that solves semidefinite programming (1) with accuracy in
1.2 Low-Treewidth LP
Furthermore, we also improve the best previous low-treewidth LP result due to [DLY21] (which runs in time). Before stating our result for LP, let us define treewidth of an LP.
Given an LP, we construct the LP dual graph where vertices are constraints, and there is an edge between two vertices if they share a common variable (with non-zero coefficients). Then treewidth of the LP is defined as the treewidth of its LP dual graph.
There is an algorithm that solves linear programming (3) with accuracy in
1.3 Decomposable SDP
There are cases where Theorem 1.4 does not apply but we can still obtain an efficient SDP solving algorithm. One such case is summarized in the following theorem. To state the result, let us define the sparsity graph, a graph with potentially lower treewidth than the SDP graph (Definition 1.2).
Given an SDP (Definition 1.1), we define its sparsity graph as a graph where and
Let be the maximum number of constraints a bag correspond to. Let be the maximum size of a bag. Then the SDP can be solved in time .
A special case for which the condition in Theorem 1.9 is satisfied is the “Network Flow Semidefinite Program” studied in [ZL18].
A network flow SDP is an SDP (Definition 1.1) where for every constraint matrix , there exists a vertex such that .
[ZL18] gave an algorithm to solve network flow semidefinite programs in time, where is the maximum degree of the tree and is the maximum number of network flow constraints at any vertex (i.e., ).
Using Theorem 1.9, we can achieve almost linear running time for network flow semidefinite programs.
The network flow semidefinite program can be solved in time .
Note that for network flow SDPs, a trivial bound for is .
2 Applications
In this section, we discuss three applications: MaxCut SDP, Lovasz Theta function, and low rank matrix completion.
For a graph, a maximum cut is a cut whose size is at least the size of any other cut. That is, it is a partition of the graph’s vertices into two complementary sets and , such that the number of edges between the set and the set is as large as possible. The problem of finding a maximum cut in a graph is known as the Problem. This problem is NP-complete [Kar72], and also APX-hard [PY91]. The problem is a natural generalization of , where we would like to partition the set of vertices into disjoint parts, and maximize the number of edges between different parts. A problem is the same as a problem.
and admit natural SDP relaxations.
Let be the weighted Laplacian matrix for a graph with vertices. There is a randomized algorithm to solve with an approximation ratio of based on solving
The classic Goemans-Williamson 0.878-approximation algorithm [GW95] for is recovered by setting and removing the redundant constraint . This is the best possible approximation ratio under the Unique Games Conjecture [KKMO07].
2.2 Lovász Theta Function
We discuss another famous application of SDP which is the Lovász theta function,
The SDP graph (Definition 1.2) is obtained by adding a new vertex to the complement graph of input graph , with an edge for all . Given a tree decomposition of with bag size , a tree decomposition of the SDP graph with bag size can be obtained by adding the new vertex into every bag. So SDP treewidth is small when has small treewidth.
2.3 Low Rank Matrix Completion
In the low rank matrix completion problem, we are given a partially filled matrix , where entries are filled. The goal is to find a matrix of smallest rank that agrees with on .
This problem is non-convex and in general difficult to solve. A popular relaxation [CR09] of the problem is to minimize the nuclear norm instead.
Furthermore, [CR09] rewrote the above formulation in the following equivalent form:
Let be the adjacency graph. The SDP graph (Definition 1.2) is as follows: for every edge , the SDP graph contains the clique .
3 Related Work
In the previous SDP literature, there are two lines of SDP solvers: second order methods and first order methods. Second order methods usually have running time with logarithmic dependence on , while first order methods usually have polynomial dependence on .
Second order methods can be further splitted into several lines: first line is cutting plane methods, for example [LSW15, JLSW20]. The algorithm in [LSW15, JLSW20] can solve semidefinite programming in time. The second line is interior point methods (associated with certain self-concordant barrier functions), for example, [NN92, JKL+20, HJS+22] use log-barrier function, and [Ans00, HJS+22] use hybrid barrier function. The algorithm in [JKL+20] can solve SDP in time. Furthermore, [HJS+22] shows that as long as , we can solve semidefinite programming in time.
The interior point method is a second-order algorithm. Second-order algorithms usually have logarithmic dependence on the error parameter . First-order algorithms do not need to use second-order information, but they usually have polynomial dependence on . There is a long list of work focusing on first-order algorithms [AK07, GH16, AZL17, CDST19, LP20, YTF+19, JY11, ALO16].
For a semidefinite program with bounded treewidth, the work [ZL18] shows how to solve it in time.
Technique Overview
In this section, we explain the previous technique and summarize our new techniques.
In Section 2.1, we briefly summarize the techniques in [ZL18] and explain the barrier of that algorithm.
In Section 2.3, we briefly analyze running time of the algorithm in previous section and explain the bottlenecks.
In Section 2.4, we discuss how we improve the running time for bottlenecks, thus achieving an improved algorithm for low-treewidth SDP.
In Section 2.5, we discuss how we achieve improved algorithm for low-treewidth linear program.
In this section, we briefly summarize the technique in [ZL18].
Suppose we have an SDP of form (1) with a tree decomposition of maximum bag size .
[ZL18] creates another SDP of smaller number of variables, where every bag in the tree decomposition becomes one PSD matrix, which corresponds to an principal minor in the original PSD matrix.
See Appendix 5 for a more detailed explanation of the program.
The new SDP has three types of contraints:
, which corresponds to linear constraints in the original SDP;
, which says that when two minors overlap in the original PSD matrix, they should have the same value in overlapping positions;
, meaning that each minor should be PSD.
After this reduction, we run IPM iteration directly.In fact, [ZL18] ran IPM on the dual SDP, because the maximum degree of a bag in the tree decomposition could be large. However, we can easily make the maximum degree by adding bags. This does not change the asymptotic running time but results in a simpler algorithm.
[ZL18] uses interior point method to solve (5). For every step, we need to perform computation of the following kind
is the Hessian matrix, a block-diagonal matrix.
Because of the low-treewidth assumption, these updates can be implemeneted efficiently, as discussed below.
Number of iterations we need to run is controlled by the number of variables and geometry of the primal space. (More precisely, number of iterations is square root of sum of self-concordance value of all blocks.) Because we can have matrix variables, each of them is in the PSD cone, which is is -self-concordant, the total number of iterations is
Each of the matrix factors in the above equation can be computed in time, and contains non-zero entries, so cost per iteration is .
So the overall running time of [ZL18]’s algorithm is .
More specifically, [DLY21] gave an algorithm for low-treewidth LP. Their central path equation is
where is the primal variable, is the dual variable, is the slack variable, and denotes the error. The central path is defined as the path of as goes from initial value to .
where is the Hessian.
We only need to follow the central path approximately, meaning that when computing the steps, we could use instead of , where is a vector close enough to . The IPM algorithm works roughly in the following sense.
,
The general LP and SDP central path algorithm (without treewidth assumption) maintains directly, since we don’t have the benefit of Cholesky decomposition (coming from treewidth assumption). This would lead to algorithms with cost-per-iteration super-linear in .
The key idea of [DLY21] is that, instead of maintaining the pair on the central path explicitly, we maintain them implicitly (“multiscale coefficients”)
Similar ideas can be applied to our treewidth SDP case. We maintain primal-dual pairs , and let them follow the central path. In each step, we need to run approximate Newton step
To maintain the central path, we need to have a data structure which can support (1) central path steps (8), and (2) report coordinates on which and differ too much.
However, because we maintain implicitly, maintaining under central path steps and under change of multiscale representation and answering range queries is not a trivial task. We resolve this issue by using BlockBalancedSketch (Section 4.4.5), a block version of balanced sampling tree sketch in [DLY21]. Using BlockBalancedSketch and BlockVectorSketch (Section 4.4.4, an easy application of segment trees), we are able to implement BatchSketch (Section 4.4.3), a data structure for maintaining sketches of .
Finally, by combining ExactDS and ApproxDS, we are able to maintain implicitly, and to maintain an approximation explicitly. This gives our central path maintenance algorithm CentralPathMaintenance (Section 4.2).
3 Bottlenecks for Running Time
In this section we give a brief analysis of running time. The actual analysis is much more complicated, but the highlight the bottlenecks here.
Therefore, the final running time is a result of balancing the total restart time and update time.
In the following, we plug in the exact exponents of and compute the running time.
Restart can be splitted into two steps, one is initialization and the other is output. The most time-consuming step is computing Choleky factorization in initialization.
As described in Algorithm 1, update can be splitted into mainly four substeps: Central path (ExactDS) move, ApproxDS query (using sketching data structure BatchSketch), ExactDS update, and sketching data structure BatchSketch update.
The central path move step takes time per iteration because it only updates constant coefficients in the multiscale representation.
4 Improve Running Time Bottleneck
In this section we discuss how to improve the running time bottleneck. As described in the last section, the most time consuming step is computing Cholesky factorization (which affects restart time), and updating Cholesky factorization under change of one variable block (which affects update time).
5 Improve Running Time of Low-Treewidth LP
In this section, we discuss the technique we use to achieve a more efficient algorithm for LP with bounded treewidth.
Recall that the key idea of [DLY21] is, instead of maintaining the primal and slack variables on the (approximate) central path explicitly, we maintain a sparsely-changing representation (multiscale representation) of them. The central path maintenance algorithm has two main parts (1) restart (which contains initialize and output), and (2) update. In every iteration, if certain conditions are satisfied, we restart the data structure. Afterwards, we perform a central path move and maintain the relevant data structures ExactDS and ApproxDS. The final running time is achieved by balancing restart time and update time.
We improve restart time by devising improved algorithms for computations related to Cholesky factorization. One main step in initialization part is to compute the Cholesky factorization of the matrix . Because of the treewidth assumption, the Cholesky factor is -column sparse, i.e., every column has at most non-zero entries. Using this property, [DLY21] is able to compute the Choleksy factorization in time.
We can do better by utilization more properties of the matrix. The key observation is that we can divide the indices of into blocks of size , such that in the Cholesky factor is -block sparse, i.e., every block column has at most non-zero block entries.
In this way, we can perform the Choleksy factorization algorithm on block level, achieving an algorithm (c.f. Lemma 6.4, 8.4) running in time
Using similar ideas, we are able to improve other Cholesky-related computations, including Cholesky factor inverse (c.f. Lemma 8.7), product of Cholesky factor and a batch of vectors (c.f. Lemma 8.8), and so on. These are all bottleneck steps in the original [DLY21] algorithm. By combining all these improvements, we achieve improved running time for restart.
The overall running time is sum of restart time and update time. In the LP case, the number of iterations is . Let be the data structure restart threshold. Then overall restart time is given by
where the last step is by taking .
Acknowledgements
The authors would like to thank Guanghao Ye and Lichen Zhang for useful discussions.
Here, we provide an organization for the rest of the paper.
In Section 3, we present a few basic definitions and results used in the paper.
In Section 4, we present a general framework which covers both semidefinite programming and linear programming.
In Section 6: we show how to further improve the running time of semidefinite programming solver to achieve an time algorithm.
In Section 7, we show how to solve a more general kind of low-treewidth SDP (which we call decomposable SDP) using our general framework.
In Section 8, we show how to improve running time of low-treewidth linear programming to .
Preliminaries
In Section 3.1, we define some basic notations. In Section 3.2, we define self concordant barrier. In Section 3.3, we define treewidth. In Section 3.4, we introduce some backgrounds for sketching matrices.
For two functions , we use the shorthand (resp. ) to indicate that (resp. ) for an absolute constant . We use to mean for constants .
We use to denote the exponent of matrix multiplication, i.e., multiplying an matrix with another matrix takes time. Currently, [Wil12, AW21].
We will deal with block matrices and vectors a lot. Therefore we use a block-friendly notation.
In particular , .
2 Self-Concordant Barrier
We start with defining self concordant barrier,
A function is a self-concordant barrier if the first condition holds.
Log-barrier for the PSD cone is -self-concordant.
3 Treewidth
Let be a graph, a tree decomposition of is a tree with vertices, and sets (called bags), satisfying the following properties:
For every edge , there exists such that ;
For every vertex , is a non-empty subtree of .
The treewidth of is defined as the minimum value of over all tree decompositions.
4 Sketching Matrices
5 Sparse Cholesky Decomposition
In this section we state a few basic results on sparse Cholesky decomposition. The following definition essentially come from [Sch82].
Let be an undirected graph on vertices. An elimination tree is a rooted tree on together with an ordering of such that for any vertex , its parent is the smallest (under ) element such that there exists a path from to , such that for all .
The following lemma is useful in proving elimination trees.
Let be an undirected graph on vertices. Let be a rooted tree with vertices, satisfying the property that: for any path with for all , then there exists such that is an ancestor of both and . Then together with any post-order traversal of is an elimination tree.
We prove that satisfies Definition 3.7. Let and be any path from to a vertex outside the subtree rooted at . By assumption, there exists a vertex which is an ancestor of . Let be the parent of . Then . Therefore is the smallest element reachable from using only elements before . ∎
When any post-order traversal of works, we omit the choice of and say is an elimination tree.
Under the setting of Lemma 3.8, if depth of is at most , then the Cholesky decomposition can be computed in time.
General Treewidth Program Solver Framework
In this section we establish a general framework for solving treewidth LP/SDP and related problems. Our framework takes block size into consideration and do not assume various block size-related parameters are constant. Our framework takes in certain subroutine running time as parameters. This allows us to see which subroutines are running time bottlenecks. Our SDP and LP results follow from the general framework with minimal problem-specific results in addition.
We briefly describe the outline of this section.
In Section 4.1, we present the definitions and backgrounds for this Section 4.
In Section 4.2, we present the main data structure which is central path maintenance data structure.
In Section 4.3, we present several computation-related lemmas which will be heavily used in our tasks.
In Section 4.4, we present several data structures that are being used in central path maintenance, including ExactDS (Section 4.4.1), ApproxDS (Section 4.4.2), BatchSketch (Section 4.4.3) and BlockVectorSketch(Section 4.4.4).
In Section 4.5, we prove correctness and running time of the central path maintenance data structure.
In Section 4.6, we prove the main result (Theorem 4.3).
We consider programs of the following form.
We make the following assumptions on Program (9) and define relevant parameters. These parameters will have an impact to the final running time (Theorem 4.3).
Assume that for each , we have a -self-concordant barrier function . Let .
Assume that , and can be computed in time. Define and .
Assume that it takes time to compute Cholesky decomposition .
Assume that it takes time to update Cholesky decomposition, i.e., given and supported on a single diagonal block, computing such that .
Assume that it takes time to compute for all , where is supported on , where is the set of ancestors of vertex . This is used in Lemma 4.24.
Assume that is the diameter of . Assume that we are given an initial point such that . Assume that there exists such that and .
Under assumptions in Definition 4.2, given any , we can find with such that
2 Algorithm structure and CentralPathMaintenance
Our algorithm is a robust Interior Point Method (robust IPM). Details of the robust IPM will be given in Section A.
and explicitly maintain such that they remain close to .
This task is handled by the CentralPathMaintenance data structure, which is the main data structure. The robust IPM algorithm (Algorithm 19,20) directly calls it in every iteration. This data structure is a generalization of CentralPathMaintenance data structure in [DLY21].
The CentralPathMaintenance data structure (Algorithm 2) has two main sub data structures, ExactDS (Algorithm 4 and Algorithm 5) and ApproxDS. ExactDS is used to to maintain , and ApproxDS is used to monitor changes in , and update when necessary.
MultiplyAndMove: (See Lemma 4.38) It implicitly maintains
Assuming the function is called at most times and is monotonically decreasing from to , the total running time is
Correctness and running time analysis of CentralPathMaintenance is deferred to Section 4.5 and Section 4.6, after we establish properties of the sub data structures.
3 Block Elimination Tree and Computation-Related Lemmas
Our algorithm is based on efficient computations involving Cholesky factorization and the block elimination tree. In this section we introduce the block elimination tree and prove a few useful lemmas on running time of relevant computations. They will be used repeatedly in the running time analysis of our algorithm.
Under the setting of Program 9, we always take to be the LP dual graph, and to be .
The following lemma is the block verion of Lemma 3.9.
We define another tree with block pattern . For every vertex in , we replace it with a path (of an arbitrary ordering of elements in ). For all edges in , we connect top element of the child and the bottom element of the parent.
In this way, satisfies the property that for any path with for all , then there exists such that is an ancestor of both and . By Lemma 3.9, is a valid elimination tree. This implies that is a valid block elimination tree. ∎
As in Definition 4.2, we assume that we are given a block elimination tree with (block) depth . We can without loss of generality assume that the blocks are labeled in postorder, i.e., for any and , we have .
Given a block elimination tree, we can efficiently perform many computations related to the Cholesky decomposition, as shown in the following lemma.
Assume that we are given a block elimination tree with block structure and block depth . Assume that we are given the Cholesky factorization together with inverses of the diagonal blocks of , i.e., for all .
Then we have the following running time for matrix-vector multiplications.
Statements about and follow from the Transposition principle [Bor57].
If is supported on a single block , then computing takes time by block column sparsity of . So computing for general takes time.
Consider Algorithm 3. By block column sparsity pattern of , for every block with , it takes time to compute and update . So overall running time is .
. So the result follows from combining (i)(vii)(v).
Assume that we are given a block elimination tree with block structure and block depth . Assume that we are given the Cholesky factorization together with inverses of the diagonal blocks of , i.e., for all .
Then we have the following running time for matrix-vector multiplications, when we only need result for a subset of coordinates.
We have . By column sparsity pattern of , is supported on . So depends only on . So we only need to compute , which takes time By Lemma 4.7(i).
We state a generic bound on (recall Definition 7.1).
Computing each takes time by Lemma 4.7(iv). So computing of them takes time. ∎
4 Data structures being used in CentralPathMaintenance
In Section 4.4, we present several data structures that are being used in central path maintenance, including:
ExactDS (Section 4.4.1). This data structure implicitly maintains the primal-dual solution pair . This data structure is directly used by CentralPathMaintenance.
ApproxDS (Section 4.4.2). This data structure explicitly maintains the approximate primal-dual solution pair . This data structure is directly used by CentralPathMaintenance.
BatchSketch (Section 4.4.3). This data structure maintains a sketch of and , using BlockVectorSketch and BlockBalancedSketch. This data structure is used by ApproxDS.
BlockVectorSketch(Section 4.4.4). This data structure maintains a sketch of a vector (with block pattern) under single-point updates. This data structured is used by BatchSketch.
BlockBalancedSketch(Section 4.4.5). This data structure maintains a sketch of a vector of form , under updates of . This data structure is used by BatchSketch.
In this section, we present our ExactDS (Algorithm 4 and Algorithm 5). In Theorem 4.11, we provide our theoretical statement for Algorithm 4 and Algorithm 5. This is a block-based generalization of MultiscaleRepresentation data structure of [DLY21].
We can write the central path update using multiscale representation
The data structure supports the following functions:
time, with initial value of the primal-dual pair , its initial approximation , and initial approximate timestamp .
time, and output the changes in variables .
Furthermore, changes in blocks, and changes in blocks.
Query: Output in time. This function is used by ApproxDS.
Query: Output in time. This function is used by ApproxDS.
By combining Lemma 4.12, 4.13, 4.15, 4.16. ∎
ExactDS correctly maintains an implicit representation of , i.e., invariant
Initialize: Initialization satisfies the invariant because , , , . Furthermore, we correctly initialize , , , , , .
Move: By inspecting terms with coefficient , we see that we move in the correct direction and step size.
Update: We would like to prove that Update does not change the value of . First note that and , , are update correctly. The remaining updates are separated into two steps: Update and Update.
So and are updated correctly. Furthermore, immediately after Algorithm 5, Line 24, we have
So is updated correctly, i.e., after Update finishes, we have
Immediately after Algorithm 5, Line 24, we have
So is updated correctly, i.e., after Update finishes, we have
So is updated correctly, i.e., after Update finishes, we have
Immediately after Algorithm 5, Line 33, we have
So is updated correctly, i.e., after Update finishes, we have
Computing takes time. Computing takes time.
ExactDS.Move (Algorithm 4) runs in time.
All steps in this procedure can be done in time. ∎
Each call of ExactDS.Update (Algorithm 5) runs in
time. Furthermore, changes in blocks, and changes in blocks.
It remains to analyze two parts Update and Update. We will analyze these two parts separately in the next a few paragraphs.
time by Lemma 4.8(i). Also, is supported on paths in the block elimination tree, thus blocks, or dimension.
We compute and from left to right. This takes
Computing and takes
To compute and , we first compute , where is the row support of , which can be decomposed into at most paths. This takes
time by Lemma 4.8(i). So computing and takes
Combining everything finishes the proof of running time.
For the claim on output sparsity, note that change in paths, and that change only in the support of and support of . ∎
Correctness is by Lemma 4.12. By Lemma 4.7(viii). ∎
ExactDS.Query (Algorithm 4) and ExactDS.Query (Algorithm 4) runs in time and returns the correct answer.
Correctness is obvious. Running time follows from Lemma 4.8(ii). ∎
4.2 ApproxDS
In this section we introduce ApproxDS, data structure for maintaining a sparsely-changing approximation of .
Furthermore, total time cost over all queries is at most
The proof for is similar and omitted.
Initialize: By Initialize part of Theorem 4.21.
Then the running time bound for Query follows from Query part of Theorem 4.11 and Query part of Theorem 4.21.
The proof for is similar and omitted. ∎
4.3 BatchSketch
In this section we introduce BatchSketch, our data structure for maintaining a sketch of and .
For this task, we need another tree structure on the set of variable blocks.
If is a leaf node of , then
For any node of , the set \{\chi(c):\text{cv}\} forms a partition of .
The partition tree does not need to (but can) have any relationship with the block elimination tree. The partition tree will need to satisfy maximum degree and depth. We will choose the partition tree in Section 4.4.5 so that the BlockBalancedSketch data structure can be efficiently maintained.
Data structure BatchSketch (Algorithm 8, 9) supports the following operations:
For every query, with probability at least , the return values are correct, and costs at most
For every query, with probability at least , the return values are correct, and costs at most
Correctness: Correctness of Update follows from combining Lemma 4.23 and Lemma 4.29. In the following we focus on correctness of queries.
Proof of correctness of Query is similar and omitted.
Initialize: Follows from Lemma 4.23 and Lemma 4.30.
Update: Follows from Lemma 4.23 and Lemma 4.31.
Then the result follows from Lemma 4.23 and Lemma 4.35.
Query: Proof is similar to Query and is omitted. ∎
4.4 BlockVectorSketch
In this section we present BlockVectorSketch (Algorithm 10), data structure for maintaining a vector with block structure under sparse changes. This is generalization of VectorSketch in [DLY21].
Query: Outputs in time.
Note that in Theorem 4.23, the running time does not depend on depth of the partition tree.
Correctness follows from from guarantees of segment trees.
Update: For every modified coordinate, it takes time to update . So total time cost is .
Query: Takes time because of segment tree query time.
4.5 BlockBalancedSketch
Initialize: Initializes the data structure in
Query: Outputs in time.
The algorithm is a block version of [DLY21, Section 6.6.1]. We nevertheless present a full proof for completeness.
Let us first describe the main idea of the algorithm. Note that in BlockBalancedSketch, we have the freedom of choosing the partition tree . Then this tree is used by BatchSketch and BlockVectorSketch. Therefore we can choose a partition tree which works well for our purpose.
Let us consider the operations BlockBalancedSketch needs to support. It needs to support updating and , and answering queries on a subtree . Change of one block in leads to change of one path in the block elimination tree , and change of one block in leads to change of one subtree in . Therefore we essentially would like a data structure which supports subtree and path updates and subtree queries. With this in mind, it is natural to use heavy-light decomposition [ST81].
Given a rooted tree with vertices, we can construct in time an ordering of the vertices such that (1) every path in can be decomposed into contiguous subseqeuences under , and (2) every subtree in is a single contiguous subsequence under .
We fix an ordering of using the heavy-light decomposition (Lemma 4.25). We construct complete binary tree with leaves and ordering .
To get a partition tree, we need to add leaves to . For every coordinate , let be any vertex in such that the support of is contained in . (Recall that for a block elimination tree, support of is contained in a path for any .) For any , we construct a complete binary tree with leaves and hang this tree under leaf in . This finishes the construction of a partition tree .
The following definitions come from [DLY21].
We make the following definitions. For , define
where is the set of leaves in which are descendants of .
For , define be the lowest vertex such that . In other words, is the lowest vertex such that contains (set of descendants of in ). Therefore is well-defined.
For any , is contained in the union of two paths in . In particular, .
The order in Lemma 4.25 is a pre-order traversal of . Let be the last vertex before under , and be the first vertex after under . Then is contained in . ∎
BlockBalancedSketch correctly maintains a sketch of , and all query results are returned correctly.
We prove that the following invariant always holds after every call to BlockBalancedSketch.
Initialize: The invariants are clearly satisfied after initialization.
Query: If then we compute directly and the result is correct.
Now assume . We update , and update and accordingly. We have Note that
because Invariant (13) and column sparsity of . So
So Invariant (11) is satisfied. Updating ensures that Invariant (12) is satisfied. Finally, the return value is correct because of definition of and .
Update: We divide the proof into several steps. Correctness of Update follows from correctness of Update and Update (which we will prove below).
Correctness of Update: We update , and for . In other words, is the set of all vertices with . For any , is not changed. So Invariant (13) is preserved for .
Fix . In Algorithm 13, Line 5, we update to . In Algorithm 13, Line 6, we update to . By a similar computation as the one we did for Query, is updated correctly (i.e., Invariant (11) is preserved). This implies is updated correctly (i.e., Invariant (12) is preserved).
Correctness of Update: We update , , for all (where ). Invariant (13) is preserved because does not change. Invariant (10), (11), (12) are preserved by our choice of , , .
Correctness of Algorithm 12, Line 6 to Line 11: This part is “Update”. For with , we update for such that . Recall that contains all vertices such that . So Invariant (12) is satisfied. ∎
BlockBalancedSketch.Initialize (Algorithm 11) costs
Computing takes time. Computing , takes time. Computing takes time.
Computation of : To compute , we first compute for all leaves . This takes time by assumption (Definition 4.2). Then we sum from bottom to up to compute for all . Because height of the partition tree is , every non-zero entry in the leaves gets propagated times. So computing takes time in total.
Summing everything up we get the desired running time. ∎
BlockBalancedSketch.Update (Algorithm 12) costs
For each with and each , it takes time to update . So the total time needed to update is . ∎
BlockBalancedSketch.Update (Algorithm 12) costs
BlockBalancedSketch.Update (Algorithm 13) costs time.
By Lemma 4.28, we have . So we can compute in time by Lemma 4.7(ii). Then computing takes time. Finally, computing takes time by Lemma 4.7(iv). Analysis for is the same.
Computing takes time by sparsity pattern of .
Summing everything up we get the desired running time. ∎
BlockBalancedSketch.Query (Algorithm 11) takes time.
If , then (each row of) is supported on a path. So computing takes time by Lemma 4.7(iv).
Now suppose . By Lemma 4.28, we have . So we can compute in time by Lemma 4.7(ii). Then computing takes time. Furthermore, has columns supported on two paths. Therefore, computing takes time by Lemma 4.7(iv). So the total time needed to compute is .
Computing takes time by sparsity pattern of . Computing takes time because .
Summing everything up we get the desired running time. ∎
Combining everything we finish the proof of Lemma 4.24.
Combining Lemma 4.29, Lemma 4.30, Lemma 4.31, Lemma 4.35. ∎
5 Analysis of CentralPathMaintenance
The goal of this section is to prove Theorem 4.4.
We first prove correctness of CentralPathMaintenance.
We correctly maintain a multiscale representation of because of correctness of (Lemma 4.12).
where the second step follows from definition of , the third step follows from Lemma A.4, and the last step follows from our choice of .
We set , so
where the first step follows from definition of , the second step follows from definition of , the third step follows from (14).
Now we prove running time claims in Theorem 4.4.
Total running time of MultiplyAndMove (Algorithm 2) is
The choice of parameters under modification of is summarized in Table 4.
By Theorem 4.11 and Theorem 4.18, in a sequence of update/queries,
the total cost for query is .
We restart the data structure whenever or , so there are
restarts in total. By Theorem 4.11, Theorem 4.18, time cost per restart is
The third step is by taking , , . The fourth step is by taking
Note that because the initialization time is bounded above by time for running updates, we always have
Therefore and (4.5) is a valid choice for . ∎
The proof directly follows from Theorem 4.11. ∎
6 Proofs of Main Result
In this section we combine everything and prove Theorem 4.4 and Theorem 4.3.
Using Lemma 4.36, we finish the correctness part.
Using Lemma 4.37, we prove the running time for initialization,
Using Lemma 4.38, we prove the running time for multiply and move,
where we use Theorem 4.4 and Theorem A.1 (by setting ).
Our First Result
In Section 5.1, we present the main result of this section, Theorem 5.2.
In Section 5.2, we reduce our SDP to a form which can be handled by Theorem 4.3.
In Section 5.3, we state and prove parameters needed to apply Theorem 4.3.
In Section 5.4, we plug in all parameters and finish proof of Theorem 5.2.
In Section 5.5, we discuss how to deal with inequality constraints.
We consider semidefinite program of form (1). Let us restate it here for clarity.
We make the following assumptions on program (16).
where hides terms.
Our proof of Theorem 5.2 is in two steps. First we reduce program (16) to form (9), then we apply Theorem 4.3 by plugging in needed parameters.
2 Reduce Low-Treewidth SDP to General Treewidth Program
In this section we reduce program (16) satisfying Definition 5.1 to form (9).
Using Lemma 5.3, we can WLOG assume that has maximum degree .
Given any tree decomposition with bags, we can construct another tree decomposition with at most bags, with the same maximum bag size, and maximum degree at most .
For every vertex with degree , we can replace it with vertices, each of degree , with the corresponding bags equal to . It is easy to verify that this is a valid tree decomposition, and that the total number of bags after this transformation is at most . ∎
By Lemma 5.4, to solve program (16), it suffices to solve the following program with fewer variables:
Now we have reduced program (16) to program (17), which is of form (9). Let us compute the treewidth of program 17.
Let us define a bag decomposition for the LP dual graph. For every , we define a bag containing
all type- constraints with or , and
all type- constraints with .
We connect with if and only if .
Finally, we prove that is a valid tree decomposition of the LP dual graph. For any two constraints sharing a variable , they must both be in . So the first condition in Definition 3.5 is satisfied. The second condition in Definition 3.5 is clearly satisfied. So is a valid tree decomposition. ∎
This enables solving program (17) using Theorem 4.3.
3 Choice of Parameters
In this section we present value of parameters needed to apply Theorem 4.3.
Under the setting of Theorem 5.2, we can choose the following set of parameters.
Bounds on and are direct consequences of (i), (ii).
It remains to prove that the constructed tree is a valid block elimination tree. By properties of a bag decomposition, the condition in Lemma 4.6 is satisfied. So is a valid block elimination tree. ∎
4 Proof of Theorem 5.2
According to Theorem 4.3, there is an algorithm solving SDP in
It remains to compute the parameters , , , , , , , , the details can be found in Lemma 5.6.
5 Discussions on Inequality Constraints
In certain problems (e.g., ) there are inequality constraints. In this section we briefly discuss how to deal with inequality constraints.
Therefore, the running time claims of Theorem 5.2 and Theorem 6.1 still hold in the presence of inequality constraints.
Our Second Result, An Improved Version of Our First Result
In Section 6.1, we present the main result of this section, Theorem 6.1.
In Section 6.2, we state and prove parameters needed to apply Theorem 4.3.
In Section 6.3, we develop improved algorithms for Cholesky-related computation.
In Section 6.4, we plug in all parameters and finish proof of Theorem 6.1.
We work under the same setting as Section 5, where we are given program (17) with assumptions in Definition 5.1.
where hides terms.
2 Choice of Parameters
In this section we present value of parameters needed to apply Theorem 4.3.
Under the setting of Theorem 6.1, we can choose the following set of parameters.
Bounds on and are direct consequences of (i), (ii).
It remains to prove that the constructed tree is a valid block elimination tree. By properties of a bag decomposition, the condition in Lemma 4.6 is satisfied. So is a valid block elimination tree. ∎
3 Cholesky Decomposition Using Block Structures
In this section we discuss how to utilize the block elimination tree constructed in Lemma 6.3 to compute and update Cholesky decomposition faster.
Correctness: From the algorithm we can see only when . So for , if , then either or . WLOG assume that . If , then Line 5 shows that . If , then Line 7 shows that . So .
Then we prove that the square root in Line 5 always exists. Let . Recall that
where the last step is by property of PSD matrix. So the square root in Line 5 can always be taken.
Finally, let us examine the effect of Line 12. Note that before Line 10, all are PSD matrices. Line 12 makes update , which makes a lower triangular matrix. So in the end is a lower triangular matrix as desired.
Running time: Because the block elimination tree has block depth , there are triples with , . For each such triple, we take time to perform the corresponding computations. So computation before Line 9 takes time. By [DDH07], computing QR decomposition of a matrix of size takes time. So computation starting from Line 10 takes time. Therefore the whole algorithm runs in time. ∎
Work under the setting of Lemma 6.4. In addition, assume that we already computed the Cholesky decomposition . Suppose we perform an update , where support of is contained in the union of block row and block column , for some vertex . Then in time, we can compute such that is the Cholesky factorization of .
Running time: There are tuples such that . For every such tuple, computation time is . So total update time is . ∎
4 Proof of Theorem 6.1
According to Theorem 4.3, there is an algorithm solving SDP in
It remains to compute the parameters , , , , , , , , the details can be found in Lemma 6.2.
Decomposable SDP
In this section we give a more general version of Theorem 6.1, which can handle more general decomposable SDPs. Outline of this section is as follows.
In Section 7.1, we present the main result of this section, Theorem 7.2.
In Section 7.2, we reduce decomposable SDPs to a form which can be handled by Theorem 4.3.
In Section 7.3, we state and prove parameters needed to apply Theorem 4.3.
In Section 7.4, we plug in all parameters and finish proof of Theorem 7.2.
We consider semidefinite programs of form (16). Instead of assumptions in Definition 5.1, we make the following assumptions on the program.
We make the following assumptions on program (16).
Assume that for every constraint , we have a connected (in the given tree decomposition) set of bags, such that the union of these bags contains the support of , i.e.,
Let be the maximum number of constraints a bag correspond to.
where hides terms.
2 Reduce Decomposable SDP to General Treewidth Program
In this section we reduce program (16) satisfying Definition 7.1 to form (9).
Let be the given tree decomposition. Using Lemma 5.3, we can WLOG assume that has maximum degree .
Lemma 7.3 tells us that we can reduce program 16 to the following program.
Under assumptions in Definition 7.1, the optimal value of program (16) is equal to the optimal value of (22).
In this way, we further reduce (22) into the following form.
Program (23) is a form which can be handled by Theorem 4.3. Let us compute the treewidth of program (23).
For every , we define a bag containing
all type- constraints with ,
all type- constraints with .
We connected with if and only if .
Finally, we prove that is a valid tree decomposition of the LP dual graph. Recall that we assume that every is connected in . So the second condition in Definition 3.5 is satisfied. For any two constraints sharing a variable , they must both be in . So the first condition in Definition 3.5 is satisfied. Therefore is a valid tree decomposition. ∎
3 Choice of Parameters
In this section we present value of parameters needed to apply Theorem 4.3.
Under the setting of Theorem 7.2, we can choose the following set of parameters.
Bounds on and are direct consequences of (i), (ii).
4 Proof of Theorem 7.2
It remains to compute the parameters , , , , , , , , the details can be found in Lemma 6.2.
Improving Running Time for Linear Programming
In this section, we discuss our result for linear programming,
In Section 8.1, we present the main result in this Section, Theorem 8.2.
In Section 8.2, we state and prove parameters needed to apply Theorem 4.3.
In Section 8.3, we develop improved algorithms for Cholesky-related computation.
In Section 8.4, we plug in all parameters and finish proof of Theorem 8.2.
We consider linear program of form (3). Let us restate it here for clarity.
We make the following assumptions on program (26).
Assume that we are given a tree decomposition (Definition 3.5) of the LP dual graph (Definition 1.6) with maximum bag size .
2 Choice of Parameters
Under the setting of Theorem 8.2, we can choose the following set of parameters.
We let every variable block contain a single element.
Because is of full rank, . We let every constraint block contain a single element.
The LP dual graph for program 9 and 26 are the same graphs.
We use the log barrier .
Bounds on and are direct consequences of (i), (ii).
Computing a single Hessian takes time.
Follows from Lemma 8.6. There is one caveat: in the statement of Lemma 8.6, we use a block elimination tree constructed using Lemma 6.3. For definition of , we use block elimination tree constructed using Lemma 5.7. However by examining both algorithms, we see that every path in is contained in a path in , and vice versa. So Lemma 8.6 can be applied here.
3 Improvement for Cholesky-Related Computation
In this section we prove Lemma 8.4 and Lemma 8.6.
In Lemma 8.3 we choose constraint block structure for the purpose of smaller updating time (e.g., ). Nevertheless, we can utilize another block structure to achieve faster initialization (e.g., , ).
Using Lemma 6.3, we can construct a block elmination tree with constant maximum degree, maximum depth and maximum bag size . However, this block elimination tree could potentially have vertices. So we use Lemma 8.5 to compute a new block elimination tree with number of blocks . Finally, we use Lemma 6.4 to compute Cholesky factorization using , which takes time. ∎
Given a block elimination tree with maximum degree , maximum depth , maximum block size , and total block size , we can construct a block elimination tree with maximum degree , maximum depth , maximum block size , and blocks in total (i.e., ).
We perform a bottom up process to construct the new tree .
For each node from bottom to up, if any of its children is in a block of size smaller than , then we combine their blocks with (if there are multiple such children, then all of their blocks are merged).
In this way every block (except possibly the root block) has size at least . Because has maximum degree, every new block has size. So the number of blocks in is .
Because preserves all ancestor-descendant relationships in , condition in Lemma 3.9 is satisfied by . So is still a block elimination tree.
The only remaining problem is that could have nodes with large degree. For every node with number of children larger than , we replace this node with a perfect binary tree with leaves, where the root node is , and all other nodes are empty. Then we link ’s original children to leaves of the perfect binary tree.
The number of added nodes is at most . So this final tree satisfies all requirements. ∎
Under the setting of Lemma 8.4, there is an algorithm to compute for all , where is supported on a single path in , in time.
By our construction in proof of Theorem 8.4, every block in is the union of several blocks in . For , let be the block it belongs to in . Note that preserves all ancestor-descendant relationships in . So for every , we have
So every path in is contained in a path in .
Therefore, we only need to solve the following problem: Compute for , where every is supported on a single path in . Because has maximum depth , we can assume that every is supported on a single block in (with an factor loss in running time). Then the desired result follows from combining Lemma 8.7 and Lemma 8.8 on and . ∎
Then is also a lower-triangular matrix compatible with , and we can compute in time.
Run Algorithm 18. Correctness is obvious. Let us focus on running time.
By induction, we can see that only when . So we perform matrix multiplications for every tuple with , . Because maximum depth is , number of such triples is . So total running time is ∎
where in the last step we use that and . ∎
4 Proof of Theorem 8.2
According to Theorem 4.3, there is an algorithm solving LP in
It remains to compute the parameters , , , , , , , , the details can be found in Lemma 8.3.
where the second step follows Lemma 8.3(i) (), and the third step follows from Lemma 8.3(xi) (), the forth step follows from Lemma 8.3(viii) (), the fifth step follows from Lemma 8.3(iv) ( and ), and the last step follows from merging the terms.
where the first step follows from Lemma 8.3(iv) (), the second step follows from (see Eq. (8.4)) and (see Eq. (8.4)).
References
Appendix
Appendix A Robust IPM Analysis
The goal of this section is to present some existing tools which give us a bound on the number of iterations of IPM. To really improve the total running time, we still need to improve the cost per iteration which is a major contribution of our work. Those discussions can be found in Section 4.
Let us begin with a roadmap for this section. In Section A.1, we present the main convergence statement. In Section A.2, we explain the the choice of step and present a useful lemma.
We consider program of form (9). The following theorem gives a bound on the number of iterations of a robust IPM algorithm.
Inner radius : There exists a such that and .
Lipschitz constant : .
The above Theorem A.1 provides the iteration bound for Algorithm 19. The overall running time largely depends on cost per iteration, which is decided by the implementation of CentralPathMaintenance. The high level framework of Algorithm 19 and 20 are the same as [DLY21], but the reduction to form (9) and the implementations of CentralPathMaintenance are different.
A.2 Definitions and Useful Lemmas
For each block , we define
For the whole domain , we define
Instead of following the path exactly, we follow the path
where is close to under . The norm of is controlled using the following potential function.
For , define error at -th variable block as
Define . Define the soft-max function as
for some . Finally, the potential function is the soft-max of norm of the error at each variable block
Since our goal is to decrease , a natural choice is the steepest descent direction ([DLY21, Section A.4]):
Using to denote and solve the above equations, we get
This is the ideal IPM step. In robust IPM, we compute the steps using , a sparsely changing approximation of , giving
We state a useful lemma for bounding the step size.
The steps and satisfy