arXiv is now an independent nonprofit! Learn more
License: arXiv.org perpetual non-exclusive license
arXiv:2008.04447v1 [cs.MS] 10 Aug 2020

Randomized Projection for Rank-Revealing Matrix Factorizations and Low-Rank Approximations Thanks:  Revised from Randomized QR with Column Pivoting for submission to SIGEST

Jed A. Duersch Thanks: Sandia National Laboratories, Livermore, CA 94550, United States (jaduers@sandia.gov)    Ming Gu Email: mgu@berkeley.edu Thanks: Department of Mathematics, University of California, Berkeley, CA 94720 ().
Abstract

Rank-revealing matrix decompositions provide an essential tool in spectral analysis of matrices, including the Singular Value Decomposition (SVD) and related low-rank approximation techniques. QR with Column Pivoting (QRCP) is usually suitable for these purposes, but it can be much slower than the unpivoted QR algorithm. For large matrices, the difference in performance is due to increased communication between the processor and slow memory, which QRCP needs in order to choose pivots during decomposition. Our main algorithm, Randomized QR with Column Pivoting (RQRCP), uses randomized projection to make pivot decisions from a much smaller sample matrix, which we can construct to reside in a faster level of memory than the original matrix. This technique may be understood as trading vastly reduced communication for a controlled increase in uncertainty during the decision process. For rank-revealing purposes, the selection mechanism in RQRCP produces results that are the same quality as the standard algorithm, but with performance near that of unpivoted QR (often an order of magnitude faster for large matrices). We also propose two formulas that facilitate further performance improvements. The first efficiently updates sample matrices to avoid computing new randomized projections. The second avoids large trailing updates during the decomposition in truncated low-rank approximations. Our truncated version of RQRCP also provides a key initial step in our truncated SVD approximation, TUXV. These advances open up a new performance domain for large matrix factorizations that will support efficient problem-solving techniques for challenging applications in science, engineering, and data analysis.

keywords
QR factorization, column pivoting, rank-revealing, random sampling, sample update, blocked algorithm, low-rank approximation, truncated SVD
Funding.
The original work was support by NSF award 1319312. This revised version was supported by NSF award 1760316 and by the Laboratory Directed Research and Development program at Sandia National Laboratories.
runningheads: Randomized Projection for Rank-Revealing Factorizations / Jed A. Duersch and Ming Gu
AMS
68W20, 15A23, 15A18, 65F25

1 Introduction

QR with Column Pivoting (QRCP) is a fundamental kernel in numerical linear algebra that broadly supports scientific analysis. As a rank-revealing matrix factorization, QRCP provides the first step in efficient implementations of spectral methods such as the eigenvalue decomposition and Principal Component Analysis (PCA), also called the Singular Value Decomposition (SVD) [16]. QRCP also plays a key role in least-squares approximation [6] and stable basis extraction [33, 15, 10] for other important algorithms. These methods allow us to form compressed representations of linear operators by truncation while retaining dominant features that facilitate analytic capabilities that would otherwise be impractical for large matrices. In the field of data science, PCA and its generalizations [35] support unsupervised machine learning techniques to extract salient features in two-dimensional numerical arrays. Randomized methods have been extended further to support analysis of multidimensional data using tensor decompositions [1, 17].

QRCP builds on the QR decomposition, which expresses a matrix 𝑨\boldsymbol{A} as the product of an orthogonal matrix 𝑸\boldsymbol{Q} and a right-triangular factor 𝑹\boldsymbol{R} as 𝑨=𝑸𝑹\boldsymbol{A}=\boldsymbol{Q}\boldsymbol{R}. Unlike the LU decomposition, or Gaussian elimination, QR always exists and may be stably computed regardless of the conditioning of 𝑨\boldsymbol{A}. Furthermore, finely tuned library implementations use a blocked algorithm that operates with the communication efficiency of matrix-matrix multiply, or level-3 kernels in the Basic Linear Algebra Subprograms (BLAS-3). The standard QR decomposition is not, however, suitable for rank detection or low-rank approximations. These applications require a column permutation scheme to process more representative columns of 𝑨\boldsymbol{A} earlier in the decomposition [5, 4]. A permutation matrix 𝑷\boldsymbol{P} encodes these pivoting decisions so that the decomposition becomes 𝑨𝑷=𝑸𝑹\boldsymbol{A}\boldsymbol{P}=\boldsymbol{Q}\boldsymbol{R}.

The basic QRCP approach selects an unfactorized column with a maximal 2-norm of components that do not reside within the span of previously factorized columns. This heuristic is a greedy algorithm attempting to maximize the sequence of partial determinants in 𝑹\boldsymbol{R}, which is typically adequate for rank detection with a few notable rare exceptions, such as the Kahan matrix [12]. The critical drawback, however, is that these computations suffer a substantial increase in communication between slow (large) and fast (small) levels of memory, especially for large matrices. Each pivot decision requires at least one matrix-vector multiply in series, thus limiting overall efficiency to that of level-2 kernels in the Basic Linear Algebra Subprograms (BLAS-2).

Our primary motivation to examine efficient rank-revealing algorithms is that, for large matrices or algorithms that require frequent use of QRCP, the communication bottleneck becomes prohibitively expensive and impedes utilization of this important set of analytic tools.

1.1 Our Contributions

Randomized projection allows us to reduce communication complexity at the cost of increasing uncertainty regarding latent 2-norms (and inner products) among columns in a large matrix. Randomized QR with Column Pivoting (RQRCP), shown in algorithm 4, harnesses this trade-off to obtain full blocks of pivot decisions that can be applied to 𝑨\boldsymbol{A} all at once. We do this by drawing a Gaussian Independent Identically Distributed (GIID) matrix, 𝛀\boldsymbol{\Omega}, and compressing columns of 𝑨\boldsymbol{A} into a sample matrix, 𝑩=𝛀𝑨\boldsymbol{B}=\boldsymbol{\Omega}\boldsymbol{A}. The sample matrix retains enough information about the original matrix for us to obtain a full block of pivoting decisions, while requiring far less communication to do so. Because we construct the sample to contain far fewer rows than the original, it resides in a faster level of memory than the full matrix. Having a full block of pivots allows us to update the matrix that becomes 𝑹\boldsymbol{R} with blocked BLAS-3 operations in the same fashion as unpivoted QR, thus entirely eliminating the communication bottleneck of BLAS-2 operations encountered in the standard algorithm.

We show how rank-revealing decompositions are well suited to this approach because each pivot decision must merely avoid selecting a column containing a relatively small component orthogonal to the span of previous pivots. As many columns are often suitable for this purpose, the use of precise 2-norm computations in standard QRCP is unnecessarily. Our approach has been adopted in subsequent work in computing matrix factorization-based low-rank approximations on sequential and parallel platforms [11, 24, 25, 27, 37].

We also propose a sample update formula that reduces the number of BLAS-3 operations required to process a full matrix. Given a block of pivots, updating 𝑹\boldsymbol{R} with blocked Householder reflections requires two matrix-matrix multiplications. Without a formula to update the sample, we would need a new sample matrix after each block and one additional matrix-matrix multiply. Instead, we utilize computations that are needed to update 𝑹\boldsymbol{R} to also update 𝑩\boldsymbol{B} into a suitable sample for the next decision block.

RQRCP naturally extends to a truncated formulation, described in algorithm 5, that further reduces communication by avoiding trailing updates. For low-rank matrix approximations, this algorithm requires only one block matrix-matrix multiply per update. We accomplish this by storing reflector information in the compact WY notation [29], which allows us to construct each block of 𝑹\boldsymbol{R} without intermediate updates. Moreover, this algorithm serves as a key initial step in our approximation of the truncated SVD described in algorithm 6, which is a variant of Stewart’s QLP algorithm [34].

Section 2 will discuss the nature of the communication bottleneck and related approaches to address it. Section 3 will analyze sample-based pivoting as the maximization of expected utility and derive our main result, RQRCP. Section 4 will derive and explain our truncated algorithms for low-rank approximation. Section 5 will provide numerical experiments that explore the performance and decomposition quality of these approaches. Section 6 will offer concluding remarks.

2 Related Work

In order to understand how our algorithms improve performance, we first review the reasons why additional communication could not be avoided with previous approaches. Given a large matrix 𝑨m×n\boldsymbol{A}\in\mathbb{R}^{m\times n}, the QRCP decomposition can be computed using algorithm 1. This algorithm is composed of a sequence of Householder reflections. To review, a reflector 𝒚\boldsymbol{y} is formed from a particular column, say 𝒂\boldsymbol{a}, by subtracting the desired reflection (which must have the same 2-norm) from the current form, such as 𝒚=𝒂(sign(𝒂1)𝒂2𝒆1)\boldsymbol{y}=\boldsymbol{a}-\left(-\text{sign}(\boldsymbol{a}_{1})\left\lVert\boldsymbol{a}\right\rVert_{2}\boldsymbol{e}_{1}\right). The negative sign of the leading element of 𝒂\boldsymbol{a} is used to ensure that the reflector satisfies 𝒚2𝒂2\left\lVert\boldsymbol{y}\right\rVert_{2}\geq\left\lVert\boldsymbol{a}\right\rVert_{2} for numerical stability. The corresponding reflection coefficient is τ=2/𝒚T𝒚\tau=2/\boldsymbol{y}^{T}\boldsymbol{y}, which yields the Householder reflection 𝑯=𝑰𝒚τ𝒚T\boldsymbol{H}=\boldsymbol{I}-\boldsymbol{y}\tau\boldsymbol{y}^{T}.

In the algorithms that follow, an intermediate state of an array or operator at the end of iteration jj is denoted by superscript (j)(j) to emphasize when updates overwrite a previous state. In contrast, an element computed on iteration jj that remains accessible in some form is denoted with a simple subscript.

Algorithm 1 QRCP with BLAS-2 Householder reflections.
1:
2: 𝑨\boldsymbol{A} is m×nm\times n.
3:
4: 𝑸\boldsymbol{Q} is an m×mm\times m orthogonal matrix.
5: 𝑹\boldsymbol{R} is an m×nm\times n right triangular matrix, magnitude of diagonals nonincreasing.
6: 𝑷\boldsymbol{P} is an n×nn\times n permutation matrix such that 𝑨𝑷=𝑸𝑹\boldsymbol{A}\boldsymbol{P}=\boldsymbol{Q}\boldsymbol{R}.
7: function [𝑸,𝑹,𝑷][\boldsymbol{Q},\boldsymbol{R},\boldsymbol{P}](QRCP)𝑨\boldsymbol{A}
8:   Compute initial column 2-norms which become trailing column norms.
9:   for j=1,2,,kj=1,2,\ldots,k, where k=min(m,n)k=\min(m,n) do
10:    Find index pjp_{j} of the column with maximum trailing 2-norm.
11:    Swap columns jj and pjp_{j} with permutation 𝑷j\boldsymbol{P}_{j}.
12:    Form Householder reflection 𝑯j=𝑰𝒚jτj𝒚jT\boldsymbol{H}_{j}=\boldsymbol{I}-\boldsymbol{y}_{j}\tau_{j}\boldsymbol{y}_{j}^{T} from new column.
13:     Apply reflection 𝑨(j)=𝑯j(𝑨(j1)𝑷j)\boldsymbol{A}^{(j)}=\boldsymbol{H}_{j}(\boldsymbol{A}^{(j-1)}\boldsymbol{P}_{j}).
14:     Update trailing column norms by removing the contribution of row jj.
15:   end for
16:   𝑸=𝑯1𝑯2𝑯k\boldsymbol{Q}=\boldsymbol{H}_{1}\boldsymbol{H}_{2}\ldots\boldsymbol{H}_{k} is the product of all reflections.
17:   𝑹=𝑨(k)\boldsymbol{R}=\boldsymbol{A}^{(k)}.
18:   𝑷=𝑷1𝑷2𝑷k\boldsymbol{P}=\boldsymbol{P}_{1}\boldsymbol{P}_{2}\ldots\boldsymbol{P}_{k} is the aggregate column permutation.
19: end function

At the end of iteration jj we can represent the matrix 𝑨\boldsymbol{A} as a partial factorization using the permutation 𝑷(j)=𝑷1𝑷j\boldsymbol{P}^{(j)}=\boldsymbol{P}_{1}\ldots\boldsymbol{P}_{j}, the composition of column swaps so far, and the analogous composition of Householder reflections, 𝑸(j)=𝑯1𝑯j\boldsymbol{Q}^{(j)}=\boldsymbol{H}_{1}\ldots\boldsymbol{H}_{j}, to obtain

𝑨𝑷(j)=𝑸(j)[𝑹11(j)𝑹12(j)0𝑨^(j)].\boldsymbol{A}\boldsymbol{P}^{(j)}=\boldsymbol{Q}^{(j)}\left[\begin{array}[]{cc}\boldsymbol{R}^{(j)}_{11}&\boldsymbol{R}^{(j)}_{12}\\ 0&\boldsymbol{\hat{A}}^{(j)}\\ \end{array}\right].

The leading j1j-1 entries of the vector 𝒚j\boldsymbol{y}_{j} in line 66 of Algorithm 1 are 00. The upper-left submatrix 𝑹11(j)j×j\boldsymbol{R}^{(j)}_{11}\in\mathbb{R}^{j\times j} is right-triangular. Likewise, 𝑹12(j)j×j\boldsymbol{R}^{(j)}_{12}\in\mathbb{R}^{j\times j} completes the leading jj rows of 𝑹\boldsymbol{R}. It only remains to process the trailing matrix 𝑨^(j)\boldsymbol{\hat{A}}^{(j)}. On the next iteration, the 2-norm of the selected column within 𝑨^(j)\boldsymbol{\hat{A}}^{(j)} becomes the magnitude of the next diagonal element in 𝑹11(j+1)\boldsymbol{R}^{(j+1)}_{11}. We may understand QRCP as a greedy procedure intended to maximize the magnitude of the determinant of 𝑹11(j+1)\boldsymbol{R}^{(j+1)}_{11}. The new determinant magnitude is |det𝑹11(j+1)|=|det𝑹11(j)|𝑨^(j)(:,pj+1)2|\det\boldsymbol{R}^{(j+1)}_{11}|=|\det\boldsymbol{R}^{(j)}_{11}|\left\lVert\boldsymbol{\hat{A}}^{(j)}(:,p_{j+1})\right\rVert_{2}, so this scheme has selected the pivot that multiplies the previous determinant by the largest factor. Note that true determinant maximization would require exchanging prior columns and adjusting the factorization accordingly [13].

Early implementations of QR also relied on BLAS-2 kernels and, thus, gave similar performance results until reflector blocking was employed in QR [2, 32]. To process bb columns of an m×nm\times n matrix with BLAS-2 kernels, O(bmn)O(bmn) elements must pass from slow to fast memory. Blocking improves performance by reducing communication between these layers of memory using matrix-matrix multiply. Instead of updating the entire matrix with each Householder reflection, transformations are collected into a matrix representation that can be applied using two BLAS-3 matrix-matrix multiplies, which reduces communication complexity to O(bmn/M3/2)O(bmn/M^{3/2}), where MM is the size of fast memory.

In order to produce a correct pivot decision at iteration j+1j+1 in QRCP, however, trailing column norms must be updated to remove the contribution of row jj, which depends on the Householder transformation 𝑯j\boldsymbol{H}_{j}. At first glance, this update appears to require two BLAS-2 operations on the trailing matrix per iteration. The first operation computes scaled inner products 𝒘jT=τj𝒚jT𝑨(j1)𝑷j\boldsymbol{w}_{j}^{T}=\tau_{j}\boldsymbol{y}_{j}^{T}\boldsymbol{A}^{(j-1)}\boldsymbol{P}_{j} and the second operation modifies the trailing matrix with the rank-1 update 𝑨(j)=𝑨(j1)𝑷j𝒚j𝒘jT\boldsymbol{A}^{(j)}=\boldsymbol{A}^{(j-1)}\boldsymbol{P}_{j}-\boldsymbol{y}_{j}\boldsymbol{w}_{j}^{T}. These two operations cause the communication bottleneck in QRCP.

2.1 Attempts to Achieve BLAS-3 Performance

Quintana-Ortí, Sun, and Bischof [30] were able to halve BLAS-2 operations with the insight that the trailing norm update does not require completing the full rank-1 update on each iteration. Instead, reflections can be gathered into blocks, as in QR. This method appears in algorithm 2.

At the end of iteration jj, the algorithm has collected a block of reflectors 𝒀(j)\boldsymbol{Y}^{(j)}. Reflector 𝒚i\boldsymbol{y}_{i}, for iji\leq j, appears in column ii from the diagonal down. This forms a block reflection 𝑸(j)=𝑰𝒀(j)𝑻(j)𝒀(j)T\boldsymbol{Q}^{(j)}=\boldsymbol{I}-\boldsymbol{Y}^{(j)}\boldsymbol{T}^{(j)}\boldsymbol{Y}^{(j)T}, where 𝑻(j)\boldsymbol{T}^{(j)} is an upper triangular j×jj\times j connection matrix that can be solved from 𝒀(j)\boldsymbol{Y}^{(j)} so that 𝑸(j)\boldsymbol{Q}^{(j)} is orthogonal. This algorithm must also collect each corresponding scaled inner product, 𝒘iT\boldsymbol{w}_{i}^{T}, which appears as row ii in a matrix 𝑾(j)T\boldsymbol{W}^{(j)T}. In the compact WY notation, this block of inner products is 𝑾(j)T=𝑻(j)T𝒀(j)T𝑨𝑷(j)\boldsymbol{W}^{(j)T}=\boldsymbol{T}^{(j)T}\boldsymbol{Y}^{(j)T}\boldsymbol{A}\boldsymbol{P}^{(j)}, which provides enough information to update row jj alone and adjust trailing column norms to prepare for the next pivot selection

𝑨(j)(j,:)=𝑨(j1)(j,:)𝑷j𝒀(j)(j,:)𝑾(j)T.\boldsymbol{A}^{(j)}(j,:)=\boldsymbol{A}^{(j-1)}(j,:)\boldsymbol{P}_{j}-\boldsymbol{Y}^{(j)}(j,:)\boldsymbol{W}^{(j)T}.

Note, however, that this construction complicates reflector formation. As before, the next pivot index pj+1p_{j+1} is selected and swapped into column j+1j+1. Let this new column be 𝒂j+1\boldsymbol{a}_{j+1}. From rows j+1j+1 down, elements of 𝒂j+1\boldsymbol{a}_{j+1} have not been updated with the current block of reflectors. Before we can form 𝒚j+1\boldsymbol{y}_{j+1}, prior transformations must be applied to these rows from the formula 𝒂^j+1=𝒂j+1𝒀(j)𝑾(j)T(:,pj+1)\boldsymbol{\hat{a}}_{j+1}=\boldsymbol{a}_{j+1}-\boldsymbol{Y}^{(j)}\boldsymbol{W}^{(j)T}(:,p_{j+1}). An additional step is also required to compute reflector inner products because they must account for reflections that have not been applied to the trailing matrix. The adjusted formula for these inner products is

𝒘j+1T=τj+1(𝒚j+1T𝑨(j)(𝒚j+1T𝒀(j))𝑾(j)T)𝑷j+1.\boldsymbol{w}_{j+1}^{T}=\tau_{j+1}\left(\boldsymbol{y}_{j+1}^{T}\boldsymbol{A}^{(j)}-(\boldsymbol{y}_{j+1}^{T}\boldsymbol{Y}^{(j)})\boldsymbol{W}^{(j)T}\right)\boldsymbol{P}_{j+1}.

The reflector and inner product blocks are then updated:

𝒀(j+1)=[𝒀(j)𝒚j+1]and𝑾(j+1)T=[𝑾(j)T𝑷j+1𝒘j+1T].\boldsymbol{Y}^{(j+1)}=\begin{bmatrix}\boldsymbol{Y}^{(j)}&\boldsymbol{y}_{j+1}\\ \end{bmatrix}\quad\text{and}\quad\boldsymbol{W}^{(j+1)T}=\begin{bmatrix}\boldsymbol{W}^{(j)T}\boldsymbol{P}_{j+1}\\ \boldsymbol{w}_{j+1}^{T}\\ \end{bmatrix}\text{.}

Unfortunately, the remaining BLAS-2 operations 𝒚j+1T𝑨(j)\boldsymbol{y}_{j+1}^{T}\boldsymbol{A}^{(j)} and 𝒚j+1T𝒀(j)\boldsymbol{y}_{j+1}^{T}\boldsymbol{Y}^{(j)} in the inner product computation still dominate slow communication complexity for large matrices. The entire trailing matrix must pass from slow to fast memory once per iteration. Consequently, even heavily optimized implementations of blocked QRCP still run substantially slower than blocked QR on both sequential and parallel architectures.

Algorithm 2 QRCP with BLAS-3 reflection blocking.
1:
2: 𝑨\boldsymbol{A} is m×nm\times n.
3:
4: 𝑸\boldsymbol{Q} is an m×mm\times m orthogonal matrix.
5: 𝑹\boldsymbol{R} is an m×nm\times n right triangular matrix, diagonals in nonincreasing magnitude order.
6: 𝑷\boldsymbol{P} is an n×nn\times n permutation matrix such that 𝑨𝑷=𝑸𝑹\boldsymbol{A}\boldsymbol{P}=\boldsymbol{Q}\boldsymbol{R}.
7: function [𝑸,𝑹,𝑷]=[\boldsymbol{Q},\boldsymbol{R},\boldsymbol{P}]= QRCP(𝑨\boldsymbol{A})
8:   Compute initial column 2-norms, which will become trailing column norms.
9:   for i=0,b,2b,i=0,b,2b\ldots, where bb is block size. do
10:    for j=i+1,i+2,min(i+b,k)j=i+1,i+2,\ldots\min(i+b,k), where k=min(m,n)k=\min(m,n). do
11:      Find index pjp_{j} of the column with maximum trailing 2-norm.
12:      Apply permutation 𝑷j\boldsymbol{P}_{j} swapping column jj with pjp_{j}.
13:      Update column jj with prior reflections in this block.
14:      Form reflector 𝒚j\boldsymbol{y}_{j} and τj\tau_{j} from new column jj.
15:      Compute adjusted reflector inner products wjT\boldsymbol{w}_{j}^{T}.
16:      Update row jj with all reflections in this block.
17:      Update trailing column norms by removing the contribution of row jj.
18:    end for
19:    Apply block reflection to trailing matrix.
20:   end for
21:   𝑸=𝑰𝒀k𝑻k𝒀kT\boldsymbol{Q}=\boldsymbol{I}-\boldsymbol{Y}_{k}\boldsymbol{T}_{k}\boldsymbol{Y}_{k}^{T} where 𝑻k\boldsymbol{T}_{k} can be recovered from 𝒀k\boldsymbol{Y}_{k} and τ1,,τk\tau_{1},\ldots,\tau_{k}.
22:   𝑹=𝑨(k)\boldsymbol{R}=\boldsymbol{A}^{(k)}.
23:   𝑷=𝑷1𝑷2𝑷k\boldsymbol{P}=\boldsymbol{P}_{1}\boldsymbol{P}_{2}\ldots\boldsymbol{P}_{k} is the aggregate column permutation.
24: end function

2.2 Communication Avoiding Rank-Revealing QR

Several mechanisms have been put forward to avoid repeating full passes over the trailing matrix on each iteration. Bischof [3] proposed pivoting restricted to local blocks and Demmel, et al. [7, 8] propose a procedure called Communication Avoiding Rank-Revealing QR (CARRQR). CARRQR proceeds by partitioning the trailing matrix into 𝒫\mathcal{P} subsets of columns that are processed independently and possibly simultaneously. From within each column subset, bb candidate pivots are selected using QRCP. Adjacent subsets of candidates are then combined to form 12𝒫\frac{1}{2}\mathcal{P} subsets of 2b2b candidates. This procedure continues, using QRCP to filter bb candidates per subset followed by merging results into 14𝒫\frac{1}{4}\mathcal{P} subsets and so on, until only one subset of bb candidates remains. The trailing matrix is then updated as before, with blocked reflections.

We now examine several practical constraints in implementing CARRQR. First, the reflectors 𝒀\boldsymbol{Y}, inner products 𝑾T\boldsymbol{W}^{T}, and leading rows of 𝑹\boldsymbol{R} must be stored separately from the original matrix for each independently processed subset of columns. Furthermore, one must employ a version of QRCP that avoids the trailing update, because the final reflectors are unknown until the last selection stage. Any intermediate changes to the original columns would have to be undone before the final transformations can be correctly processed. In contrast, QRCP can be written to convert columns into reflectors, storing the results in the same array as the input on the strictly lower triangle portion of the matrix. Likewise, 𝑹\boldsymbol{R} can be stored in place of the input on the upper triangle.

Depending on the initial column partition, CARRQR performs up to 2 times as many inner products as QRCP per block iteration. Note that as the reflector index jj increases, the total number of inner products of the form 𝒚j+1T𝒚j+1\boldsymbol{y}_{j+1}^{T}\boldsymbol{y}_{j+1}, 𝒚j+1T𝒀(j)\boldsymbol{y}_{j+1}^{T}\boldsymbol{Y}^{(j)} and 𝒚j+1T𝑨(j)\boldsymbol{y}_{j+1}^{T}\boldsymbol{A}^{(j)} remains constant. Therefore, if the iith subset contains nin_{i} columns, bnibn_{i} inner products will be required to produce bb candidates. Letting n1+n2++n𝒫=nn_{1}+n_{2}+\cdots+n_{\mathcal{P}}=n on the first stage of refinement, summing over all of the subsets gives bnbn inner products to produce 𝒫\mathcal{P} subsets of bb candidates. QRCP requires the same computational complexity to produce bb final pivots. Assuming that the number of candidates is at least halved for each subsequent stage of refinement in CARRQR, it easily follows that no more than 2bn2bn inner products will be computed in total.

Despite increased computational complexity, CARRQR is intended to benefit from better memory utilization and better parallel scalability. If each column subset is thin enough to fit in fast memory, then slow communication is eliminated between iterations of jj. The only remaining slow communication transmits pivot candidates between stages of refinement.

Unfortunately, writing and tuning CARRQR is nontrivial. We implemented this algorithm and found that it ran slightly slower than the LAPACK implementation of algorithm 2, called DGEQP3, on a shared-memory parallel machine. We believe this was mainly due to inefficient parallelization in the final stages of refinement. We assigned each column subset to a different processor, which then worked independently to produce candidates. This approach was attractive because it did not require communication between processors during each filtration stage. However, despite communication efficiency, this technique can only engage as many processors as there are column subsets. Most processors are left idle during the final stages of refinement. A second problem with this approach occurres when the matrix is too tall. In such cases, it is not possible to select column subsets that are thin enough to fit into fast memory. An efficient implementation would need alternative or additional workload-splitting tactics to use all processors at every stage of refinement.

As we will discuss in the next section, the method we propose also gathers pivots into blocks, which are then applied to the trailing matrix. Our method, however, improves performance by reducing both the communication and computational complexity needed to form a block of pivots.

3 Randomized Projection for Sample Pivoting

Sampling via randomized projection has proven to be beneficial for a variety of applications in numerical linear algebra [22, 36, 31, 14, 23, 26]. Sampling reduces communication complexity via dimensional reduction, while simultaneously maintaining a safe degree of uncertainty in the approximations that follow. This technique is typically framed using the Johnson–Lindenstrauss lemma [19]. Let 𝒂j\boldsymbol{a}_{j} represent the jjth column of 𝑨\boldsymbol{A} for j=1,2,,nj=1,2,\ldots,n. There exists a distribution over ×m\ell\times m matrices such that a randomly drawn matrix 𝛀\boldsymbol{\Omega} yields a lower dimensional embedding 𝒃j=𝛀𝒂j\boldsymbol{b}_{j}=\boldsymbol{\Omega}\boldsymbol{a}_{j}, with high probability of preserving distances within a relative error ε\varepsilon. Because we would like to use the sample to obtain a block of bb pivots while controlling the degree of uncertainty in the true norms of 𝑨\boldsymbol{A}, we include padding pp in the sample rank so that =b+p\ell=b+p. When 𝛀\boldsymbol{\Omega} is GIID, the expected 2-norms and variance are

𝔼𝛀[𝐛j22]=𝐚j22andVar𝛀[𝐛j22]=2𝐚j24.\expect_{\boldsymbol{\Omega}}\left[\left\lVert\boldsymbol{b}_{j}\right\rVert_{2}^{2}\right]=\ell\left\lVert\boldsymbol{a}_{j}\right\rVert_{2}^{2}\quad\text{and}\quad\var_{\boldsymbol{\Omega}}\left[\left\lVert\boldsymbol{b}_{j}\right\rVert_{2}^{2}\right]=2\ell\left\lVert\boldsymbol{a}_{j}\right\rVert_{2}^{4}.

If we let 𝒂0=0\boldsymbol{a}_{0}=0 and 𝒃0=0\boldsymbol{b}_{0}=0, then we can express the probability of satisfying the relative error bounds as

P(|𝒃j𝒃i22𝒂j𝒂i221|ε)12exp(ε24(1ε)),P\left(\left|\frac{\left\lVert\boldsymbol{b}_{j}-\boldsymbol{b}_{i}\right\rVert_{2}^{2}}{\ell\left\lVert\boldsymbol{a}_{j}-\boldsymbol{a}_{i}\right\rVert_{2}^{2}}-1\right|\leq\varepsilon\right)\geq 1-2\exp\left(\frac{-\ell\varepsilon^{2}}{4}(1-\varepsilon)\right),

where 0<ε<120<\varepsilon<\frac{1}{2} and i,j=0,1,,ni,j=0,1,\ldots,n. Capturing the norm of the difference between columns also implies coherence among inner product approximations by taking (𝒃1𝒃2)T(𝒃1𝒃2)=𝒃1222𝒃1T𝒃2+𝒃222(\boldsymbol{b}_{1}-\boldsymbol{b}_{2})^{T}(\boldsymbol{b}_{1}-\boldsymbol{b}_{2})=\left\lVert\boldsymbol{b}_{1}\right\rVert_{2}^{2}-2\boldsymbol{b}_{1}^{T}\boldsymbol{b}_{2}+\left\lVert\boldsymbol{b}_{2}\right\rVert_{2}^{2}. Thus, each component of 𝑩\boldsymbol{B} within a subspace defined by a few of its columns approximates the corresponding component of 𝑨\boldsymbol{A}.

3.1 Bayesian Analysis

Bayesian inference is not often used in numerical linear algebra. In this case, it allows us to obtain an exact expression for the uncertainty in column norms, which rigorously frames the amount of padding pp that is needed to satisfy a relative error bound with a desired probability of success.

We begin by expressing a single column 𝒂\boldsymbol{a} as its 2-norm multiplied by a unit vector 𝒒\boldsymbol{q}, so that 𝒂=𝒂2𝒒\boldsymbol{a}=\left\lVert\boldsymbol{a}\right\rVert_{2}\boldsymbol{q}. Because a GIID matrix is invariant in distribution under independent orthogonal transformations, we can construct an orthogonal matrix 𝑸=[𝒒𝑸]\boldsymbol{Q}=[\boldsymbol{q}\;\boldsymbol{Q}_{\bot}] and write 𝛀\boldsymbol{\Omega} as

𝛀=[𝝎^𝛀^][𝒒T𝑸T],\boldsymbol{\Omega}=\left[\begin{array}[]{cc}\boldsymbol{\hat{\omega}}&\boldsymbol{\hat{\Omega}}\\ \end{array}\right]\left[\begin{array}[]{c}\boldsymbol{q}^{T}\\ \boldsymbol{Q}_{\bot}^{T}\\ \end{array}\right],

where both the leading column 𝝎^\boldsymbol{\hat{\omega}} and remaining columns 𝛀^\boldsymbol{\hat{\Omega}} are GIID. It easily follows that each element of the sample column, 𝒃=𝒂2𝝎^\boldsymbol{b}=\left\lVert\boldsymbol{a}\right\rVert_{2}\boldsymbol{\hat{\omega}}, is normally distributed with mean 00 and latent variance 𝒂22\left\lVert\boldsymbol{a}\right\rVert_{2}^{2}.

Inferring variance from a normal distribution with a known mean is a standard problem in Bayesian statistics. The likelihood probability distribution is written p(𝒃𝒂22)𝒩(𝒃0,𝒂22𝑰)p(\boldsymbol{b}\mid\left\lVert\boldsymbol{a}\right\rVert_{2}^{2})\equiv\mathcal{N}(\boldsymbol{b}\mid 0,\left\lVert\boldsymbol{a}\right\rVert_{2}^{2}\boldsymbol{I}) where 𝑰\boldsymbol{I} is the ×\ell\times\ell identity. Jeffreys proposed the maximally uninformative prior for an unknown variance, p(𝒂22)𝒂22p(\left\lVert\boldsymbol{a}\right\rVert_{2}^{2})\equiv\left\lVert\boldsymbol{a}\right\rVert_{2}^{-2}, which is invariant under scaling and power transformations [20]. We apply Bayes’ theorem, p(𝒂22𝒃)p(𝒃𝒂22)p(𝒂22)p(\left\lVert\boldsymbol{a}\right\rVert_{2}^{2}\mid\boldsymbol{b})\propto p(\boldsymbol{b}\mid\left\lVert\boldsymbol{a}\right\rVert_{2}^{2})p(\left\lVert\boldsymbol{a}\right\rVert_{2}^{2}), to obtain the posterior distribution. Normalization results in the inverse gamma distribution

p(𝒂22𝒃22)(𝒃222)/2Γ(2)𝒂22exp(𝒃222𝒂22).p(\left\lVert\boldsymbol{a}\right\rVert_{2}^{2}\mid\left\lVert\boldsymbol{b}\right\rVert_{2}^{2})\equiv\frac{\left(\frac{\left\lVert\boldsymbol{b}\right\rVert_{2}^{2}}{2}\right)^{\ell/2}}{\Gamma(\frac{\ell}{2})\left\lVert\boldsymbol{a}\right\rVert_{2}^{-\ell-2}}\exp\left(\frac{-\left\lVert\boldsymbol{b}\right\rVert_{2}^{2}}{2\left\lVert\boldsymbol{a}\right\rVert_{2}^{2}}\right).

Consequently, we can cast each pivoting decision as the maximizer of expected utility, where utility is taken to be the latent 2-norm squared

𝔼p(𝐚22𝐛22)[𝐚22]=𝐛222.\expect_{p(\left\lVert\boldsymbol{a}\right\rVert_{2}^{2}\mid\left\lVert\boldsymbol{b}\right\rVert_{2}^{2})}\left[\left\lVert\boldsymbol{a}\right\rVert_{2}^{2}\right]=\frac{\left\lVert\boldsymbol{b}\right\rVert_{2}^{2}}{\ell-2}.

Since expected utility is monotonic in the sample column norms, we simply choose the maximum as in QRCP.

More importantly, the posterior distribution clearly relates sample rank \ell to uncertainty. In order to capture the probability distribution of the latent relative error, we can change variables to express the latent column norm as a fraction ϕ\phi of the expectation, 𝒂22=ϕ2𝒃22\left\lVert\boldsymbol{a}\right\rVert_{2}^{2}=\frac{\phi}{\ell-2}\left\lVert\boldsymbol{b}\right\rVert_{2}^{2}. This gives analytic expressions for both the probability distribution function and the cumulative distribution function of the relative scaling

p(ϕ)(22)/2Γ(2)ϕ/2+1exp((2)2ϕ)andP(ϕ<τ)=Γ(2,22τ)Γ(2),p(\phi\mid\ell)\equiv\frac{\left(\frac{\ell-2}{2}\right)^{\ell/2}}{\Gamma(\frac{\ell}{2})\phi^{\ell/2+1}}\exp\left(\frac{-(\ell-2)}{2\phi}\right)\quad\text{and}\quad P(\phi<\tau)=\frac{\Gamma(\frac{\ell}{2},\frac{\ell-2}{2\tau})}{\Gamma(\frac{\ell}{2})},

respectively. The numerator of the cumulative distribution is the upper incomplete gamma function and normalization results in the regularized gamma function.

Rank-revealing decompositions must avoid selecting columns that are already well approximated by components in the span of previous pivots, i.e columns with small trailing norms. As such, we only care about the probability that a sample column radically overestimates the true column norm. The CDF plotted in fig. 1 shows the probability that the relative scaling ϕ\phi falls below a specified upper bound τ\tau for several choices of \ell. Our experiments provide good results using padding p=8p=8 with a block size b=32b=32 so that the effective sample rank satisfies 8<408<\ell\leq 40 for each pivot decision. Note that this analysis also holds for linear combinations of columns in 𝑨\boldsymbol{A} and 𝑩\boldsymbol{B}, provided that those linear combinations are independent of 𝑩\boldsymbol{B}. An in-depth reliability and probability analysis has appeared in Xiao, Gu, and Langou [37]. In particular, they show that in the case of decaying singular values in the matrix 𝑨\boldsymbol{A}, a nearly optimal low-rank approximation can be computed with the QR factorization with a slight modification in the strategy used to choose 𝑷\boldsymbol{P}.

Refer to caption
Figure 1: Cumulative distribution function for latent relative scaling factor. For sample rank 4, the probability that the latent 2-norm squared is less than 1/81/8 of the expectation is 0.30%0.30\%. For sample rank 8, the probability that it is less than 1/41/4 is 0.23%0.23\%. For sample rank 32, the probability that it is less than 1/21/2 is 0.20%0.20\%.

3.2 Sample QRCP Distribution Updates

We now show how the sample matrix 𝑩=𝛀𝑨\boldsymbol{B}=\boldsymbol{\Omega}\boldsymbol{A} can be used to select a full block of bb pivots. If QRCP is performed on the sample matrix, then at iteration jj we can examine 𝑩\boldsymbol{B} as a partial factorization. We let 𝑷(j)\boldsymbol{P}^{(j)} be the aggregate permutation so far and represent the accumulated orthogonal transformations applied to 𝑩\boldsymbol{B} as 𝑼(j)\boldsymbol{U}^{(j)}, with corresponding intermediate triangular factor 𝑺(j)\boldsymbol{S}^{(j)}, as shown below. We also consider a partial factorization of 𝑨\boldsymbol{A} using the same pivots that were applied to 𝑩\boldsymbol{B}. The corresponding factors of 𝑨\boldsymbol{A} are 𝑸(j)\boldsymbol{Q}^{(j)} and 𝑹\boldsymbol{R}.

𝑩𝑷(j)=𝑼(j)[𝑺11(j)𝑺12(j)0𝑺22(j)] and 𝑨𝑷(j)=𝑸(j)[𝑹11(j)𝑹12(j)0𝑹22(j)].\boldsymbol{B}\boldsymbol{P}^{(j)}=\boldsymbol{U}^{(j)}\begin{bmatrix}\boldsymbol{S}_{11}^{(j)}&\boldsymbol{S}_{12}^{(j)}\\ 0&\boldsymbol{S}_{22}^{(j)}\\ \end{bmatrix}\quad\text{ and }\quad\boldsymbol{A}\boldsymbol{P}^{(j)}=\boldsymbol{Q}^{(j)}\begin{bmatrix}\boldsymbol{R}_{11}^{(j)}&\boldsymbol{R}_{12}^{(j)}\\ 0&\boldsymbol{R}_{22}^{(j)}\\ \end{bmatrix}\text{.}

Both 𝑺11(j)\boldsymbol{S}_{11}^{(j)} and 𝑹11(j)\boldsymbol{R}_{11}^{(j)} are upper triangular. 𝛀\boldsymbol{\Omega} can then be expressed as elements 𝛀^\boldsymbol{\hat{\Omega}} in the bases given by 𝑼(j)\boldsymbol{U}^{(j)} and 𝑸(j)\boldsymbol{Q}^{(j)}:

𝛀=𝑼(j)[𝛀^11(j)𝛀^12(j)𝛀^21(j)𝛀^22(j)]𝑸(j)T.\boldsymbol{\Omega}=\boldsymbol{U}^{(j)}\begin{bmatrix}\boldsymbol{\hat{\Omega}}_{11}^{(j)}&\boldsymbol{\hat{\Omega}}_{12}^{(j)}\\ \boldsymbol{\hat{\Omega}}_{21}^{(j)}&\boldsymbol{\hat{\Omega}}_{22}^{(j)}\\ \end{bmatrix}\boldsymbol{Q}^{(j)T}\text{.}

Noting that 𝑩𝑷(j)=𝛀𝑨𝑷(j)\boldsymbol{B}\boldsymbol{P}^{(j)}=\boldsymbol{\Omega}\boldsymbol{A}\boldsymbol{P}^{(j)}, we have

[𝑺11(j)𝑺12(j)0𝑺22(j)]=[𝛀^11(j)𝑹11(j)𝛀^11(j)𝑹12(j)+𝛀^12(j)𝑹22(j)𝛀^21(j)𝑹11(j)𝛀^21(j)𝑹12(j)+𝛀^22(j)𝑹22(j)].\begin{bmatrix}\boldsymbol{S}_{11}^{(j)}&\boldsymbol{S}_{12}^{(j)}\\ 0&\boldsymbol{S}_{22}^{(j)}\\ \end{bmatrix}=\begin{bmatrix}\boldsymbol{\hat{\Omega}}_{11}^{(j)}\boldsymbol{R}_{11}^{(j)}&\boldsymbol{\hat{\Omega}}_{11}^{(j)}\boldsymbol{R}_{12}^{(j)}+\boldsymbol{\hat{\Omega}}_{12}^{(j)}\boldsymbol{R}_{22}^{(j)}\\ \boldsymbol{\hat{\Omega}}_{21}^{(j)}\boldsymbol{R}_{11}^{(j)}&\boldsymbol{\hat{\Omega}}_{21}^{(j)}\boldsymbol{R}_{12}^{(j)}+\boldsymbol{\hat{\Omega}}_{22}^{(j)}\boldsymbol{R}_{22}^{(j)}\\ \end{bmatrix}\text{.} (1)

If 𝑺11(j)\boldsymbol{S}_{11}^{(j)} is nonsingular, then both 𝛀^11(j)\boldsymbol{\hat{\Omega}}_{11}^{(j)} and 𝑹11(j)\boldsymbol{R}_{11}^{(j)} are also nonsingular. It follows that 𝛀^11(j)=𝑺11(j)𝑹11(j)1\boldsymbol{\hat{\Omega}}_{11}^{(j)}=\boldsymbol{S}_{11}^{(j)}\boldsymbol{R}_{11}^{(j)-1} is upper triangular and 𝛀^21(j)=0\boldsymbol{\hat{\Omega}}_{21}^{(j)}=0. In other words, we have implicitly formed a QR factorization of 𝛀𝑸(j)\boldsymbol{\Omega}\boldsymbol{Q}^{(j)} using the same orthogonal matrix 𝑼(j)\boldsymbol{U}^{(j)}. Finally, the trailing matrix in the sample simplifies to 𝑺22(j)=𝛀^22(j)𝑹22(j)\boldsymbol{S}_{22}^{(j)}=\boldsymbol{\hat{\Omega}}_{22}^{(j)}\boldsymbol{R}_{22}^{(j)}, which is a sample of the trailing matrix 𝑹22(j)\boldsymbol{R}_{22}^{(j)} using the compression matrix 𝛀^22(j)\boldsymbol{\hat{\Omega}}_{22}^{(j)}. If the permutation 𝑷(j)\boldsymbol{P}^{(j)} were independent of the sample, then 𝑸(j)\boldsymbol{Q}^{(j)} would be formed from 𝑨\boldsymbol{A}, independent of 𝛀\boldsymbol{\Omega}. Likewise, 𝑼(j)\boldsymbol{U}^{(j)} only depends on the leading jj columns of the sample, which are independent of the trailing columns. Thus 𝛀^22(j)\boldsymbol{\hat{\Omega}}_{22}^{(j)} would be GIID. As such, we may use column norms of 𝑺22(j)\boldsymbol{S}_{22}^{(j)} to approximate column norms of 𝑹22(j)\boldsymbol{R}_{22}^{(j)} when we select the (j+1)(j+1)st pivot, so that a full block of pivots can be selected without interleaving any references to 𝑨\boldsymbol{A} or 𝑹\boldsymbol{R} memory. We note, however, that the permutation may exhibit a subtle dependence on the pivots, which we briefly discuss in section 3.3.

Once bb pivots have been selected from the sample matrix 𝑩\boldsymbol{B}, the corresponding columns of 𝑨\boldsymbol{A} are permuted and processed all at once, as is done in BLAS-3 QR, thus reducing both the communication and computational complexity associated with selecting a block of bb pivots by a factor of /m\ell/m. More significantly, if the sample matrix 𝑩\boldsymbol{B} fits in fast memory, then slow communication between consecutive pivot decisions is eliminated within each block iteration. As in BLAS-3 QR, the remaining communication costs are due to the matrix-matrix multiplications needed to perform block reflections. As such, RQRCP satisfies the BLAS-3 performance standard.

Algorithm 3 outlines the full procedure for a sample-based block permutation. It is acceptable for very low-rank approximations, wherein the required sample is small enough to maintain communication efficiency. That is, when the desired approximation rank kk is small enough to be a single block, b=kb=k. For larger approximations we will resort to a more comprehensive algorithm that includes a sample update formulation that subsumes this version. Since the single-sample algorithm illuminates the performance advantage gained from this approach, we examine it first.

Algorithm 3 Single-Sample Randomized QRCP.
1:
2: 𝑨\boldsymbol{A} is m×nm\times n.
3: kk is the desired approximation rank. kmin(m,n)k\ll\min(m,n).
4:
5: 𝑸\boldsymbol{Q} is an m×mm\times m orthogonal matrix in the form of kk reflectors.
6: 𝑹\boldsymbol{R} is a k×nk\times n truncated upper trapezoidal matrix.
7: 𝑷\boldsymbol{P} is an n×nn\times n permutation matrix such that 𝑨𝑷𝑸(:,1:k)𝑹\boldsymbol{A}\boldsymbol{P}\approx\boldsymbol{Q}(:,1:k)\boldsymbol{R}.
8: function [𝑸,𝑹,𝑷]=[\boldsymbol{Q},\boldsymbol{R},\boldsymbol{P}]= SingleSampleRQRCP(𝑨,k\boldsymbol{A},k)
9:   Set sample rank l=k+pl=k+p as needed for acceptable uncertainty.
10:   Generate random l×ml\times m matrix 𝛀\boldsymbol{\Omega}.
11:   Form the sample 𝑩=𝛀𝑨\boldsymbol{B}=\boldsymbol{\Omega}\boldsymbol{A}.
12:   Get kk column pivots from sample [,,P]=QRCP(B)[\cdot,\cdot,\boldsymbol{P}]=\texttt{QRCP}(\boldsymbol{B}).
13:   Apply permutation A(1)=AP\boldsymbol{A}^{(1)}=\boldsymbol{A}\boldsymbol{P}.
14:   Construct kk reflectors from new leading columns [𝑸,𝑹11]=QR(𝑨(1)(:,1:k))[\boldsymbol{Q},\boldsymbol{R}_{11}]=\texttt{QR}(\boldsymbol{A}^{(1)}(\texttt{:,1:k})).
15:   Finish kk rows of 𝑹\boldsymbol{R} in remaining columns 𝑹12=𝑸(:,1:k)T𝑨(1)(:,k+1:n)\boldsymbol{R}_{12}=\boldsymbol{Q}(\texttt{:,1:k})^{T}\boldsymbol{A}^{(1)}(\texttt{:,k+1:n}).
16: end function

3.3 Sample Bias

The bias of an estimator is the difference between the expected value of the estimator and the true value of the quantity being estimated. In this case, sample column norms are used to estimate true column norms. As illustrated in the following thought experiment, a subtle form of bias occurs when we use the maximum to select a pivot.

Suppose Jack and Jill roll one six-sided die each. The expected outcome for each of them is 3.53.5. We then learn that Jill rolled 55, which was greater than Jack’s roll. This new information reduces Jack’s expectation to 2.52.5, because it is no longer possible for him to have rolled 55 or 66. Similarly, the act of selecting the largest sample norm creates a dependency with remaining samples by truncating their plausible outcomes.

This effect becomes less pronounced, however, if the decision is more likely to be determined by the true value being estimated rather than a chance sample outcome. For example, now suppose that Jill rolls three dice and Jack rolls one. If we only know each person’s sum, we can still infer the number of dice each person rolled and select the expected maximum as before. In 90.7%90.7\% of trials, Jill’s sum will be 77 or greater, driven by the fact that three dice were rolled. In most cases, this leaves Jack’s potential outcomes unconstrained and his expectation unbiased after we observe the maximum. Analogously, when a selected column exhibits a norm that is an order of magnitude greater than others, the bias effect is negligible and we may proceed as though the pivot decision was independent of the sample.

The original version of this paper included analysis of this distribution truncation effect [9]. For our purposes, we proceed as though the progression of sample updates is independent of the pivot decisions, which is also the approach Xiao, et al. [37] take. This assumption is potentially problematic when multiple trailing columns have similar norms, but any such column provides a suitable pivot in that scenario.

3.4 Blocked Sample Updates

The sample matrix in algorithm 3 is formulated to have rank =k+p\ell=k+p, where kk was both the desired approximation rank and the permutation block size, bb. As kk increases, however, it becomes inefficient to simply increase the sample rank \ell. In the extreme case, a full decomposition would require a sample just as big as the original matrix. If we require a decomposition with a larger rank than that which can be efficiently sampled and blocked, that is if the sample rank cannot exceed =b+p\ell=b+p, but we require k>bk>b, then we need to update the sample matrix after each block. Martinsson [28] developed an approach in which one simply processes each subsequent block by drawing a new random matrix 𝛀\boldsymbol{\Omega} and applying it to each new trailing matrix. We propose a sample update formulation that does not require multiplying the trailing matrix by a new compression matrix and reduces BLAS-3 communication in the overall factorization by at least one third.

The update formula we derive is an extension of the implicit update mechanism described in the previous section. Both algorithm 4 and algorithm 5, the truncated variation, will proceed in blocks of pivots. Bracket superscripts denote the results of a computation that occurred on the indicated block-iteration. At entry to the first block-iteration, the sample is 𝑩[0]=𝛀[0]𝑨[0]\boldsymbol{B}^{[0]}=\boldsymbol{\Omega}^{[0]}\boldsymbol{A}^{[0]}, where 𝑨[0]\boldsymbol{A}^{[0]} is the original matrix. At the end of block-iteration JJ, the sample will be in the transformed state

[𝑺11[J]𝑺12[J]0𝑺22[J]]=[𝛀^11[J]𝛀^12[J]0𝛀^22[J]][𝑹11[J]𝑹12[J]0𝑨[J]],\begin{bmatrix}\boldsymbol{S}_{11}^{[J]}&\boldsymbol{S}_{12}^{[J]}\\ 0&\boldsymbol{S}_{22}^{[J]}\\ \end{bmatrix}=\begin{bmatrix}\boldsymbol{\hat{\Omega}}_{11}^{[J]}&\boldsymbol{\hat{\Omega}}_{12}^{[J]}\\ 0&\boldsymbol{\hat{\Omega}}_{22}^{[J]}\\ \end{bmatrix}\begin{bmatrix}\boldsymbol{R}_{11}^{[J]}&\boldsymbol{R}_{12}^{[J]}\\ 0&\boldsymbol{A}^{[J]}\\ \end{bmatrix}, (2)

just as in eq. 1. 𝑺11[J]\boldsymbol{S}_{11}^{[J]} is the leading upper triangle from the partial factorization of the sample and 𝑺22[J]\boldsymbol{S}_{22}^{[J]} gives the trailing sample columns. Likewise 𝑹11[J]\boldsymbol{R}_{11}^{[J]} and 𝑨[J]\boldsymbol{A}^{[J]}, respectively, give the leading upper triangle and trailing columns that would be obtained by factorizing the original matrix with the same pivots. By absorbing the transformations 𝑼[J]T\boldsymbol{U}^{[J]T} and 𝑸[J]\boldsymbol{Q}^{[J]} into 𝛀[J]\boldsymbol{\Omega}^{[J]}, we obtained an effective compression matrix 𝛀^22[J]\boldsymbol{\hat{\Omega}}_{22}^{[J]}, which had already been implicitly applied to the trailing columns: 𝑺22[J]=𝛀^22[J]𝑨[J]\boldsymbol{S}_{22}^{[J]}=\boldsymbol{\hat{\Omega}}_{22}^{[J]}\boldsymbol{A}^{[J]}. The difficulty is 𝑺22[J]\boldsymbol{S}_{22}^{[J]} only has rank pp. In order to construct a rank =b+p\ell=b+p sample of the trailing matrix 𝑨[J]\boldsymbol{A}^{[J]}, we need to include 𝛀^12[J]\boldsymbol{\hat{\Omega}}_{12}^{[J]} in the updated compression matrix

𝛀[J]=[𝛀^12[J]𝛀^22[J]]giving𝑩[J]=𝛀[J]𝑨[J]=[𝑺12[J]𝛀^11[J]𝑹12[J]𝑺22[J]].\boldsymbol{\Omega}^{[J]}=\begin{bmatrix}\boldsymbol{\hat{\Omega}}_{12}^{[J]}\\ \boldsymbol{\hat{\Omega}}_{22}^{[J]}\\ \end{bmatrix}\quad\text{giving}\quad\boldsymbol{B}^{[J]}=\boldsymbol{\Omega}^{[J]}\boldsymbol{A}^{[J]}=\begin{bmatrix}\boldsymbol{S}_{12}^{[J]}-\boldsymbol{\hat{\Omega}}_{11}^{[J]}\boldsymbol{R}_{12}^{[J]}\\ \boldsymbol{S}_{22}^{[J]}\\ \end{bmatrix}.

In other words, the new compression matrix 𝛀[J]\boldsymbol{\Omega}^{[J]} is simply 𝑼[J]T𝛀[J1]𝑸[J]\boldsymbol{U}^{[J]T}\boldsymbol{\Omega}^{[J-1]}\boldsymbol{Q}^{[J]}, with the leading bb columns removed. This new compression matrix does not need to be explicitly formed or applied to the trailing columns 𝑨[J]\boldsymbol{A}^{[J]}. Instead, we form the result implicitly by removing 𝛀^11[J]𝑹12[J]\boldsymbol{\hat{\Omega}}_{11}^{[J]}\boldsymbol{R}_{12}^{[J]} from 𝑺12[J]\boldsymbol{S}_{12}^{[J]}. Both 𝑹11[J]\boldsymbol{R}_{11}^{[J]} and 𝑹12[J]\boldsymbol{R}_{12}^{[J]} will be computed in blocked matrix multiply operations using the previous bb pivots of 𝑨\boldsymbol{A}. Since 𝛀^11[J]\boldsymbol{\hat{\Omega}}_{11}^{[J]} can then be recovered from 𝑺11[J]\boldsymbol{S}_{11}^{[J]}, we can avoid any direct computations on 𝛀\boldsymbol{\Omega}. We only need to update the first bb rows of 𝑩\boldsymbol{B}, which gives us the sample update formula

[𝑩1[J]𝑩2[J]]=[𝑺12[J]𝑺11[J]𝑹11[J]1𝑹12[J]𝑺22[J]].\left[\begin{array}[]{c}\boldsymbol{B}_{1}^{[J]}\\ \boldsymbol{B}_{2}^{[J]}\\ \end{array}\right]=\left[\begin{array}[]{c}\boldsymbol{S}_{12}^{[J]}-\boldsymbol{S}_{11}^{[J]}\boldsymbol{R}_{11}^{[J]-1}\boldsymbol{R}_{12}^{[J]}\\ \boldsymbol{S}_{22}^{[J]}\\ \end{array}\right]. (3)

Full RQRCP, described in algorithm 4, can be structured as a modification to blocked BLAS-3 QR. The algorithm must simply interleave processing blocks of reflectors with permutations obtained from each sample matrix, then update the sample as above. To obtain a modified version that employs repeated sampling simply replace the sample update with a new sample of the trailing matrix, 𝑩[J]=𝛀[J]𝑨[J]\boldsymbol{B}^{[J]}=\boldsymbol{\Omega}^{[J]}\boldsymbol{A}^{[J]}.

When QRCP is applied to the sample matrix 𝑩\boldsymbol{B}, only a partial decomposition is necessary. The second argument bb in the subroutine call QRCP(𝑩[J],b)\texttt{QRCP}(\boldsymbol{B}^{[J]},b) indicates that only bb column permutations are required. It is relatively simple to modify the QR algorithm to avoid any unnecessary computation. After sample pivots have been applied to the array containing both 𝑨\boldsymbol{A} and 𝑹\boldsymbol{R}, we perform QR factorization on the new leading bb columns of the trailing matrix. Although this is stated as returning 𝑸[J]\boldsymbol{Q}^{[J]} for convenience, it can be implemented efficiently with the blocked Householder reflections described in section 2.1. We can then apply reflectors to the trailing matrix and form the sample update 𝑩[J]\boldsymbol{B}^{[J]} to prepare for the next iteration.

Algorithm 4 Randomized QR with Column Pivoting, RQRCP
1:
2: 𝑨\boldsymbol{A} is m×nm\times n.
3: kk is the desired factorization rank. kmin(m,n)k\leq\min{(m,n)}.
4:
5: 𝑸\boldsymbol{Q} is an m×mm\times m orthogonal matrix in the form of kk reflectors.
6: 𝑹\boldsymbol{R} is a k×nk\times n upper trapezoidal (or triangular) matrix.
7: 𝑷\boldsymbol{P} is an n×nn\times n permutation matrix such that 𝑨𝑷𝑸(:,1:k)𝑹\boldsymbol{A}\boldsymbol{P}\approx\boldsymbol{Q}(\texttt{:,1:k})\boldsymbol{R}.
8: function [𝑸,𝑹,𝑷]=[\boldsymbol{Q},\boldsymbol{R},\boldsymbol{P}]= RQRCP(𝑨,k\boldsymbol{A},k)
9:   Set sample rank =b+p\ell=b+p as needed for acceptable uncertainty.
10:   Generate random ×m\ell\times m matrix 𝛀[0]\boldsymbol{\Omega}^{[0]}.
11:   Form the initial sample 𝑩[0]=𝛀[0]𝑨[0]\boldsymbol{B}^{[0]}=\boldsymbol{\Omega}^{[0]}\boldsymbol{A}^{[0]}.
12:   for J=1J=1, 2, …, kb\frac{k}{b} do
13:    Get bb column pivots from sample [𝑼[J],𝑺[J],𝑷[J]]=QRCP(𝑩[J1],b)[\boldsymbol{U}^{[J]},\boldsymbol{S}^{[J]},\boldsymbol{P}^{[J]}]=\texttt{QRCP}(\boldsymbol{B}^{[J-1]},b).
14:    Permute A[J1]\boldsymbol{A}^{[J-1]} and completed rows in R\boldsymbol{R} with P[J]\boldsymbol{P}^{[J]}.
15:    Construct bb reflectors [𝑸[J],𝑹11[J]]=QR(𝑨[J1](:,1:b))[\boldsymbol{Q}^{[J]},\boldsymbol{R}_{11}^{[J]}]=\texttt{QR}(\boldsymbol{A}^{[J-1]}(\texttt{:,1:b})).
16:    Finish bb rows 𝑹12[J]=𝑸[J](:,1:b)T𝑨[J1](:,b+1:end)\boldsymbol{R}_{12}^{[J]}=\boldsymbol{Q}^{[J]}(\texttt{:,1:b})^{T}\boldsymbol{A}^{[J-1]}(\texttt{:,b+1:end}).
17:    Update the trailing matrix 𝑨[J]=𝑸[J](:,b+1:end)T𝑨[J1](:,b+1:end)\boldsymbol{A}^{[J]}=\boldsymbol{Q}^{[J]}(\texttt{:,b+1:end})^{T}\!\boldsymbol{A}^{[J-1]}(\texttt{:,b+1:end}).
18:    Update the sample 𝑩1[J]=𝑺12[J]𝑺11[J]𝑹11[J]1𝑹12[J]\boldsymbol{B}_{1}^{[J]}=\boldsymbol{S}_{12}^{[J]}-\boldsymbol{S}_{11}^{[J]}\boldsymbol{R}_{11}^{[J]-1}\boldsymbol{R}_{12}^{[J]} and 𝑩2[J]=𝑺22[J]\boldsymbol{B}_{2}^{[J]}=\boldsymbol{S}_{22}^{[J]}.
19:   end for
20:   𝑸=𝑸[1][𝑰b𝑸[2]][𝑰([k/b]1)b𝑸[k/b]]\boldsymbol{Q}=\boldsymbol{Q}^{[1]}\left[\begin{array}[]{cc}\boldsymbol{I}_{b}&\\ &\boldsymbol{Q}^{[2]}\\ \end{array}\right]\ldots\left[\begin{array}[]{cc}\boldsymbol{I}_{\left([k/b]-1\right)\,b}&\\ &\boldsymbol{Q}^{[k/b]}\\ \end{array}\right].
21:   𝑷=𝑷[1][𝑰b𝑷[2]][𝑰([k/b]1)b𝑷[k/b]]\boldsymbol{P}=\boldsymbol{P}^{[1]}\left[\begin{array}[]{cc}\boldsymbol{I}_{b}&\\ &\boldsymbol{P}^{[2]}\\ \end{array}\right]\ldots\left[\begin{array}[]{cc}\boldsymbol{I}_{\left([k/b]-1\right)\,b}&\\ &\boldsymbol{P}^{[k/b]}\\ \end{array}\right].
22: end function

4 Truncated Factorizations for Low-Rank Approximations

The trailing matrix is unnecessary for low-rank applications. We can reformulate RQRCP to avoid the trailing update, rather than computing it and discarding it. Provided the approximation rank is small (kmin(m,n)k\ll\min(m,n)), the truncated reformulation (TRQRCP) reduces large matrix multiplications by half and completes in roughly half the time.

4.1 Truncated RQRCP

Our technique is analogous to the method Quintana-Ortí, Sun, and Bischof used to halve BLAS-2 operations in QRCP. In their version of QRCP, all reflector inner products are computed, but rows and columns are only updated as needed. In order to compute correct reflector inner products, without having updated the trailing matrix, we need to formulate blocked reflector compositions

(𝑰𝒀1𝑻1𝒀1T)(𝑰𝒀2𝑻2𝒀2T)=𝑰𝒀𝑻𝒀T,\displaystyle(\boldsymbol{I}-\boldsymbol{Y}_{1}\boldsymbol{T}_{1}\boldsymbol{Y}_{1}^{T})(\boldsymbol{I}-\boldsymbol{Y}_{2}\boldsymbol{T}_{2}\boldsymbol{Y}_{2}^{T})=\boldsymbol{I}-\boldsymbol{Y}\boldsymbol{T}\boldsymbol{Y}^{T},
where𝒀=[𝒀1𝒀2] and 𝑻=[𝑻1𝑻1𝒀1T𝒀2𝑻20𝑻2].\displaystyle\text{where}\quad\boldsymbol{Y}=\begin{bmatrix}\boldsymbol{Y}_{1}&\boldsymbol{Y}_{2}\\ \end{bmatrix}\quad\text{ and }\quad\boldsymbol{T}=\begin{bmatrix}\boldsymbol{T}_{1}&-\boldsymbol{T}_{1}\boldsymbol{Y}_{1}^{T}\boldsymbol{Y}_{2}\boldsymbol{T}_{2}\\ 0&\boldsymbol{T}_{2}\\ \end{bmatrix}.

The corresponding reflector inner products 𝑾T=𝑻T𝒀T𝑨\boldsymbol{W}^{T}=\boldsymbol{T}^{T}\boldsymbol{Y}^{T}\boldsymbol{A} become

𝑾T=[𝑾1T𝑾2T]with𝑾1T=𝑻1T𝒀1T𝑨and𝑾2T=𝑻2T(𝒀2T𝑨(𝒀2T𝒀1)𝑾1T).\boldsymbol{W}^{T}=\begin{bmatrix}\boldsymbol{W}_{1}^{T}\\ \boldsymbol{W}_{2}^{T}\\ \end{bmatrix}\quad\text{with}\quad\boldsymbol{W}_{1}^{T}=\boldsymbol{T}_{1}^{T}\boldsymbol{Y}_{1}^{T}\boldsymbol{A}\quad\text{and}\quad\boldsymbol{W}_{2}^{T}=\boldsymbol{T}_{2}^{T}\left(\boldsymbol{Y}_{2}^{T}\boldsymbol{A}-(\boldsymbol{Y}_{2}^{T}\boldsymbol{Y}_{1})\boldsymbol{W}_{1}^{T}\right)\text{.}

If we store these reflector inner products, then we can construct any submatrix of the accumulated transformation 𝑨^[J]=𝑨𝒀[J]𝑾[J]T\boldsymbol{\hat{A}}^{[J]}=\boldsymbol{A}-\boldsymbol{Y}^{[J]}\boldsymbol{W}^{[J]T} as needed. Columns that are selected by sample pivots are constructed just before becoming the next reflectors and corresponding rows of 𝑹\boldsymbol{R} are constructed just before being used to update the sample, as outlined in algorithm 5.

Algorithm 5 Truncated RQRCP without trailing update
1:
2: 𝑨\boldsymbol{A} is m×nm\times n.
3: kk is the approximation rank. kmin(m,n)k\ll\min(m,n).
4:
5: 𝑸\boldsymbol{Q} is an m×mm\times m orthogonal matrix in the form of kk reflectors.
6: 𝑹\boldsymbol{R} is a k×nk\times n upper trapezoidal matrix.
7: 𝑷\boldsymbol{P} is an n×nn\times n permutation matrix such that 𝑨𝑷𝑸(:,1:k)𝑹\boldsymbol{A}\boldsymbol{P}\approx\boldsymbol{Q}(\texttt{:,1:k})\boldsymbol{R}.
8: function [𝑸,𝑹,𝑷][\boldsymbol{Q},\boldsymbol{R},\boldsymbol{P}] TruncatedRQRCP(𝑨,k\boldsymbol{A},k)
9:   Set the sample rank =b+p\ell=b+p as needed for acceptable uncertainty.
10:   Generate ×m\ell\times m random matrix 𝛀[0]\boldsymbol{\Omega}^{[0]} and sample 𝑩[0]=𝛀[0]𝑨[0]\boldsymbol{B}^{[0]}=\boldsymbol{\Omega}^{[0]}\boldsymbol{A}{[0]}.
11:   for J=1J=1, 2, …, kb\frac{k}{b} do
12:    Obtain bb pivots [𝑼[J],𝑺[J],𝑷[J]]=QRCP(𝑩[J],b)[\boldsymbol{U}^{[J]},\boldsymbol{S}^{[J]},\boldsymbol{P}^{[J]}]=\texttt{QRCP}(\boldsymbol{B}^{[J]},b).
13:    Permute 𝑨[J]=𝑨[J1]𝑷[J]\boldsymbol{A}^{[J]}=\boldsymbol{A}^{[J-1]}\boldsymbol{P}^{[J]}, 𝑾1[J]T=𝑾[J1]T𝑷[J]\boldsymbol{W}_{1}^{[J]T}=\boldsymbol{W}^{[J-1]T}\boldsymbol{P}^{[J]}, and leading 𝑹\boldsymbol{R} rows.
14:    Construct selected columns A^J\boldsymbol{\hat{A}}_{J} from A[J]Y[J1]W1[J]T\boldsymbol{A}^{[J]}-\boldsymbol{Y}^{[J-1]}\boldsymbol{W}_{1}^{[J]T}.
15:    Form reflectors 𝒀2[J]\boldsymbol{Y}_{2}^{[J]} using [𝑸[J],𝑹11[J]]=QR(𝑨^J)[\boldsymbol{Q}^{[J]},\boldsymbol{R}_{11}^{[J]}]=\texttt{QR}(\boldsymbol{\hat{A}}_{J}).
16:    Form inner products W2[J]=T2[J]T(Y2[J]TA[J](Y2[J]TY[J1])W1[J]T)\boldsymbol{W}_{2}^{[J]}=\boldsymbol{T}_{2}^{[J]T}(\boldsymbol{Y}_{2}^{[J]T}\boldsymbol{A}^{[J]}-(\boldsymbol{Y}_{2}^{[J]T}\boldsymbol{Y}^{[J-1]})\boldsymbol{W}_{1}^{[J]T}).
17:    Augment 𝒀[J]=[𝒀[J1]𝒀2[J]]\boldsymbol{Y}^{[J]}=[\boldsymbol{Y}^{[J-1]}\kern 5.0pt\boldsymbol{Y}_{2}^{[J]}] and 𝑾[J]=[𝑾1[J]𝑾2[J]]\boldsymbol{W}^{[J]}=[\boldsymbol{W}_{1}^{[J]}\kern 5.0pt\boldsymbol{W}_{2}^{[J]}].
18:    Construct new rows of R\boldsymbol{R} from A[J]Y[J]W[J]T\boldsymbol{A}^{[J]}-\boldsymbol{Y}^{[J]}\boldsymbol{W}^{[J]T}.
19:    Update the sample 𝑩1[J]=𝑺12[J]𝑺11[J]𝑹11[J]1𝑹12[J]\boldsymbol{B}_{1}^{[J]}=\boldsymbol{S}_{12}^{[J]}-\boldsymbol{S}_{11}^{[J]}\boldsymbol{R}_{11}^{[J]-1}\boldsymbol{R}_{12}^{[J]} and 𝑩2[J]=𝑺22[J]\boldsymbol{B}_{2}^{[J]}=\boldsymbol{S}_{22}^{[J]}.
20:   end for
21:   𝑸=𝑸[1][𝑰b𝑸[2]][𝑰([k/b]1)b𝑸[k/b]]\boldsymbol{Q}=\boldsymbol{Q}^{[1]}\left[\begin{array}[]{cc}\boldsymbol{I}_{b}&\\ &\boldsymbol{Q}^{[2]}\\ \end{array}\right]\ldots\left[\begin{array}[]{cc}\boldsymbol{I}_{\left([k/b]-1\right)\,b}&\\ &\boldsymbol{Q}^{[k/b]}\\ \end{array}\right].
22:   𝑷=𝑷[1][𝑰b𝑷[2]][𝑰([k/b]1)b𝑷[k/b]]\boldsymbol{P}=\boldsymbol{P}^{[1]}\left[\begin{array}[]{cc}\boldsymbol{I}_{b}&\\ &\boldsymbol{P}^{[2]}\\ \end{array}\right]\ldots\left[\begin{array}[]{cc}\boldsymbol{I}_{\left([k/b]-1\right)\,b}&\\ &\boldsymbol{P}^{[k/b]}\\ \end{array}\right].
23: end function

4.2 Truncated SVD Approximation

TRQRCP naturally extends to an approximation of the truncated SVD by following the QLP method proposed by Stewart. The QLP decomposition proceeds by first applying QRCP to obtain 𝑨𝑷0=𝑸0𝑹\boldsymbol{A}\boldsymbol{P}_{0}=\boldsymbol{Q}_{0}\boldsymbol{R}. Then the right triangular matrix 𝑹\boldsymbol{R} is factored again using an LQ factorization 𝑷1𝑹=𝑳𝑸1\boldsymbol{P}_{1}\boldsymbol{R}=\boldsymbol{L}\boldsymbol{Q}_{1}, where row-pivoting is an optional safeguard (otherwise 𝑷1=𝑰\boldsymbol{P}_{1}=\boldsymbol{I}), giving the factorization 𝑨=(𝑸0𝑷1T)𝑳(𝑸1𝑷0T)\boldsymbol{A}=(\boldsymbol{Q}_{0}\boldsymbol{P}_{1}^{T})\boldsymbol{L}(\boldsymbol{Q}_{1}\boldsymbol{P}_{0}^{T}). The diagonal elements of 𝑳\boldsymbol{L} approximate the singular values of 𝑨\boldsymbol{A}. Huckaby and Chan [18] provide convergence analysis.

The approximate truncated SVD we propose (TUXV) simply adapts low-rank versions of the steps in QLP. The rank-kk approximation that results is exactly the same as the truncated approximation that would be obtained if QLP had been processed to completion using RQRCP, without secondary row-pivoting, and then truncated to a rank-kk approximation.

We begin by using TRQRCP to produce kk left reflectors, which defines the initial left orthogonal matrix 𝑼(0)\boldsymbol{U}^{(0)}. Superscript (0)(0) refers to the initial state of an array upon entry to the first iteration of the main loop. We can compare our results to what would have been obtained from full RQRCP-based QLP:

𝑨𝑷(0)[𝑼1(0)𝑼2(0)][𝑹11(0)𝑹12(0)00]vs.\displaystyle\boldsymbol{A}\boldsymbol{P}^{(0)}\approx\begin{bmatrix}\boldsymbol{U}^{(0)}_{1}&\boldsymbol{U}^{(0)}_{2}\end{bmatrix}\begin{bmatrix}\boldsymbol{R}^{(0)}_{11}&\boldsymbol{R}^{(0)}_{12}\\ 0&0\\ \end{bmatrix}\;\;\text{vs.}\;\; 𝑨𝑷(0)=[𝑼1(0)𝑼(0)2][𝑹11(0)𝑹(0)120𝑹(0)22].\displaystyle\hskip-7.22743pt\boldsymbol{A}\boldsymbol{P}^{(0*)}=\begin{bmatrix}\boldsymbol{U}^{(0)}_{1}&\boldsymbol{U}^{(0*)}_{2}\end{bmatrix}\begin{bmatrix}\boldsymbol{R}^{(0)}_{11}&\boldsymbol{R}^{(0*)}_{12}\\ 0&\boldsymbol{R}^{(0*)}_{22}\\ \end{bmatrix}.

The asterisk denotes additional pivoting produced from the full factorization. The first kk pivots in 𝑷(0)\boldsymbol{P}^{(0)} and corresponding reflectors in 𝑼(0)\boldsymbol{U}^{(0)} are the same, as are corresponding rows in 𝑹(0)\boldsymbol{R}^{(0)} modulo additional column permutations. We reverse these permutations to construct the k×nk\times n matrix 𝒁(0)=𝑹(0)𝑷(0)T\boldsymbol{Z}^{(0)}=\boldsymbol{R}^{(0)}\boldsymbol{P}^{(0)T} so that

𝑨[𝑼1(0)𝑼2(0)][𝒁11(0)𝒁12(0)00]versus𝑨=[𝑼1(0)𝑼(0)2][𝒁11(0)𝒁12(0)𝒁(0)21𝒁(0)22].\displaystyle\boldsymbol{A}\approx\begin{bmatrix}\boldsymbol{U}^{(0)}_{1}&\boldsymbol{U}^{(0)}_{2}\end{bmatrix}\begin{bmatrix}\boldsymbol{Z}^{(0)}_{11}&\boldsymbol{Z}^{(0)}_{12}\\ 0&0\\ \end{bmatrix}\quad\text{versus}\quad\boldsymbol{A}=\begin{bmatrix}\boldsymbol{U}^{(0)}_{1}&\boldsymbol{U}^{(0*)}_{2}\end{bmatrix}\begin{bmatrix}\boldsymbol{Z}^{(0)}_{11}&\boldsymbol{Z}^{(0)}_{12}\\ \boldsymbol{Z}^{(0*)}_{21}&\boldsymbol{Z}^{(0*)}_{22}\\ \end{bmatrix}.

Taking the LQ factorization from 𝒁(0)\boldsymbol{Z}^{(0)}, so that 𝑳(1)𝑽(1)T=𝒁(0)\boldsymbol{L}^{(1)}\boldsymbol{V}^{(1)T}=\boldsymbol{Z}^{(0)}, instead of from 𝑹(0)\boldsymbol{R}^{(0)} simply absorbs the permutation 𝑷(0)T\boldsymbol{P}^{(0)T} into the definition of 𝑽(1)T\boldsymbol{V}^{(1)T} so that

𝑨[𝑼1(0)𝑼2(0)][𝑳11(1)000][𝑽1(1)T𝑽2(1)T]\displaystyle\boldsymbol{A}\approx\begin{bmatrix}\boldsymbol{U}^{(0)}_{1}&\boldsymbol{U}^{(0)}_{2}\end{bmatrix}\begin{bmatrix}\boldsymbol{L}^{(1)}_{11}&0\\ 0&0\\ \end{bmatrix}\begin{bmatrix}\boldsymbol{V}^{(1)T}_{1}\\ \boldsymbol{V}^{(1)T}_{2}\\ \end{bmatrix}
versus 𝑨=[𝑼1(0)𝑼(0)2][𝑳11(1)0𝑳(1)21𝑳(1)22][𝑽1(1)T𝑽(1)T2].\displaystyle\boldsymbol{A}=\begin{bmatrix}\boldsymbol{U}^{(0)}_{1}&\boldsymbol{U}^{(0*)}_{2}\end{bmatrix}\begin{bmatrix}\boldsymbol{L}^{(1)}_{11}&0\\ \boldsymbol{L}^{(1*)}_{21}&\boldsymbol{L}^{(1*)}_{22}\\ \end{bmatrix}\begin{bmatrix}\boldsymbol{V}^{(1)T}_{1}\\ \boldsymbol{V}^{(1*)T}_{2}\\ \end{bmatrix}.

For consistency with the following algorithm, we label the k×kk\times k connecting matrix 𝑳11(1)\boldsymbol{L}^{(1)}_{11} as 𝑿(0)\boldsymbol{X}^{(0)}. We will discuss the connecting matrix further after explaining the rest of the algorithm. Provided that no secondary row-pivoting is considered, the leading kk reflectors in 𝑽(1)\boldsymbol{V}^{(1)} and 𝑽(1)\boldsymbol{V}^{(1*)} are identical because they are only computed from the leading kk rows of 𝒁(0)\boldsymbol{Z}^{(0)}. At this point, the rank-kk approximation of RQRCP-based QLP would require 𝑳(1)21\boldsymbol{L}^{(1*)}_{21}, which is unknown. Fortunately, the leading kk columns of 𝑼(0)𝑳(1)\boldsymbol{U}^{(0*)}\boldsymbol{L}^{(1*)} can be reconstructed with one matrix multiply. We label this m×km\times k matrix 𝒁(1)\boldsymbol{Z}^{(1)}, which is

𝒁(1)=𝑨𝑽1(1)=[𝑼1(0)𝑼(0)2][𝑳11(1)𝑳(1)21]\boldsymbol{Z}^{(1)}=\boldsymbol{A}\boldsymbol{V}^{(1)}_{1}=\begin{bmatrix}\boldsymbol{U}^{(0)}_{1}&\boldsymbol{U}^{(0*)}_{2}\end{bmatrix}\begin{bmatrix}\boldsymbol{L}^{(1)}_{11}\\ \boldsymbol{L}^{(1*)}_{21}\\ \end{bmatrix}

in both cases. We can then take the QR-factorization 𝑼(1)𝑿(1)=𝒁(1)\boldsymbol{U}^{(1)}\boldsymbol{X}^{(1)}=\boldsymbol{Z}^{(1)} to produce the approximation

𝑨𝑼(1)[𝑿(1)000]𝑽(1)T.\boldsymbol{A}\approx\boldsymbol{U}^{(1)}\begin{bmatrix}\boldsymbol{X}^{(1)}&0\\ 0&0\\ \end{bmatrix}\boldsymbol{V}^{(1)^{T}}. (4)

Further iterations can be computed to produce subsequent k×kk\times k connection matrices 𝑿(2)\boldsymbol{X}^{(2)}, 𝑿(3)\boldsymbol{X}^{(3)}, etc. which would flip-flop between upper triangular and lower triangular forms. To do this, we simply multiply the leading rows of 𝑼T\boldsymbol{U}^{T} or columns of 𝑽\boldsymbol{V} on the left and right of 𝑨\boldsymbol{A}, respectively, as outlined in algorithm 6. The leading singular values of 𝑨\boldsymbol{A} are approximated on the diagonals of 𝑿(j)\boldsymbol{X}^{(j)}. Since the connection matrix is small, however, it is feasible to obtain slightly better approximations by taking the SVD of 𝑿(j)\boldsymbol{X}^{(j)}. One could also insert mechanisms to iterate until a desired level of convergence is obtained, but Stewart observed that only one QRCP-LQ iteration is needed to produce a reasonable approximation of the SVD. One subtle point of possible confusion is that by setting jmax=1j_{\text{\scriptsize{max}}}=1 our algorithm might appear to produce a truncated approximation from the sequence RQRCP-LQ-QR. It is true that the diagonal elements in 𝑿\boldsymbol{X} correspond to that sequence; however, the resulting factorization is equivalent to that which would be obtained by keeping only the leading columns of 𝑳\boldsymbol{L} after RQRCP-LQ. The final QR factorization simply extracts an orthogonal basis 𝑼\boldsymbol{U}. In the next section, we test the performance of TUXV with jmax=1j_{\text{\scriptsize{max}}}=1 for both timing and quality experiments.

Algorithm 6 TUXV approximation of the truncated SVD
1:
2: 𝑨\boldsymbol{A} is an m×nm\times n matrix to approximate.
3: kk is the approximation rank. kmin(m,n)k\ll\min(m,n).
4: jmaxj_{\text{\scriptsize{max}}} is the number of LQ-QR iterations. We set jmax=1j_{\text{max}}=1.
5:
6: 𝑼\boldsymbol{U} is an orthogonal m×mm\times m matrix.
7: 𝑽\boldsymbol{V} is an orthogonal n×nn\times n matrix.
8: 𝑿\boldsymbol{X} is a k×kk\times k upper or lower triangular matrix.
9: 𝑨𝑼(:,1:k)𝑿𝑽(:,1:k)T\boldsymbol{A}\approx\boldsymbol{U}(:,1:k)\boldsymbol{X}\boldsymbol{V}(:,1:k)^{T}.
10: function [𝑼,𝑿,𝑽]=[\boldsymbol{U},\boldsymbol{X},\boldsymbol{V}]= TUXV(𝑨,k,τ,jmax\boldsymbol{A},k,\tau,j_{\text{\scriptsize{max}}})
11:   TRQRCP-Factorize [𝑼(0),𝑹(0),𝑷(0)]=TRQRCP(𝑨,k)[\boldsymbol{U}^{(0)},\boldsymbol{R}^{(0)},\boldsymbol{P}^{(0)}]=\texttt{TRQRCP}(\boldsymbol{A},k).
12:   Restore original column order 𝒁(0)=𝑹(0)𝑷(0)T\boldsymbol{Z}^{(0)}=\boldsymbol{R}^{(0)}\boldsymbol{P}^{(0)T}.
13:   LQ-Factorize [𝑽(1),𝑿(0)T]=QR(𝒁(0)T)[\boldsymbol{V}^{(1)},\boldsymbol{X}^{(0)T}]=\texttt{QR}(\boldsymbol{Z}^{(0)T}).
14:   for j=1,3,5,j=1,3,5,\ldots do
15:    𝒁(j)=𝑨𝑽(j)(:,1:k)\boldsymbol{Z}^{(j)}=\boldsymbol{A}\boldsymbol{V}^{(j)}(\texttt{:,1:k}).
16:    QR-Factorize [𝑼(j+1),𝑿(j)]=QR(𝒁(j))[\boldsymbol{U}^{(j+1)},\boldsymbol{X}^{(j)}]=\texttt{QR}(\boldsymbol{Z}^{(j)}).
17:    If j=jmaxj=j_{\text{\scriptsize{max}}}, then break.
18:    𝒁(j+1)=𝑼(j+1)(:,1:k)T𝑨\boldsymbol{Z}^{(j+1)}=\boldsymbol{U}^{(j+1)}(\texttt{:,1:k})^{T}\boldsymbol{A}.
19:    LQ-Factorize [𝑽(j+2),𝑿(j+1)T]=QR(𝒁(j+1)T)[\boldsymbol{V}^{(j+2)},\boldsymbol{X}^{(j+1)T}]=\texttt{QR}(\boldsymbol{Z}^{(j+1)T}).
20:    If j+1=jmaxj+1=j_{\text{\scriptsize{max}}}, then break.
21:   end for
22: end function

5 Experiments

Our first Fortran version of RQRCP used simple calls to BLAS and LAPACK subroutines without directly managing workloads among available cores. Library implementations of BLAS and LAPACK subroutines automatically distribute the computation to available cores using OpenMP. Although we knew RQRCP should have nearly the same communication complexity as blocked QR, that version did not compete well with library calls to the LAPACK subroutine DGEQRF, the BLAS-3 QR factorization. We believe this was due to poor automatic memory coordination between large blocked matrix operations. In order to provide a convincing demonstration of the efficiency of RQRCP, we had to carefully manage workloads using OpenMP within each phase of the main algorithm. The following experiments show that our RQRCP and TRQRCP subroutines can be written to require substantially less computation time than the optimized QRCP implementation DGEQP3 available through Intel’s Math Kernel Library.

5.1 Full Factorization Time

These tests examine how factorization times scale with various problem dimensions for several full matrix decompositions. Since we wanted to understand how different sizes and shapes of matrices could affect performance, we separately tested order scaling, row scaling, and column scaling. In order scaling, we vary the number of rows and columns together so that the matrix remains square. We also wanted to see how the performance of each algorithm scales as we increase the number of cores engaged. Unless the experiment specifies otherwise, each matrix has 1200012000 rows, 1200012000 columns, and the algorithm engages 2424 cores. The algorithms we tested are listed in table 1. fig. 2 shows performance results.

Table 1: Full decomposition experiments compare these algorithms. Rank-revealing subroutines are DGESVD, DGEQP3, RSRQRCP, and RQRCP. DGEQRF demonstrates the limit of performance without pivoting. DGEQR2 to shows the historical evolution of these algorithms.
Subroutine Description
DGEQR2 LAPACK BLAS-2 implementation of QR
DGESVD LAPACK singular value decomposition
DGEQP3 LAPACK competing implementation of QRCP
RSRQRCP algorithm 4 modified for repeated-sampling
RQRCP algorithm 4 with sample update (unmodified)
DGEQRF LAPACK BLAS-3 implementation of QR
Refer to caption
Figure 2: Full decomposition benchmarks. Top-left: 2424 cores, rows and columns scaled equally. Top-right: 2424 cores, 1200012000 rows, columns scaled. Bottom-left: 2424 cores, rows scaled, 1200012000 columns. Bottom-right: cores scaled, 1200012000 rows and columns. RQRCP consistently performs almost as well as DGEQRF, QR without pivoting.

These tests show that RQRCP performs nearly as well as DGEQRF, the LAPACK implementation of BLAS-3 QR without pivoting. We further note that our implementation even outperforms DGEQRF in some column scaling cases. These experiments were run on a single node of the NERSC machine Edison. Each node has two 12-core Intel processors. Subroutines were linked with Intel’s Math Kernel Library. Each test matrix was randomly generated and the same matrix was submitted to each algorithm.

5.2 Truncated Decomposition

These experiments compare truncated approximation performance. In addition to probing how the matrix shape affects execution time, we examine the effect of varying the truncation rank. As before, we test parallelization by varying the number of cores engaged. Unless specified otherwise, each algorithm engages 2424 cores, operates on a 12000×1200012000\times 12000 matrix, and truncates to rank 12001200. Since the proprietary optimized implementations of LAPACK functions were unavailable for modification, we rewrote and adjusted each algorithm to halt at the desired rank. Table 2 lists the algorithms we tested. Again, the same random matrix is submitted to each algorithm. Figure 3 shows results.

Table 2: These algorithms are compared in truncated decomposition scaling experiments. Comparing RSRQRCP with RQRCP reveals the cost of repeated sampling. Comparing RQRCP with QR reveals the cost of pivot selection from samples. Comparing RQRCP with TRQRCP reveals the cost of the trailing matrix update. This version of QR is identical to RQRCP after eliminating sample operations and pivoting.
Subroutine Description
QRCP algorithm 2, QRCP with trailing update
RSRQRCP algorithm 4 modified for repeated-sampling
TUXV algorithm 6, approximation of truncated SVD
RQRCP algorithm 4 with sample update and trailing update (unmodified)
QR QR (no pivoting) with trailing update
TRQRCP algorithm 5 with sample update and no trailing update
Refer to caption
Figure 3: Truncated decomposition benchmarks. Top-left: 2424 cores, 1200012000 rows and columns, truncation rank scaled. Top-right: 2424 cores, 1200012000 rows, columns scaled, rank 12001200. Bottom-left: 2424 cores, rows scaled, 1200012000 columns, rank 12001200. Bottom-right: cores scaled, 1200012000 rows and columns, rank 12001200. RQRCP and QR perform similarly. TRQRCP is fastest. TUXV requires only modest additional cost.

Since TRQRCP uses the sample update formula and avoids the trailing update, it is nearly always fastest. Our TUXV experiments use jmax=1j_{\text{\scriptsize{max}}}=1. As such, TUXV performs just one additional matrix multiply. These results show that TUXV requires only a modest increase in processing time over optimized truncated QR. Furthermore, the next set of experiments shows that TUXV gains a significant improvement in approximation quality over both QRCP and RQRCP.

5.3 Decomposition quality

The pivots that result from randomized sampling are not the same as those obtained from QRCP. In order to compare factorization quality, we construct sequences of partial factorizations and compute the corresponding low rank approximations. The resulting relative error in the Frobenius norm is plotted in fig. 4 against the corresponding approximation rank. For both RQRCP and TUXV, we perform 100 runs and plot the median, as well as both the minimum and maximum error bounds. Random samples used padding size p=8p=8 and block size b=32b=32. Matrix decomposition quality is compared for the proposed algorithms using test cases from the San Jose State University Singular Matrix Database: FIDAP/ex33, HB/lock2232, and LPnetlib/lpi_gran. We also test a matrix corresponding to a gray-scale image of a differential gear (image credit: Alex Kovach [21]). Plot axes have been chosen to magnify the differences among these algorithms.

Refer to caption
Figure 4: Truncated decomposition quality experiments. Top-left: FIDAP/ex33 (1733×1733)(1733\times 1733). Top-right: HB/lock2232 (2232×2232)(2232\times 2232). Bottom-left: Differential gear (2442×3888)(2442\times 3888). Bottom-right: LPnetlib/lpi_gran (2658×2525)(2658\times 2525). Both RQRPC and TUXV show the minimum and maximum truncation errors over 100 runs. The range of outcomes for RQRCP is narrow and holds to QRCP. TUXV outcomes are even narrower and slightly above the truncated SVD.

At the top of each plot we have QR without pivoting. In order to produce competitive results, QR was applied after presorting columns in order of descending 2-norms. Despite this modification, QR performs poorly (as expected) with approximation error dropping much more slowly than the other approximations, thus demonstrating why pivoting is necessary to prioritize representative columns in the truncated decomposition. Below QR we have RQRCP, which achieves results that are consistent with QRCP in each case. The QRCP-like low-rank approximations are further improved by TUXV and the exact truncated SVD, which is theoretically optimal. In each case, TUXV produces approximation error closer to the SVD, with very low variation among the 100 runs.

In fig. 5, we compare approximation quality by reconstructing the image of the differential gear using low-rank approximations. The original image is 2442×38882442\times 3888 and we truncate to rank 8080. Again, truncated QR shows the poorest reconstruction quality, despite presorting. Truncated RQRCP produces better results, but close inspection shows fine defects. Reconstruction using TUXV is nearly indistinguishable from the original.

Refer to caption
Figure 5: Low-rank image reconstruction comparison. Reconstructions are computed from a 2442×38882442\times 3888 grayscale matrix. Approximations are reconstructed with rank 8080. Truncated QR is computed with columns presorted by descending 22-norm. TRQRCP dramatically improves visual approximation quality. Likewise, TUXV further improves fine details.

6 Conclusion

We have shown that RQRCP achieves strong parallel scalability and the pivoting quality of QRCP at BLAS-3 performance, often an order of magnitude faster than the standard approach. By using randomized projection to construct a small sample matrix 𝑩\boldsymbol{B} from a much larger original matrix 𝑨\boldsymbol{A}, it becomes possible to substantially reduce the communication complexity associated with a series of algorithmic decisions. Our analysis of latent column norms, inferred from the sample, justifies the selection computations that we use to obtain full blocks of column pivots. Having blocks of pivots allows our algorithm to factorize 𝑨\boldsymbol{A} using matrix-matrix multiplications instead of interleaving multiple series of matrix-vector operations, making RQRCP the algorithm of choice for numerical rank determination.

Critically, we have shown how to leverage intermediate block transformations of 𝑨\boldsymbol{A} to update 𝑩\boldsymbol{B} with a sample update formula. This technique allows us to avoid computing a new randomized projection for each block operation, thus substantially reducing the matrix-matrix multiplication work needed to process each block.

We have extended this method of factorization to produce truncated low-rank approximations. TRQRCP, the truncated formulation of RQRCP, avoids block updates to the trailing matrix during factorization, which reduces the leading contribution to communication for low-rank approximations. Moreover, TRQRCP provides an efficient initial operation in our approximation of the truncated SVD, TUXV.

Our algorithms are implemented in Fortran with OpenMP. Numerical experiments compare performance with LAPACK subroutines, linked with the Intel Math Kernel Library, using a 24-core system. These experiments demonstrate that the computation time of RQRCP is nearly as short as that of unpivoted QR and substantially shorter than QRCP. Problems that have been too large to process with QRCP-dependent subroutines may now become feasible. Other applications that had to settle for QR, due to performance constraints, may find improved numerical stability at little cost by switching to RQRCP. For low-rank approximations, TRQRCP offers an additional performance advantage and TUXV improves approximation quality at a modest additional cost. These algorithms open a new performance domain for large matrix factorizations that we believe will be useful in science, engineering, and data analysis.

Randomized methods harness the fact that it is possible to make good algorithmic decisions in the face of uncertainty. By permitting controlled uncertainty, we can substantially improve algorithm performance. Future work will address how we may understand the foundations of credible uncertainty in predictions. Improving this understanding will facilitate the development of efficient predictive algorithms and support our ability to make good decisions from limited information.

Acknowledgments

We sincerely thank Chris Melgaard, Laura Grigori, and James Demmel for several helpful discussions, and to anonymous reviewers for their hard work and insightful feedback. We also deeply appreciate feedback on this revision from both Thomas Catanach and Jacquilyn Weeks.

Sandia National Laboratories is a multimission laboratory managed and operated by National Technology and Engineering Solutions of Sandia, LLC., a wholly owned subsidiary of Honeywell International, Inc., for the U.S. Department of Energy’s National Nuclear Security Administration under contract DE-NA-0003525.

This paper describes objective technical results and analysis. Any subjective views or opinions that might be expressed in the paper do not necessarily represent the views of the U.S. Department of Energy or the United States Government.

References

  • [1] C. Battaglino, G. Ballard, and T. G. Kolda, A practical randomized CP tensor decomposition, SIAM Journal on Matrix Analysis and Applications, 39 (2018), pp. 876–901.
  • [2] C. Bischof and C. Van Loan, The WYWY representation for products of Householder matrices, SIAM Journal on Scientific and Statistical Computing, 8 (1987), pp. s2–s13.
  • [3] C. H. Bischof, A parallel QRQR factorization algorithm with controlled local pivoting, SIAM Journal on Scientific and Statistical Computing, 12 (1991), pp. 36–57.
  • [4] C. H. Bischof and P. C. Hansen, Structure-preserving and rank-revealing QRQR-factorizations, SIAM Journal on Scientific and Statistical Computing, 12 (1991), pp. 1332–1350, https://doi.org/10.1137/0912073.
  • [5] T. F. Chan, Rank revealing QR factorizations, Linear Algebra and its Applications, 88-89 (1987), pp. 67–82, https://doi.org/10.1016/0024-3795(87)90103-0, https://doi.org/10.1016/0024-3795(87)90103-0.
  • [6] T. F. Chan and P. C. Hansen, Some applications of the rank revealing QRQR factorization, SIAM Journal on Scientific and Statistical Computing, 13 (1992), pp. 727–741.
  • [7] J. Demmel, L. Grigori, M. Hoemmen, and J. Langou, Communication-optimal parallel and sequential QRQR and LULU factorizations, SIAM Journal on Scientific Computing, 34 (2012), pp. A206–A239.
  • [8] J. W. Demmel, L. Grigori, M. Gu, and H. Xiang, Communication avoiding rank revealing QRQR factorization with column pivoting, SIAM Journal on Matrix Analysis and Applications, 36 (2015), pp. 55–89.
  • [9] J. A. Duersch and M. Gu, Randomized QRQR with column pivoting, SIAM Journal on Scientific Computing, 39 (2017), pp. C263–C291.
  • [10] J. A. Duersch, M. Shao, C. Yang, and M. Gu, A robust and efficient implementation of LOBPCG, SIAM Journal on Scientific Computing, 40 (2018), pp. C655–C676.
  • [11] N. B. Erichson, S. Voronin, S. L. Brunton, and J. N. Kutz, Randomized matrix decompositions using R, Journal of Statistical Software, 89 (2019), pp. 1–48.
  • [12] G. H. Golub and C. F. Van Loan, Matrix Computations, vol. 3, JHU Press, 2013.
  • [13] M. Gu and S. C. Eisenstat, Efficient algorithms for computing a strong rank-revealing QRQR factorization, SIAM Journal on Scientific Computing, 17 (1996), pp. 848–869.
  • [14] N. Halko, P.-G. Martinsson, and J. A. Tropp, Finding structure with randomness: Probabilistic algorithms for constructing approximate matrix decompositions, SIAM review, 53 (2011), pp. 217–288.
  • [15] U. Hetmaniuk and R. Lehoucq, Basis selection in LOBPCG, Journal of Computational Physics, 218 (2006), pp. 324–332.
  • [16] N. J. Higham, QRQR factorization with complete pivoting and accurate computation of the SVD, Linear Algebra and its Applications, 309 (2000), pp. 153–174.
  • [17] D. Hong, T. G. Kolda, and J. A. Duersch, Generalized canonical polyadic tensor decomposition, SIAM Review, 62 (2020), pp. 133–163.
  • [18] D. A. Huckaby and T. F. Chan, On the convergence of Stewart’s QLPQLP algorithm for approximating the SVD, Numerical Algorithms, 32 (2003), pp. 287–316.
  • [19] W. B. Johnson and J. Lindenstrauss, Extensions of Lipschitz mappings into a Hilbert space, Contemporary mathematics, 26 (1984), p. 1.
  • [20] R. E. Kass and L. Wasserman, Formal rules for selecting prior distributions: A review and annotated bibliography, Journal of the American Statistical Association, 435 (1996), pp. 1343–1370.
  • [21] A. Kovach, Differential gear, 2016, https://commons.wikimedia.org/wiki/File:Diff_gear.jpg.
  • [22] E. Liberty, F. Woolfe, P.-G. Martinsson, V. Rokhlin, and M. Tygert, Randomized algorithms for the low-rank approximation of matrices, Proceedings of the National Academy of Sciences, 104 (2007), pp. 20167–20172.
  • [23] M. W. Mahoney et al., Randomized algorithms for matrices and data, Foundations and Trends® in Machine Learning, 3 (2011), pp. 123–224.
  • [24] P.-G. Martinsson, G. Q. Ortí, and N. Heavner, randUTV: A blocked randomized algorithm for computing a rank-revealing UTV factorization, ACM Transactions on Mathematical Software, 45 (2019), pp. 1–26.
  • [25] P.-G. Martinsson, G. Q. Ortí, N. Heavner, and R. van de Geijn, Householder QR factorization with randomization for column pivoting (HQRRP), SIAM J. Sci. Comput., 39 (2017), p. C96–C115.
  • [26] P.-G. Martinsson, V. Rokhlin, and M. Tygert, A randomized algorithm for the decomposition of matrices, Applied and Computational Harmonic Analysis, 30 (2011), pp. 47–68, https://doi.org/10.1016/j.acha.2010.02.003, https://doi.org/10.1016/j.acha.2010.02.003.
  • [27] P.-G. Martinsson and J. Tropp, Randomized numerical linear algebra: Foundations & algorithms, Manuscript, (2020), https://doi.org/https://arxiv.org/pdf/2002.01387.pdf.
  • [28] P.-G. Martinsson and S. Voronin, A randomized blocked algorithm for efficiently computing rank-revealing factorizations of matrices, SIAM Journal on Scientific Computing, 38 (2016), pp. S485–S507.
  • [29] C. Puglisi, Modification of the householder method based on the compact WYWY representation, SIAM Journal on Scientific and Statistical Computing, 13 (1992), pp. 723–726.
  • [30] G. Quintana-Ortí, X. Sun, and C. H. Bischof, A BLAS-3 version of the QRQR factorization with column pivoting, SIAM Journal on Scientific Computing, 19 (1998), pp. 1486–1494.
  • [31] V. Rokhlin, A. Szlam, and M. Tygert, A randomized algorithm for principal component analysis, SIAM Journal on Matrix Analysis and Applications, 31 (2010), pp. 1100–1124.
  • [32] R. Schreiber and C. Van Loan, A storage-efficient WYWY representation for products of Householder transformations, SIAM Journal on Scientific and Statistical Computing, 10 (1989), pp. 53–57.
  • [33] A. Stathopoulos and K. Wu, A block orthogonalization procedure with constant synchronization requirements, SIAM Journal on Scientific Computing, 23 (2002), pp. 2165–2182.
  • [34] G. Stewart, The QLPQLP approximation to the singular value decomposition, SIAM Journal on Scientific Computing, 20 (1999), pp. 1336–1348.
  • [35] R. Vidal, Y. Ma, and S. Sastry, Generalized principal component analysis (GPCA), IEEE transactions on pattern analysis and machine intelligence, 27 (2005), pp. 1945–1959.
  • [36] F. Woolfe, E. Liberty, V. Rokhlin, and M. Tygert, A fast randomized algorithm for the approximation of matrices, Applied and Computational Harmonic Analysis, 25 (2008), pp. 335–366.
  • [37] J. Xiao, M. Gu, and J. Langou, Fast parallel randomized QRQR with column pivoting algorithms for reliable low-rank matrix approximations, in 2017 IEEE 24th International Conference on High Performance Computing (HiPC), IEEE, 2017, pp. 233–242.