Abstract
We study the problem of estimating the trace of a matrix A that can only be accessed through matrix-vector multiplication. We introduce a new randomized algorithm, Hutch++, which computes a (1 ± ε) approximation to tr(A) for any positive semidefinite (PSD) A using just O(1/ε) matrix-vector products. This improves on the ubiquitous Hutchinson’s estimator, which requires O(1/ε2) matrix-vector products. Our approach is based on a simple technique for reducing the variance of Hutchinson’s estimator using a low-rank approximation step, and is easy to implement and analyze. Moreover, we prove that, up to a logarithmic factor, the complexity of Hutch++ is optimal amongst all matrix-vector query algorithms, even when queries can be chosen adaptively. We show that it significantly outperforms Hutchinson’s method in experiments. While our theory requires A to be positive semidefinite, empirical gains extend to applications involving non-PSD matrices, such as triangle estimation in networks.
1. Introduction
A ubiquitous problem in numerical linear algebra is that of approximating the trace of a d×d matrix A that can only be accessed via matrix-vector multiplication queries. In other words, we are given access to an oracle that can evaluate Ax for any , and the goal is to return an approximation to tr(A) using as few queries to this oracle as possible. An exact solution can be obtained with d queries because , where ei denotes the ith standard basis vector. The goal is thus to develop algorithms that use far fewer than d matrix-vector multiplications.
Known as implicit or matrix free trace estimation, this problem arises in applications that require the trace of a matrix A, where A is itself a transformation of some other matrix B. For example, A = Bq, A = B−1, or A = exp(B). In all of these cases, explicitly computing A would require roughly O(d3) time, whereas multiplication with a vector x can be implemented more quickly using iterative methods. For example, Bqx can be computed in just O(d2) time for constant q, and for well-conditioned matrices, B−1x and exp(B)x can also be computed in O(d2) time using the conjugate gradient or Lanczos methods [Hig08]. Implicit trace estimation is used to approximate matrix norms [HMAS17, MNS+18], spectral densities [LSY16, CKSV18, BKKS20], log-determinants [BDKZ15, HMS15], the Estrada index [US18, WSMB20], eigenvalue counts in intervals [DNPS16], triangle counts in graphs [Avr10], and much more [Che16, LSTZ20]. In these applications, we typically have that A is symmetric, and often positive semidefinite (PSD).
1.1. Hutchinson’s Estimator
The most common method for implicit trace estimation is Hutchinson’s stochastic estimator [Hut90]. This elegant randomized algorithm works as follows: let be a matrix containing i.i.d. random variables with mean 0 and variance 1. A simple calculation shows that for each , and can be computed with just one matrix-vector multiplication. So to approximate tr(A), Hutchinson’s estimator returns the following average:
| (1) |
Hutchinson’s original work suggests using random ±1 sign vectors for g1, …, gm, and an earlier paper by Girard suggests standard normal random variables [Gir87]. Both choices perform similarly, as both random variables are sub-Gaussian. For vectors with sub-Gaussian random entries, it can be proven that, when A is positive semidefinite, (1−ε)tr(A) ≤ Hm(A) ≤ (1+ε)tr(A) with probability ≥ 1 − δ if we use matrix-vector multiplication queries [AT11, RA15].1 For constant δ (e.g., ) the bound is O(1/ε2).
1.2. Our results
Since Hutchinson’s work, and the non-asymptotic analysis in [AT11], there has been no improvement on this O(1/ε2) matrix-vector multiplication bound for trace approximation. Our main contribution is a quadratic improvement: we provide a new algorithm, Hutch++, that obtains the same (1 ± ε) guarantee with O(1/ε) matrix-vector multiplication queries. This algorithm is nearly as simple as the original Hutchinson’s method, and can be implemented in just a few lines of code.
Algorithm 1.
Hutch++
| input: Matrix-vector multiplication oracle for PSD matrix . Number m of queries. |
| output: Approximation to tr(A). |
| 1: Sample and with i.i.d. {+1, −1} entries. |
| 2: Compute an orthonormal basis for the span of AS (e.g., via QR decomposition). |
| 3: return Hutch++ . |
Hutch++ requires m matrix-vector multiplications with A: m/3 to compute A·S, m/3 to compute A · Q, and m/3 to compute A · (I − QQT )G. It requires O(dm2) additional runtime to compute the basis Q and the product (I − QQT )G = G − QQT G. For concreteness, we state the method with random sign matrices, but the entries of S and G can be any sub-Gaussian random variables with mean 0 and variance 1, including e.g., standard Gaussians. Our main theorem on Hutch++ is:
Theorem 1.
If Hutch++ is implemented with matrix-vector multiplication queries, then for any PSD A, with probability ≥ 1 − δ, the output Hutch++(A) satisfies:
Hutch++ can be viewed as a natural variance reduced version of Hutchinson’s estimator. The method starts by computing an orthonormal span by running a single iteration of power method with a random start matrix S. Q coarsely approximates the span of A’s top eigenvectors. Then we separate A into its projection onto the subspace spanned by Q, and onto that subspace’s orthogonal compliment, writing tr(A) = tr(QQT AQQT ) + tr ((I − QQT )A(I − QQT)). By the cyclic property of the trace, the first term is equal to tr(QT AQ), which is computed exactly by Hutch++ with matrix-vector multiplications. The second term is approximated using Hutchinson’s estimator with the random vectors in G.
Thus, the error in estimating tr(A) is entirely due to approximating this second term. The key observation is that the variance when estimating this term is much lower than when estimating tr(A) directly. Specifically, it is proportional to , which, using standard tools from randomized linear algebra [CEM+15, Woo14], we can show is bounded by ε tr(A)2 with good probability when m = O(1/ε). This yields our improvement over Hutchinson’s method applied directly to A, which has variance bounded by tr(A)2. The full proof of Theorem 1 is in Section 3.
Algorithm 1 is adaptive: it multiplies A by a sequence of query vectors r1, …, rm, where later queries depend on earlier ones. In contrast, Hutchinson’s method is non-adaptive: r1, …, rm are chosen in advance, before computing any of the products Ar1, …, Arm. In addition to Algorithm 1, we give a non-adaptive variant of Hutch++ that obtains the same O(1/ε) bound. We complement these results with a nearly matching lower bound, proven in Section 4. Specifically, via a reduction from the Gap-Hamming problem from communication complexity, we show that any matrix-vector query algorithm whose queries have bounded bit complexity requires queries to estimate the trace of a PSD matrix up to a (1 ± ε) multiplicative approximation. We also prove a tight lower bound for non-adaptive algorithms in the real RAM model of computation.
Empirical Results.
In Section 5 we complement our theoretical results with experiments on synthetic and real-world matrices, including applications of trace estimation to approximating log determinants, the graph Estrada index, and the number of triangles in a graph. We demonstrate that Hutch++ improves substantially on Hutchinson’s estimator, and on related estimators based on approximating the top eigenvalues of A. While our theory applies to positive semidefinite matrices, Hutch++ can be applied unmodified to non-positive semidefinite trace estimation, and continues to perform very well empirically. We note that Hutch++ is simple to implement and essentially parameter free – the only choice needed is the number of matrix-vector multiplication queries m.
1.3. Prior Work
Upper bounds.
A nearly tight non-asymptotic analysis of Hutchinson’s estimator for positive semidefinite matrices was given by Avron and Toledo using an approach based on reducing to Johnson-Lindenstrauss random projection [AT11, DG03, Ach03]. A slightly tighter approach from [RA15] obtains a (1±ε) multiplicative error bound with m = O(1/ε2) matrix-vector multiplication queries. This bound is what we improve on with Hutch++.
A number of papers suggest variance reduction schemes for Hutchinson’s estimator. Some take advantage of sparsity structure in A [TS11, SLO13] and others use a “decomposition” approach similar to Hutch++ [APJ+18]. Most related to our work are two papers which, like Hutch++, perform the decomposition by projecting onto some Q that approximately spans A’s top eigenspace [GSO17, Lin17]. The justification is that this method should perform much better than Hutchinson’s when A is close to low-rank, because tr(QT AQ) will capture most of A’s trace. Our contribution is an analysis of this approach which 1) improves on Hutchinson’s even when A is far from low-rank and 2) shows that a very coarse approximation to the top eigenvectors suffices (computed using one iteration of the power method). Finally, we note two papers which directly use the approximation tr(A) ≈ tr(QT AQ), where Q is computed with a randomized SVD method [SAI17, HL20]. Of course, this approach works best for nearly-low rank matrices.
Lower bounds.
Our lower bounds extend a recent line of work on lower bounds for linear algebra problems in the “matrix-vector query model” [SEAR18, SWYZ19, BHSW20]. [WWZ14] proves a lower bound of Ω(1/ε2) queries for PSD trace approximation in an alternative model that allows for adaptive “quadratic form” queries:. This model captures Hutchinson’s estimator, but not Hutch++, which is why we are able to obtain an upper bound of O(1/ε) queries.
2. Preliminaries
Notation.
For , denotes the ℓ2 norm and denotes the ℓ1 norm. For , denotes the Frobenius norm. For square , denotes the trace. Our main results on trace approximation are proven for symmetric positive semidefinite (PSD) matrices, which are the focus of most applications. Any symmetric has an eigendecomposition A = V ΛV T, where is orthogonal and Λ is a real-valued diagonal matrix. We let λ = diag(Λ) be a length d vector containing A’s eigenvalues in descending order: λ1 ≥ λ2 ≥ … ≥ λd. When A is PSD, λi ≥ 0 for all i. We use the identities tr(A) = ‖λ‖1 and ‖A‖F = ‖λ‖2. Finally, we let Ak = argminB,rank(B)=k ‖A − B‖F denote the optimal k-rank approximation to A. For a PSD matrix , where contains the first k columns of V and Λk is the k × k top left submatrix of Λ.
Hutchinson’s Analysis.
We require a standard bound on the accuracy of Hutchinson’s estimator:
Lemma 2.
Let , δ ∈ (0, 1/2],. Let Hℓ(A) be the ℓ-query Hutchinson estimator defined in (1), implemented with mean 0, i.i.d. sub-Gaussian random variables with constant sub-Gaussian parameter. For fixed constants c, C, if ℓ > clog(1/δ), then with probability ≥ 1 − δ,
So, if then, with probability ≥ 1 − δ, |Hℓ(A) − tr(A)| ≤ ε‖A‖F.
We refer the reader to [RV+13] for a formal definition of sub-Gaussian random variables: both normal random variables and ±1 random variables are sub-Gaussian with constant parameter. Lemma 2 is proven in Appendix A for completeness. It is slightly more general than prior work [RA15] in that it applies to non-PSD, and even asymmetric matrices, which will be important in the analysis of our non-adaptive algorithm. A similar result was recently shown in [CK20].
3. Complexity Analysis
We start by providing the technical intuition behind Hutch++. First note that, for a PSD matrix with eigenvalues λ, ‖A‖F ≤ tr(A), so Lemma 2 immediately implies that Hutchinson’s estimator obtains a relative error guarantee with O(1/ε2) queries. However, this bound is only tight when ‖λ‖2 ≈ ‖λ‖1, i.e., when A has significant mass concentrated on just a small number of eigenvalues.
Hutch++ simply eliminates this possibility by approximately projecting off A’s large eigenvalues using a projection QQT. By doing so, it only needs to compute a stochastic estimate for the trace of (I−QQT )A(I−QQT ). The error of this estimate is proportional to ‖(I−QQT )A(I−QQT )‖F, which we show is always much smaller than tr(A). In particular, suppose that Q = Vk exactly spanned the top k eigenvectors A and thus (I − QQT )A(I − QQT ) = A − Ak. Then we have:
Lemma 3.
Let Ak be the best rank-k approximation to PSD matrix A. Then,
Proof.
We have , so:
This result immediately suggests the possibility of an algorithm with O(1/ε) query complexity: Set k = O(1/ε) and split tr(A) = tr(Ak) + tr(A − Ak). The first term can be computed exactly with O(1/ε) matrix-vector multiplication queries if Vk is known, since . By Lemma 3 combined with Lemma 2, the second can be estimated to error ±εtr(A) using just O(1/ε) queries instead of O(1/ε2). Of course, we can’t compute Vk exactly with a small number of matrix-vector multiplication queries, but this is easily resolved by using an approximate projection. Using standard tools from randomized linear algebra, O(k) queries suffices to find a Q with ‖(I − QQT )A(I − QQT )‖F ≤ O(‖A − Ak‖F ), which is all that is needed for a O(1/ε) query result.
Concretely, we use Lemma 3 to prove the following general theorem, from which Theorem 1 and our non-adaptive algorithmic result will follow as direct corollaries.
Theorem 4.
Let be PSD, δ ∈ (0, 1/2), ,. Let and Δ be any matrices with:
For fixed constants c, C, if ℓ > clog(1/δ), then with probability 1−δ, satisfies:
In particular, if , Z is a (1 ± ε) error approximation to tr(A).
Proof.
We have with probability ≥ 1 − δ:
As discussed, Theorem 4 would immediately yield an O(1/ε) query algorithm if we knew an optimal k-rank approximation for A. Since computing one is infeasible, our first version of Hutch++ (Algorithm 1) instead uses a projection onto a subspace Q which is computed with one iteration of the power method. We have:
Theorem 1 Restated.
If Algorithm 1 is implemented with matrix-vector multiplication queries, then for any PSD A, with probability ≥ 1−δ, the output Hutch++(A) satisfies: (1 − ε)tr(A) ≤ Hutch++(A) ≤ (1 + ε)tr(A).
Proof.
Let S, G, and Q be as in Algorithm 1. We instantiate Theorem 4 with and Δ = (I − QQT )A(I − QQT ). Note that, since Q is orthogonal, (I − QQT ) is a projection matrix, so (I − QQT ) = (I − QQT )2. This fact, along with the cyclic property of the trace, gives:
and thus as required by Theorem 4. Furthermore, since multiplying by a projection matrix can only decrease Frobenius norm,.
Recall that Q is an orthogonal basis for the column span of AS, where S is a random sign matrix with columns. Q is thus an orthogonal basis for a linear sketch of A’s column space, and it is well known that Q will align with large eigenvectors of A, and will be small [Sar06, Woo14]. Concretely, applying Corollary 7 and Claim 1 from [MM20], we have that, as long as , with probability ≥ 1 − δ:
Accordingly, as required by Theorem 4. The result then immediately follows by setting and noting that where . □
3.1. A Non-Adaptive Variant of Hutch++
As discussed in Section 1, Algorithm 1 is adaptive: it uses the result of computing AS to compute Q, which is then multiplied by A to compute the tr(QT AQ) term. Meanwhile, Hutchinson’s estimator is non-adaptive: it samples a single random matrix upfront, batch-multiplies by A once, and computes an approximation to tr(A) from the result, without any further queries.
Not only is non-adaptivity an interesting theoretical property, but it can be practically useful, since parallelism or block iterative methods often make it faster to multiply an implicit matrix by many vectors at once. With these considerations in mind, we describe a non-adaptive variant of Hutch++, which we call NA-Hutch++. NA-Hutch++ obtains nearly the same theoretical guarantees as Algorithm 1, although it tends to perform slightly worse in our experiments.
We leverage a streaming low-rank approximation result of Clarkson and Woodruff [CW09] which shows that if and are sub-Gaussian random matrices with m = O(k log(1/δ)) and c > 1 a fixed constant, then with probability 1 − δ, the matrix satisfies . Here + denotes the Moore-Penrose pseudoinverse. We can compute efficiently without explicitly constructing by noting that it is equal to tr((ST AR)+(AS)T (AR)) via the cyclic property of the trace. This yields:
Algorithm 2.
NA-Hutch++ (Non-Adaptive variant of Hutch++)
| input: Matrix-vector multiplication oracle for PSD matrix . Number m of queries. |
| output: Approximation to tr(A). |
| 1: Fix constants c1, c2, c3 such that c1 < c2 and c1 + c2 + c3 = 1. |
| 2: Sample , , and with i.i.d. {+1, −1} entries. |
| 3: Compute Z = AR and W = AS. |
| 4: return |
NA-Hutch++ requires m matrix-vector multiplications with A. In our experiments, it works well with c1 = c3 = 1/4 and c2 = 1/2. Assuming m < d, it requires O(dm2) further runtime, to perform the matrix multiplications on line 4 and to compute (ST Z)+, which takes O(dm2 + m3) time.
Theorem 5.
If NA-Hutch++ is implemented with m = O(log(1/δ)/ε) matrix-vector multiplication queries and a sufficiently large constant, then for any PSD A, with probability ≥ 1 − δ, the output NA-Hutch++(A) satisfies: (1 − ε)tr(A) ≤ NA-Hutch++(A) ≤ (1 + ε)tr(A).
Proof.
We apply Theorem 4 with , , k = O(1/ε) and . and . By Theorem 4.7 of [CW09], since c1m = O(k log(1/δ)), ∥Δ∥F ≤ 2∥A − Ak∥F with probability ≥ 1 − δ as required. □
4. Lower Bounds
A natural question is if the O(1/ε) matrix-vector query bound of Theorem 1 and Theorem 5 is tight. In this section, we prove that it is up to a logarithmic factor, even for algorithms that perform adaptive queries like Hutch++. Our lower bound is via a reduction to communication complexity: we show that a better algorithm for PSD trace estimation would imply a better 2-party communication protocol for the Gap-Hamming problem, which would violate known adaptive lower bounds for that problem [CR12]. To prove this result we need to assume a fixed precision model of computation. Specifically we require that the entries in each query vector r are integers bounded in absolute value by 2b, for some fixed constant b. By scaling, this captures the setting where the query vectors are non-integer, but have bounded precision. Formally, we prove in Section 4.1:
Theorem 6.
Any algorithm that accesses a positive semidefinite matrix A via matrix-vector multiplication queries Ar1, …, Arm, where r1, …, rm are possibly adaptively chosen vectors with integer entries in {−2b, …, 2b}, requires such queries to output an estimate t so that, with .
For constant b our lower bound is , which matches Theorem 1 and Theorem 5 up to a log(1/ε) factor. We also provide an alternative lower bound which holds in the real RAM model of computation (all inputs and arithmetic operations involve real numbers). This second lower bound is tight up to constants, but only applies to non-adaptive algorithms. It is proven using different information theoretic techniques – we reduce to a hypothesis testing problem involving negatively spiked covariance matrices [CMW15, PWBM18]. Formally, we prove in Appendix B:
Theorem 7.
Any algorithm that accesses a postive semidefinite matrix A through matrix-vector multiplication queries Ar1, …, Arm, where r1, …, rm are real valued non-adaptively chosen vectors requires such queries to output an estimate t so that, with probability > ¾, (1 − ε)tr(A) ≤ t ≤ (1 + ε) tr(A).
4.1. Adaptive lower bound
The proof of Theorem 6 is based on reducing the Gap-Hamming problem to trace estimation. This problem has been well studied in communication complexity since its introduction in [IW03].
Problem 1 (Gap-Hamming).
Let Alice and Bob be communicating parties who hold vectors s ∈ {−1, 1}n and t ∈ {−1, 1}n, respectively. The Gap-Hamming problem asks Alice and Bob to return:
A tight lower bound on the unbounded round, randomized communication complexity of this problem was first proven in [CR12], with alternative proofs appearing in [Vid12, She12]. Formally:
Lemma 8 (Theorem 2.6 in [CR12]).
The randomized communication complexity for solving Problem 1 with probability ≥ 2/3 is Ω(n) bits.
With Lemma 8 in place, we have all we need to prove Theorem 6.
Proof of Theorem 6.
Fix a perfect square . Consider an instance of Problem 1 with inputs and . Let and contain the entries of s and t rearranged into matrices (e.g., placed left-to-right, top-to-bottom). Let Z = S + T and let A = ZT Z. A is positive semidefinite and we have:
| (2) |
If then we will have and if then we will have . So, if Alice and Bob can approximate tr(A) up to relative error , then they can solve Problem 1. We claim that they can do so with just bits of communication if there exists an m-query adaptive matrix-vector multiplication algorithm for positive semidefinite trace estimation achieving error .
Specifically, Alice takes charge of running the query algorithm. To compute Ar for a vector r, Alice and Bob first need to compute Zr. To do so, Alice sends r to Bob, which takes bits since r has entries bounded by 2b. Bob then computes Tr, which has entries bounded by . He sends the result to Alice, using bits. Upon receiving Tr, Alice computes Zr = Sr + Tr. Next, they need to multiply Zr by ZT to obtain Ar = ZT Zr. To do so, Alice sends Zr to Bob (again using bits) who computes TT Zr. The entries in this vector are bounded by 2n2b, so Bob sends the result back to Alice using bits. Finally, Alice computes ST Zr and adds the result to TT Zr to obtain ZT Zr = Ar. Given this result, Alice chooses the next query vector according to the algorithm and repeats.
Overall, running the full matrix-vector query algorithm requires bits of communication. So, from Lemma 8 we have that queries are needed to approximate the trace to accuracy 1 ± ε for , with . □
5. Experimental Validation
We complement our theory with experiments on synthetic matrices and real-world trace estimation problems. We compare four algorithms, including both our adaptive and non-adaptive methods:
Hutchinson’s. The standard estimator run with {+1, −1} random vectors.
Subspace Projection. The method from [SAI17], which computes an orthogonal matrix that approximately spans the top eigenvector subspace of and returns tr(QT AQ) as an approximation to tr(A). A similar approach is employed in [HL20]. [SAI17] computes Q using subspace iteration, which requires k(q + 1) matrix-vector multiplications when run for q iterations. A larger q results in a more accurate Q, but requires more multiplications. As in [SAI17], we found that setting q = 1 gave the best performance, so we did so in our experiments. With q = 1, this method is similar to Hutch++, except that is does not approximate the remainder of the trace outside the top eigenspace.
Hutch++. The adaptive method of Algorithm 1 with {+1, −1} random vectors.
NA-Hutch++. The non-adaptive method of Algorithm 2 with c1 = c3 = ¼ and c2 = 1/2 and {+1, −1} random vectors.
5.1. Synthetic Matrices
We first test the methods above on random matrices with power law spectra. For varying constant c, we let Λ be diagonal with Λii = i−c. We generate a random orthogonal matrix by orthogonalizing a random Gaussian matrix and set A = QT ΛQ. A’s eigenvalues are the values in Λ. A larger c results in a more quickly decaying spectrum, so we expect Subspace Projection to perform well. A smaller c results in a slowly decaying spectrum, which will mean that ∥A∥F ≪tr(A). In this case, we expect Hutchinson’s to outperform its worst case multiplicative error bound: instead of error ±εtr(A) after O(1/ε2) matrix-multiplication queries, Lemma 2 predicts error on the order of ±ε∥A∥F. Concretely, for dimension d = 5000 and c = 2, we have ∥A∥F = .63 · tr(A) and for c = .5 we have ∥A∥F = .02 · tr(A). In general, unlike the Subspace Projection method and Hutchinson’s estimator, we expect Hutch++ and NA-Hutch++ to be less sensitive to A’s spectrum.
In Figure 1 we plot results for various c. Relative error should scale roughly as ε = O(m−γ), where γ = ½ for Hutchinson’s and γ = 1 for Hutch++ and NA-Hutch++. We thus use log-log plots, where we expect a linear relationship between the error ε and number of iterations m.
Figure 1:
Relative error versus number of matrix-vector multiplication queries for trace approximation algorithms run on random matrices with power law spectra. We report the median relative error of the approximation t after 200 trials. The upper and lower bounds of the shaded region around each curve are the 25th and 75th percentile errors. Subspace Projection has consistently low variance, but as expected, only performs better than Hutchinson’s when c = 2 and there is very fast eigenvalue decay. Hutch++ and NA-Hutch++ typically outperform both methods.
The superior performance of Hutch++ and NA-Hutch++ shown in Figure 1 is not surprising. These methods are designed to achieve the “best of both worlds”: when A’s spectrum decays quickly, our methods approximate tr(A) well by projecting off the top eigenvalues. When it decays slowly, they perform essentially no worse than Hutchinson’s. We note that the adaptivity of Hutch++ leads to consistently better performance over NA-Hutch++, and the method is simpler to implement as we do not need to set the constants c1, c2, c3. Accordingly, this is the method we move forward with in our real data experiments.
5.2. Real Matrices
To evaluate the real-world performance of Hutch++ we test it in the common setting where A = f(B). In most applications, B is symmetric with eigendecomposition VT ΛV, and is a function on real valued inputs. Then we have f(B) = VT f(Λ)V where f(Λ) is simply f applied to the real-valued eigenvalues on the diagonal of Λ. When f returns negative values, A may not be postive semidefinite. Generally, computing f(B) explicitly requires a full eigendecomposition and thus Ω(n3) time. However, many iterative methods can more quickly approximate matrix-vector queries of the form Ar = f(B)r. The most popular and general is the Lanczos method, which we employ in our experiments [UCS17, MMS18].2
We consider trace estimation in three example applications, involving both PSD and non-PSD matrices. We test on relatively small inputs, for which we can explicitly compute tr(f(B)) to use as a baseline for the approximation error. However, our methods can scale to much larger matrices.
Graph Estrada Index.
Given the binary adjacency matrix B ∈ {0, 1}d×d of a graph G, the Estrada index is defined as tr(exp(B)) [Est00, dlPGR07], where exp(x) = ex. This index measures the strength of connectivity within G. A simple transformation of the Estrada index yields the natural connectivity metric, defined as [JBYJHZ10, EHB12].
In our experiments, we approximated the Estrada index of the Roget’s Thesaurus semantic graph, available from [BM06]. The Estrada index of this 1022 node graph was originally studied in [EH08]. We use the Lanczos method to approximate matrix multiplication with exp(B), running it for 40 iterations, after which the error of application was negligible compared to the approximation error of trace estimation. Results are shown in Figure 2.
Figure 2:
Relative error versus number of matrix-vector multiplication queries for trace approximations of transformed matrices, which were multiplied by vectors using the Lanczos method. We report median relative error of the approximation t after 100 trials. The upper and lower bounds of the shaded region around each curve are the 25th and 75th percentile errors. As expected, Subspace Project and Hutch++ outperform Hutchinson’s when A = exp(B), as exponentiating leads to a quickly decaying spectrum. On the other hand, Hutchinson’s performs well for A = log(B + λI), which has a very flat spectrum. Hutch++ is still essentially as fast, even though this matrix is not PSD. Subspace Project fails in this case because the top eigenvalues of A do not dominate its trace.
Gaussian Process Log Likelihood.
Let be a PSD kernel covariance matrix and let λ ≥ 0 be a regularization parameter. In Gaussian process regression, the model log likelihood computation requires computing logdet(B + λI) = tr(f(B)) where f(x) = log(x + λ) [WR96, Ras04]. This quantity must be computed repeatedly for different choices of B and λ during hyperparameter optimization, and it is often approximated using Hutchinson’s method [BDKZ15, UCS17, HMAS17, DEN+17]. We note that, while B is positive semidefinite, log(B +λI) typically will not be. So our theoretical bounds do not apply in this case, but Hutch++ can be applied unmodified, and as we see in Figure 2, still gives good performance.
In our experiments we consider a benchmark 2D Gaussian process regression problem from the GIS literature, involving precipitation data from Slovakia [NM13]. B is the kernel covariance matrix on 6400 randomly selected training points out of 196,104 total points. Following the setup of [EMM20], we let B be a Gaussian kernel matrix with width parameter γ = 64 and regularization parameter λ = .008, both determined via cross-validation on ℓ2 regression loss.
Graph Triangle Counting.
Given the binary adjacency matrix B ∈ {0, 1}d×d of an undirected graph G, the number of triangles in G is equal to . The triangle count is an important measure of local connectivity and extensive research studies its efficient approximation [SW05, BBCG08, PT12]. Popular approaches include applying Hutchinson’s method to A = B3 [Avr10], or using the EigenTriangle estimator, which is similar to the Subspace Projection method [Tso08].
In our experiments, we study approximate triangle counting on two common benchmark graphs: an arXiv.org collaboration network3 with 5,243 nodes and 48,260 triangles, and a Wikipedia administrator voting network4 with 7,115 nodes and 608,389 triangles. We again note that the adjacency matrix B is not positive semidefinite, and neither is A = B3. Nevertheless, we can apply Hutch++ and see very strong performance. In this setting we do not need to apply Lanczos for matrix-vector query computation: Ar can be computed exactly using three matrix-vector multiplications with B. Results are shown Figure 3 with graph spectral visualized in Figure 4
Figure 3:
Relative error versus number of matrix-vector multiplication queries for trace approximations of transformed matrices. We report the median relative error of the approximation t after 100 trials. The upper and lower bounds of the shaded region around each curve are the 25th and 75th percentile errors. Hutch++ still outperforms the baseline methods even though A is not PSD. We note that Subspace Project has somewhat uneven performance: increasing m will take into account a larger number of top eigenvalues when approximating the trace. However, since these may be positive or negative, approximation error does not monotonically decrease. Hutch++ is not sensitive to this issue since it does not use just the top eigenvalues: see Figure 4 for more discussion.
Figure 4:
Even when estimating the trace of a non-PSD matrix like A = B3, which for the triangle counting examples above will have both positive and negative eigenvalues, Hutch++ can far outperform Hutchinson’s method. It will approximately project off the largest magnitude eigenvalues from A (whether postive or negative), which will reduce the variance in estimating the trace 3.
Acknowledgments:
D. Woodruff would like to thank support from the National Institute of Health (NIH) grant 5R01 HG 10798–2 and a Simons Investigator Award.
A. Proof of Lemma 2
We start by stating the Hanson-Wright inequality for i.i.d sub-Gaussian random variables:
Imported Theorem 9 (Theorem 1.1 from [RV+13]).
Let be a vector of mean 0, i.i.d. sub-Gaussian random variables with constant sub-Gaussian parameter C. Let be a matrix. Then, there exists a constant c only depending on C such that for every t ≥ 0,
Above, ∥A∥2 = maxx ∥Ax∥2/∥x∥2 denotes the spectral norm. We refer the reader to [RV+13] for a formal definition of sub-Gaussian random variables: both normal random variables and ±1 random variables are sub-Gaussian with constant C.
Lemma 2 Restated.
Let , δ ∈ (0, ½],. Let Hℓ(A) be the ℓ-query Hutchinson estimator defined in (1), implemented with mean 0, i.i.d. sub-Gaussian random variables with constant sub-Gaussian parameter. For fixed constants c, C, if , then with prob. 1 − δ,
Proof.
Let be a block-diagonal matrix formed from ℓ repetitions of A:
Let be as in (1). Let gi be G’s ith column and let be a vectorization of G. We have that . So, by Imported Theorem 9,
| (3) |
We let t′ = t/ℓ, and substitute , and into (3) to get:
Now, taking , we have:
Since , if we take , we have that the minimum takes value , so
The final result follows from noting that for δ ≤ ½. □
B. Proof of Theorem 7
To prove our non-adaptive lower bound for the real RAM moodel we first introduce a simple testing problem which we reduce to estimating the trace of a PSD matrix A to (1 ± ε) relative error:
Problem 2.
Fix d, such that d ≥ n and for ε ∈ (0, 1]. Let D1 = In and .5 Consider A = GT DG generated by selecting with i.i.d. random Guassian entries and D = D1 or D = D2 with equal probability. Then consider any algorithm which fixes a query matrix , observes , and guesses if D = D1 or D = D2.
The reduction from Problem 2 to relative error trace estimation is as follows:
Lemma 10.
For any ε ∈ (0, 1] and sufficient large d, if a randomized algorithm can estimate the trace of any d × d PSD matrix to relative error with success using m queries, then can be used to solve Problem 2 with success using m queries.
Proof.
To solve Problem 2 we simply apply to the matrix A = GT DG and guess D1 if the trace is closer to and D2 if it’s closer to . To see that this succeeds with probability 2/3, we first need to understand the trace of A. To do so, note that tr(A) = tr(GT DG) is simply a scaled Hutchinson estimate for tr(D), i.e. tr(GT DG) = d · Hd(D). So, via Lemma 2, for large enough d we have that with probability both of the following hold:
Additionally, with probability , computes an approximation Z with . By a union bound, all of the above events happen with . If D = D1:
On the other hand, if D = D2,
Thus, with probability 2/3, Z is closer to when D = D1 and closer to when D = D2, so the proposed scheme guesses correctly.
In the remainder of the section we show that Problem 2 requires Ω(1/ε) queries, which combined with Lemma 10 proves our main lower bound, Theorem 7. Throughout, we let denote that X and Y are identically distributed. We first argue that for Problem 2, the non-adaptive query matrix U might as well be chosen to be the first m standard basis vectors.
Lemma 11.
For Problem 2, without loss of generality, we may assume that the query matrix U equals U = Em = [e1 … em], the first m standard basis vectors.
Proof.
First, we may assume without loss of generality that U is orthonormal, since if it were not, we could simply reconstruct the queries AU by querying A with an orthonormal basis for the columns of U. Next, by rotational invariance of the Gaussian distribution, if is an i.i.d. matrix, and is any orthogonal matrix, then GQ is distributed identically to G. Let be any orthonormal span for the nullspace of U, so that is orthogonal. We have that . So, using the result GT DGEm of querying with matrix Em, we can just multiply by Q on the left to obtain a set of vectors that has the exact same distribution as if U had been used as a 25aquery matrix.
With Lemma 11 in place, we are able to reduce Problem 2 to a simpler testing problem on distinguishing m random vectors drawn from normal distributions with different covariance matrices:
Problem 3.
Let and let be a uniformly random unit vector. Let contain m i.i.d. random Gaussian vectors drawn from an n-dimensional Gaussian distribution, , where the covariance matrix C either equals I or I − zzT , with equality probability. The goal is to use N to distinguish, with what the true identity of C is.
Lemma 12.
Let be an algorithm that solves Problem 2 with m queries and success probability p. Then can be used to solve Problem 3 with m Gaussian samples and the same success probability.
Proof.
By Lemma 11, it suffices to show how to use the observed matrix N in Problem 3 to create a sample from the distribution GT DGEm where has i.i.d. entries. Specifically, we claim that, if we sample with i.i.d. entries, and compute
then M is identically distributed to GT DGEm. I.e, if we let contain the first m columns of G and let Gd−m contain the remaining d − m columns, our goal is the show that .
To see this is the case, let be a uniformly random orthogonal matrix and let D1, D2 be as in Problem 2. The first observation is that is identically distributed to ZDS where has standard normal entries ~ and D = D1 or D = D2 with equal probability. This follows simply from that fact that ZD1D1ZT = I and , where zn is the last row of Z, which is a uniformly random unit vector. It follows that . Next, observe that LT Z is independent of G and has i.i.d. entries since Z is orthogonal (and Gaussians are rotationally invariant). So, and overall:
Finally, we directly prove a lower bound on the number of samples m required to solve Problem 3, and thus, via Lemma 12, Problem 2. Combined with Lemma 10, this immediately yields our main lower bound on non-adaptive trace estimation, Theorem 7.
Lemma 13.
If for a fixed constant c, then Problem 3 cannot be solved with .
Proof.
The proof follows from existing work on lower bounds for learning “negatively spiked” covariance matrices [CMW15, PWBM18]. Let be the distribution of N in Problem 3, conditioned on C = I, and let be the distribution conditioned on C = I − zzT. These distributions fall into the spiked covariance model of [PWBM18], specifically the negatively spiked Wishart model (see Defn. 5.1 in [PWBM18]) with spike size β = −1, and spike distribution the uniform distribution over unit vectors in . Let denote the divergence between and . Specifically,
We have , so to prove that , cannot be distinguished with good probability, it suffices to prove an upper bound on . In [CMW15] (Lemma 7) it is proven that, letting v and v′ be independent random unit vectors in ,
| (4) |
Equation (4) uses the notation of Prop. 5.11 in [PWBM18], which restates and proves a slightly less general form of the equality from [CMW15]. Our goal is to prove that the expectation term in (4) is ≤ 1 + C for some small constant C when for a sufficiently small constant c.
We first note that 〈v, v′〉 is identically distributed to x ∈ [−1, 1] where x is the first entry in a random unit vector in . It is well known that is distributed according to a beta distribution with parameters [FKN90]. Specifically, this gives that x has density:
Plugging this density back in to the expectation term in (4) we obtain:
Assume without loss of generality that n is an odd integer, and thus is an integer. Let m/2 = cα for some constant c ≪ 1 such that cα is an integer and thus (1−c)α is an integer. Then:
| (5) |
where the equality follows because the term being integrated is the density of x where is distributed according to a beta distribution with parameters (1 − c)α, (1 − c)α. Since we have chosen parameters such that α is a positive integer, we have:
Similarly . Each of the binomial coefficients in these expressions is a central binomial coefficient (i.e., proportional to a Catalan number), and we can use well known methods like Stirling’s approximation to bound them. In particular, we employ a bound given in Lemma 7 of [MS77], which gives . for any integer z. Accordingly, we have
Plugging into (5) and requiring c ≤ .1 we have:
It follows that , and thus by Pinsker’s inequality that
Thus, no algorithm can solve Problem 3 with , completing the lemma. □
Footnotes
For non-PSD matrices, this generalizes to tr(A) − ε‖A‖F ≤ Hm(A) ≤ tr(A) + ε‖A‖F, which implies the relative error bound since when A is PSD, ‖A‖F ≤ tr(A).
We use our implementation of Lanczos available at https://github.com/cpmusco/fast-pcr, but modified to block matrix-vector multiplies when run on multiple query vectors r.
Accessed from: https://snap.stanford.edu/data/ca-GrQc.html.
Accessed from: https://snap.stanford.edu/data/wiki-Vote.html.
Here Ir denotes an r × r identity matrix.
Contributor Information
Raphael A. Meyer, New York University
Cameron Musco, UMass Amherst.
Christopher Musco, New York University.
David P. Woodruff, Carnegie Mellon University
References
- [Ach03].Achlioptas Dimitris. Database-friendly random projections: Johnson-Lindenstrauss with binary coins. Journal of Computer and System Sciences, 66(4):671–687, 2003. Preliminary version in the 20th Symposium on Principles of Database Systems (PODS). [Google Scholar]
- [APJ+18].Adams Ryan P., Pennington Jeffrey, Johnson Matthew J., Smith Jamie, Ovadia Yaniv, Brian Patton, and James Saunderson. Estimating the spectral density of large implicit matrices. arXiv:1802.03451, 2018. [Google Scholar]
- [AT11].Avron Haim and Toledo Sivan. Randomized algorithms for estimating the trace of an implicit symmetric positive semi-definite matrix. Journal of the ACM, 58(2), 2011. [Google Scholar]
- [Avr10].Avron Haim. Counting triangles in large graphs using randomized matrix trace estimation. In Proceedings of the 16th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining (KDD), 2010. [Google Scholar]
- [BBCG08].Becchetti Luca, Boldi Paolo, Castillo Carlos, and Gionis Aristides. Efficient semi-streaming algorithms for local triangle counting in massive graphs. In Proceedings of the 14th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining (KDD), pages 16–24, 2008. [Google Scholar]
- [BDKZ15].Boutsidis Christos, Drineas Petros, Kambadur Prabhanjan, and Zouzias Anastasios. A randomized algorithm for approximating the log determinant of a symmetric positive definite matrix. Linear Algebra and its Applications, 533, 03 2015. [Google Scholar]
- [BHSW20].Braverman Mark, Hazan Elad, Simchowitz Max, and Woodworth Blake. The gradient complexity of linear regression. In Proceedings of the 33rd Annual Conference on Computational Learning Theory (COLT), volume 125, pages 627–647, 2020. [Google Scholar]
- [BKKS20].Braverman Vladimir, Krauthgamer Robert, Krishnan Aditya, and Sinoff Roi. Schatten norms in matrix streams: Hello sparsity, goodbye dimension. In Proceedings of the 37th International Conference on Machine Learning (ICML), 2020. [Google Scholar]
- [BM06].Batagelj Vladimir and Mrvar Andrej. Pajek datasets. http://vlado.fmf.unilj.si/pub/networks/data/, 2006.
- [CEM+15].Cohen Michael, Elder Sam, Musco Cameron, Musco Christopher, and Persu Madalina. Dimensionality reduction for k-means clustering and low rank approximation. In Proceedings of the 47th Annual ACM Symposium on Theory of Computing (STOC), pages 163–172, 2015. [Google Scholar]
- [Che16].Chen Jie. How accurately should I compute implicit matrix-vector products when applying the Hutchinson trace estimator? SIAM Journal on Scientific Computing, 38(6):A3515–A3539, 2016. [Google Scholar]
- [CK20].Cortinovis Alice and Kressner Daniel. On randomized trace estimates for indefinite matrices with an application to determinants. arXiv:2005.10009, 2020. [Google Scholar]
- [CKSV18].David Cohen-Steiner Weihao Kong, Sohler Christian, and Valiant Gregory. Approximating the spectrum of a graph. In Proceedings of the 24th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining (KDD), pages 1263–1271, 2018. [Google Scholar]
- [CMW15].Cai Tony, Ma Zongming, and Wu Yihong. Optimal estimation and rank detection for sparse spiked covariance matrices. Probability theory and related fields, 161:781–815, 2015. [DOI] [PMC free article] [PubMed] [Google Scholar]
- [CR12].Chakrabarti Amit and Regev Oded. An optimal lower bound on the communication complexity of gap-hamming-distance. SIAM Journal on Computing, 41(5):1299–1317, 2012. [Google Scholar]
- [CW09].Clarkson Kenneth L. and Woodruff David P.. Numerical linear algebra in the streaming model. In Proceedings of the 41st Annual ACM Symposium on Theory of Computing (STOC), pages 205–214, 2009. [Google Scholar]
- [DEN+17].Dong Kun, Eriksson David, Nickisch Hannes, Bindel David, and Wilson Andrew Gordon. Scalable log determinants for Gaussian process kernel learning. In Advances in Neural Information Processing Systems 30 (NeurIPS), pages 6327–6337, 2017. [Google Scholar]
- [DG03].Dasgupta Sanjoy and Gupta Anupam. An elementary proof of a theorem of Johnson and Lindenstrauss. Random Structures & Algorithms, 22(1):60–65, 2003. [Google Scholar]
- [dlPGR07].de la Peña osé Antonio, Gutman Ivan, and Rada Juan. Estimating the Estrada index. Linear Algebra and its Applications, 427(1):70–76, 2007. [Google Scholar]
- [DNPS16].Edoardo Di Napoli Eric Polizzi, and Saad Yousef. Efficient estimation of eigenvalue counts in an interval. Numerical Linear Algebra with Applications, 2016. [Google Scholar]
- [EH08].Estrada Ernesto and Hatano Naomichi. Communicability in complex networks. Phys. Rev. E, 77:036111, March 2008. [DOI] [PubMed] [Google Scholar]
- [EHB12].Estrada Ernesto, Hatano Naomichi, and Benzi Michele. The physics of communicability in complex networks. Physics Reports, 514(3):89–119, 2012. [DOI] [PubMed] [Google Scholar]
- [EMM20].Erdélyi Tamás, Musco Cameron, and Musco Christopher. Fourier sparse leverage scores and approximate kernel learning. Advances in Neural Information Processing Systems 33 (NeurIPS), 2020. [Google Scholar]
- [Est00].Estrada Ernesto. Characterization of 3d molecular structure. Chemical Physics Letters, 319(5–6):713–718, 2000. [Google Scholar]
- [FKN90].Fang Kaitai, Kotz Samuel, and Wang Ng Kai. Symmetric Multivariate and Related Distributions. London: Chapman and Hall, 1990. [Google Scholar]
- [Gir87].Girard Didier. Un algorithme simple et rapide pour la validation croisee géenéralisée sur des problémes de grande taille. Technical report, 1987. [Google Scholar]
- [GSO17].Gambhir Arjun Singh, Stathopoulos Andreas, and Orginos Kostas. Deflation as a method of variance reduction for estimating the trace of a matrix inverse. SIAM Journal on Scientific Computing, 39(2):A532–A558, 2017. [Google Scholar]
- [Hig08].Higham Nicholas J.. Functions of Matrices: Theory and Computation. Society for Industrial and Applied Mathematics, 2008. [Google Scholar]
- [HL20].Zhu Yuanyang Li Hanyu. Randomized block Krylov space methods for trace and log-determinant estimators. arXiv:2003.00212, 2020. [Google Scholar]
- [HMAS17].Han Insu, Malioutov Dmitry, Avron Haim, and Shin Jinwoo. Approximating the spectral sums of large-scale matrices using stochastic Chebyshev approximations. SIAM Journal on Scientific Computing, 2017. [Google Scholar]
- [HMS15].Han Insu, Malioutov Dmitry, and Shin Jinwoo. Large-scale log-determinant computation through stochastic Chebyshev expansions. In Proceedings of the 32nd International Conference on Machine Learning (ICML), pages 908–917, 2015. [Google Scholar]
- [Hut90].Hutchinson Michael F.. A stochastic estimator of the trace of the influence matrix for Laplacian smoothing splines. Communications in Statistics-Simulation and Computation, 19(2):433–450, 1990. [Google Scholar]
- [IW03].Indyk Piotr and Woodruff David. Tight lower bounds for the distinct elements problem. In Proceedings of the 44th Annual IEEE Symposium on Foundations of Computer Science (FOCS), 2003. [Google Scholar]
- [JBYJHZ10].Jun WU, Barahona Mauricio, Yue-Jin Tan, and Hong-Zhong Deng. Natural connectivity of complex networks. Chinese Physics Letters, 27(7):078902, 2010. [Google Scholar]
- [Lin17].Lin Lin. Randomized estimation of spectral densities of large matrices made accurate. Numerische Mathematik, 136(1):183–213, 2017. [Google Scholar]
- [LSTZ20].Li Jerry, Sidford Aaron, Tian Kevin, and Zhang Huishuai. Well-conditioned methods for ill-conditioned systems: Linear regression with semi-random noise. arXiv:2008.01722, 2020. [Google Scholar]
- [LSY16].Lin Lin, Saad Yousef, and Yang Chao. Approximating spectral densities of large matrices. SIAM Review, 58(1):34–65, 2016. [Google Scholar]
- [MM20].Musco Cameron and Musco Christopher. Projection-cost-preserving sketches: Proof strategies and constructions. arXiv:2004.08434, 2020. [Google Scholar]
- [MMS18].Musco Cameron, Musco Christopher, and Sidford Aaron. Stability of the Lanczos method for matrix function approximation. In Proceedings of the 29th Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 1605–1624, 2018. [Google Scholar]
- [MNS+18].Musco Cameron, Netrapalli Praneeth, Sidford Aaron, Ubaru Shashanka, and Woodruff David P.. Spectrum approximation beyond fast matrix multiplication: Algorithms and hardness. Proceedings of the 9th Conference on Innovations in Theoretical Computer Science (ITCS), 2018. [Google Scholar]
- [MS77].MacWilliams Florence Jessie and Alexander Sloane Neil James. The theory of error correcting codes, volume 16. Elsevier, 1977. [Google Scholar]
- [NM13].Neteler Markus and Mitasova Helena. Open source GIS: a GRASS GIS approach, volume 689. Springer Science & Business Media, 2013. [Google Scholar]
- [PT12].Pagh Rasmus and Charalampos E Tsourakakis. Colorful triangle counting and a mapreduce implementation. Information Processing Letters, 112(7):277–281, 2012. [Google Scholar]
- [PWBM18].Perry Amelia, Wein Alexander, Bandeira Afonso, and Moitra Ankur. Optimality and sub-optimality of PCA I: Spiked random matrix models. Annals of Statistics, 46:2416–2451, 10 2018. [Google Scholar]
- [RA15].Roosta-Khorasani Farbod and Ascher Uri M.. Improved bounds on sample size for implicit matrix trace estimators. Foundations of Computational Mathematics, 15(5):1187–1212, 2015. [Google Scholar]
- [Ras04].Rasmussen Carl Edward. Gaussian Processes in Machine Learning. In Advanced Lectures on Machine Learning, pages 63–71. Springer, 2004. [Google Scholar]
- [RV+13].Rudelson Mark, Vershynin Roman, et al. Hanson-Wright inequality and sub-Gaussian concentration. Electronic Communications in Probability, 18, 2013. [Google Scholar]
- [SAI17].Saibaba Arvind K., Alexanderian Alen, and Ipsen Ilse C. F.. Randomized matrix-free trace and log-determinant estimators. Numerische Mathematik, 137(2):353–395, 2017. [Google Scholar]
- [Sar06].Sarlos Tamas. Improved approximation algorithms for large matrices via random projections. In Proceedings of the 47th Annual IEEE Symposium on Foundations of Computer Science (FOCS), pages 143–152, 2006. [Google Scholar]
- [SEAR18].Simchowitz Max, El Alaoui Ahmed, and Recht Benjamin. Tight query complexity lower bounds for PCA via finite sample deformed Wigner law. In Proceedings of the 50th Annual ACM Symposium on Theory of Computing (STOC), pages 1249–1259, 2018. [Google Scholar]
- [She12].Sherstov Alexander A.. The communication complexity of gap hamming distance. Theory of Computing, 8(8):197–208, 2012. [Google Scholar]
- [SLO13].Stathopoulos Andreas, Laeuchli Jesse, and Orginos Kostas. Hierarchical probing for estimating the trace of the matrix inverse on toroidal lattices. SIAM Journal on Scientific Computing, 35(5):S299–S322, 2013. [Google Scholar]
- [SW05].Schank Thomas and Wagner Dorothea. Finding, counting and listing all triangles in large graphs, an experimental study. In International Workshop on Experimental and Efficient Algorithms, pages 606–609. Springer, 2005. [Google Scholar]
- [SWYZ19].Sun Xiaoming, Woodruff David P., Yang Guang, and Zhang Jialin. Querying a matrix through matrix-vector products. In Proceedings of the 46th International Colloquium on Automata, Languages and Programming (ICALP), volume 132, pages 94:1–94:16, 2019. [Google Scholar]
- [TS11].Tang Jok M. and Saad Yousef. Domain-decomposition-type methods for computing the diagonal of a matrix inverse. SIAM Journal on Scientific Computing, 33(5):2823–2847, 2011. [Google Scholar]
- [Tso08].Tsourakakis Charalampos E. Fast counting of triangles in large real networks without counting: Algorithms and laws. In 2008 Eighth IEEE International Conference on Data Mining, pages 608–617, 2008. [Google Scholar]
- [UCS17].Ubaru Shashanka, Chen Jie, and Saad Yousef. Fast estimation of $tr(f(a))$ via stochastic Lanczos quadrature. SIAM Journal on Matrix Analysis and Applications, 38(4):1075–1099, 2017. [Google Scholar]
- [US18].Ubaru Shashanka and Saad Yousef. Applications of trace estimation techniques. In High Performance Computing in Science and Engineering, pages 19–33, 2018. [Google Scholar]
- [Vid12].Vidick Thomas. A concentration inequality for the overlap of a vector on a large set, with application to the communication complexity of the gap-hamming-distance problem. Chicago Journal of Theoretical Computer Science, 2012. [Google Scholar]
- [Woo14].Woodruff David P.. Sketching as a tool for numerical linear algebra. Foundations and Trends in Theoretical Computer Science, 10(1–2):1–157, 2014. [Google Scholar]
- [WR96].Williams Christopher K. I. and Rasmussen Carl Edward. Gaussian Processes for Regression. In Advances in Neural Information Processing Systems 9 (NeurIPS), pages 514–520, 1996. [Google Scholar]
- [WSMB20].Wang Sheng, Sun Yuan, Musco Christopher, and Bao Zhifeng. Route planning for robust transit networks: When connectivity matters. Preprint, 2020. [Google Scholar]
- [WWZ14].Wimmer Karl, Wu Yi, and Zhang Peng. Optimal query complexity for estimating the trace of a matrix. In Proceedings of the 41st International Colloquium on Automata, Languages and Programming (ICALP), pages 1051–1062, 2014. [Google Scholar]




