Randomized Iterative Methods for Linear Systems

Robert M. Gower, Peter Richtárik

Introduction

The need to solve linear systems of equations is ubiquitous in essentially all quantitative areas of human endeavour, including industry and science. Linear systems are a central problem in numerical linear algebra, and play an important role in computer science, mathematical computing, optimization, signal processing, engineering, numerical analysis, computer vision, machine learning, and many other fields.

For instance, in the field of large scale optimization, there is a growing interest in inexact and approximate Newton-type methods for , which can benefit from fast subroutines for calculating approximate solutions of linear systems. In machine learning, applications arise for the problem of finding optimal configurations in Gaussian Markov Random Fields , in graph-based semi-supervised learning and other graph-Laplacian problems , least-squares SVMs, Gaussian processes and more.

In a large scale setting, direct methods are generally not competitive when compared to iterative approaches. While classical iterative methods are deterministic, recent breakthroughs suggest that randomization can play a powerful role in the design and analysis of efficient algorithms which are in many situations competitive or better than existing deterministic methods.

We shall assume throughout that the system is consistent: there exists xx^{*} for which Ax=bAx^{*}=b.

We now comment on the main contribution of this work:

1. New method. We develop a novel, fundamental, and surprisingly simple randomized iterative method for solving (1).

2. Six equivalent formulations. Our method allows for several seemingly different but nevertheless equivalent formulations. First, it can be seen as a sketch-and-project method, in which the system (1) is replaced by its random sketch, and then the current iterate is projected onto the solution space of the sketched system. We can also view it as a constrain-and-approximate method, where we constrain the next iterate to live in a particular random affine space passing through the current iterate, and then pick the point from this subspace which best approximates the optimal solution. Third, the method can be seen as an iterative solution of a sequence of random (and simpler) linear equations. The method also allows for a simple geometrical interpretation: the new iterate is defined as the unique intersection of two random affine spaces which are orthogonal complements. The fifth viewpoint gives a closed form formula for the random update which needs to be applied to the current iterate in order to arrive at the new one. Finally, the method can be seen as a random fixed point iteration.

3. Special cases. These multiple viewpoints enrich our interpretation of the method, and enable us to draw previously unknown links between several existing algorithms. Our algorithm has two parameters, an n×nn\times n positive definite matrix BB defining geometry of the space, and a random matrix SS. Through combinations of these two parameters, in special cases our method recovers several well known algorithms. For instance, we recover the randomized Kaczmarz method of Strohmer and Vershyinin , randomized coordinate descent method of Leventhal and Lewis , random pursuit (with exact line search), and the stochastic Newton method recently proposed by Qu et al . However, our method is more general, and leads to i) various generalizations and improvements of the aforementioned methods (e.g., block setup, importance sampling), and ii) completely new methods. Randomness enters our framework in a very general form, which allows us to obtain a Gaussian Kaczmarz method, Gaussian descent, and more.

4. Complexity: general results. When AA has full column rank, our framework allows us to determine the complexity of these methods using a single analysis. Our main results are summarized in Table 1, where {xk}\{x^{k}\} are the iterates of our method, ZZ is a random matrix dependent on the data matrix AA, parameter matrix BB and random parameter matrix SS, defined as

As we shall see later, we will often consider setting B=IB=I, B=AB=A (if AA is positive definite) or B=ATAB=A^{T}A (if AA is of full column rank). In particular, we first show that the convergence rate ρ\rho is always bounded between zero and one. We also show that as soon as E[Z]\mathbf{E}\left[Z\right] is invertible (which can only happen if AA has full column rank, which then implies that xx^{*} is unique), we have ρ<1\rho<1, and the method converges. Besides establishing a bound involving the expected norm of the error (see the last line of Table 1), we also obtain bounds involving the norm of the expected error (second line of Table 1). Studying the expected sequence of iterates directly is very fruitful, as it allows us to establish an exact characterization of the evolution of the expected iterates (see the first line of Table 1) through a linear fixed point iteration.

Both of these theorems on the convergence of the error can be recast as iteration complexity bounds. For instance, using standard arguments, from Theorem 6 in Table 1 we observe that for a given ϵ>0\epsilon>0 we have that

5. Complexity: special cases. Besides these generic results, which hold without any major restriction on the sampling matrix SS (in particular, it can be either discrete or continuous), we give a specialized result applicable to discrete sampling matrices SS (see Theorem 10). In the special cases for which rates are known, our analysis recovers the existing rates.

6. Extensions. Our approach opens up many avenues for further development and research. For instance, it is possible to extend the results to the case when AA is not necessarily of full column rank. Furthermore, as our results hold for a wide range of distributions, new and efficient variants of the general method can be designed for problems of specific structure by fine-tuning the stochasticity to the structure. Similar ideas can be applied to design randomized iterative algorithms for finding the inverse of a very large matrix.

2 Background and Related Work

The literature on solving linear systems via iterative methods is vast and has long history . For instance, the Kaczmarz method, in which one cycles through the rows of the system and each iteration is formed by projecting the current point to the hyperplane formed by the active row, dates back to the 30’s . The Kaczmarz method is just one example of an array of row-action methods for linear systems (and also, more generally, feasibility and optimization problems) which were studied in the second half of the 20th century .

Research into the Kaczmarz method was in 2009 reignited by Strohmer and Vershynin , who gave a brief and elegant proof that a randomized thereof enjoys an exponential error decay (also know as “linear convergence”). This has triggered much research into developing and analyzing randomized linear solvers.

It should be mentioned at this point that the randomized Kaczmarz (RK) method arises as a special case (when one considers quadratic objective functions) of the stochastic gradient descent (SGD) method for convex optimization which can be traced back to the seminal work of Robbins and Monro’s on stochastic approximation . Subsequently, intensive research went into studying various extensions of the SGD method. However, to the best of our knowledge, no complexity results with exponential error decay were established prior to the aforementioned work of Strohmer and Vershynin . This is the reason behind our choice of as the starting point of our discussion.

Motivated by the results of Strohmer and Vershynin , Leventhal and Lewis utilize similar techniques to establish the first bounds for randomized coordinate descent methods for solving systems with positive definite matrices, and systems arising from least squares problems . These bounds are similar to those for the RK method. This development was later picked up by the optimization and machine learning communities, and much progress has been made in generalizing these early results in countless ways to various structured convex optimization problems. For a brief up to date account of the development in this area, we refer the reader to and the references therein.

The RK method and its analysis have been further extended to the least-squares problem and the block setting . In the authors extend the randomized coordinate descent and the RK methods to the problem of solving underdetermined systems. The authors of analyze side-by-side the randomized coordinate descent and RK method, for least-squares, using a convenient notation in order to point out their similarities. Our work takes the next step, by analyzing these, and many other methods, through a genuinely single analysis. Also in the spirit of unifying the analysis of different methods, in the authors provide a unified analysis of iterative Schwarz methods and Kaczmarz methods.

The use of random Gaussian directions as search directions in zero-order (derivative-free) minimization algorithm was recently suggested . More recently, Gaussian directions have been combined with exact and inexact line-search into a single random pursuit framework , and further utilized within a randomized variable metric method .

One Algorithm in Six Disguises

Our method has two parameters: i) an n×nn\times n positive definite matrix BB which is used to define the BB-inner product and the induced BB-norm by

xk+1x^{k+1} is the nearest point to xkx^{k} which solves a sketched version of the original linear system:

This viewpoint arises very naturally. Indeed, since the original system (1) is assumed to be complicated, we replace it by a simpler system—a random sketch of the original system (1)—whose solution set {x    STAx=STb}\{x\;|\;S^{T}Ax=S^{T}b\} contains all solutions of the original system. However, this system will typically have many solutions, so in order to define a method, we need a way to select one of them. The idea is to try to preserve as much of the information learned so far as possible, as condensed in the current point xkx^{k}. Hence, we pick the solution which is closest to xkx^{k}.

xk+1x^{k+1} is the best approximation of xx^{*} in a random space passing through xkx^{k}:

xk+1x^{k+1} is the (unique) intersection of two affine spaces:

Note that xk+1x^{k+1} is the (unique) solution (in xx) of a linear system (with variables xx and yy):

This system is clearly equivalent to (7), and can alternatively be written as:

Hence, our method reduces the solution of the (complicated) linear system (1) into a sequence of (hopefully simpler) random systems of the form (9).

By plugging the second equation in (8) into the first, we eliminate xx and obtain the system (STAB1ATS)y=ST(bAxk)(S^{T}AB^{-1}A^{T}S)y=S^{T}(b-Ax^{k}). Note that for all solutions yy of this system we must have xk+1=xk+B1ATSyx^{k+1}=x^{k}+B^{-1}A^{T}Sy. In particular, we can choose the solution y=yky=y^{k} of minimal Euclidean norm, which is given by yk=(STAB1ATS)ST(bAxk)y^{k}=(S^{T}AB^{-1}A^{T}S)^{\dagger}S^{T}(b-Ax^{k}), where † denotes the Moore-Penrose pseudoinverse. This leads to an expression for xk+1x^{k+1} with an explicit form of the random update which must be applied to xkx^{k} in order to obtain xk+1x^{k+1}:

In some sense, this form is the standard: it is customary for iterative techniques to be written in the form xk+1=xk+dkx^{k+1}=x^{k}+d^{k}, which is precisely what (10) does.

Note that iteration (10) can be written as

where ZZ is defined in (2) and where we used the fact that Ax=bAx^{*}=b. Matrix ZZ plays a central role in our analysis, and can be used to construct explicit projection matrices of the two projections depicted in Figure 1.

The equivalence between these six viewpoints is formally captured in the next statement.

The six viewpoints are equivalent: they all produce the same (unique) point xk+1x^{k+1}.

The proof is simple, and follows directly from the above discussion. In particular, see the caption of Figure 1. ∎

2 Projection Matrices

In this section we state a few key properties of matrix ZZ. This will shed light on the previous discussion and will also be useful later in the convergence proofs.

Recall that SS is a m×qm\times q random matrix (with qq possibly being random), and that AA is an m×nm\times n matrix. Let us define the random quantity

With respect to the geometry induced by the BB-inner product, we have that

B1ZB^{-1}Z projects orthogonally onto the dd–dimensional subspace Range(B1ATS)\mathbf{Range}\left(B^{-1}A^{T}S\right)

(IB1Z)(I-B^{-1}Z) projects orthogonally onto (nd)(n-d)–dimensional subspace Null(STA).\mathbf{Null}\left(S^{T}A\right).

For any matrix MM, the pseudoinverse satisfies the identity MMM=MM^{\dagger}MM^{\dagger}=M^{\dagger}. Using this with M=STAB1ATSM=S^{T}AB^{-1}A^{T}S, we get

and thus both B1ZB^{-1}Z and IB1ZI-B^{-1}Z are projection matrices. In order to establish that B1ZB^{-1}Z is an orthogonal projection with respect to the BB-inner product (from which it follows that IB1ZI-B^{-1}Z is), we will show that

The second relation is trivially satisfied. In order to establish the first relation, it is enough to use two further properties of the pseudoinverse: (MTM)MT=M(M^{T}M)^{\dagger}M^{T}=M^{\dagger} and MMM=MMM^{\dagger}M=M, both with M=B1/2ATSM=B^{-1/2}A^{T}S. Indeed,

This lemma sheds additional light on Figure 1 as it gives explicit expressions for the associated projection matrices. The result also implies that IB1ZI-B^{-1}Z is a contraction with respect to the BB-norm, which means that the random fixed point iteration (11) has only very little room not to work. While IB1ZI-B^{-1}Z is not a strict contraction, under some reasonably weak assumptions on SS it will be a strict contraction in expectation, which ensures convergence. We shall state these assumptions and develop the associated convergence theory for our method in Section 4 and Section 5.

Special Cases: Examples

In this section we briefly mention how by selecting the parameters SS and BB of our method we recover several existing methods. The list is by no means comprehensive and merely serves the purpose of an illustration of the flexibility of our algorithm. All the associated complexity results we present in this section, can be recovered from Theorem 10, presented later in Section 5.

When SS is an m×mm\times m invertible matrix with probability one, then the system STAx=STbS^{T}Ax=S^{T}b is equivalent to solving Ax=b,Ax=b, thus the solution to (5) must be xk+1=xx^{k+1}=x^{*}, independently of matrix B.B. Our convergence theorems also predict this one step behaviour, since ρ=0\rho=0 (see Table 1).

2 Random Vector Sketch

Next we describe several well known specializations of the random vector sketch and for brevity, we write the updates in the form of (15) and leave implicit that when the denominator is zero, no step is taken.

3 Randomized Kaczmarz

Using (10), these iterations can be calculated with

When ii is selected at random, this is the randomized Kaczmarz (RK) method . A specific non-uniform probability distribution for SS can yield simple and easily interpretable (but not necessarily optimal) complexity bound. In particular, by selecting ii with probability proportional to the magnitude of row ii of AA, that is pi=Ai:22/AF2p_{i}=\|A_{i:}\|_{2}^{2}/\|A\|_{F}^{2}, it follows from Theorem 10 that RK enjoys the following complexity bound:

This result was first established by Strohmer and Vershynin . We also provide new convergence results in Theorem 6, based on the convergence of the norm of the expected error. Theorem 6 applied to the RK method gives

Now the convergence rate appears squared, which is a better rate, though, the expectation has moved inside the norm, which is a weaker form of convergence.

Analogous results for the convergence of the norm of the expected error holds for all the methods we present, though we only illustrate this with the RK method.

Using the Constrain-and-Approximate formulation (6), the randomized Kaczmarz method can also be written as

with probability pip_{i}. Writing the least squares function f(x)=12Axb22f(x)=\tfrac{1}{2}\|Ax-b\|_{2}^{2} as

we see that the random vector fi(x)=1pi(Ai:xbi)(Ai:)T\nabla f_{i}(x)=\tfrac{1}{p_{i}}(A_{i:}x-b_{i})(A_{i:})^{T} is an unbiased estimator of the gradient of ff at xx. That is, E[fi(x)]=f(x)\mathbf{E}\left[\nabla f_{i}(x)\right]=\nabla f(x). Notice that RK takes a step in the direction fi(x)-\nabla f_{i}(x). This is true even when Ai:xbi=0A_{i:}x-b_{i}=0, in which case, the RK does not take any step. Hence, RK takes a step in the direction of the negative stochastic gradient. This means that it is equivalent to the Stochastic Gradient Descent (SGD) method. However, the stepsize choice is very special: RK chooses the stepsize which leads to the point which is closest to xx^{*} in the Euclidean norm.

4 Randomized Coordinate Descent: positive definite case

If AA is positive definite, then we can choose B=AB=A and S=eiS=e^{i} in (5), which results in

where we used the symmetry of AA to get (ei)TA=Ai:=(A:i)T.(e^{i})^{T}A=A_{i:}=(A_{:i})^{T}. The solution to the above, given by (10), is

When ii is chosen randomly, this is the Randomized CD method (CD-pd). Applying Theorem 10, we see the probability distribution pi=Aii/Tr(A)p_{i}=A_{ii}/\mathbf{Tr}\left(A\right) results in a convergence with

This result was first established by Leventhal and Lewis .

Using the Constrain-and-Approximate formulation (6), this method can be interpreted as

with probability pip_{i}. It is easy to check that the function f(x)=12xTAxbTxf(x)=\tfrac{1}{2}x^{T}Ax-b^{T}x satisfies: xxA2=2f(x)+bTx\|x-x^{*}\|_{A}^{2}=2f(x)+b^{T}x^{*}. Therefore, (23) is equivalent to

where Li=AiiL_{i}=A_{ii} is the Lipschitz constant of the gradient of ff corresponding to coordinate ii and if(xk)\nabla_{i}f(x^{k}) is the iith partial derivative of ff at xkx^{k}.

5 Randomized Block Kaczmarz

Our framework also extends to new block formulations of the randomized Kaczmarz method. Let RR be a random subset of [m][m] and let S=I:RS=I_{:R} be a column concatenation of the columns of the m×mm\times m identity matrix II indexed by RR. Further, let B=IB=I. Then (5) specializes to

In view of (10), this can be equivalently written as

From Theorem 8 we obtain the following new complexity result:

To obtain a more meaningful convergence rate, we would need to bound the smallest eigenvalue of E[(AR:)T(AR:(AR:)T)AR:].\mathbf{E}\left[(A_{R:})^{T}(A_{R:}(A_{R:})^{T})^{\dagger}A_{R:}\right]. This has been done in when the image of RR defines a row paving of AA. Our framework paves the way for analysing the convergence of new block methods for a large set of possible random subsets R,R, including, for example, overlapping partitions.

6 Randomized Newton: positive definite case

If AA is symmetric positive definite, then we can choose B=AB=A and S=I:CS=I_{:C}, a column concatenation of the columns of II indexed by CC, which is a random subset of [n][n]. In view of (5), this results in

In view of (10), we can equivalently write the method as

Clearly, iteration (27) is well defined as long as CC is nonempty with probability 1. Such CC is in referred to by the name “non-vacuous” sampling. From Theorem 8 we obtain the following convergence rate:

The convergence rate of this particular method was first established and studied in . Moreover, it was shown in that ρ<1\rho<1 if one additionally assumes that the probability that iCi\in C is positive for each column i[n]i\in[n], i.e., that CC is a “proper” sampling.

Using formulation (6), and in view of the equivalence between f(x)f(x) and xxA2\|x-x^{*}\|_{A}^{2} discussed in Section 3.4, the Randomized Newton method can be equivalently written as

The next iterate is determined by advancing from the previous iterate over a subset of coordinates such that ff is minimized. Hence, an exact line search is performed in a random C|C| dimensional subspace.

7 Randomized Coordinate Descent: least-squares version

By choosing S=Aei=:A:iS=Ae^{i}=:A_{:i} as the iith column of AA and B=ATAB=A^{T}A, the resulting iterates (6) are given by

When ii is selected at random, this is the Randomized Coordinate Descent method (CD-LS) applied to the least-squares problem: minxAxb22\min_{x}\|Ax-b\|_{2}^{2}. Using (10), these iterations can be calculated with

Applying Theorem 10, we see that by selecting ii with probability proportional to magnitude of column ii of AA, that is pi=A:i22/AF2p_{i}=\|A_{:i}\|_{2}^{2}/\|A\|_{F}^{2}, results in a convergence with

This result was first established by Leventhal and Lewis .

Using the Constrain-and-Approximate formulation (6), the CD-LS method can be interpreted as

where Li=defA:i22L_{i}\overset{\text{def}}{=}\|A_{:i}\|_{2}^{2} is the Lipschitz constant of the gradient corresponding to coordinate ii and if(xk)\nabla_{i}f(x^{k}) is the iith partial derivative of ff at xkx^{k}.

Convergence: General Theory

We shall present two complexity theorems: we first study the convergence of E[xkx]\|\mathbf{E}\left[x^{k}-x^{*}\right]\| , and then move on to analysing the convergence of E[xkx]\mathbf{E}\left[\|x^{k}-x^{*}\|\right].

The following lemma explains the relationship between the convergence of the norm of the expected error and the expected norm of the error.

Note that E[xE[x]2]=E[x2]E[x]2\mathbf{E}\left[\|x-\mathbf{E}\left[x\right]\|^{2}\right]=\mathbf{E}\left[\|x\|^{2}\right]-\|\mathbf{E}\left[x\right]\|^{2}. Adding and subtracting x22<E[x],x>\|x^{*}\|^{2}-2\left<\mathbf{E}\left[x\right],x^{*}\right> from the right hand side and grouping the appropriate terms yields the desired result. ∎

To interpret this lemma, note that E[xE[x]2]=i=1nE[(xiE[xi])2]=i=1nVar(xi)\mathbf{E}\left[\left\|x-\mathbf{E}\left[x\right]\right\|^{2}\right]=\sum_{i=1}^{n}\mathbf{E}\left[(x_{i}-\mathbf{E}\left[x_{i}\right])^{2}\right]=\sum_{i=1}^{n}\mathbf{Var}(x_{i}), where xix_{i} denotes the iith element of x.x. This lemma shows that the convergence of xx to xx^{*} under the expected norm of the error is a stronger form of convergence than the convergence of the norm of the expected error, as the former also guarantees that the variance of xix_{i} converges to zero, for i=1,,n.i=1,\ldots,n.

2 The Rate of Convergence

All of our convergence theorems (see Table 1) depend on the convergence rate

To show that the rate is meaningful, in Lemma 4 we prove that 0ρ10\leq\rho\leq 1. We also provide a meaningful lower bound for ρ\rho.

The quantity ρ\rho defined in (33) satisfies:

where d=Rank(STA)d=\mathbf{Rank}\left(S^{T}A\right).

Since the mapping Aλmax(A)A\mapsto\lambda_{\max}(A) is convex on the set of symmetric matrices, by Jensen’s inequality we get

Recalling from Lemma 2 that B1ZB^{-1}Z is a projection, we get

whence the spectrum of B1/2ZB1/2B^{-1/2}ZB^{-1/2} is contained in {0,1}\{0,1\}. Thus, λmax(B1/2ZB1/2)  1\lambda_{\max}(B^{-1/2}ZB^{-1/2})~{}\leq~{}1, and from (35) we conclude that λmax(B1E[Z])1\lambda_{\max}(B^{-1}\mathbf{E}\left[Z\right])\leq 1. The inequality λmin(B1E[Z])  0\lambda_{\min}(B^{-1}\mathbf{E}\left[Z\right])~{}\geq~{}0 can be shown analogously using convexity of the mapping Aλmin(A)A\mapsto-\lambda_{\min}(A). Thus

and consequentially 0ρ1.0\leq\rho\leq 1. As the trace of a matrix is equal to the sum of its eigenvalues, we have

As B1ZB^{-1}Z projects onto a dd–dimensional subspace (Lemma 2) we have Tr(B1Z)=d.\mathbf{Tr}\left(B^{-1}Z\right)=d. Thus rewriting (36) gives 1E[d]/nρ.1-\mathbf{E}\left[d\right]/n\leq\rho.

The lower bound on ρ\rho in item 1 has a natural interpretation which makes intuitive sense. We shall present it from the perspective of the Constrain-and-Approximate formulation (6). As the dimension (dd) of the search space B1ATSB^{-1}A^{T}S increases (see (13)), the lower bound on ρ\rho decreases, and a faster convergence is possible. For instance, when SS is restricted to being a random column vector, as it is in the RK (17), CD-LS (30) and CD-pd (22) methods, the convergence rate is bounded with 11/nρ.1-1/n\leq\rho. Using (3), this translates into the simple iteration complexity bound of knlog(1/ϵ)k\geq n\log(1/\epsilon). On the other extreme, when the search space is large, then the lower bound is close to zero, allowing room for the method to be faster.

We now characterize circumstances under which ρ\rho is strictly smaller than one.

If E[Z]\mathbf{E}\left[Z\right] is invertible, then ρ<1\rho<1, AA has full column rank and xx^{*} is unique.

3 Exact Characterization and Norm of Expectation

We now state a theorem which exactly characterizes the evolution of the expected iterates through a linear fixed point iteration. As a consequence, we obtain a convergence result for the norm of the expected error. While we do not highlight this in the text, this theorem can be applied to all the particular instances of our general method we detail throughout this paper.

Moreover, the spectral radius and the induced BB-norm of the iteration matrix IB1E[Z]I-B^{-1}\mathbf{E}\left[Z\right] are both equal to ρ\rho:

Taking expectations conditioned on xkx^{k} in (11), we get

Applying the norms to both sides we obtain the estimate

It remains to prove that ρ=IB1E[Z]B\rho=\|I-B^{-1}\mathbf{E}\left[Z\right]\|_{B} and then unroll the recurrence. According to the definition of operator norm (37), we have

Substituting B1/2x=yB^{1/2}x=y in the above gives

where in the third equality we used the symmetry of (IB1E[Z]B1)(I-B^{-1}\mathbf{E}\left[Z\right]B^{-1}) when passing from the operator norm to the spectral radius. Note that the symmetry of E[Z]\mathbf{E}\left[Z\right] derives from the symmetry of ZZ. ∎

4 Expectation of Norm

We now turn to analysing the convergence of the expected norm of the error, for which we need the following technical lemma.

If E[Z]\mathbf{E}\left[Z\right] is positive definite, then

As E[Z]\mathbf{E}\left[Z\right] and BB are positive definite, we get

Therefore, E[Z](1ρ)B\mathbf{E}\left[Z\right]\succeq(1-\rho)B, and the result follows.∎

If E[Z]\mathbf{E}\left[Z\right] is positive definite, then

Let rk=xkxr^{k}=x^{k}-x^{*}. Taking the expectation of (11) conditioned on rkr^{k} we get

Taking expectation again and unrolling the recurrence gives the result. ∎

The convergence rate ρ\rho of the expected norm of the error is “worse” than the ρ2\rho^{2} rate of convergence of the norm of the expected error in Theorem 6. This should not be misconstrued as Theorem 6 offering a “better” convergence rate than Theorem 8, because, as explained in Lemma 3, convergence of the expected norm of the error is a stronger type of convergence. More importantly, the exponent is not of any crucial importance; clearly, an exponent of 22 manifests itself only in halving the number of iterations.

Methods Based on Discrete Sampling

When SS has a discrete distribution, we can establish under reasonable assumptions when E[Z]\mathbf{E}\left[Z\right] is positive definite (Proposition 9), we can optimize the convergence rate in terms of the chosen probability distribution, and finally, determine a probability distribution for which the convergence rate is expressed in terms of the scaled condition number (Theorem 10).

When SS is a complete discrete sampling, then STAS^{T}A has full row rank and (STAB1ATS)=(STAB1ATS)1.(S^{T}AB^{-1}A^{T}S)^{\dagger}=(S^{T}AB^{-1}A^{T}S)^{-1}. Therefore we replace the pseudo-inverse in (10) and (11) by the inverse. Furthermore, using a complete discrete sampling guarantees convergence of the resulting method.

Let SS be a complete discrete sampling, then E[Z]\mathbf{E}\left[Z\right] is positive definite.

which is a block diagonal matrix, and is well defined and invertible as SiTAS_{i}^{T}A has full row rank for i=1,,ri=1,\ldots,r. Taking the expectation of ZZ (2) gives

which is positive definite because ATSA^{T}\mathbf{S} has full row rank and DD is invertible. ∎

With E[Z]\mathbf{E}\left[Z\right] positive definite, we can apply the convergence Theorem 6 and 8, and the resulting method converges.

We can choose the discrete probability distribution that optimizes the convergence rate. For this, according to Theorems 8 and 6 we need to find p=(p1,,pr)p=(p_{1},\dots,p_{r}) that maximizes the minimal eigenvalue of B1/2E[Z]B1/2B^{-1/2}\mathbf{E}\left[Z\right]B^{-1/2}. Let SS be a complete discrete sampling and fix the sample matrices S1,,SrS_{1},\dots,S_{r}. Let us denote Z=Z(p)Z=Z(p) as a function of p=(p1,,pr)p=(p_{1},\dots,p_{r}). Then we can also think of the spectral radius as a function of pp where

the problem of minimizing the spectral radius (i.e., optimizing the convergence rate) can be written as

This can be cast as a convex optimization problem, by first re-writing

To obtain pp that maximizes the smallest eigenvalue, we solve

Despite (46) being a convex semi-definite programWhen preparing a revision of this paper, we have learned about the existence of prior work where the authors have also characterized the probability distribution that optimizes the convergences rate of the RK method as the solution to an SDP., which is apparently a harder problem than solving the original linear system, investing the time into solving (46) using a solver for convex conic programming such as cvx can pay off, as we show in Section 7.4. Though for a practical method based on this, we would need to develop an approximate solution to (46) which can be efficiently calculated.

2 Convenient Probabilities

Next we develop a choice of probability distribution that yields a convergence rate that is easy to interpret. This result is new and covers a wide range of methods, including randomized Kaczmarz, randomized coordinate descent, as well as their block variants. However, it is more general, and covers many other possible particular algorithms, which arise by choosing a particular set of sample matrices SiS_{i}, for i=1,,r.i=1,\ldots,r.

Let ti=Tr(SiTAB1ATSi)t_{i}=\mathbf{Tr}\left(S_{i}^{T}AB^{-1}A^{T}S_{i}\right), and with (47) in (43) we have

The result (48) follows by applying Theorem 8. ∎

for i=1,r.i=1,\ldots r. In this case, the bound (50) is an equality and D2D^{2} is a scaled identity, so (51) and consequently (52) are equalities. For block methods, it is different story, and there is much more slack in the inequality (52). So much so, the convergence rate (49) does not indicate any advantage of using a block method (contrary to numerical experiments). To see the advantage of a block method, we need to use the exact expression for λmin(D2)\lambda_{\min}(D^{2}) given in (50). Though this results in a somewhat harder to interpret convergence rate, a matrix paving could be used explore this block convergence rate, as was done for the block Kaczmarz method .

By appropriately choosing BB and SS, this theorem applied to RK method (16), the CD-LS method (29) and the CD-pd method (20), yields the convergence results (18), (31) and (22), respectively, for single column sampling or block methods alike.

This theorem also suggests a preconditioning strategy, in that, a faster convergence rate will be attained if S\mathbf{S} is an approximate inverse of B1/2AT.B^{-1/2}A^{T}. For instance, in the RK method where B=IB=I, this suggests that an accelerated convergence can be attained if SS is a random sampling of the rows of a preconditioner (approximate inverse) of A.A.

Methods Based on Gaussian Sampling

Due to the symmetry of the multivariate normal distribution, there is a zero probability that ζNull(AT)\zeta\in\mathbf{Null}\left(A^{T}\right) for any nonzero matrix AA.

Unlike the discrete methods in Section 3, to calculate an iteration of (53) we need to compute the product of a matrix with a dense vector ζ\zeta. This significantly raises the cost of an iteration. Though in our numeric tests in Section 7, the faster convergence of the Gaussian method often pays off for their high iteration cost.

To analyze the complexity of the resulting method let ξ=defB1/2ATS,\xi\overset{\text{def}}{=}B^{-1/2}A^{T}S, which is also Gaussian, distributed as ξN(0,Ω)\xi\sim N(0,\Omega), where Ω=defB1/2ATΣAB1/2.\Omega\overset{\text{def}}{=}B^{-1/2}A^{T}\Sigma AB^{-1/2}. In this section we assume AA has full column rank, so that Ω\Omega is always positive definite. The complexity of the method can be established through

We can simplify the above by using the lower bound

which is proven in Lemma 11 in the Appendix. Thus

where we used the general lower bound in (34). Lemma 11 also shows that E[ξξT/ξ22]\mathbf{E}\left[\xi\xi^{T}/\|\xi\|^{2}_{2}\right] is positive definite, thus Theorem 8 guarantees that the expected norm of the error of all Gaussian methods converges exponentially to zero. This bound is tight upto a constant factor. For illustration of this, in the setting with A=I=ΣA=I=\Sigma we have ξN(0,I)\xi\sim N(0,I) and E[ξξT/ξ22]=1nI,\mathbf{E}\left[\xi\xi^{T}/\|\xi\|^{2}_{2}\right]=\tfrac{1}{n}I, which yields

When n=2n=2, then in Lemma 12 of the Appendix we prove that

which yields a very favourable convergence rate.

Let B=IB=I and choose Σ=I\Sigma=I so that S=ηN(0,I)S=\eta\sim N(0,I). Then (53) has the form

which we call the Gaussian Kaczmarz (GK) method, for it is the analogous method to the Randomized Karcmarz method in the discrete setting. Using the formulation (6), for instance, the GK method can be interpreted as

Thus at each iteration, a random normal Gaussian vector η\eta is drawn and a search direction is formed by ATη.A^{T}\eta. Then, starting from the previous iterate xkx^{k}, an exact line search is performed over this search direction so that the euclidean distance from the optimal is minimized.

2 Gaussian Least-Squares

Let B=ATAB=A^{T}A and choose SN(0,Σ)S\sim N(0,\Sigma) with Σ=AAT\Sigma=AA^{T}. It will be convenient to write S=AηS=A\eta, where ηN(0,I)\eta\sim N(0,I). Then method (53) then has the form

which we call the Gauss-LS method. This method has a natural interpretation through formulation (6) as

That is, starting from xkx^{k}, we take a step in a random (Gaussian) direction, then perform an exact line search over this direction that minimizes the least squares error. Thus the Gauss-LS method is the same as applying the Random Pursuit method with exact line search to the Least-squares function.

3 Gaussian Positive Definite

When AA is positive definite, we achieve an accelerated Gaussian method. Let B=AB=A and choose S=ηN(0,I)S=\eta\sim N(0,I). Method (53) then has the form

Using formulation (6), the method can be interpreted as

That is, starting from xkx^{k}, we take a step in a random (Gaussian) direction, then perform an exact line search over this direction. Thus the Gauss-pd method is equivalent to applying the Random Pursuit method with exact line search to f(x).f(x).

Numerical Experiments

In implementing the discrete sampling methods we used the convenient probability distributions (47).

All tests were performed on a Desktop with 64bit quad-core Intel(R) Core(TM) i5-2400S CPU @2.50GHz with 6MB cache size with a Scientific Linux release 6.4 (Carbon) operating system.

Consistently across our experiments, the Gaussian methods almost always require more flops to reach a solution with the same precision as their discrete sampling counterparts. This is due to the expensive matrix-vector product required by the Gaussian methods. While the results are more mixed when measured in terms of wall clock time. This is because MATLAB performs automatic multi-threading when calculating matrix-vector products, which was the bottleneck cost in the Gaussian methods. As our machine has four cores, this explains some of the difference observed when measuring performance in terms of number of flops and wall clock time.

First we compare the methods Gauss-LS, CD-LS, Gauss-Kaczmarz and RK methods on synthetic linear systems generated with the matrix functions rand and sprandn, see Figure 2. The high iteration cost of the Gaussian methods resulted in poor performance on the dense problem generated using rand in Figure 2(a). In Figure 2(b) we compare the methods on a sparse linear system generated using the MATLAB sparse random matrix function sprandn(m,nm,n,density,rc), where density is the percentage of nonzero entries and rc is the reciprocal of the condition number. On this sparse problem the Gaussian methods are more efficient, and converge at a similar rate to the discrete sampling methods.

In Figure 3 we test two overdetermined linear systems taken from the the Matrix Market collection . The collection also provides the right-hand side of the linear system. Both of these systems are very well conditioned, but do not have full column rank, thus Theorem 8 does not apply. The four methods have a similar performance on Figure 3(a), while the Gauss-LS and CD-LS method converge faster on 3(b) as compared to the Gauss-Kaczmarz and Kaczmarz methods.

Finally, we test two problems, the SUSY problem and the covtype.binary problem, from the library of support vector machine problems LIBSVM . These problems do not form consistent linear systems, thus only the Gauss-LS and CD-LS methods are applicable, see Figure 4. This is equivalent to applying the Gauss-pd and CD-pd to the least squares system ATAx=ATb,A^{T}Ax=A^{T}b, which is always consistent.

Despite the higher iteration cost of the Gaussian methods, their performance, in terms of the wall-clock time, is comparable to performance of the discrete methods when the system matrix is sparse.

2 Bound for Gaussian convergence

Now we compare the error over the number iterations of the Gauss-LS method to theoretical rate of convergence given by the bound (55). For the Gauss-LS method (55) becomes

In Figures 5(a) and 5(b) we compare the empirical and theoretical bound on a random Gaussian matrix and the liver-disorders problem . Furthermore, we ran the Gauss-LS method 100 times and plot as dashed lines the 95% and 5% quantiles. These tests indicate that the bound it tight for well conditioned problems, such as Figure 5(a) in which the system matrix has a condition number equal to 1.941.94. While in Figure 5(b) the system matrix has a condition number of 41.7041.70 and there is some much more slack between the empirical convergence and the theoretical bound.

3 Positive Definite

First we compare the two methods Gauss-pd (58) and CD-pd (21) on synthetic data in Figure 6.

Using the MATLAB function hilbert, we can generate positive definite matrices with very high condition number, see Figure 6(LEFT). Both methods converge slowly and, despite the dense system matrix, the Gauss-pd method has a similar performance to CD-pd. In Figure (6)(RIGHT) we compare the two methods on a system generated by the MATLAB function sprandsym (mm, nn, density, rc, type), where density is the percentage of nonzero entries, rc is the reciprocal of the condition number and type=1 returns a positive definite matrix. The Gauss-pd and the CD-pd method have a similar performance in terms of wall clock time on this sparse problem.

To appraise the performance gain in using block variants, we perform tests using two block variants: the Randomized Newton method (26), which we will now refer to as the Block CD-pd method, and the Block Gauss-pd method (59). The size of blocks qq in both methods was set to q=n.q=\sqrt{n}. To solve the q×qq\times q system required in the block methods, we use MATLAB’s built-in direct solver, sometimes referred to as “back-slash”.

Next we test the Newton system 2f(w0)x=f(w0)\nabla^{2}f(w_{0})x=-\nabla f(w_{0}), arising from four ridge-regression problems of the form

using data from LIBSVM . In particular, we set w0=0w_{0}=0 and use λ=1\lambda=1 as the regularization parameter, whence f(w0)=ATb\nabla f(w_{0})=A^{T}b and 2f(w0)=ATA+I\nabla^{2}f(w_{0})=A^{T}A+I.

In terms of wall clock time, The Gauss-pd method converged faster on all problems accept the protein problem as compared to CD-pd. The two Block methods had a comparable performance on the aloi and the SUSY problem. The Block Gauss-pd method converged in one iteration on covtype.binary, and the Block CD-pd method converged fast on the Protein problem.

We now compare the methods on two positive definite matrices from the Matrix Market collection , see Figure 8. The right-hand side was generated using rand(n,1). The Block CD-pd method converged much faster on both problems. The lower condition number (κ2=12\kappa_{2}=12) of the gr_30_30-rsa problem resulted in fast convergence of all methods, see Figure 8(a). While the high condition number (κ2=4.3104\kappa_{2}=4.3\cdot 10^{4}) of the bcsstk18 problem, resulted in a slow convergence for all methods, see Figure 8(b).

Despite the clear advantage of using a block variant, applying a block method that uses a direct solver can be infeasible on very ill-conditioned problems. As an example, applying the Block CD-pd to the Hilbert system, and using MATLAB back-slash solver to solve the inner q×qq\times q systems, resulted in large numerical inaccuracies, and ultimately, prevented the method from converging. This occurred because the submatrices of the Hilbert matrix are also very ill-conditioned.

4 Comparison between Optimized and Convenient probabilities

We compare the practical performance of using the convenient probabilities (47) against using the optimized probabilities by solving (46). We solved (46) using the disciplined convex programming solver cvx for MATLAB.

In Table 2 we compare the different convergence rates for the CD-pd method, where ρc\rho_{c} is the convenient convergence rate (49), ρ\rho^{*} the optimized convergence rate, (11/n)(1-1/n) is the lower bound, and in the final “optimized time(s)” column the time taken to compute ρ\rho^{*}. In Figure 9, we compare the empirical convergence of the CD-pd method when using the convenient probabilities (47) and CD-pd-opt, the CD-pd method with the optimized probabilities, on four ridge regression problems and a uniform random matrix. We ran each method for 6060 seconds.

In most cases using the optimized probabilities results in a much faster convergence, see Figures 9(a), 9(c), 9(d) and 9(e). In particular, the 7.4017.401 seconds spent calculating the optimal probabilities for aloi paid off with a convergence that was 5555 seconds faster. The mushrooms problem was insensitive to the choice of probabilities 9(d). Finally despite ρ\rho^{*} being much less than ρc\rho_{c} on covtype, see Table 2, using optimized probabilities resulted in an initially slower method, though CD-pd-opt eventually catches up as CD-pd stagnates, see Figure 9(b).

In Table 3 we compare the different convergence rates for the RK method. In Figure 10, we then compare the empirical convergence of the RK method when using the convenient probabilities (47) and RK-opt, the RK method with the optimized probabilities by solving (46). The rates ρ\rho^{*} and ρc\rho_{c} for the rand(500,100) problem are similar, and accordingly, both the convenient and optimized variant converge at a similar rate in practice, see Figure 10b. While the difference in the rates ρ\rho^{*} and ρc\rho_{c} for the liver-disorders is more pronounced, and in this case, the 0.830.83 seconds invested in obtaining the optimized probability distribution paid off in practice, as the optimized method converged 1.251.25 seconds before the RK method with the convenient probability distribution, see Figure 10a.

We conclude from these tests that the choice of the probability distribution can greatly affect the performance of the method. Hence, it is worthwhile to develop approximate solutions to (45).

Conclusion

We present a unifying framework for the randomized Kaczmarz method, randomized Newton method, randomized coordinate descent method and random Gaussian pursuit. Not only can we recover these methods by selecting appropriately the parameters SS and BB, but also, we can analyse them and their block variants through a single Theorem 8. Furthermore, we obtain a new lower bound for all these methods in Theorem 6, and in the discrete case, recover all known convergence rates expressed in terms of the scaled condition number in Theorem 10.

The Theorem 10 also suggests a preconditioning strategy. Developing preconditioning methods are important for reaching a higher precision solution on ill-conditioned problems. For as we have seen in the numerical experiments, the randomized methods struggle to bring the solution within 10210^{-2} relative error when the matrix is ill-conditioned.

This is also a framework on which randomized methods for linear systems can be designed. As an example, we have designed a new block variant of RK, a new Gaussian Kaczmarz method and a new Gaussian block method for positive definite systems. Furthermore, the flexibility of our framework and the general convergence Theorems 8 and 6 allows one to tailor the probability distribution of SS to a particular problem class. For instance, other continuous distributions such uniform, or other discrete distributions such Poisson might be more suited to a particular class of problems.

Numeric tests reveal that the new Gaussian methods designed for overdetermined systems are competitive on sparse problems, as compared to the Kaczmarz and CD-LS methods. The Gauss-pd also proved competitive as compared to CD-pd on all tests. Though, when applicable, the combined efficiency of using a direct solver and an iterative procedure, such as in Block CD-pd method, proved the most efficient.

The work opens up many possible future venues of research. Including investigating accelerated convergence rates through preconditioning strategies based on Theorem 10 or by obtaining approximate optimized probability distributions (46).

The authors would like to thank Prof. Sandy Davie for useful discussions relating to Lemma 12, and Prof. Joel Tropp for invaluable suggestions regarding Lemma 11.

References

Appendix A A Bound on the Expected Gaussian Projection Matrix

Let us write S(ξ)S(\xi) for the random vector ξ/ξ2\xi/\|\xi\|_{2} (if ξ=0\xi=0, we set S(ξ)=0S(\xi)=0). Using this notation, we can write

where the last identity follows since E[S(ξ)]=0\mathbf{E}\left[S(\xi)\right]=0, which in turn holds as the Gaussian distribution is centrally symmetric. As ξ=Uu\xi=Uu, note that

Left multiplying both sides by UU we obtain US(u)=S(ξ)US(u)=S(\xi), from which we obtain

To prove (62), note first that M=defE[uuT/uTu]M\overset{\text{def}}{=}\mathbf{E}\left[uu^{T}/u^{T}u\right] is a diagonal matrix. One can verify this by direct calculation (informally, this holds because the entries of uu are independent and centrally symmetric). The iith diagonal entry is given by

As the map (x,y)x2/y(x,y)\rightarrow x^{2}/y is convex on the positive orthant, we can apply Jensen’s inequality, which gives

Appendix B Expected Gaussian Projection Matrix in 2D

Let Σ=UDUT\Sigma=UDU^{T} and uN(0,D).u\sim N(0,D). Given (61) it suffices to show that

Let σx2\sigma_{x}^{2} and σy2\sigma_{y}^{2} be the two diagonal elements of D.D. First, suppose that σx=σy.\sigma_{x}=\sigma_{y}. Then u=σxηu=\sigma_{x}\eta where ηN(0,I)\eta\sim N(0,I) and

Now suppose that σxσy.\sigma_{x}\neq\sigma_{y}. We calculate the diagonal terms of the covariance matrix by integrating

Using polar coordinates x=Rcos(θ)x=R\cos(\theta) and y=Rsin(θ)y=R\sin(\theta) we have

where C(θ)=def(cos(θ)2/σx2+sin(θ)2/σy2).C(\theta)\overset{\text{def}}{=}\left(\cos(\theta)^{2}/\sigma_{x}^{2}+\sin(\theta)^{2}/\sigma_{y}^{2}\right). Note that

where b=σx/σy.b=\sigma_{x}/\sigma_{y}. Multiplying the numerator and denominator of the integrand by sec4(x)\sec^{4}(x) gives the integral

Substituting v=tan(θ)v=\tan(\theta) so that v2+1=sec2(θ)v^{2}+1=\sec^{2}(\theta), dv=sec2(θ)dθdv=\sec^{2}(\theta)d\theta and using the partial fractions

To apply the limits of integration, we must take care because of the singularity at θ=π/2\theta=\pi/2. For this, consider the limits

Using this to evaluate (67) on the limits of the interval [0,π/2][0,\,\pi/2] gives

Applying a similar argument for calculating the limits from π/2+\pi/2^{+} to π\pi, we find

Repeating the same steps with xx swapped for yy we obtain the other diagonal element, which concludes the proof of (64). ∎