A Parallel Hierarchical Blocked Adaptive Cross Approximation Algorithm
Yang Liu, Wissam Sid-Lakhdar, Elizaveta Rebrova, Pieter Ghysels,, Xiaoye Sherry Li

TL;DR
This paper introduces a hierarchical blocked adaptive cross approximation algorithm that enhances low-rank matrix decompositions with improved convergence and efficiency, suitable for parallel computing environments.
Contribution
It proposes a novel hierarchical BACA algorithm that combines adaptive cross approximation with hierarchical merging, improving convergence and computational efficiency over traditional methods.
Findings
Significantly improved convergence over baseline ACA
Reduced computational complexity compared to full decompositions
Demonstrated efficiency and parallel scalability in numerical tests
Abstract
This paper presents a hierarchical low-rank decomposition algorithm assuming any matrix element can be computed in time. The proposed algorithm computes rank-revealing decompositions of sub-matrices with a blocked adaptive cross approximation (BACA) algorithm, followed by a hierarchical merge operation via truncated singular value decompositions (H-BACA). The proposed algorithm significantly improves the convergence of the baseline ACA algorithm and achieves reduced computational complexity compared to the full decompositions such as rank-revealing QR decompositions. Numerical results demonstrate the efficiency, accuracy and parallel efficiency of the proposed algorithm.
| constant rank | increasing rank | |
|---|---|---|
| BACA | ||
| Merge compute | ||
| Merge communicate |
| Algorithm | ACA/ | Hyrbird-ACA | BACA | H-BACA |
|---|---|---|---|---|
| Pivot count per iteration | 1 | 1 | ||
| Cost (constant rank) | ||||
| Cost (increasing rank) | ||||
| Pre-selection of submatrices | no | yes | no | no |
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
\corrauth
Yang Liu, Computational Research Divisio Lawrence Berkeley National Laboratory, Berkeley, CA, USA.
A Parallel Hierarchical Blocked Adaptive Cross Approximation Algorithm
Yang Liu11affiliationmark:
Wissam Sid-Lakhdar11affiliationmark:
Elizaveta Rebrova22affiliationmark:
Pieter Ghysels11affiliationmark: and Xiaoye Sherry Li11affiliationmark:
11affiliationmark: Computational Research Division, Lawrence Berkeley National Laboratory, Berkeley, CA, USA
22affiliationmark: Department of Mathematics, University of California, Los Angeles, CA, USA
Abstract
This paper presents a low-rank decomposition algorithm assuming any matrix element can be computed in time. The proposed algorithm first computes rank-revealing decompositions of sub-matrices with a blocked adaptive cross approximation (BACA) algorithm, and then applies a hierarchical merge operation via truncated singular value decompositions (H-BACA). The proposed algorithm significantly improves the convergence of the baseline ACA algorithm and achieves reduced computational complexity compared to the full decompositions such as rank-revealing QR. Numerical results demonstrate the efficiency, accuracy and parallel scalability of the proposed algorithm.
keywords:
Adaptive cross approximation, singular value decomposition, rank-revealing decomposition, parallelization, multi-level algorithms
1 Introduction
Rank-revealing decomposition algorithms are important numerical linear algebra tools for compressing high-dimensional data, accelerating solution of integral and partial differential equations, constructing efficient machine learning algorithms, and analyzing numerical algorithms, etc, as matrices arising from many science and engineering applications oftentimes exhibit numerical rank-deficiency. Despite the favorable memory footprint of such decompositions with and respectively denoting the matrix dimension (assuming a square matrix) and the numerical rank, the computational cost can be expensive. Existing rank-revealing decompositions such as truncated singular value decomposition (SVD), column-pivoted QR (QRCP), CUR decomposition, interpolative decomposition (ID), and rank-revealing LU typically require at least operations Gu and Eisenstat (1996); Cheng et al. (2005); Voronin and Martinsson (2017); Mahoney and Drineas (2009). This complexity can be reduced to by structured random matrix projection-based algorithms Voronin and Martinsson (2017); Liberty et al. (2007). In addition, faster algorithms are available in the following three scenarios. 1. When each element entry can be computed in CPU time with prior knowledge (i.e., smoothness, sparsity, or leverage scores) about the matrix, faster algorithms such as randomized CUR and adaptive cross approximation (ACA) Bebendorf (2000); Bebendorf and Grzhibovskis (2006); Zhao et al. (2005) algorithms can achieve complexity. However, the robustness of these algorithms relies heavily on matrix properties that are not always present in practice. 2. When the matrix can be rapidly applied to arbitrary vectors, algorithms such as randomized SVD, QR and UTV (T lower or upper triangular) Liberty et al. (2007); Xiao et al. (2017); Feng et al. (2018a); Martinsson et al. (2017) can be utilized to achieve quasi-linear complexity. 3. Finally, given a matrix with missing entries, the low-rank decomposition can be constructed via matrix completion algorithms Candès and Recht (2009); Balzano et al. (2010) in quasi-linear time assuming incoherence properties of the matrices (i.e., projection of natural basis vectors onto the space spanned by singular vectors of the matrix should not be very sparse). This work concerns the development of a practical algorithm, in application scenario 1, that improves the robustness of ACA algorithms while maintaining reduced complexity for broad classes of matrices.
The partially-pivoted ACA algorithm, closely related to LU with rook pivoting Foster (1997), constructs an LU-type decomposition upon accessing one row and column per iteration. For matrices resulting from asymptotically smooth kernels, ACA is a rank-revealing and optimal-complexity algorithm that converges in iterations Bebendorf (2000). Despite its favorable computational complexity, it is well-known that the ACA algorithm suffers from deteriorated convergence and/or premature termination for non-smooth, sparse and/or coherent matrices Heldring et al. (2014). Hybrid methods or improved convergence criteria (e.g., hybrid ACA-CUR, averaging, statistical norm estimation) have been proposed to partially alleviate the problem Heldring et al. (2015); Grasedyck and Hackbusch (2005). The main difficulty of leveraging ACA as robust algebraic tools for general low-rank matrices results from ACA’s partial pivot-search strategy to attain low complexity. In addition to the abovementioned remedies, another possibility to improve ACA’s robustness is to search for pivots in a wider range of rows/columns without sacrificing too much computational efficiency. Here we consider two different strategies: 1. Instead of searching one row/column per iteration as in ACA, it is possible to search a block of rows/columns to find multiple pivots together. 2. Instead of applying ACA directly on the entire matrix, it is possible to start with compressing submatrices via ACA and then merge the results as one low-rank product. In extreme cases (e.g., when block size equals matrix dimension or submatrix dimension equals one), these strategies lead to quadratic computational costs. Therefore, it is valuable to address the question: for what matrix kernels and under what block/submatrix sizes will these strategies retain low complexity.
For the first strategy, this work proposes a blocked ACA algorithm (BACA) that extracts a block row/column per iteration to significantly improve convergence of the baseline ACA algorithms. The blocked version also enjoys higher flop performance as it involves mainly BLAS-3 operations. Compared to the aforementioned remedies, the proposed algorithm provides a unified framework to balance robustness and efficiency. Upon increasing the block size (i.e., the number of rows/columns per iteration), the algorithm gradually changes from ACA to ID. For the second strategy, the proposed algorithm further subdivides the matrix into submatrices compressed via BACA, followed by a hierarchical merge algorithm leveraging low-rank arithmetic Hackbusch et al. (2002); Grasedyck and Hackbusch (2003). The overall cost of this H-BACA algorithm is at most assuming the block size in BACA is less than the rank. In other words, the proposed H-BACA algorithm is a general numerical linear algebra tool as an alternative to ACA, SVD, QR, etc. In addition, the overall algorithm can be parallelized using distributed-memory linear algebra packages such as ScaLAPACK Blackford et al. (1997) which avoids the difficulty of efficient parallelization of plain ACA algorithms. Numerical results illustrate good accuracy, efficiency and parallel performance. In addition, the proposed algorithm can be used as a general low-rank compression tool for constructing hierarchical matrices Rebrova et al. (2018).
2 Notation
Throughout this paper, we adopt the Matlab notation of matrices and vectors. Submatrices of a matrix are denoted , or where , are index sets. Similarly, subvectors of a column vector are denoted . An index set permuted by reads . Transpose, inverse, pseudo-inverse of are , , . and denote Frobenius norm and 2-norm. Note that refers to a column vector. Vertical and horizontal concatenations of , are and . Element-wise multiplication of and is . All matrices are real-valued unless otherwise stated. It is assumed for , , but the proposed algorithms also apply to complex-valued and tall-skinny / short-fat matrices. We denote truncated SVD as with , column orthogonal, diagonal, and being -rank defined by . We denote QRCP as or with column orthogonal, upper triangular, being column pivots, and and being the prescribed accuracy and rank, respectively. QR without column-pivoting is simply written as . Cholesky decomposition without pivoting is written as with upper triangular. means logarithm of to the base 2.
3 Algorithm Description
3.1 Adaptive Cross Approximation
Before describing the proposed algorithm, we first briefly summarize the baseline ACA algorithm Zhao et al. (2005). Consider a matrix of -rank , the ACA algorithm approximates by a sequence of rank-1 outer-products as
[TABLE]
At each iteration , the algorithm selects column (pivot from remaining columns) and row (pivot from remaining rows) from the residual matrix corresponding to an element denoted by with sufficiently large magnitude. Note that and are and vectors. The partially-pivoted ACA algorithm (ACA for short), selecting by only looking at previously selected rows and columns, is described as Algorithm 1. Specifically, each iteration selects pivot used in the current iteration and pivot for the next iteration (via line 1 and 1) as
[TABLE]
and is a random initial column index. Note that and are enforced. The iteration is terminated when with
[TABLE]
and is the prescribed tolerance. Note that each iteration requires only flop operations with denoting currently revealed numerical rank. The overall complexity of partially-pivoted ACA scales as when the algorithm converges in iterations. Despite the favorable complexity, the convergence of ACA for general rank-deficient matrices is unsatisfactory. For many rank-deficient matrices arising from the numerical solution of PDEs, signal processing and data science, ACA oftentimes either requires iterations or exhibits premature termination. First, as ACA does not search the full residual matrices for the largest element, it cannot avoid selection of smaller pivots for general rank-deficient matrices and may require iterations. Second, the approximation in (4) often causes the premature termination with the selection of smaller pivots. Remedies such as averaged stopping criteria Zhou et al. (2017), stochastic error estimation Heldring et al. (2015), ACA+ Grasedyck and Hackbusch (2005), and hybrid ACA Grasedyck and Hackbusch (2005) have been developed but they do not generalize to a broad range of applications.
3.2 Blocked Adaptive Cross Approximation
Instead of selecting only one column and row from the residual matrix in each ACA iteration, we can select a fixed-size block of columns and rows per iteration to improve the convergence and accuracy of ACA. In addition, many BLAS-1 and BLAS-2 operations of ACA become BLAS-3 operations and hence higher flop performance can be achieved.
Specifically, the proposed BACA algorithm factorizes
[TABLE]
where and . In principle, the algorithm selects a block of rows and columns via cross approximations in the residual matrix and then ones via rank-revealing algorithms to form a low-rank update at iteration . The total number of iterations is approximately if . Instead of selecting row/column pivots via lines 1 and 1 of Algorithm 1, the proposed algorithm selects row and column index sets and by performing QRCP on columns (more precisely their transpose) and rows of the residual matrices. This proposed strategy is described in Algorithm 2.
Each BACA iteration is composed of three steps.
- •
Find block row and block column by QRCP. Starting with a random column index set , the block row and the next iteration’s block column are selected by (line 2 and 2)
[TABLE]
Here the algorithm first selects skeleton rows from the submatrix (i.e., columns from its transpose) and then selects skeleton columns from the submatrix by leveraging the LAPACK implementation of QRCP as it provides a simple way of greedily selecting well-conditioned columns by examining column norms in the factor at each iteration. Note that many other subset selection algorithms exist in both the machine learning and numerical linear algebra communities (e.g., strong rank-revealing QR Gu and Eisenstat (1996), spectrum-revealing QR Feng et al. (2018b), and column subset selection problems Boutsidis et al. (2009)), which ideally pick matrix columns with maximum volumes. Note that excludes rows selected in previous iterations. To efficiently enforce such condition, the QRCP is performed on the submatrix of excluding previously selected rows rather than directly on . Similarly, excludes columns selected in previous iterations. See Fig. 1(a) for an illustration of the procedure. and are selected by QRCP on the column and transpose of the row marked in yellow, respectively. The column marked in grey is used to select in the next iteration. For illustration purpose, index sets in Fig. 1(a) consist of contiguous indices.
- •
Form the factors of the low-rank product . Let , and , can be approximated by an ID-type decomposition Voronin and Martinsson (2017) by (8) and (9). Note that the pseudo inverse is computed via rank-revealing QR (also see the LRID algorithm at line 2). The rank-revealing algorithm is needed as the block can be further compressed with rank . Particularly for matrices where the ACA algorithm tends to fail, the corresponding matrices in BACA are often rank-deficient. In this case, BACA becomes more robust than ACA as the effective pivots can still be used to generate columns for the next iteration (as long as ). Consequently, the effective rank increase is and the pivot pair is updated in (10) by the column pivots of QRCP in (8).
[TABLE]
- •
Compute and update . Assuming constant block size , the norm of the low-rank update can be computed in operations (line 2) via
[TABLE]
Once is computed, the norm of can be updated efficiently in operations (line 2) as
[TABLE]
where represents the column dimension of at iteration . Note that the matrix multiplications in (11) and (13) involving and (and similarly for those involving and ) can be performed as to further improve the computational efficiency. Then the algorithm updates , as , and tests the stopping criteria . Note that with larger provides better approximations to the exact stop criteria compared to those in (4) hence can significantly reduce the chance of premature termination.
We would like to highlight the difference between the proposed BACA algorithm and existing ACA algorithms. First, as BACA selects a block of rows and columns per iteration as opposed to a single row and column in the baseline ACA algorithm, the convergence behavior and flop performance can be significantly improved. In the existing ACA algorithms, convergence can also be improved by leveraging averaged stopping criteria Zhou et al. (2017) or searching a single pivot in a broader range of rows and columns (e.g., fully-pivoted ACA). However, they still find one row or column at a time in each iteration and hence suffer from poor flop performance. Moreover, they cannot utilize strong rank revealing algorithms to select skeleton rows and columns with better volume (determinant in modulus) qualities. Second, BACA also has important connections to the hybrid ACA algorithm Grasedyck and Hackbusch (2005). The hybrid ACA algorithm assumes prior knowledge about the skeleton rows and columns to leverage interpolation algorithms (e.g., ID and CUR) on a skeleton submatrix and use ACA to refine the skeletons. In contrast, BACA uses cross approximations with QRCP to select skeleton rows and columns and uses interpolation algorithms (LRID at line 2) to form the low-rank update in each iteration. In other words, hybrid ACA can be treated as embedding ACA into interpolation algorithms while BACA can be thought of as embedding interpolation algorithms into ACA iterations. In addition, BACA is purely algebraic and requires no prior knowledge of the row/column skeletons or geometrical information about the rows/columns.
It is worth mentioning that the choice of affects the trade-off between efficiency and robustness of the BACA algorithm. When , the algorithm requires operations assuming convergence in iterations as each iteration requires operations. For example, BACA (Algorithm 2) precisely reduces to ACA (Algorithm 1) when . In what follows we refer to the baseline ACA algorithm as BACA with . On the other hand, BACA converges in a constant number of iterations when . In the extreme case, BACA reduces to QRCP-based ID when (note that the LRID algorithm at line 2 remains the only nontrivial operation). In this case the algorithm requires operations but enjoys the provable convergence of QRCP. Detailed complexity analysis of the BACA algorithm will be provided in Section Cost Analysis.
The BACA algorithm oftentimes exhibits overestimated ranks compared to those revealed by truncated SVD. Therefore, an SVD re-compression step of and may be needed via first computing a QR of and as , , and then a truncated SVD of Heldring et al. (2015). The result can be viewed as an approximate truncated SVD of and we assume this is the output of the BACA algorithm in the rest of this paper.
3.3 Parallel Hierarchical Low-Rank Merge
The distributed-memory implementations of the proposed BACA algorithm and the baseline ACA algorithm can pose performance challenges as straightforward parallelization of all operations in Algorithm 2 and 1 involves many collective communications. To see this, assuming the and factors in Algorithm 1 follow 1D block row and column data layouts, then every operation from line 3 to line 9 requires one or more collective communications. Instead, one can assign one process to perform BACA/ACA on submatrices without any communication and then leverage parallel low-rank arithmetic to merge the results into one single low-rank product. To elucidate the proposed algorithm, we first describe the hierarchical low-rank merge algorithm then outline its parallel implementation.
Given a matrix with , the algorithm first creates -level binary trees for index vectors and with index set and for nodes and at each level, upon recursively dividing each index set into / of approximately equal sizes, , . Here, and are children of and , respectively. The leaf and root levels are denoted [math] and , respectively. This process generates leaf-level submatrices of similar sizes. For simplicity, it is assumed . We denote submatrices associated with as and their truncated SVD as . Here is the -rank of . As submatrices have significantly smaller dimensions than (e.g., when as an extreme case), both BACA and ACA algorithms become more robust to attain the truncated SVD. Following compression of submatrices by BACA or ACA at step , there are multiple approaches to combine them into one low-rank product including randomized algorithms via applying to random matrices, and deterministic algorithms via recursively pair-wise re-compressing the blocks using low-rank arithmetic. Here we choose the deterministic algorithm for simplicity of rank estimation and parallelization. Here, we deploy truncated SVD as the re-compression tool but other tools such as ID, QR, UTV can also be applied. Fig. 1(b) illustrates one re-compression operation for transforming SVDs of into that of . The operation first horizontally compresses SVDs of at step and then vertically compresses the results, i.e., SVDs of at step , . Specifically, the horizontal compression step is composed of one concatenation operation in (14) and one compression operation in (15):
[TABLE]
with . Let and denote the submatrix before and after the SVD truncation, respectively. Similarly, the vertical compression step can be performed via horizontal merge of . Let represent the maximum rank among all blocks at steps . Note that the algorithm returns an approximate truncated SVD after steps. As an example, the hierarchical merge algorithm with the level count of the hierarchical merge and is illustrated in Fig. 2. At step , the algorithm compresses all submatrices with BACA; at step , the algorithm merges every horizontal pair of blocks; similarly at level , the algorithm merges every vertical pair of blocks. Note that blocks surrounded by solid lines represent results after compression at each step .
The above-described hierarchical algorithm with BACA for leaf-level compressions, is dubbed H-BACA (Algorithm 3). In the following, a distributed-memory implementation of the H-BACA algorithm is described. Without loss of generality, it is assumed that and . The proposed parallel implementation first creates two -level binary trees with denoting the total number of MPI processes. One process performs BACA compression of one or two leaf-level submatrices and low-rank merge operations from the bottom up until it reaches a submatrix shared by more than one process. Then, all such blocks are handled by PBLAS and ScaLAPACK with BLACS process grids that aggregate those in corresponding submatrices. Consider the example in Fig. 2 with process count . The workload of each process is labeled with its process rank and highlighted with one color. The dashed lines represent the ScaLAPACK blocks. First, BACA compressions and merge operations at are handled locally by one process without any communication. Next, merge operations at are handled by BLACS grids of , , and , respectively. For illustration purposes, we select the ScaLAPACK block size in Fig. 2 as where is the dimension of the finest-level submatrices in the hierarchical merge algorithm and . In this case, the only required data redistribution is from step to . However, the ScaLAPACK block size may be set to much smaller numbers in practice, requiring data redistribution at each row/column re-compression step. Similarly, the requirement of and is not needed in practice.
4 Cost Analysis
In this section, the costs for computation and communication of the proposed BACA and H-BACA algorithms are analyzed.
4.1 Computational Cost
First, the costs for BACA can be summarized as follows. Assuming BACA converges in iterations, each iteration performs entry evaluation from the residual matrices, QRCP for pivot selection, LRID for forming the LR product, and estimation of matrix norms. The entry evaluation computes entries each requiring operations; QRCP on block rows requires operations; the LRID algorithm requires operations; norm estimation requires operations. Summing up these costs, the overall cost for the BACA algorithm is
[TABLE]
Here we assume the block size . Note that when (e.g., ), it follows that the worst-case complexity is by bypassing the pivot selection step that causes the term. In practice, one would always avoid the case of .
Next, the computational costs of the H-BACA algorithm are analyzed. The costs are analyzed for two cases of distributions of the maximum ranks at each level, i.e., (ranks stay constant during the merge) and (rank increases by a factor of per level), . The constant-rank case is often valid for matrices with their numerical ranks independent of matrix dimensions (e.g., random low-rank matrices, matrices representing well-separated interactions from low-frequency and static wave equations and certain quantum chemistry matrices); the increasing-rank case holds true for matrices whose ranks depend polynomially (with order no bigger than 1) on the matrix dimensions (e.g., those arising from high-frequency wave equations, matrices representing near-field interactions from low-frequency and static wave equations, and certain classes of kernel methods on high dimensional data sets). From the aforementioned analysis of BACA, the computational costs for the leaf-level compression are:
[TABLE]
which represent the complexity with ACA when .
Let denote the size of submatrices at level . The computational costs of hierarchical merge operations can be estimated as
[TABLE]
Accounting for the two cases of rank distributions, the computational costs for the leaf-level BACA and hierarchical merge operations of the H-BACA algorithm are summarized in Table 1. Note that the costs of the BACA algorithm can also be extracted from Table 1 upon setting . Not surprisingly, the hierarchical merge algorithm induces a computational overhead of at most when ranks stay constant; the leaf-level compression can have a reduction factor for the increasing rank case and overhead for the constant rank case.
For completeness, the comparison between the proposed BACA, H-BACA algorithms (assuming ) and existing ACA algorithms are given in Table 2. In contrast to existing ACA algorithms that select one pivot at a time, BACA and H-BACA select and pivots simultaneously. As such, H-BACA is the most robust algorithm among all listed here. Not surprisingly, H-BACA can induce a computational overhead of .
4.2 Communication Cost
As the leaf-level BACA compression requires no communication, only the communication costs for the hierarchical merge operations are analyzed here. Since the merge operations may introduce an computational overhead, one would only increase to create more parallelism, i.e., the process count . Let denote the number of processes involved in one level merge operation, . The operation requires redistribution between process grids of sizes , and (see the example in Fig. 2). Each process grid involves a PDGEMM function in PBLAS to combine the low-rank products and a PDGESVD function in ScaLAPACK to compute the new rank after the combination (see Fig. 1(b)). Let the pair [#messages, volume] denote the communication cost including the number of messages and the number of words transferred along the critical path. Then the communication costs for each (BLACS) grid redistribution, PDGEMM and PDGESVD during the hierarchical merge are , , and , respectively. Recall that and denote the size and rank of submatrices at level and note that . Therefore the communication cost of the hierarchical merge (and H-BACA) can be estimated as
[TABLE]
Consider the two cases of rank distributions, i.e., and , the overall communication costs of H-BACA are and , respectively (see Table 1).
5 Numerical Results
This section presents several numerical results to demonstrate the accuracy and efficiency of the proposed H-BACA algorithm. The matrices in all numerical examples are generated from the following kernels: 1. Gaussian kernel: , . Here is the Gaussian width, and and are feature vectors in one subset of the SUSY and MNIST Data Sets from the UCI Machine Learning Repository Dheeru and Karra Taniskidou (2017), respectively. Note that the Gaussian kernel permits low-rank compression as shown in Wang et al. (2017); Bach (2013); Musco and Musco (2017) 2. EFIE2D kernel: resulting from the Nyström discretization of the electric field integral equation (EFIE) for electromagnetic scattering from 2-D curves. Here is the second kind Hankel function of order 0, is the free-space wavenumber, are discretization points (15 points per wavelength) of two 2-D parallel strips of length and distance . 3. EFIE3D kernel: is obtained by the Galerkin method for EFIE to analyze electromagnetic scattering from 3-D surfaces. 4. Frontal3D kernel: is a dense frontal matrix that arises from the multifrontal sparse elimination for the finite-difference frequency-domain solution of the homogeneous-coefficient Helmholtz equation inside a unit cube. 5. Polynomial kernel: . Here are points from a randomly generated dataset, and is a regularization parameter. 6. Product-of-random kernel: with and being random matrices with i.i.d. entries. Note that the EFIE2D, EFIE3D and Frontal3D kernels result in complex-valued matrices. Throughout this section, we refer to ACA as a special case of BACA when . In all examples except for the Product-of-random kernel, the algorithm is applied to the offdiagonal submatrix {\color[rgb]{0,0,0}\definecolor[named]{pgfstrokecolor}{rgb}{0,0,0}\pgfsys@color@gray@stroke{0}\pgfsys@color@gray@fill{0}{A_{12}}}=A(1:n,1+n:2n) assuming rows/columns of have been properly permuted (e.g., by a KD-tree partitioning scheme). Note that the permutation may yield a hierarchical matrix representation of , but in this paper we only focus on compression of one off-diagonal subblock of with H-BACA. All experiments are performed on the Cori Haswell machine at NERSC, which is a Cray XC40 system and consists of 2388 dual-socket nodes with Intel Xeon E5-2698v3 processors running 16 cores per socket. The nodes are configured with 128 GB of DDR4 memory at 2133 MHz.
5.1 Convergence
First, the convergence of the proposed BACA algorithm is investigated using several matrices: Gaussian-SUSY matrices with , , an EFIE3D matrix for a unit sphere with and approximately 20 points per wavelength, and a Frontal3D matrix with and 10 points per wavelength. The corresponding -ranks are for . The residual histories versus revealed ranks , at each iteration of BACA with are plotted in Fig. 3. The residual error is defined as from (12). As a reference, the singular value spectra computed from are also plotted.
For the Gaussian-SUSY matrices, the baseline ACA algorithm () behaves poorly with smaller due to the exponential decay of the Gaussian kernel. As a result, the matrix becomes increasingly sparse and coherent for small particularly for high dimensional data sets. In fact, ACA constantly selects smaller pivots and the residual exhibits wild oscillations particularly for smaller (e.g., when in Fig. 3(b)). Similarly, the analytical and numerical Green’s functions respectively for the EFIE3D (Fig. 3(c)) and Frontal3D (Fig. 3(d)) matrices are not asymptotically smooth for ACA to converge rapidly. For all examples in Fig. 3, significant portions of the residual curves lie below the singular value spectra which causes premature iteration termination for certain given residual errors. In stark contrast, the proposed BACA algorithm () shows increasingly smooth residual histories residing above the singular value spectra as the block size increases. Although BACA may overestimate the matrix ranks particularly for larger , the SVD re-compression step mentioned in Section Blocked Adaptive Cross Approximation can effectively reduce the ranks.
5.2 Accuracy
Next, the accuracy of the H-BACA algorithm is demonstrated using the following matrices: two Gaussian-SUSY matrices with , , one EFIE3D matrix for a unit sphere with and approximately 20 points per wavelength, and a Frontal3D matrix with and 10 points per wavelength. The relative Frobenious-norm error is computed for changing number of leaf-level submatrices and block size . When for the Gaussian-SUSY matrix (Fig. 4a), the H-BACA algorithms achieve desired accuracies () using the baseline ACA (), and BACA () when and the hierarchical merge operation only causes slight error increases as increases. However when for the Gaussian-SUSY matrix (Fig. 4b), all data points for H-BACA with fail due to the wildly oscillating residual histories. In contrast, H-BACA with achieves significantly better accuracies for most data points particularly as increases. For the EFIE3D (Fig. 4c) and Frontal3D (Fig. 4d) matrices, H-BACA with achieves comparable accuracies as H-BACA with for most data points. Note that is significantly better than when the prescribed residual error is large (). This agrees with the residual histories in Fig. 3(c) and Fig. 3(d) as they lie below the singular value spectra when iteration count is small.
5.3 Efficiency
This subsection provides six examples to verify the computational complexity estimates in Table 1. H-BACA with leaf-level ACA () and BACA () is tested for the following matrices: one Gaussian-SUSY matrix with , , , one Gaussian-MNIST matrix with , , , one EFIE3D matrix for a unit sphere with , and points per wavelength, one Frontal3D matrix with , and 10 points per wavelength, one Polynomial matrix with , , , and one Product-of-random matrix with , . The corresponding -ranks are 298, 137, 1488, 788, 450 and 1000, respectively. It can be validated that the hierarchical merge operation attains increasing ranks for the Gaussian, EFIE3D and Frontal3D matrices, and relatively constant ranks for the Polynomial, and Product-of-random matrices. All examples use one process except that the Gaussian-SUSY example uses 16 processes. The CPU times are measured and plotted in Fig. 5.
Table I predicts that H-BACA exhibits increasing (with a factor of ) and constant time when stays constant and increases, respectively. Note that the rank assumption leading to the computational overhead may not be fully observed for practical values of and . Given one matrix, may stay approximately constant for a limited number of subdivision levels . For example, stay constant for bottom levels of EFIE3D and Frontal3D matrices, and top levels of Polynomial and Product-of-random matrices. This agrees with the observed scalings (w.r.t ) in Fig. 5(c) - 5(f). As a reference, the curves are plotted and only small ranges of exhibit the overhead. For the Gaussian matrices, we even observe non-increasing CPU time w.r.t. when is not too big. (see Fig. 5(a) and 5(b)).
The effects of varying block size also deserve further discussions. First, larger block size can significantly improve the robustness of H-BACA for the Gaussian matrices. For example, H-BACA does not achieve desired accuracies due to premature termination for all data points on the curve in Fig. 5(a) and curves in Fig. 5(b). In contrast, H-BACA with larger attains desired accuracies. Second, larger block size results in reduced CPU time for the Polynomial and Frontal3D matrices due to better BLAS performance (see Fig. 5(d) and 5(e)). For the other tested matrices, no significant performance differences have been observed by changing block size . However, for matrices with ranks , larger and can introduce significant overheads.
5.4 Parallel Performance
Finally, the parallel performance of the H-BACA algorithm is demonstrated via strong scaling studies with the EFIE2D, EFIE3D, Product-of-random and Gaussian matrices with process counts . For the EFIE2D matrices, and the wavenumbers are chosen such that the -ranks with are and , respectively. For the EFIE3D matrices for a unit square, and the wavenumbers are chosen such that the -ranks with are and , respectively. For the Product-of-random matrices, and the inner dimension of the product is set to and , respectively. For the Gaussian matrices with a randomly generated dataset of dimension and , we choose and such that the -ranks with are and , respectively. In all examples, the block size and number of leaf-level subblocks in H-BACA are chosen as and . The ScaLAPACK block size is set to . As the reference, we compare to a straightforward parallel implementation of the baseline ACA algorithm which essentially parallelize every operation in ACA with collective MPI communications.
For all examples, the parallel ACA algorithm stops scaling when is sufficiently large (see Fig. 6). In contrast, the proposed parallel H-BACA algorithm scales up to . In most examples, H-BACA achieves better parallel efficiencies with larger ranks due to better process utilization during the hierarchical merge operation. We also note that ACA outperforms H-BACA for the Product-of-random matrices with small process count (and ). This is partially attributed to the overhead observed in Fig. 5(f).
Overall, the parallel H-BACA algorithm can achieve reasonably good parallel performances for rank-deficient matrices with modest to large numerical ranks. Not surprisingly, the parallel runtime is dominated by that of ScaLAPACK computation and possible redistributions between each re-compression step as analyzed in Section Cost Analysis. Also note that the leaf-level BACA compression is embarrassingly parallel for all test cases.
6 Conclusion
This paper presents a parallel and purely algebraic ACA-type matrix decomposition algorithm given that any matrix entry can be evaluated in time. Two proposed strategies, BACA and H-BACA, are leveraged to improve the robustness and parallel efficiency of the (baseline) ACA algorithm for general rank-deficient matrices.
First, the BACA algorithm searches for blocks of row/column pivots via column-pivoted QR on the column/row submatrices at each iteration. The blocking nature of BACA provides a closer estimation of the true residual error and reduces the chance of selecting smaller pivots when compared to ACA. Therefore, BACA exhibits a much smoother and more reliable convergence history. Moreover, blocked operations also benefit from higher flop performance compared to non-blocked ones. For a rank-deficient matrix with dimension and -rank , the computational cost of BACA is assuming the block size constant and iteration count .
Second, the H-BACA algorithm divides the matrix into similar-sized submatrices each compressed with BACA and then hierarchically merges the results using low-rank arithmetic. Depending on the rank behaviors of submatrices during the merge, the H-BACA may have a computational overhead of yielding the overall computational cost at most . The H-BACA algorithm can be parallelized with distributed-memory machines by assigning each process to one submatrix and leveraging PBLAS and ScaLAPACK for the hierarchical merge operation. Such parallelization strategy yields a much more favorable communication cost when compared to the straightforward parallelization of ACA/BACA with collective MPI routines. Not surprisingly, good parallel performance can be achieved for matrices with modest to large numerical ranks which increases process utilization for each merge operation.
In contrast to the baseline ACA algorithm, the proposed algorithms exhibit improved robustness and favorable parallel performance with low computational overheads for broad ranges of matrices arising from many science and engineering applications.
{dci}
The author(s) declared no potential conflicts of interest with respect to the research, authorship, and/or publication of this article.
{funding}
The author(s) disclosed receipt of the following financial support for the research, authorship, and/or publication of this article: This research was supported in part by the Exascale Computing Project (17-SC-20-SC), a collaborative effort of the U.S. Department of Energy Office of Science and the National Nuclear Security Administration, and in part by the U.S. Department of Energy, Office of Science, Office of Advanced Scientific Computing Research, Scientific Discovery through Advanced Computing (SciDAC) program through the FASTMath Institute under Contract No. DE-AC02-05CH11231 at Lawrence Berkeley National Laboratory.
{acks}
This research used resources of the National Energy Research Scientific Computing Center (NERSC), a U.S. Department of Energy Office of Science User Facility operated under Contract No. DE-AC02-05CH11231.
The reference list from the paper itself. Each links out to its DOI / PubMed record.
- 1Bach (2013) Bach F (2013) Sharp analysis of low-rank kernel matrix approximations. In: Proceedings of the 26th Annual Conference on Learning Theory , Proceedings of Machine Learning Research , volume 30. Princeton, NJ, USA: PMLR, pp. 185–209.
- 2Balzano et al. (2010) Balzano L, Nowak R and Recht B (2010) Online identification and tracking of subspaces from highly incomplete information. In: 2010 48th Annual Allerton Conference on Communication, Control, and Computing (Allerton) . pp. 704–711. 10.1109/ALLERTON.2010.5706976 . · doi ↗
- 3Bebendorf (2000) Bebendorf M (2000) Approximation of boundary element matrices. Numerische Mathematik 86(4): 565–589. 10.1007/PL 00005410 . · doi ↗
- 4Bebendorf and Grzhibovskis (2006) Bebendorf M and Grzhibovskis R (2006) Accelerating Galerkin BEM for linear elasticity using adaptive cross approximation. Mathematical Methods in the Applied Sciences 29(14): 1721–1747. 10.1002/mma.759 . · doi ↗
- 5Blackford et al. (1997) Blackford LS, Choi J, Cleary A, D’Azevedo E, Demmel J, Dhillon I, Dongarra J, Hammarling S, Henry G, Petitet A, Stanley K, Walker D and Whaley RC (1997) Sca LAPACK users’ guide . Philadelphia, PA: Society for Industrial and Applied Mathematics. ISBN 0-89871-397-8 (paperback).
- 6Boutsidis et al. (2009) Boutsidis C, Mahoney MW and Drineas P (2009) An improved approximation algorithm for the column subset selection problem. In: Proceedings of the Twentieth Annual ACM-SIAM Symposium on Discrete Algorithms , SODA ’09. Philadelphia, PA, USA: Society for Industrial and Applied Mathematics, pp. 968–977.
- 7Candès and Recht (2009) Candès EJ and Recht B (2009) Exact matrix completion via convex optimization. Foundations of Computational Mathematics 9(6): 717. 10.1007/s 10208-009-9045-5 . · doi ↗
- 8Cheng et al. (2005) Cheng H, Gimbutas Z, Martinsson P and Rokhlin V (2005) On the compression of low rank matrices. SIAM Journal on Scientific Computing 26(4): 1389–1404. 10.1137/030602678 . · doi ↗
