Solving Tall Dense Linear Programs in Nearly Linear Time
Jan van den Brand, Yin Tat Lee, Aaron Sidford, Zhao Song
Introduction
is one of the most fundamental and well-studied problems in computer science and optimization. Developing faster algorithms for (1.1) has been the subject of decades of extensive research and the pursuit of faster linear programming methods has lead to numerous algorithmic advances and the advent of fundamental optimization techniques, e.g. simplex methods [Dan51], ellipsoid methods [Kha80], and interior-point methods (IPMs) [Kar84].
With this IPM in hand, the problem of achieving our desired running time reduces to implementing this IPM efficiently. This problem is that of maintaining multiplicative approximations to vectors (the current iterates), leverage scores (a measure of importance of the rows under local rescaling), and the inverse of matrix (the system one needs to solve to take a step of the IPM) under small perturbations. While variants of vector maintenance have been considered recently [CLS19, LSZ19, Bra20] and inverse maintenance is well-studied historically [Kar84, NN89, Vai89a, NN91, LS14, LS15, CLS19, LSZ19, LS19, Bra20], none of these methods can be immediately applied in our setting where we cannot afford to pay too much in terms of each iteration.
Our second contribution is to show that these data-structure problems can be solved efficiently. A key technique we use to overcome these issues is heavy-hitters sketching. We show that it is possible to apply a heavy hitters sketch (in particular [KNPW11, Pag13]) to the iterates of the method such that we can efficiently find changes in the coordinates. This involves carefully sketching groups of updates and dynamically modifying the induced data-structure. These sketches only work against non-adaptive adversaries, and therefore care is need to ensure that the sketch is used only to save time and not affect the progression of the overall IPM in a way that break this non-adaptive assumption. To achieve this we use the sketches to propose short-lists of possible changes which we then filter to ensure that the output of the datastructure is deterministic (up to a low probability failure event). Coupling this technique with known Johnson-Lindestrauss sketches yields our leverage score maintenance data structure and adapting and simplifying previous inverse maintenance techniques yields our inverse maintenance data structure. We believe this technique of sketching the central path is powerful and may find further applications.
See [Ren88, LS14] on the discussion on converting such an approximate solution to an exact solution. For integral , it suffices to pick to get an exact solution where is the bit complexity and is the largest absolute value of the determinant of a square sub-matrix of . For many combinatorial problems .
2 Previous Work
Linear programming has been the subject of extensive research for decades and it is impossible to completely cover to this impressive line of work in this short introduction. Here we cover results particularly relevant to our approach. For more detailed coverage of prior-work see, e.g. [NN94, Ye11].
IPMs: The first proof of a polynomial time IPM was due to Karmarkar in [Kar84]. After multiple running time improvements [Kar84, NN89, Vai89a, NN91] the current fastest IPMs are the aforementioned results of [LS19] and [CLS19]. Beyond these results, excitingly the work of [CLS19] was recently extended to obtain comparable running time improvements for solving arbitrary empirical risk minimization problems (ERM) [LSZ19] and was recently simplified and de-randomized by van den Brand [Bra20]. These works consider variants of the vector maintenance problem and our work is inspired in part by them. Our IPM leverages the barrier from [LS19] in a new way, that enables the application of robustness techniques from [LS19, CLS19, Bra20] and new techniques for handling approximately feasible points.
Leverage Scores and Lewis Weights: Leverage scores [SS11, Mah11, LMP13, CLM+15] (and more broadly Lewis weights [Lew78, BLM89, CP15, LS19]) are fundamental notions of importance of rows of a matrix with numerous applications. In this paper we introduce a natural online problem for maintaining multiplicative approximations to leverage scores and we show how to solve this problem efficiently. Though we are unaware of this problem being studied previously, we know that in the special case of leverage scores induced by graph problems, which are known as effective resistances, there are dynamic algorithms for maintaining them, e.g [DGGP19]. However, these algorithms seem tailored to graph structure and it is unclear how to apply them in our setting. Further, there are streaming algorithms for variants of this problem [AGM13, KLM+17, KNST20], however their running time is too large for our purposes.
Overview of Approach
We first give a quick introduction to primal-dual path IPMs, review the central path from [LS19] and from it derive the central path that our method is based on, and explain our new IPM.
The Lewis Weight Barrier and Beyond
where . In the special case when ,
is known as the leverage scores of the rows of and is a fundamental object for dimension reduction and solving linear systems [SS11, Mah11, LMP13, NW14, Woo14, CLM+15, SWZ19].
Formally, in this paper we consider the following regularized-variant of this centrality measure:
Our Robust Primal-Dual Method:
The main guarantees of this new IPM are given by Theorem 5 (Section 4.1) and proven in Section 5 and Section B. This theorem formalizes the above discussion and quantifies how much the iterates, leverage scores, and Hessian can change in each iteration. These bounds are key to obtaining an efficient method that can maintain multiplicative approximations to these quantities.
2 Heavy Hitters, Congestion Detection, and Sketching the Central Path
We treat each of these problems as a self contained data-structure problem, the first we call the vector maintenance problem, the second we call the leverage score maintenance problem, and the third has been previously studied (albeit different variants) and is called the inverse maintenance problem. For each problem we build efficient solutions by combining techniques form the sketching literature (e.g. heavy hitters sketches and Johnson-Lindenstrauss sketches) and careful potential functions and tools for dealing with sparse and low rank approximations. (Further work is also needed to maintain the gradient of a potential used to measure proximity to the central path (Section D) and this is discussed in the appendix.)
In the remainder of this overview, we briefly survey how we solve each of these problems. A common issue that needs to addressed in solving each problem is that of hiding randomness and dealing with adversarial input. Each data-structure uses sampling and sketching techniques to improve running times. While these techniques are powerful and succeed with high probability, they only work against an oblivious adversary, i.e. one which provides input that does not depend on the randomness of the data structure. However, the output of our data-structures are used to take steps along the central path and provide the next input, so care needs to be taken to argue that the output of the data structure, as used by the method, doesn’t somehow leak information about the randomness of the sketches and samples into the next input. A key contribution of our work is showing how to overcome this issue in each case.
So far we only explained how we can detect large changes in that occur within a single iteration. However, it could be that some entry changes slowly over several iterations. It is easy to extend our heavy hitter technique to also detect these slower changes. The idea is that we not just detect changes within one iteration (i.e. ) but also changes within any power of two (i.e. for ). To make sure that this does not become too slow, we only check every iterations if there was a large change within the past iterations. One can prove that this is enough to also detect slowly changing entries.
Leverage Score Maintenance:
Inverse Maintenance:
Fortunately, we note that we do not need a sparsifier that satisfies both conditions at all time. Therefore, our final data structure has two ways to output the inverse of the sparsifier. The sparsifier that works only against oblivious adversary is used in implementing the Newton steps and the sparsifier that is slowly changing is used to compute the sketch used in the leverage score maintenance problem mentioned above.
Preliminaries
Here we discuss varied notation we use throughout the paper. We adopt similar notation to [LS14] and some of the explanations here are copied directly form this work.
Approximations: We use to denote that and to denote that .
Linear Programming Algorithm
The proof for Theorem 1 uses four intermediate results, which we formally state in the next Sections 4.1, to 4.4. Each of these intermediate results is self-contained and analyzed in its own section, Sections 5 to 8 correspondingly. In this section we show how these results can be combined to obtain Theorem 1. The first result is a new, improved IPM as outlined in Section 2.1. The exact statement is given in Section 4.1 and its analysis can be found in Section 5 and Section B. Here we give a rough summary to motivate the other three results used by our linear programming algorithm.
(ii) In Section 4.3 we present a data-structure that can main approximate leverage scores, required by the IPM. Its correctness is proven in Section 7.
With this we have all tools available for proving the main result Theorem 1. In Section 4.5 we show how to combine all these tools to obtain the fast linear programming algorithm.
Furthermore, throughout Algorithm 1, we have
for some where is immediate points in the algorithms
Note that the complexity of Theorem 5 depends on the cost of implementing Lines 1, 1, 1, and 1 of Algorithm 1, as well as the cost of Algorithm 10. Here Lines 1, 1 and 1 ask us to maintain an approximation of the primal dual solution pair . A data-structure for this task is presented in Section 4.2. Additionally, to compute Lines 1 and 1, we must have access to an approximate inverse of (see Line 1). The task of maintaining this inverse will be performed by the data-structure presented in Section 4.4. At last, consider Line 1. To implement this line, we must have an approximation of the leverage scores . In Section 4.3, we present a data-structure that can efficiently maintain such an approximation.
To help us analyze the cost of Algorithm 10, we prove the following in Section B.
2 Vector Data Structure
To maintain an approximation of , we can then use the data-structure for maintaining an approximation of by choosing
Likewise, we can maintain an approximation of by a slightly different choice of parameters. The exact result, which we prove in Section 6, is the following Theorem 8:
There exists a Monte-Carlo data-structure (Algorithm 6), that works against an adaptive adversary, with the following procedures:
3 Leverage Score Maintenance
The IPM of Theorem 5, requires approximate leverage scores of some matrix of the form , where is a diagonal matrix (see Line 1 of Algorithm 1, where ) . Here the matrix changes slowly from one iteration of the IPM to the next one, which allows us to create a data-structure that can maintain the scores more efficiently than recomputing them from scratch every time changes. In Section 7 we prove the following result for maintaining leverage scores:
There exists a Monte-Carlo data-structure (Algorithm 7), that works against an adaptive adversary, with the following procedures:
where is the time required to multiply a vector with (i.e. in case it is given implicitly via a data structure).
4 Inverse Maintenance
The amortized time per call of Update is .
The time per call of Solve is .
Theorem 10 holds even if the input and of the algorithm depends on the output of Solve. Furthermore, we have
5 Linear Programming Algorithm
Moving along these two paths of the first and second phase is performed via the IPM of Algorithm 1 (Section 4.1, Theorem 5). Note that Algorithm 1 does not specify in Line 1 how to obtain the approximate solution pair , so we must implement this step on our own. Likewise, we must specify how to efficiently compute the steps in Lines 1 and 1. These implementations can be found in the second part of Algorithm 2. The high-level idea is to use the data-structures presented in Section 4.2 to 4.4.
To illustrate, consider Line 1 of Algorithm 1, which computes
for and for . We split this task into three parts: (i) compute , (ii) compute , and (iii) compute . Part (i), the vector , can be maintained efficiently, because we maintain the approximate solutions , (thus also ) and vector , (by Algorithm 12, Theorem 59, of Section D) in such a way, that per iteration only few entries change on average. Part (ii) is solved by the inverse maintenance data-structure of Section 4.4 (Theorem 10). The last part (iii) is solved implicitly by the data-structure of Section 4.2 (Theorem 8), which is also used to obtain the approximate solutions in Line 1 of Algorithm 1. We additionally run the data-structure of Section 4.3 (Theorem 9) in parallel, to maintain an approximation of the leverage scores, which allows us to find the approximation required in Line 1. These modifications to Algorithm 1 are given in the second part of Algorithm 2.
The following theorem shows how to reduce solving any bounded linear program to solving a linear program with a non-degenerate constrain matrix and an explicit initial primal and dual interior point. This theorem is proven in Appendix C.
Consider linear program with variables and constraints. Assume that 1. Diameter of the polytope : For any with , we have that . 2. Lipschitz constant of the linear program : . 3. The constraint matrix is non-degenerate.
For any , the modified linear program with
As outlined before, the initial points given in Theorem 12 do not satisfy
Similarly, we have . Taking power of both sides, we have
Hence, .
Consequently, let and consider the algorithm . Since we have that
Now, we first prove the correctness of the Algorithm 2.
Algorithm 2 outputs such that w.h.p. in
We define the primal dual point via the formula of lines 1 and 1. We start by showing that our implementation of Algorithm 1 in Algorithm 2 satisfies all required conditions, i.e. that we can apply Theorem 5. Throughout this proof, states hold only w.h.p. and therefore the restatement of this is often omitted for brevity.
We first show that throughout Centering, we have the invariant above, assuming the input parameter satisfied . Theorem 8 shows that and (Line 3 and 3). Then, by the update rule (Line 3 and 3), we have that and . Hence, we have the desired approximation for and .
(Line 2) and
(Line 2 and Line 3). Again, by update rule (Line 3), we have the desired approximation for .
Invariant: xs≈μ⋅τ(x,s)xs\approx\mu\cdot\tau(x,s):
Initially, due to the reduction (Lemma 12), and (Line 2). Hence, initially.
First, we bound the denominator. We have that , so for all we have
where we used by Lemma 12 as we ensure is sufficiently close to feasible for the modified linear program by Theorem 5. For the numerator, we note that for the modified linear program and for the computed by Theorem 13 in Line 2.again by the definition of (Line 2) and the modified and . Hence, we have that
for any constant by choosing the constant in the in Line 2 appropriately. Thus and , so when we call Centering in Line 2, we again obtain .
Conclusion:
Before the algorithm ends, we have . In Line 2, we reduce to some small enough . By Corollary 56 this does not move the vector too much, i.e. we still have . Hence, by the choice of the new in Line 2, Lemma 12 shows that we can output a point with the desired properties. ∎ Finally, we analyze the cost of the Algorithm 2.
Algorithm 2 takes time with high probability in .
Number of iterations:
Cost of DInverseD_{\textsc{Inverse}}:
Cost of DLeverageD_{\textsc{Leverage}}:
By Lemma 11, the total movement of the projection matrix is
where is the number of steps and . Then, Theorem 9 shows that the total cost is .
Cost of DMatVec(x)D_{\textsc{MatVec}}^{(x)} and DMatVec(s)D_{\textsc{MatVec}}^{(s)}:
Cost of maintaining 𝐀⊤𝐗¯h\mathbf{A}^{\top}\overline{\mathbf{X}}h (DGradientD_{\text{Gradient}}):
Cost of implementing MaintainFeasibility (Algorithm 10):
Removing the extra log(1/δ)\log(1/\delta) term:
We note that all the extra ) terms are due to running the data structures for steps. However, we can we reinitialize the data structures every iterations. This decreases the dependence from to .
Independence and Adaptive Adversaries:
Randomized data-structures often can not handle inputs that depend on outputs of the previous iteration. For example Theorem 10 is such a case, where the input to Update is not allowed to depend on the output of any previous calls to Update. In our Algorithm 2 the input to the data-structures inherently depends on their previous output, so here we want to verify that this does not cause any issues.
Robust Primal Dual LS-Path Following
Similar to previous papers [CLS19, LSZ19, Bra20] our algorithms measure progress or the quality of this approximation by
To update our points and improve the potential we consider attempting to move in some direction suggested by . To do so we solve for satisfying the following
where . Solving this system of equations, we have
Note that, since we use and (rather than a true orthogonal projection) it is not necessarily the case that . Consequently, we will need to take further steps to control this error and this is analyzed in Section B.
Much of the remaining analysis is bounding the effect of such a step and leveraging this analysis to tune and . In Section 5.1 we bound the change in the point when we take a Newton step, in Section 5.2 we bound the effect of a Newton step on centrality for arbitrary , and in Section 5.3 we analyze the particular structure of and use this to prove Theorem 1.
Next, we relate leverage scores of the projection matrix considered in taking a Newton step to the leverage scores used to measure centrality, i.e. .
For -centered point with we have
By assumption satisfies . Since leverage scores lie between and , this implies . Consequently and since we have that entrywise
The result then follows from the assumption . ∎
Leveraging Lemma 19 we obtain the following bounds on and for Newton directions.
Since , we have and
Since is PSD this implies and since and this implies
Similarly, we have and hence (using that ). Therefore, we have
Further, by Cauchy Schwarz and we have
Since we have
Further, by and Lemma 19 we have that
Combining these and using yields the desired bounds. ∎
Leveraging Lemma 19 we obtain the following bounds on the multiplicative stability of Newton directions.
Note that . Since and the bounds on and follow immediately from Lemma 18 and Lemma 20.
Similarly, . Since and , we have and . The bounds on and follow by triangle inequality and the same derivation as for and . ∎
2 Newton Step Progress
Here we analyze the effect of a Newton step from a centered point on the potential . We show that up to some additive error on in the appropriate mixed norm the potential decreases by . The main result of this section is the following.
where is the derivative of at for all .
We prove this theorem in multiple steps. First, in Lemma 23 we directly compute the change in the potential function by chain rule and mean value theorem. Then, in Lemma 24 and Lemma 25 we bound the terms in this change of potential formula and use this to provide a formula for the approximate the change in the potential in Lemma 26. Finally, in Lemma 26 we bound this approximate change and use this to prove Theorem 22.
In the setting of Theorem 22 for all let and . Then for some , we have that
By the mean value theorem, there is such that
and Lemma 45 combined with chain rule implies that
The result then follows by the definition of and . ∎
On the other hand, we know that by Lemma 44 and that . Consequently, and Lemma 18 yields
Since for all we have and as combining (5.1) and (5.2) yields that for all it is the case that
Next, since by assumptions and we have that and therefore the above implies
In the setting of Lemma 23 there is a matrix with such that
By Lemma 25, , , and . By definition of an -Newton direction this further implies that and . Further, this implies that and since by definition of -centered this implies that . Consequently, Fact 18, Lemma 46, and implies
Further, by Lemma 25 with and by Lemma 24 with . Combining these facts and applying Lemma 18 we have that there are and with and with
In the setting of Lemma 26 we have .
Lemma 26 implies that for
Further, Lemma 24 and implies that and therefore
We now have everything we need to prove the main theorem.
where by Lemma 26 and Lemma 26 we know that for some matrix with it holds that . Hence, we have where
Lemma 21 implies that , , and . Consequently, and . The definition of -centered implies that and therefore . The bound on follows from (5.5) and . ∎
3 Following the Central Path
Here we use the particular structure of to analyze the effect of Newton steps and changing on centrality. First we state the following lemma about the potential function from [LS19]. Then we use it to analyze the effect of centering for one step, Lemma 31, and we conclude the section by proving a simplified variant of Theorem 5.
When is clear from context we also write for .
Here we provide a general lemma bounding how much can increase for a step of bounded size in the mixed norm.
where in the second line we applied (5.8) of Lemma 28 as . ∎
Further, since we have that
Now, the proof of Lemma 24 shows that and that and is -centered shows that and . Combining yields the result. ∎
where we used (5.7), and Theorem 22. Since and , (5.8) implies that
Further and imply that
Using the bounds on and this implies that . Consequently, applying Lemma 29 yields
where in the second line we applied Lemma 28 and . Combining with (5.9) yields
Finally, for any vector , we have \|u\|_{*}\geq\left\langle u,\frac{\alpha\text{\cdotsign}(u)}{40\sqrt{d}}\right\rangle=\frac{\alpha}{40\sqrt{d}}\|u\|_{1} as
and combining yields the desired result. ∎
Furthermore, during the algorithm 1, we have
for some where is immediate points in the algorithms
Initially, we have because of and (5.6) of Lemma 28.
We proceed to show that in each iteration . Note that, by Lemma 28 in any iteration this holds, this implies that . Since this implies that which by the choice of implies that is centered. Further, Lemma 31 and the design of the algorithm then imply that if in this iteration, then
Now recall that and consequently as we have
Consequently, the reasoning in the preceding paragraph implies that in each step is moved closer to by a multiplicative factor. Hence, it takes iterations to arrive . Further, (5.10) shows that it takes iterations to decrease to . Hence, in total, it takes
iterations for the algorithm to terminate. Further, when the algorithm terminates, we have that because , and (5.6).
Finally, the bounds on the movement of , , follow from Lemma 21, the condition , and the choice of . The movement of follows from Lemma 14 in [LS15]. ∎
Vector Maintenance
Here we show how to preprocess any matrix , such that we can build a data structure which supports quickly computing the large entries of the product for changing diagonal .
There exists a Monte-Carlo data-structure (Algorithm 4), that works against an adaptive adversary, with the following procedures:
for in time .
Scale(): Sets in time.
Johnson-Lindenstrauss lemma is a famous result about low-distortion embeddings of points from high-dimensional into low-dimension Eculidean space. It was named after William B. Johnson and Joram Lindenstrauss [JL84]. The most classical matrix that gives the property is random Gaussian matrix, it is known that several other matrices also suffice to show the guarantees, e.g. FastJL[AC06], SparseJL[KN14], Count-Sketch matrix [CCFC02, TZ12], subsampled randomized Hadamard/Fourier transform [LDFU13].
It is worth to mention that JL lemma is tight up to some constant factor, i.e., there exists a set of points of size that needs dimension in order to preserve the distances between all pairs of points [LN17].
Our proof of Lemma 33 is through the analysis of Algorithm 4 which works as follows. The data-structure creates sketching matrices according to Lemma 34, where each is constructed for The data-structure then maintains the matrices , whenever is changed by calling Scale. Whenever is called, the data-structure estimates via a Johnson-Lindenstrass matrix, and then pick the smallest , for which is guaranteed to find all with , i.e. where was initialized for . To make sure that the algorithm works against an adaptive adversary, we compute these entries exactly and output only those entries whose absolute value is at least (as we might also detect a few for which the entry is smaller).
We now give a formal proof, that this data-structure is correct.
Queries:
Now, If then and time is within the time-budget for the query. Hence, the algorithm simply outputs the vector by direct calculations, which takes time.
Otherwise, the algorithm uses Lemma 34 to find a list of indices which contains all such that with probability at least . Since and , the heavy hitters algorithm outputs all such that . Hence, the vector that we output is correct.
To bound the runtime, note that we find the list by first computing in time. Then, we use Lemma 34 to decode the list in time time. Hence, in total, it takes .
Scaling:
When we set , i.e by adding to entry , then the product changes by adding the outer product . This outer product can be computed in time, because each column of has only non-zero entries. Since there are many , the total time is . ∎
2 Maintaining Accumulated Sum
There exists a Monte-Carlo data-structure (Algorithm 5), that works against an adaptive adversary, with the following procedures:
Scale(): Sets in amortized time.
MarkExact(): Marks the -th row to be calculated exactly in the next call to Query in amortized time.
: Let be the vector approximated by the last call to Query.Then returns in amortized time.
Finally, the cost of Query mainly consists of the following: (1) computation of sums in Line 5, (2) the calculation on indices in (i.e. calling ComputeExact), (3) the call of and finally (4) the calls to .
The cost of (1) is bounded by , which we charge as amortized cost to Update. The cost of (2) is bounded by , which we charge to the amortized cost of Scale and MarkExact. The cost of (3) is exactly the runtime we claimed due to Lemma 33 since we zero out some of the rows using scale (Line 5) which causes the term in the complexity.. The cost of (4) is bounded by times the cost of . We charge this cost to the Scale and MarkExact procedure of the current data structure.
We now prove that the output of Query is correct. Let be the output of the algorithm. The algorithm Query consists of two parts. From Line 5 to 5, we calculate on indices in . From Line 5 to 5, we calculate on indices in .
For any , we note that is never changed. Hence, we have
and therefore we can re-write the -th entry of as
By the definition of this is precisely what is computed in Line 5.
3 Vector Maintenance Algorithm and Analysis
We note that this assumption is satisfied for our interior point method. If this assumption is violated, we can detect it easily by Lemma 33 and propagate this change through the data-structure with small amortized cost. However, this would make the data structure have more special cases and make the code more difficult to read.
To analyze this data structure, recall that
and let be the output of the algorithm at iteration . Our goal is to prove that the . We prove this by induction.We assume for all and proceed to prove this is also true for .
for all . (Note that the sum on the left is using for its indices while the error bound on the right uses .)
Correctness of xx:
ComputeExact:
Complexity:
The runtime of initialization and ComputeExact are that of Lemma 36, but increased by an factor, as we run that many instances of these data-structures.
Adaptive Adversaries:
The algorithm works against adaptive adversaries, because the data structures of Lemma 36 work against adaptive adversaries. ∎
Leverage Score Maintenance
The IPM presented in this work requires approximate leverage scores of a matrix of the form , where is a non-negative diagonal matrix that changes slowly from one iteration to the next. Here we provide a data-structure which exploits this stability to maintain the leverage scores of this matrix more efficiently than recomputing them from scratch every time changes. Formally, we provide Algorithm 7 and show it proves the following theorem on maintaining leverage scores:
The high-level idea for obtaining this data-structure is that when changes slowly, the leverage scores of change slowly as well. Thus not too many leverage scores must be recomputed per iteration, when we are interested in some -approximation, as the previously computed values are still a valid approximation. The task of maintaining a valid approximation can thus be split into two parts: (i) for some small set , quickly compute the -th leverage score for , and (ii) detect which leverage scores should be recomputed, i.e. which leverage scores have changed enough so their previously computed value is no longer a valid approximation.
This section is structured according to the two tasks, (i) and (ii). In Section 7.1 we show how to solve (i), i.e. quickly compute a small number of leverage scores. In Section 7.2 we then show how to solve (ii) by showing how to detect which leverage scores have changed significantly and must be recomputed. The last Section 7.3 then combines these two results to prove Theorem 9.
Before we proceed to prove (i) and (ii), we first give a more accurate outline of how the algorithm of Theorem 9 works. An important observation is, that by standard dimension reduction tricks, a large part of Theorem 9 can be obtained by reduction to the vector data-structures of Section 6. Note that the -th leverage score of is
There exists a Monte-Carlo data-structure, that holds against an adaptive adversary, with the following procedures:
where is a - diagonal matrix with if and only if in time
Scale(): Sets in time.
The algorithm is directly obtained from Lemma 33. Let be the input to Query and let be an instance of Lemma 33. We perform for all , so the data-structure represents . We then obtain by setting the -th column of to the result of for . Afterward, we call again, to revert back to the previous scaling. The correctness and the time complexity of this new data-structure follow from Lemma 33. ∎
Now that we have Corollary 37, we can outline how we obtain Theorem 9 from it. Given a matrix , it is easy to compute individual leverage scores (see Section 7.1, Lemma 38). However, such computation requires nearly linear work, which is quite slow for our purposes, and therefore we do not want to recompute every leverage score every time changes a bit. Instead, we use Corollary 37 to detect which scores have changed a lot. This is done in Section 7.2, Lemma 39 and Lemma s40. The idea is that, if and differ substantially, for some , then
should be quite large as well for some JL-matrix , i.e. something we can detect via Corollary 37.
We start our proof of Theorem 9 by showing how to quickly compute a small set of leverage scores. This corresponds to the function EstimateScore in Algorithm 7.
For the other case, at Line 7, we sample row with probability at least (using the assumption on ). Hence, the leverage score sampling guarantee shows that by choosing large enough constant in the factor in the probability. Hence, by the same argument as above, we have the result.
2 Detecting Leverage Scores Change
Now that we know how to quickly compute a small set of leverage scores, we must figure out which scores to compute. We only want to recompute the scores, that have changed substantially within some time-span. More accurately, we want to show that FindIndices (Algorithm 7) does indeed find all indices that changed a lot. The proof is split into two parts: We first show that we can detect large changes that happen within a sequence of updates of length in Lemma 39. We then extend the result to all large leverage score changes in Lemma 40.
Consider an execution of Line 7 (Algorithm 7) at iteration . Suppose and . Then w.h.p. in if
Further, the set remains the same w.h.p. in if we replace Line 7 by .
First, we prove that for any with
we have (see Line 7). To do this, consider any , i.e. is not in and not picked by the function . By Line 7 and Corollary 37, not picked by the function implies that
where the second inequality follows from JL (Lemma 35)and the choice of . By the definition of and that is small enough, we have
and similarly the fact that , we have
Using , we showed that implies (7.2) is false. This proves the claim that for any such that (7.2) holds, we have that .
The previous lemma only showed how to detect leverage scores that changed within some time-span of length , we now show that this is enough to detect all changes, no matter if they happen slowly (over some long time-span) or radically (within one iteration), or something in-between.
Under the assumption of Lemma 38 and Lemma 39 let be the output of FindIndices (Algorithm 7) at -th iteration and
Then, we have that w.h.p. in .
for . Since there are only steps, (7.3) shows that
because has not been updated and that Lemma 38 shows
for the last update. Combining (7.4), (7.5) and (7.6), we see that and hence . This shows that implies . Hence, . ∎
3 Leverage Score Maintenance
We can now combine the previous results Lemma 38, Lemma�39 and Lemma 40 to show that Algorithm 7 yields a proof of Theorem
We prove this statement by induction. At the start of the algorithm the vector is a good enough approximation of the shifted leverage scores because of Lemma 38. We are left with proving that with each call to Query, is updated appropriately.
By the induction, we have that . Furthermore, we know that . Hence, we have . Using , we have that . Hence, the is a good enough approximation and satisfies the assumption of Lemma 38 and hence the assumption of Lemma 40. Lemma 40 shows that finds all indices that is far away from the shifted leverage score. Lemma 38 then shows that those will be correctly updated. Hence, all is at most far away from the target. This finishes the induction. ∎
The correctness for the approximation ratio of Theorem 9 was already proven in Lemma 41. Here we bound the time complexity and prove that the data-structure works against an adaptive adversary.
To bound the complexity, we first bound how many leverage scores the data structure estimate, namely the size of .
Size of all JJ:
where we used Johnson Lindenstrauss lemma 35 at the end. Now, summing up over scales and using that we restart every iterations, we have
For the second term in (7.7), we bound it simply by . Hence, the sum of the size of all is bounded by
Complexity
The cost of Query is dominated by the cost of EstimateScore, the cost of computing and the cost of D.Query. Lemma 38 shows that the total cost of EstimateScore is bounded by
The cost of computing is simply because by assumption we can multiply with a vector in time, and is a matrix. Finally, by Corollary 37, the total cost of D.Query is bounded by
Simplify the term by the similar calculation on bounding , we have
Combining (7.9) and (7.10) and using (7.8) and , we have the total cost bounded by
We charge the first term to Initalize and the last term to Scale. This completes the proof for the time complexity. ∎
Inverse Maintenance with Leverage Score Hints
To handle this issue of changing , [LS15] resampled rows of only when the corresponding leverage score changed signficantly. With this trick, the diagonal matrix changes slowly enough to maintain. However, this approach only works if the input of the algorithm is independent on the output. In [LS15], this issue was addressed by using the maintained inverse as a pre-conditioner to solve linear systems in to high precision and then added noise to the output. However, we cannot afford to read the whole matrix each step and therefore need to modify this technique.
To avoid reading the entire matrix , we instead make further use of the given given leverage score to sample the matrix . Instead of solving , we use the maintained inverse as a pre-conditioner to solve . By solving very accurately and by adding a small amount of noise, we can hide any information about . This is formalized by Algorithm 8 (and its second half Algorithm 9).
Using , we have
where we used that at the end. Using , we have
Next we provide a general stability lemma about solving linear systems and then use this to prove Theorem 10 and Theorem 11. This lemma is mainly for convenience purpose as the vector maintenance and leverage score maintenance assume we solve the linear system by some where . The following lemma shows that this definition is same as is small compared to .
Hence, we have . Hence, we have if . In fact, we now prove that .
First, we note that and hence . Hence, we have
Similarly, we have . Hence, we have . ∎
We now have all tools available to prove Theorem 10.
Since the input of the algorithm is independent to the output of the algorithm in the previous iterations, every constraint has probability of being picked into . Therefore, the expected number of rank changes in Line 8 of is given by
Next, we note that the denominator of never changed between and . Hence, is exactly equals to the relative change of or . Hence, we have
The cost of Solve is clear from the description.
For the correctness of Solve, assume for now that in Line 9 satisfies and that is a good approximation of the solution with
(This is shown in the proof of Lemma 11.) So Lemma 42 shows that the final result satisfies
Finally, Lemma 43 shows that we can view the output of the algorithm as for some spectral approximation . ∎
w.h.p. in where we used that is a rank orthogonal projection matrix and . By choosing small enough , we have
By picking small enough , Lemma 43 shows that we have for .
where we used and in the first inequality.
where we used at the end. Note that
where we used the fact for all . Finally, we note that by the choice of the indices to update, we have
Open Problems
Acknowledgements
We thank Sébastien Bubeck, Ofer Dekel, Jerry Li, Ilya Razenshteyn, and Microsoft Research for facilitating conversations between and hosting researchers involved in this collaboration. We thank Vasileios Nakos, Jelani Nelson, and Zhengyu Wang for very helpful discussions about sparse recovery literature. We thank Jonathan Kelner, Richard Peng, and Sam Chiu-wai Wong for helpful conversations. This project has received funding from the European Research Council (ERC) under the European Unions Horizon 2020 research and innovation programme under grant agreement No 715672. This project was supported in part by NSF awards CCF-1749609, CCF-1740551, DMS-1839116, CCF-1844855, and Microsoft Research Faculty Fellowship. This project was supported in part by Special Year on Optimization, Statistics, and Theoretical Machine Learning (being led by Sanjeev Arora) at Institute for Advanced Study.
References
Appendix A Misc Technical Lemmas
Here we state various technical lemmas from prior work that we use throughout our paper.
where , , and denote the directional derivative of with respect to in direction . In particular, we have that
The next lemma gives a variety of frequently used relationships between different types of multiplicative approximations.
Further, if for and either
then .
These follow near immediately by Taylor expansion.
Here we provide some helpful expectation bounds. This lemma just shows that the relative change of a matrix in Frobenius norm can be bounded by the change in the projection Schur product norm.
The following lemma (coupled with the one above) shows that we can leverage score sample to have small change in Frobenius norm.
or and in which case
Combining these facts and leveraging that (Lemma 44) then yields the result. ∎
Appendix B Maintaining Near Feasibility
Given some infeasible we can obtain a feasible via
We show in Lemma 55 that these and are close multiplicatively
Here we prove that throughout the algorithm, we maintain , where is the parameter of Theorem 5 and is a sufficiently small constant.
Since , we have . Further , hence, we have
where the third step follows from definition of matrix , the forth step follows from the fifth step follows from . Hence, we have
where the last step follows from properties of projection matrices. As and the result follows. ∎
B.2 Increase of Infeasibility Due to x′x^{\prime} and s′s^{\prime}
where is the -th row of and
where the third step follows from Cauchy-Schwarz.
Using that , , and , we have
where the last step follows from (implied by ). Further, as in this case, we have
where the second step follows from , and the last step follows from as we only consider . Using and this implies
Using (B.4) and (B.5), Bernstein inequality shows
where the third step follows from (B.6), and the last step follows from ∎
For and , we can generate and with properties as defined in Algorithm 10 in such a way that
The statement for follows directly from Lemma 47 and Lemma 48 when we perform the same leverage score sampling on both and (i.e. both matrices sample the same entries of their diagonal).
For the other statement, we let and . By the assumption, we have . By Taylor expansion, we have
Since , are independent, we have
where we used that .
Using that and as and . Using , we have that and . Hence, we have
Finally, Lemma 47 and Lemma 48 shows that
where the first step follows from definition of (see (B.1)), the second step follows from (B.7), the third step follows from property of a projection matrix, the last step follows from definition of (see (B.1)).
For the first term in (B.8), and we have
where we used Lemma 50. In summary this means the first term in (B.8) can be bounded via
with probability . Using the definition of and Lemma 51, we have
Similarly, we have the same bound for . Putting these two into (B.10) gives the result.
where the first step follows from definition of , the fifth step follows from , the sixth step follows from the definition of leverage scores, and the last step follows from our previously proven bound on and Lemma 19 to bound . ∎
B.3 Improving Infeasibility
From Section B.1 and B.2, we see that increases slowly over time. Here we show in Lemma 53, that over iterations of the IPM, the potential changes only by a constant factor. Intuitively, this can be seen by the IPM calling MaintainFeasibility (Algorithm 11) which in turn calls Algorithm 10. The previous subsection showed that each call to Algorithm 10 increases by only a small amount. As seen in Line 11 of Algorithm 11, after iterations we decrease the potential again. Lemma 54 shows that Line 11 does indeed decrease the potential sufficiently.
Consider iterations of the algorithm 1 and let be the input to the -th call to Algorithm 10. Suppose that , and , for some small enough constants , where is the accuracy parameter used in Lemma 50. Suppose that we update using an unbiased linear system solver with accuracy as defined in Lemma 49 during the algorithm 1. Assume further
Let be the vector as defined in Algorithm 10, when we currently perform the -th call to that function. Then we have that
where the first step follows from Lemma 49, the second step follows from Lemma 52, the third step follows from and , the fourth step follows from the step of the IPM with .
Let . Let
Note that for (since ) and further there exists some such that
We want to construct a supermartingale, so we want that this expectation is less than . This is the case if
so let us analyze which other conditions are required to satisfy this inequality. For now assume that , and , then
So if we choose small enough such that (note that by Theorem 5) and , then
Hence, for we have that is a non-negative supermartingale.
By Ville’s maximal inequality [Vil39] for supermartingales, we have that
where the second step follows from . Hence, with probability at least . Under this event, we have for small enough that
Now, to move closer to , we solve the equation
with . This gives the formula
Using , we have
where the last step follows from and for .
Here we show that the correction step of Lemma 54 does not change the solution by much, provided that is small.
For the bound on consider the following
where at the end we used via Lemma 19 and . The last term can be bounded by
Thus in summary we have . For the norm we have because of , and the definition of that
To obtain the final solution of our LP, is still too large. Here we show that iterative application of Lemma 54 yields a very accuracte solution.
There exists some small enough , such that given a primal dual pair with and and any 0, we can compute an with
This follows by repeatedly applying Lemma 54 for small enough . We need repetitions to decrease down to for some small enough . Note that by Lemma 55 the total movement is bounded by as the movement per iteration is exponentially decaying. At last, going from to increases the potential by at most some factor given that and differ by at most a constant factor. Thus for small enough we have . Likewise we have when the constant factor difference between and is small enough which can be guaranteed by choosing small enough . ∎
Throughout the IPM we move several times. First, we perform the classic IPM step and then we perform the corrective steps of Algorithm 10 and 11. Note that by Lemma 52 the extra movement of depends on how much moved in the previous iteration. Here we show that this does not create an amplifying feedback loop, i.e. as long as , the total movement is always bounded by . By induction over the number of iterations Lemma 52 and Lemma 57 then imply that we always have and .
For some small enough constants let , in MaintainFeasibility and let be the parameter of Theorem 5. Let the inputs of the -th call to MaintainFeasibility. Assume
for all , then we have with high probability
Theorem 32 yields the bound (B.12) if the extra movement caused by MaintainFeasibility satisfies .
by Lemma 52 and Lemma 55. These can be bounded as follows
where we use . ∎
Note that, when ignoring feasibility, Theorem 5 was proven as Theorem 32. So we are only left with showing that stays small and that the condition of Theorem 32 is true, i.e. that the extra movement of by calling MaintainFeasibility in Algorithm 1 satisfies
On one hand, the latter claim was proven in Lemma 57, assuming the infeasibility potential is small. On the other hand, Lemma 53 shows that does not change more than a multiplicative factor within iterations as long as and do not change to much in each iteration. Thus by induction we have that is small and that and do not change much. After iterations the potential is decreased again by Lemma 54, so stays small even after iterations.
At last, note that during the last iteration of the IPM, we can apply Lemma 54 once more to reduce
We are left with analyzing the complexity of Algorithm 11.
We choose two accuracy parameters as follows:
Thus the total additional amortized cost is
Appendix C Constructing the Initial Point
Here we want to prove Lemma 12 which is used to quickly find an initial point for our IPM. Lemma 12 is an extension of the following known reduction. We modify this reduction so that we no longer require our final solution to be feasible.
Consider a linear program with variables and constraints. Assume that 1. Diameter of the polytope : For any with , we have that . 2. Lipschitz constant of the linear program : .
For any , the modified linear program with
as desired. Consequently, if we take this new LP as input to our reduction we only need to decrease by a factor of more than before to obtain the same result. So for now assume .
By choosing to be the maximizer of the absolute value of the denominator we have
where in the second step we used that and in the third step we used the assumption that . Thus in summary we have and by (C.1). This concludes the proof on and we are left with proving the last claim of Theorem 12.
For our feasible solution we can bound the duality gap as follows
The impact of the last error term can be bounded by
We are left with proving the bound on . For this note that
where in the last step we used that and differ by an factor. We already argued and we have , so
With the previous bounds on this leads to
Now, we bound the term in (C.2). Since we know that and are bounded by (this is proven in [CLS19] where they proved Lemma 58), we have the bound
Putting (C.3) and (C.4) into (C.2), we have
Appendix D Gradient Maintenance
In this section we provide a data structure for efficiently maintaining and in our IPM, i.e. Algorithm 1.
There exists a deterministic data-structure that supports the following operations
: Sets , and in time. The data-structure assumes and .
We start by explaining the algorithm and analyzing its complexity. Afterwards we prove the correctness.
During queries the data-structure computes the following: Define , then we apply Algorithm 8 from [LS19] to compute
Complexity:
Correctness:
For the given vector , we can split into groups by grouping the entries to multiples of . By assumption we have , so we have at most many groups. By rounding down on each of these groups we obtain
which satisfies . For notational simplicity define
then and for we have
Next we split into many groups based on multiplicative approximations of , in other words we have that
Next, Algorithm 8 from [LS19] shows how to compute scalars in time with
Note that there is with