Algorithms and Hardness for Linear Algebra on Geometric Graphs

Josh Alman, Timothy Chu, Aaron Schild, Zhao Song

Introduction

Linear algebra has a myriad of applications throughout computer science and physics. Consider the following seemingly unrelated tasks:

Each of these tasks has seen much work throughout numerical analysis, theoretical computer science, and machine learning. The first task is a celebrated application of the fast multipole method of Greengard and Rokhlin [GR87, GR88, GR89], voted one of the top ten algorithms of the twentieth century by the editors of Computing in Science and Engineering [DS00]. The second task is spectral clustering [NJW02, LWDH13], a popular algorithm for clustering data. The third task is to label a full set of data given only a small set of partial labels [Zhu05b, CSZ09, ZL05], which has seen increasing use in machine learning. One notable method for performing semi-supervised learning is the graph-based Laplacian regularizer method [LSZ+19b, ZL05, BNS06, Zhu05a].

nn-body simulation (one step): For each i∈{1,2,…,d}i\in\{1,2,\ldots,d\}, make a weighted graph GiG_{i} on the points in XX, in which the weight of the edge between the points u,v∈Xu,v\in X in GiG_{i} is Ki(u,v):=(Ggrav⋅mu⋅mv∥u−v∥22)(vi−ui∥u−v∥2)\mathsf{K}_{i}(u,v):=(\frac{G_{\text{grav}}\cdot m_{u}\cdot m_{v}}{\|u-v\|_{2}^{2}})(\frac{v_{i}-u_{i}}{\|u-v\|_{2}}), where GgravG_{\text{grav}} is the gravitational constant and mxm_{x} is the mass of the point x∈Xx\in X. Let AiA_{i} denote the weighted adjacency matrix of GiG_{i}. Then Ai1A_{i}\textbf{1} is the vector of iith coordinates of force vectors. In particular, gravitational force can be computed by doing O(d)O(d) adjacency matrix-vector multiplications, where each adjacency matrix is that of the Ki\mathsf{K}_{i}-graph on XX for some ii.

Spectral clustering: Make a K\mathsf{K} graph GG on XX. In applications, K(u,v)=f(∥u−v∥22)\mathsf{K}(u,v)=f(\|u-v\|_{2}^{2}), where ff is often chosen to be f(z)=e−zf(z)=e^{-z} [vL07, NJW02]. Instead of directly running a spectral clustering algorithm on LGL_{G}, one popular method is to construct a sparse matrix MM approximating LGL_{G} and run spectral clustering on MM instead [CFH16, CSB+11, KMT12]. Standard sparsification methods in the literature are heuristical, and include the widely used Nystrom method which uniformly samples rows and columns from the original matrix [CJK+13].

If HH is a spectral sparsifier of GG, it has been suggested that spectral clustering with the top kk eigenvectors of LHL_{H} performs just as well in practice as spectral clustering with the top kk eigenvectors of LGL_{G} [CFH16]. One justification is that since HH is a spectral sparsifier of GG, the eigenvalues of LHL_{H} are at most a constant factor larger than those of LGL_{G}, so cuts with similar conductance guarantees are produced. Moreover, spectral clustering using sparse matrices like LHL_{H} is known to be faster than spectral clustering on dense matrices like LGL_{G} [CFH16, CJK+13, KMT12].

In the first, second, and third tasks above, a small number of calls to matrix-vector multiplication, spectral sparsification, and Laplacian system solving, respectively, were made on geometric graphs. One could solve these problems by first explicitly writing down the graph GG and then using near-linear time algorithms [SS11, CKM+14] to multiply, sparsify, and solve systems. However, this requires a minimum of Ω(n2)\Omega(n^{2}) time, as GG is a dense graph.

In this paper, we initiate a theoretical study of the geometric graphs for which efficient spectral graph theory is possible. In particular, we attempt to determine for which (a) functions K\mathsf{K} and (b) dimensions dd there is a much faster, n1+o(1)n^{1+o(1)}-time algorithm for each of (c) multiplication, sparsification, and Laplacian solving. Before describing our results, we elaborate on the choices of (a), (b), and (c) that we consider in this work.

We would also like to emphasize that many kernel functions which do not at first appear to be of the form f(∥u−v∥22)f(\|u-v\|_{2}^{2}) can be rearranged appropriately to be of this form. For instance, in Section 10 below we show that the recently popular Neural Tangent Kernel is of this form, so our results apply to it as well. That said, to emphasize that our results are very general, we will mention later how they also apply to some functions of the form K(u,v)=f(⟨u,v⟩)\mathsf{K}(u,v)=f(\langle u,v\rangle), including K(u,v)=∣⟨u,v⟩∣\mathsf{K}(u,v)=|\langle u,v\rangle|.

Matrix-vector multiplication, spectral sparsification, and Laplacian system solving are very natural linear algebraic problems in this setting, and have many applications beyond the three we have focused on (nn-body simulation, spectral clustering, and semi-supervised learning). See Section 1.5 below where we expand on more applications.

Finally, we discuss dependencies on the dimension dd and the accuracy ε\varepsilon for which n1+o(1)n^{1+o(1)} algorithms are possible (part (b)). Define α\alpha, a measure of the ‘diameter’ of the point set and ff, as

It is helpful to have the following two questions in mind when reading our results:

(Low-dimensional algorithms, e.g. d=o(log⁡n)d=o(\log n)) Is there an algorithm which runs in time (log⁡(nα/ε))O(d)n1+o(1)(\log(n\alpha/\varepsilon))^{O(d)}n^{1+o(1)} for multiplication and Laplacian solving? Is there a sparsification algorithm which runs in time (log⁡(nα))O(d)n1+o(1)(\log(n\alpha))^{O(d)}n^{1+o(1)} when ε=1/2\varepsilon=1/2?

We will see that there are many important functions K\mathsf{K} for which there are such efficient low-dimensional algorithms, but no such efficient high-dimensional algorithms. In other words, these functions K\mathsf{K} suffer from the classic ‘curse of dimensionality.’ At the same time, other functions K\mathsf{K} will allow for efficient low-dimensional and high-dimensional algorithms, while others won’t allow for either.

We now state our results. We will give very general classifications of functions K\mathsf{K} for which our results hold, but afterwards in Section 1.4 we summarize the results for a few particular functions K\mathsf{K} of interest. The main goal of our results is as follows:

Goal: For each problem of interest (part (c)) and dimension dd (part (b)), find a natural parameter pf>0p_{f}>0 associated with the function ff for which the following dichotomy holds:

If pfp_{f} is high, then the problem cannot be solved in subquadratic time assuming SETH\mathsf{SETH} on points in dimension dd.

If pfp_{f} is low, then the problem of interest can be solved in almost-linear time (n1+o(1)n^{1+o(1)} time) on points in dimension dd.

As we will see shortly, the two parameters pfp_{f} which will characterize the difficulties of our problems of interest in most settings are the approximate degree of ff, and a parameter related to how multiplicatively Lipschitz ff is. We define both of these in the next section.

If ff can be ε\varepsilon-additively-approximated by a polynomial of degree at most o(log⁡n)o(\log n), then the problem can be solved in n1+o(1)n^{1+o(1)} time.

Otherwise, assuming SETH\mathsf{SETH}, the problem requires time n2−o(1)n^{2-o(1)}.

The same holds for LGL_{G}, the Laplacian matrix of GG, replaced by AGA_{G}, the adjacency matrix of GG.

While Theorem 1.1 yields a parameter pfp_{f} that characterizes hardness of multiplication in high dimensions, it is somewhat cumbersome to use, as it can be challenging to show that a function is far from a polynomial. We also show Theorem 5.15, which shows that if ff has a single point with large Θ(log⁡n)\Theta(\log n)-th derivative, then the problem requires time n2−o(1)n^{2-o(1)} assuming SETH\mathsf{SETH}. The Strong Exponential Time Hypothesis (SETH\mathsf{SETH}) is a common assumption in fine-grained complexity regarding the difficulty of solving the Boolean satisfiability problem; see section 3.6 for more details. Theorem 1.1 informally says that assuming SETH\mathsf{SETH}, the curse of dimensionality is inherent in performing adjacency matrix-vector multiplication. In particular, we directly apply this result to the nn-body problem discussed at the beginning:

Assuming SETH\mathsf{SETH}, in dimension d=Θ(log⁡n)d=\Theta(\log n) one step of the nn-body problem requires time n2−o(1)n^{2-o(1)}.

The fast multipole method of Greengard and Rokhlin [GR87, GR89] solves one step of this nn-body problem in time (log⁡(n/ε))O(d)n1+o(1)(\log(n/\varepsilon))^{O(d)}n^{1+o(1)}. Our Corollary 1.2 shows that assuming SETH\mathsf{SETH}, such an exponential dependence on dd is required and cannot be improved. To the best of our knowledge, this is the first time such a formal limitation on fast multipole methods has been proved. This hardness result also applies to fast multipole methods for other popular kernels, like the Gaussian kernel K(u,v)=exp⁡(−∥u−v∥22)\mathsf{K}(u,v)=\exp(-\|u-v\|_{2}^{2}), as well.

1.2 Sparsification

This Theorem applies even when d=Ω(log⁡n)d=\Omega(\log n). When LL is constant, the running time simplifies to O(ndlog⁡n+n1+o(1)log⁡α/ε2)O(nd\sqrt{\log n}+n^{1+o(1)}\log\alpha/\varepsilon^{2}). This covers the case when f(x)f(x) is any rational function with non-negative coefficients, like f(z)=zLf(z)=z^{L} or f(z)=z−Lf(z)=z^{-L}.

It may seem more natural to instead define LL-multiplicatively Lipschitz functions, without the parameter CC, as functions with ρ−Lf(x)≤f(ρx)≤ρLf(x)\rho^{-L}f(x)\leq f(\rho x)\leq\rho^{L}f(x) for all ρ\rho and xx. Indeed, an LL-multiplicatively Lipschitz function is also (C,L)(C,L)-multiplicative Lipschitz for any C>1C>1, so our results show that efficient sparsification is possible for such functions. However, the parameter CC is necessary to characterize when efficient sparsification is possible. Indeed, as in Theorem 1.3 above, it is sufficient for ff to be (C,L)(C,L)-multiplicative Lipschitz for a CC that is bounded away from 1. To complement this result, we also show a lower bound for sparsification for any function ff which is not (C,L)(C,L)-multiplicatively Lipschitz for any LL and sufficiently large CC:

For example, when L=Θ(log⁡2+δn)L=\Theta(\log^{2+\delta}n) for some constant δ>0\delta>0, Theorem 1.4 shows that there is a CC for which, whenever ff is not (C,L)(C,L)-multiplicatively Lipschitz, the sparsification problem cannot be solved in time n1+o(1)n^{1+o(1)} assuming SETH\mathsf{SETH}.

Bounding CC in terms of LL above is important. For example, if CC is small enough that CL=2C^{L}=2, then ff could be close to constant. Such K\mathsf{K}-graphs are easy to sparsify by uniformly sampling edges, so one cannot hope to show hardness for such functions.

Theorem 1.4 shows that geometric graphs for threshold functions, the exponential function, and the Gaussian kernel do not have efficient sparsification algorithms. Furthermore, this hardness result essentially completes the story of which decreasing functions can be sparsified in high dimensions, modulo a gap of L.48L^{.48} versus LL in the exponent. The tractability landscape is likely much more complicated for non-decreasing functions. That said, many of the kernels used in practice, like the Gaussian kernel, are decreasing functions of distance, so our dichotomy applies to them.

1.3 Laplacian solving

Laplacian system solving has a similar tractability landscape to that of adjacency matrix multiplication. We prove the following algorithmic result for solving Laplacian systems:

In Section 4, we will see, using an iterative refinement approach, that if a K\mathsf{K} graph can be efficiently sparsified, then there is an efficient Laplacian multiplier for K\mathsf{K} graphs if and only if there is an efficient Laplacian system solver for K\mathsf{K} graphs. Corollary 1.7 then follows using this connection: it describes functions which we have shown have efficient sparsifiers but not efficient multipliers.

Corollary 1.7, which is the first of our two hardness results in this setting, applies to slowly-growing functions that do not have low-degree polynomial approximations, like f(z)=1/(1+z)f(z)=1/(1+z). Next, we state our second hardness result:

This yields a quadratic time hardness result when L=Ω(log⁡2n)L=\Omega(\log^{2}n). By comparison, the first hardness result, Corollary 1.7, only applied for L=o(log⁡n)L=o(\log n). In particular, this shows that for non-Lipschitz functions like the Gaussian kernel, the problem of solving Laplacian systems and, in particular, doing semi-supervised learning, cannot be done in almost-linear time assuming SETH\mathsf{SETH}.

2 Our Techniques

We begin by showing a simple, generic equivalence between KLapE\mathsf{KLapE} and KAdjE\mathsf{KAdjE} for any K\mathsf{K}: an algorithm for either one can be used as a black box to design an algorithm for the other with only negligible blowups to the running time and error. It thus suffices to design algorithms and prove lower bounds for KAdjE\mathsf{KAdjE}.

We use two primary algorithmic tools: the Fast Multipole Method (FMM), and a ‘kernel method’ for approximating AGA_{G} by a low-rank matrix.

FMM is an algorithmic technique for computing aggregate interactions between nn bodies which has applications in many different areas of science. Indeed, when the interactions between bodies is described by our function K\mathsf{K}, then the problem solved by FMM coincides with our KAdjE\mathsf{KAdjE} problem.

Most past work on FMM either considers the low-dimensional case, in which dd is a small constant, or else the low-error case, in which ε\varepsilon is a constant. Thus, much of the literature does not consider the simultaneous running time dependence of FMM on ε\varepsilon and dd. In order to solve KAdjE\mathsf{KAdjE}, we need to consider the high-dimensional, high-error case. We thus give a clean mathematical overview and detailed analysis of the running time of FMM in Section 9, following the seminal work of Greengard and Strain [GS91], which may be of independent interest.

As discussed in section 1.1 above, the running time of FMM depends exponentially on dd, and so it is most useful in the low-dimensional setting. Our main algorithmic tool in high dimensions is a low-rank approximation technique: we show that when f(x)f(x) can be approximated by a sufficiently low-degree polynomial (e.g. any degree o(log⁡n)o(\log n) suffices in dimension Θ(log⁡n)\Theta(\log n)), then we can quickly find a low-rank approximation of the adjacency matrix AGA_{G}, and use this to efficiently multiply by a vector. Although this seems fairly simple, in Theorem 1.1 we show it is optimal: when such a low-rank approximation is not possible in high dimensions, then SETH\mathsf{SETH} implies that n2−o(1)n^{2-o(1)} time is required for KAdjE\mathsf{KAdjE}.

The simplest way to show that f(x)f(x) can be approximated by a low-degree polynomial is by truncating its Taylor series. In fact, the FMM also requires that a truncation of the Taylor series of ff gives a good approximation to ff. By comparison, the FMM puts more lenient restrictions on what degree the series must be truncated to in low dimensions, but in exchange adds other constraints on ff, including that ff must be monotone. See Section 9.3 and Corollary 5.13 for more details.

We now sketch the proof of Theorem 1.1, our lower bound for KAdjE\mathsf{KAdjE} for many functions K\mathsf{K} in high enough dimensions (typically d=Ω(log⁡n)d=\Omega(\log n)), assuming SETH\mathsf{SETH}. Although SETH\mathsf{SETH} is a hardness hypothesis about the Boolean satisfiability problem, a number of recent results [AW15, Rub18, Che18, SM19] have showed that it implies hardness for a variety of nearest neighbor search problems. Our lower bound approach is hence to show that KAdjE\mathsf{KAdjE} is useful for solving nearest neighbor search problems.

Similarly, for any nonnegative reals a,b≥0a,b\geq 0, we can take an appropriate affine transformation of XX so that an algorithm for KAdjE\mathsf{KAdjE} can estimate

The main tool we need for this approach is a way to pick a1,…,ad,b1,…,bda_{1},\ldots,a_{d},b_{1},\ldots,b_{d} for a function ff which cannot be approximated by a low degree polynomial so that MM has large determinant. We do this by decomposing det⁡(M)\det(M) in terms of the derivatives of ff using the Cauchy-Binet formula, and then noting that if ff cannot be approximated by a polynomial, then many of the contributions in this sum must be large. The specifics of this construction are quite technical; see section 5.4 for the details.

Prior work (e.g. [CS17], [BIS17], [BCIS18]) has shown SETH\mathsf{SETH}-based fine-grained complexity results for matrix-related computations. For instance, [BIS17] showed hardness results for exact algorithms for many machine-learning related tasks, like kernel PCA and gradient computation in training neural networks, while [CS17] and [BCIS18] showed hardness results for kernel density estimation. In all of this work, the authors are only able to show hardness for a limited set of kernels. For example, [BIS17] shows hardness for kernel PCA only for Gaussian kernels. These limitations arise from the technique used. To show hardness, [BIS17] exploits the fact that the Gaussian kernel decays rapidly to obtain a gap between the completeness and soundness cases in approximate nearest neighbors, just as we do for functions ff like f(x)=(1/x)Ω(log⁡n)f(x)=(1/x)^{\Omega(\log n)}. The hardness results of [CS17] and [BCIS18] employ a similar idea.

As discussed in Lower Bound Techniques, we circumvent these limitations by showing that applying the multiplication algorithm for one kernel a small number of times and linearly combining the results is enough to solve Hamming closest pair. This idea is enough to give a nearly tight characterization of the analytic kernels for which subquadratic-time multiplication is possible in dimension d=Θ(log⁡n)d=\Theta(\log n). As a result, by combining with reductions similar to those from past work, our lower bound also applies to a variety of similar problems, including kernel PCA, for a much broader set of kernels than previously known; see Section 5.7 below for the details.

Our lower bound is also interesting when compared with the Online Matrix-Vector Multiplication (OMV) Conjecture of Henzinger et al. [HKNS15]. In the OMV problem, one is given an n×nn\times n matrix MM to preprocess, then afterwards one is given a stream v1,…,vnv_{1},\ldots,v_{n} of length-nn vectors, and for each viv_{i}, one must output M×viM\times v_{i} before being given vi+1v_{i+1}. The OMV Conjecture posits that one cannot solve this problem in total time n3−Ω(1)n^{3-\Omega(1)} for a general matrix MM. At first glance, our lower bound may seem to have implications for the OMV Conjecture: For some kernels K\mathsf{K}, our lower bound shows that for an input set of points PP and corresponding adjacency matrix AGA_{G}, and input vector viv_{i}, there is no algorithm running in time n2−Ω(1)n^{2-\Omega(1)} for multiplying AG×viA_{G}\times v_{i}, so perhaps multiplying by nn vectors cannot be done in time n3−Ω(1)n^{3-\Omega(1)}. However, this is not necessarily the case, since the OMV problem allows O(n2.99)O(n^{2.99}) time for preprocessing AGA_{G}, which our lower bound does not incorporate. More broadly, the matrices AGA_{G} which we study, which have very concise descriptions compared to general matrices, are likely not the best candidates for proving the OMV Conjecture. That said, perhaps our results can lead to a form of the OMV Conjecture for geometric graphs with concise descriptions.

2.2 Sparsification

Our algorithm for constructing high-dimensional sparsifiers for K(x,y)=f(∥x−y∥22)\mathsf{K}(x,y)=f(\|x-y\|_{2}^{2}), when ff is a (2,L)(2,L) multiplicatively Lipschitz function, involves using three classic ideas: the Johnson Lindenstrauss lemma of random projection [JL84, IM98], the notion of well-separated pair decomposition from Callahan and Kosaraju [CK93, CK95], and spectral sparsification via oversampling [SS11, KMP10]. Combining these techniques carefully gives us the bounds in Theorem 1.3.

To overcome the ‘curse of dimensionality’, we use the Lindenstrauss lemma to project onto Llog⁡n\sqrt{L\log n} dimensions. This preserves all pairs distance, with a distortion of at most 2O(log⁡n/L)2^{O(\sqrt{\log n/L})}. Then, using a 1/21/2-well-separated pair decomposition partitions the set of projected distances into bicliques, such that each biclique has edges that are no more than 2O(log⁡n/L)2^{O(\sqrt{\log n/L})} larger than the smallest edge in the biclique. This ratio will upper bound the maximum leverage score of an edge in this biclique in the original K\mathsf{K}-graph. Each biclique in the set of projected distances has a one-to-one correspondence to a biclique in the original K\mathsf{K}-graph. Thus to sparsify our K\mathsf{K}-graph, we sparsify each biclique in the K\mathsf{K}-graph by uniform sampling, and take the union of the resulting sparsified bicliques. Due to the (2,L)(2,L)-Lipschitz nature of our function, it is guaranteed that the longest edge in any biclique (measured using K(x,y)\mathsf{K}(x,y)) is at most 2O(Llog⁡n)2^{O(\sqrt{L\log n})}. This upper bounds the maximum leverage score of an edge in this biclique with respect to the K\mathsf{K}-graph, which then can be used to upper bound the number of edges we need to sample from each biclique via uniform sampling. We take the union of these sampled edges over all bicliques, which gives our results for high-dimensional sparsification summarized in Theorem 1.3. Details can be found in the proof of Theorem 6.3 in Section 6. When LL is constant, we get almost linear time sparsification algorithms.

For low dimensional sparsification, we skip the Johnson Lindenstrauss step, and use a (1+1/L)(1+1/L)-well separated pair decomposition. This gives us a nearly linear time algorithm for sparsifying (C,L)(C,L) multiplicative Lipschitz functions, when (2L)O(d)(2L)^{O(d)} is small, which covers the case when dd is constant and L=no(1)L=n^{o(1)}. See Theorem 6.9 for details.

To prove lower bounds on sparsification for decreasing functions that are not (CL,L)(C_{L},L)-multiplicatively Lipschitz, we reduce from exact bichromatic nearest neighbors on two sets of points AA and BB. In high dimensions, nearest neighbors is hard even for Hamming distance [Rub18], so we may assume that A,B⊆{0,1}dA,B\subseteq\{0,1\}^{d}. In low dimensions, we may assume that the coordinates of points in AA and BB consist of integers on at most O(log⁡n)O(\log n) bits. In both cases, the set of possible distances between points in AA and BB is discrete. We take advantage of the discrete nature of these distance sets to prove a lower bound. In particular, CLC_{L} is set so that CLC_{L} is the smallest ratio between any two possible distances between points in AA and BB. To see this in more detail, see Lemma 8.4.

Let xfx_{f} be a point at which the function ff is not (CL,L)(C_{L},L)-multiplicatively Lipschitz and suppose that we want to solve the decision problem of determining whether or not min⁡a∈A,b∈B∥a−b∥2≤k\min_{a\in A,b\in B}\|a-b\|_{2}\leq k. We can do this using sparsification by scaling the points in AA and BB by a factor of k/xfk/x_{f}, sparsifying the K\mathsf{K}-graph on the resulting points, and thresholding based on the total weight of the resulting AA-BB cut. If there is a pair with distance at most kk, there is an edge crossing the cut with weight at least f(xf)f(x_{f}) because ff is a decreasing function. Therefore, the sparsifier has total weight at least f(xf)/(1+ε)=f(xf)/2f(x_{f})/(1+\varepsilon)=f(x_{f})/2 crossing the AA-BB cut by the cut sparsification approximation guarantee. If there is not a pair with distance at most kk, no edges crossing the cut with weight larger than f(CLxf)≤CL−Lf(xf)≤(1/n10)⋅f(xf)f(C_{L}x_{f})\leq C_{L}^{-L}f(x_{f})\leq(1/n^{10})\cdot f(x_{f}) by choice of CLC_{L}. Therefore, the total weight of the AA-BB cut is at most (1/n8)⋅f(xf)(1/n^{8})\cdot f(x_{f}), which means that it is at most ((1+ε)/n8)⋅f(xf)<f(xf)/4((1+\varepsilon)/n^{8})\cdot f(x_{f})<f(x_{f})/4 in the sparsifier. In particular, thresholding correctly solves the decision problem and one sparsification is enough to solve bichromatic nearest neighbors.

Before proceeding to the body of the paper, we summarize our results. Recall that we consider three linear-algebraic problems in this paper, along with two different dimension settings (low and high). This gives six different settings to consider. We now define pfp_{f} in each of these settings. In all high-dimensional settings, we have found a definition of pfp_{f} that characterizes the complexity of the problem. In some low-dimensional settings, we do not know of a suitable definition for pfp_{f} and leave this as an open problem. For simplicity, we focus here only on decreasing functions ff, although all of our algorithms, and most of our hardness results, hold for more general functions as well.

High dimensions: pfp_{f} is the minimum degree of any polynomial that 1/2poly(log⁡n)1/2^{\text{poly}(\log n)}-additively approximates ff. pf>Ω(log⁡n)p_{f}>\Omega(\log n) implies subquadratic-time hardness (Theorem 1.1 part 2), while pf<o(log⁡n)p_{f}<o(\log n) implies an almost-linear time algorithm (Theorem 1.1, part 1).

Low dimensions: Not completely understood. The fast multipole method yields an almost-linear time algorithm for some functions, like the Gaussian kernel (Theorem 2.1), but functions exist that are hard in low dimensions (Proposition 5.31).

Sparsification. In both settings, pfp_{f} is the minimum value for which ff is (C,pf)(C,p_{f})-multiplicatively Lipschitz, where C=1+1/pfcC=1+1/p_{f}^{c} for some constant c>0c>0 independent of ff.

High dimensions: If pf>Ω(log⁡2n)p_{f}>\Omega(\log^{2}n) and ff is nonincreasing, then no subquadratic time algorithm exists (Theorem 1.4). If pf<o(log⁡n)p_{f}<o(\log n), then an almost-linear time algorithm for sparsification exists (Theorem 1.3).

Low dimensions: There is some constant t>1t>1 such that if pf>Ω(nt)p_{f}>\Omega(n^{t}) and ff is nonincreasing, then no subquadratic time algorithm exists (Theorem 2.5).If pf<no(1/d)p_{f}<n^{o(1/d)}, then there is a subquadratic time algorithm (Theorem 2.4).

High dimensions: pfp_{f} is the maximum of the pfp_{f} values in the Adjacency matrix-vector multiplication and Sparsification settings, with hardness occurring for decreasing functions ff if pf>Ω(log⁡2n)p_{f}>\Omega(\log^{2}n) (Corollary 1.7 combined with Theorem 1.8) and an algorithm existing when pf<o(log⁡n)p_{f}<o(\log n) (Theorem 1.6).

Low dimensions: Not completely understood, as in the low-dimensional multiplication setting. As in the sparsification setting, we are able to show that there is a constant tt such that if ff is nonincreasing and pf>Ω(nt)p_{f}>\Omega(n^{t}) where pfp_{f} is defined as in the Sparsifiction setting, then no subquadratic time algorithm exists (Theorem 8.6).

Many of our results are not tight for two reasons: (a) some of the hardness results only apply to decreasing functions, and (b) there are gaps in pfp_{f} values between the upper and lower bounds. However, neither of these concerns are important in most applications, as (a) weight often decreases as a function of distance and (b) pfp_{f} values for natural functions are often either very low or very high. For example, pf>Ω(polylog(n))p_{f}>\Omega(\text{polylog}(n)) for all problems for the Gaussian kernel (f(x)=e−xf(x)=e^{-x}), while pf=O(1)p_{f}=O(1) for sparsification and pf>Ω(polylog(n))p_{f}>\Omega(\text{polylog}(n)) for multiplication for the gravitational potential (f(x)=1/xf(x)=1/x). Resolving the gap may also be difficult, as for intermediate values of pfp_{f}, the true best running time is likely an intermediate running time of n1+c+o(1)n^{1+c+o(1)} for some constant 0<c<10<c<1. Nailing down and proving such a lower bound seems beyond the current techniques in fine-grained complexity.

4 Summary of our Results on Examples

To understand our results better, we illustrate how they apply to some examples. For each of the functions fif_{i} given below, make the K\mathsf{K}-graph, where Ki(u,v)=fi(∥u−v∥22)\mathsf{K}_{i}(u,v)=f_{i}(\|u-v\|_{2}^{2}):

f1(z)=zkf_{1}(z)=z^{k} for a positive integer constant kk.

f2(z)=zcf_{2}(z)=z^{c} for a negative constant or a positive non-integer constant cc.

f4(z)=1f_{4}(z)=1 if z≤θz\leq\theta and f4(z)=0f_{4}(z)=0 if z>θz>\theta for some parameter θ>0\theta>0 (the threshold kernel).

5 Other Related Work

Linear Program is a fundamental problem in convex optimization. There is a long list of work focused on designing fast algorithms for linear program [Dan47, Kha80, Kar84, Vai87, Vai89, LS14, LS15, CLS19, LSZ19a, Son19, Bra20, BLSS20, SY20, JSWZ20]. For the dense input matrix, the state-of-the-art algorithm [JSWZ20] takes nmax⁡{ω,2+1/18}log⁡(1/ε)n^{\max\{\omega,2+1/18\}}\log(1/\varepsilon) time, ω\omega is the exponent of matrix multiplication [AW21]. The solver can run faster when matrix AA has some structures, e.g. Laplacian matrix.

A recent line of work by Charikar et al. [CS17, BCIS18] also studies the algorithmic KDE problem. They show, among other things, that kernel density functions for “smooth” kernels K\mathsf{K} can be estimated in time which depends only polynomially on the dimension dd, but which depends polynomially on the error ε\varepsilon. We are unfortunately unable to use their algorithms in our setting, where we need to solve KAdjE\mathsf{KAdjE} with ε=n−Ω(1)\varepsilon=n^{-\Omega(1)}, and the algorithms of Charikar et al. do not run in subquadratic time. We instead design and make use of algorithms whose running times have only polylogarithmic dependences on ε\varepsilon, but often have exponential dependences on dd.

Kernel functions are useful functions in data analysis, with applications in physics, machine learning, and computational biology [Sou10]. There are many kernels studied and applied in the literature; we list here most of the popular examples.

The following kernels are of the form K(x,y)=f(∥x−y∥22)\mathsf{K}(x,y)=f(\|x-y\|_{2}^{2}), which we study in this paper: the Gaussian kernel [NJW02, RR08], exponential kernel, Laplace kernel [RR08], rational quadratic kernel, multiquadric kernel [BG97], inverse multiquadric kernel [Mic84, Mar12], circular kernel [BTFB05], spherical kernel, power kernel [FS03], log kernel [BG97, Mar12], Cauchy kernel [RR08], and generalized T-Student kernel [BTF04].

For these next kernels, it is straightforward that their corresponding graphs have low-rank adjacency matrices, and so efficient linear algebra is possible using the Woodbury Identity (see Section 3.4 below): the linear kernel [SSM98, MSS+99, Hof07, Shl14] and the polynomial kernel [CV95, GE08, BHOS+08, CHC+10].

Finally, the following relatively popular kernels are not of the form we directly study in this paper, and we leave extending our results to them as an important open problem: the Hyperbolic tangent (Sigmoid) kernel [HS97, BTB05a, JKL09, KSH12, ZSJ+17, ZSD17, SSB+17, ZSJD19], spline kernel [Gun98, Uns99], B-spline kernel [Ham04, Mas10], Chi-Square kernel [VZ12], and the histogram intersection kernel and generalized histogram intersection [BTB05b]. More interestingly, our result also can be applied to Neural Tangent Kernel [JGH18], which plays a crucial role in the recent work about convergence of neural network training [LL18, DZPS19, AZLS19b, AZLS19a, SY19, BPSW21, LSS+20, JMSZ20]. For more details, we refer the readers to Section 10.

The authors would like to thank Lijie Chen for helpful suggestions in the hardness section and explanation of his papers. The authors would like to thank Sanjeev Arora, Simon Du, and Jason Lee for useful discussions about the neural tangent kernel.

Summary of Low Dimensional Results

In the results we’ve discussed so far, we show that in high-dimensional settings, the curse of dimensionality applies to a wide variety of functions that are relevant in applications, including the Gaussian kernel and inverse polynomial kernels. Luckily, in many settings, the points supplied as input are very low-dimensional. In the classic nn-body problem, for example, the input points are 3-dimensional. In this subsection, we discuss our results pertaining to whether algorithms with runtimes exponential in dd exist; such algorithms can still be efficient in low dimensions d=o(log⁡n)d=o(\log n).

The prior work on the fast multipole method [GR87, GR88, GR89] yields algorithms with runtime (log⁡(n/ε))O(d)n1+o(1)(\log(n/\varepsilon))^{O(d)}n^{1+o(1)} for ε\varepsilon-approximate adjacency matrix-vector multiplication for a number of functions K\mathsf{K}, including when K(u,v)=1∥u−v∥2c\mathsf{K}(u,v)=\frac{1}{\|u-v\|_{2}^{c}} for a constant cc and when K(u,v)=e−∥u−v∥22\mathsf{K}(u,v)=e^{-\|u-v\|_{2}^{2}}. In order to explain what functions K\mathsf{K} the fast multipole methods work well for, and to clarify dependencies on dd in the literature, we give a complete exposition of how the fast multipole method of [GS91] works on the Gaussian kernel:

The fast multipole method is fairly general, and so similar algorithms also exist for a number of other functions K\mathsf{K}; see Section 9.3 for further discussion. Unlike in the high-dimensional case, we do not have a characterization of the functions for which almost-linear time algorithms exist in near-constant dimension. We leave this as an open problem. Nonetheless, we are able to show lower bounds, even in barely super-constant dimension d=exp⁡(log⁡∗(n))d=\exp(\log^{*}(n))Here, log⁡∗(n)\log^{*}(n) denotes the very slowly growing iterated logarithm of nn., on adjacency matrix-vector multiplication for kernels that are not multiplicatively Lipschitz:

This includes threshold functions, but does not include piecewise exponential functions. Piecewise exponential functions do have efficient adjacency multiplication algorithms by Theorem 9.13.

To illustrate the complexity of the adjacency matrix-vector multiplication problem in low dimensions, we are also able to show hardness for the function K(u,v)=∣⟨u,v⟩∣\mathsf{K}(u,v)=|\langle u,v\rangle| in nearly constant dimensions. By comparison, we are able to sparsify for this function K\mathsf{K}, even in very high d=no(1)d=n^{o(1)} dimensions (in Theorem 1.5 above).

2 Sparsification

We are able to give a characterization of the decreasing functions for which sparsification is possible in near-constant dimension. We show that a polynomial dependence on the multiplicative Lipschitz constant is allowed, unlike in the high-dimensional setting:

Let ff be a (1+1/L,L)(1+1/L,L)-multiplicatively Lipschitz function and let K(u,v)=f(∥u−v∥22)\mathsf{K}(u,v)=f(\|u-v\|_{2}^{2}). Then an (1±ε)(1\pm\varepsilon)-spectral sparsifier for the K\mathsf{K}-graph on nn points can be found in n1+o(1)LO(d)(log⁡α)/ε2n^{1+o(1)}L^{O(d)}(\log\alpha)/\varepsilon^{2} time.

Thus, geometric graphs for piecewise exponential functions with L=no(1)L=n^{o(1)} can be sparsified in almost-linear time when dd is constant, unlike in the case when d=Ω(log⁡n)d=\Omega(\log n). In particular, spectral clustering can be done in O(kn1+o(1))O(kn^{1+o(1)}) time for kk clusters in low dimensions. Unfortunately, not all geometric graphs can be sparsified, even in nearly constant dimensions:

There are constants c′∈(0,1),c>1c^{\prime}\in(0,1),c>1 and a value CLC_{L} given L>1L>1 for which any decreasing function ff that is not (CL,L)(C_{L},L)-multiplicatively Lipschitz does not have an O(nLc′)O(nL^{c^{\prime}}) time sparsification algorithm for K\mathsf{K}-graphs on clog⁡∗nc^{\log^{*}n} dimensional points, where K(u,v)=f(∥u−v∥22)\mathsf{K}(u,v)=f(\|u-v\|_{2}^{2}).

This theorem shows, in particular, that geometric graphs of threshold functions are not sparsifiable in subquadratic time even for low-dimensional pointsets. These two theorems together nearly classify the decreasing functions for which efficient sparsification is possible, up to the exponent on LL.

3 Laplacian solving

As in the case of multiplication, we are unable to characterize the functions for which solving Laplacian systems can be done in almost-linear time in low dimensions. That said, we still have results for many functions K\mathsf{K}, including most kernel functions of interest in applications. We prove most of these using the aforementioned connection from Section 4: if a K\mathsf{K} graph can be efficiently sparsified, then there is an efficient Laplacian multiplier for K\mathsf{K} graphs if and only if there is an efficient Laplacian system solver for K\mathsf{K} graphs.

For the kernels K(u,v)=1/∥u−v∥2c\mathsf{K}(u,v)=1/\|u-v\|_{2}^{c} for constants cc and the piecewise exponential kernel, we have almost-linear time algorithms in low dimensions by Theorems 6.3 and 6.9 respectively. Furthermore, the fast multipole method yields almost-linear time algorithms for multiplication. Therefore, there are almost-linear time algorithm for solving Laplacian systems in geometric graphs for these kernels.

A similar approach also yields hardness results. Theorem 1.5 above implies that an almost-linear time algorithm for solving Laplacian systems on K\mathsf{K}-graphs for K(u,v)=∣⟨u,v⟩∣\mathsf{K}(u,v)=|\langle u,v\rangle| yields an almost-linear time algorithm for K\mathsf{K}-adjacency multiplication. However, no such algorithm exists assuming SETH\mathsf{SETH} by Theorem 2.3 above. Therefore, SETH\mathsf{SETH} implies that no almost-linear time algorithm for solving Laplacian systems in this kernel can exist.

Preliminaries

Our results build off of algorithms and hardness results from many different areas of theoretical computer science. We begin by defining the relevant notation and describing the important past work.

For any function ff, we write O~(f)\widetilde{O}(f) to denote f⋅log⁡O(1)(f)f\cdot\log^{O(1)}(f). In addition to O(⋅)O(\cdot) notation, for two functions f,gf,g, we use the shorthand f≲gf\lesssim g (resp. ≳\gtrsim) to indicate that f≤Cgf\leq Cg (resp. ≥\geq) for an absolute constant CC. We use f≂gf\eqsim g to mean cf≤g≤Cfcf\leq g\leq Cf for constants c,Cc,C.

For a matrix AA, we use ∥A∥2\|A\|_{2} to denote the spectral norm of AA. Let A⊤A^{\top} denote the transpose of AA. Let A†A^{\dagger} denote the Moore-Penrose pseudoinverse of AA. Let A−1A^{-1} denote the inverse of a full rank square matrix.

We use GgravG_{\text{grav}} to denote the Gravitational constant.

We define α\alpha slightly differently in different sections. Note that both are less than the value of α\alpha used in Theorem 1.3:

2 Graph and Laplacian Notation

A useful notion related to Laplacian matrices is the effective resistance of a pair of nodes:

The effective resistance of a pair of vertices u,v∈VGu,v\in V_{G} is defined as

Using effective resistance, we can define leverage score

The leverage score of an edge e=(u,v)∈EGe=(u,v)\in E_{G} is defined as

We define a useful notation called electrical flow

We let d(i)d(i) denote the degree of vertex ii. For any set S⊆VS\subseteq V, we define volume of SS: μ(S)=∑i∈Sd(i)\mu(S)=\sum_{i\in S}d(i). It is obvious that μ(V)=2∣E∣\mu(V)=2|E|. For any two sets S,T⊆VS,T\subseteq V, let E(S,T)E(S,T) be the set of edges connecting a vertex in SS with a vertex in TT. We call Φ(S)\Phi(S) to be the conductance of a set of vertices SS, and can be formally defined as

We define the notation conductance, which is standard in the literature of graph partitioning and graph clustering [ST04, KVV04, ACL06, AP09, LRTV11, ZLM13, OZ14].

The conductance of a graph GG is defined as follows:

A graph GG with minimum conductance ΦG\Phi_{G} has the property that for every pair of vertices u,vu,v,

where cuc_{u} is the sum of the weights of edges incident with uu. Furthermore, for every pair of vertices u,vu,v,

3 Spectral Sparsification via Random Sampling

Here, we state some well known results on spectral sparsification via random sampling, from previous works. The theorems below are essential for our results on sparsifying geometric graphs quickly.

Consider a graph G=(V,E)G=(V,E) with edge weights we>0w_{e}>0 and probabilities pe∈(0,1]p_{e}\in(0,1] assigned to each edge and parameters δ∈(0,1),ε∈(0,1)\delta\in(0,1),\varepsilon\in(0,1). Generate a reweighted subgraph HH of GG with qq edges, with each edge ee sampled with probability pe/tp_{e}/t and added to HH with weight wet/(peq)w_{e}t/(p_{e}q), where t=∑e∈Epet=\sum_{e\in E}p_{e}. If

q≥C⋅ε−2⋅tlog⁡t⋅log⁡(1/δ)q\geq C\cdot\varepsilon^{-2}\cdot t\log t\cdot\log(1/\delta), where C>1C>1 is a sufficiently large constant

pe≥we⋅ReffG(u,v)p_{e}\geq w_{e}\cdot\mathtt{Reff}_{G}(u,v) for all edges e={u,v}e=\{u,v\} in GG

then (1−ε)LG⪯LH⪯(1+ε)LG(1-\varepsilon)L_{G}\preceq L_{H}\preceq(1+\varepsilon)L_{G} with probability at least 1−δ1-\delta.

There is a O~(m(log⁡α)/ε2)\widetilde{O}(m(\log\alpha)/\varepsilon^{2}) time algorithm which on input ε>0\varepsilon>0 and G=(V,E,w)G=(V,E,w) with α=wmax⁡/wmin⁡\alpha=w_{\max}/w_{\min} computes a (24log⁡n/ε2)×n(24\log n/\varepsilon^{2})\times n matrix Z~\widetilde{Z} such that with probability at least 1−1/n1-1/n,

The following is an immediate corollary of Theorems 3.6 and 3.7:

There is a O~(m(log⁡α)/ε2)\widetilde{O}(m(\log\alpha)/\varepsilon^{2}) time algorithm which on input ε>0\varepsilon>0 and G=(V,E,w)G=(V,E,w) with α=wmax⁡/wmin⁡\alpha=w_{\max}/w_{\min}, produces an (1±ε)(1\pm\varepsilon)-approximate sparsifier for GG.

4 Woodbury Identity

where A,U,CA,U,C and VV all denote matrices of the correct (conformable) sizes: For integers nn and kk, AA is n×nn\times n, UU is n×kn\times k, CC is k×kk\times k and VV is k×nk\times n.

The Woodbury identity is useful for solving linear systems in a matrix MM which can be written as the sum of a diagonal matrix AA and a low-rank matrix UVUV for k≪nk\ll n (setting C=IC=I).

5 Tail Bounds

We will use several well-known tail bounds from probability theory.

Let X=∑i=1nXiX=\sum_{i=1}^{n}X_{i}, where Xi=1X_{i}=1 with probability pip_{i} and Xi=0X_{i}=0 with probability 1−pi1-p_{i}, and all XiX_{i} are independent. Let μ=E[X]=∑i=1npi\mu=\mathbf{E}[X]=\sum_{i=1}^{n}p_{i}. Then 1. Pr⁡[X≥(1+δ)μ]≤exp⁡(−δ2μ/3)\Pr[X\geq(1+\delta)\mu]\leq\exp(-\delta^{2}\mu/3), ∀δ>0\forall\delta>0 ; 2. Pr⁡[X≤(1−δ)μ]≤exp⁡(−δ2μ/2)\Pr[X\leq(1-\delta)\mu]\leq\exp(-\delta^{2}\mu/2), ∀0<δ<1\forall 0<\delta<1.

Let X1,⋯ ,XnX_{1},\cdots,X_{n} denote nn independent bounded variables in [ai,bi][a_{i},b_{i}]. Let X=∑i=1nXiX=\sum_{i=1}^{n}X_{i}, then we have

6 Fine-Grained Hypotheses

Impagliazzo and Paturi [IP01] introduced the Strong Exponential Time Hypothesis (SETH\mathsf{SETH}) to address the complexity of CNF-SAT. Although it was originally stated only for deterministic algorithms, it is now common to extend SETH\mathsf{SETH} to randomized algorithms as well.

For every ε>0\varepsilon>0 there exists an integer k≥3k\geq 3 such that CNF-SAT on formulas with clause size at most kk (the so called kk-SAT problem) and nn variables cannot be solved in O(2(1−ε)n)O(2^{(1-\varepsilon)n}) time even by a randomized algorithm.

For every ε>0\varepsilon>0, there is a c≥1c\geq 1 such that OV cannot be solved in n2−εn^{2-\varepsilon} time on instances with d=clog⁡nd=c\log n.

In particular, it is known that SETH\mathsf{SETH} implies OVC [Wil05]. SETH\mathsf{SETH} and OVC are the most common hardness assumption in fine-grained complexity theory, and they are known to imply tight lower bounds for a number of algorithmic problems throughout computer science. See, for instance, the survey [Wil18] for more background.

7 Dimensionality Reduction

We make use of the following binary version of the Johnson-Lindenstrauss lemma due to Achlioptas [Ach03]:

We will also use the following variant of Johnson Lindenstrauss for Euclidean space, for random projections onto o(log⁡n)o(\log n) dimensions:

For k=o(log⁡n)k=o(\log n), with high probability the maximum distortion in pairwise distance obtained from projecting nn points into kk dimensions (with appropriate scaling) is at most nO(1/k)n^{O(1/k)}.

8 Nearest Neighbor Search

Our results will make use of a number of prior results, both algorithms and lower bounds, for nearest neighbor search problems.

We provide the definition of the Approximate Nearest Neighbor search problem

By comparison, the best known algorithm for d=Ω(log⁡n)d=\Omega(\log n) for each of these distance measures other than edit distance runs in time about dn+n2−Ω(ε1/3/log⁡(1/ε))dn+n^{2-\Omega(\varepsilon^{1/3}/\log(1/\varepsilon))} [ACW16].

9 Geometric Laplacian System

Building off of a long line of work on Laplacian system solving [ST04, KMP10, KMP11, KOSZ13, CKM+14], we study the problem of solving geometric Laplacian systems:

where LG†L_{G}^{\dagger} denotes the pseudo-inverse of LGL_{G} and matrix norm is defined as ∥c∥A=c⊤Ac\|c\|_{A}=\sqrt{c^{\top}Ac}.

Equivalence of Matrix-Vector Multiplication and Solving Linear Systems

In this section, we show that for linear systems with sparse preconditioners, approximately solving them is equivalent to approximate matrix multiplication. We begin by formalizing our notion of approximation.

Given a matrix MM and a vector xx, we say that bb is an ε\varepsilon-approximate multiplication of MxMx if

Given a vector dd, we say that a vector yy is an ε\varepsilon-approximate solution to My=dMy=d if yy is an ε\varepsilon-approximate multiplication of M†dM^{{\dagger}}d.

Before stating the desired reductions, we state a folklore fact about the Laplacian norm:

Lower Bound for LGL_{G}: Let λmin⁡\lambda_{\min} and λmax⁡\lambda_{\max} denote the minimum nonzero and maximum eigenvalues of DG−1/2LGDG−1/2D_{G}^{-1/2}L_{G}D_{G}^{-1/2} respectively, where DGD_{G} is the diagonal matrix of vertex degrees. Since GG is connected, all cuts have conductance at least wmin⁡/(n2wmax⁡)=1/(n2α)w_{\min}/(n^{2}w_{\max})=1/(n^{2}\alpha). Therefore, by Cheeger’s Inequality [Che70], λmin⁡≥1/(2n4α2)\lambda_{\min}\geq 1/(2n^{4}\alpha^{2}). It follows that,

Upper bound for LGL_{G}: λmax⁡≤1\lambda_{\max}\leq 1. Therefore,

Proposition 4.2 implies the following equivalent definition of ε\varepsilon-approximate multiplication:

,b⊤1=0b^{\top}{\bf 1}=0, and x⊤1=0x^{\top}{\bf 1}=0, then bb is an 2n3α2ε2n^{3}\alpha^{2}\varepsilon-approximate multiplication of LGxL_{G}x.

Since b⊤1=0b^{\top}{\bf 1}=0, (b−LGx)⊤1=0(b-L_{G}x)^{\top}{\bf 1}=0 also. By the upper bound for LG†L_{G}^{\dagger}-norms in Proposition 4.2,

Since x⊤1=0x^{\top}{\bf 1}=0, xx has both nonnegative and nonpositive coordinates. Therefore, since GG is connected, there exists vertices a,ba,b in GG for which {a,b}\{a,b\} is an edge and for which ∣xa−xb∣≥∥x∥∞/n|x_{a}-x_{b}|\geq\|x\|_{\infty}/n. Therefore,

This is the desired result by definition of ε\varepsilon-approximate multiplication. ∎

Since b⊤1=0b^{\top}{\bf 1}=0, (b−LGx)⊤1=0(b-L_{G}x)^{\top}{\bf 1}=0 as well. By the lower bound for LG†L_{G}^{\dagger}-norms in Proposition 4.2 and the fact that bb is an approximate multiplication for LGxL_{G}x,

Taking square roots gives the desired result. ∎

Consider an nn-vertex ww-weighted graph GG, let wmin⁡=min⁡e∈Gwew_{\min}=\min_{e\in G}w_{e}, wmax⁡=max⁡e∈Gwew_{\max}=\max_{e\in G}w_{e}, α=wmax⁡/wmin⁡\alpha=w_{\max}/w_{\min}, and HH be a known graph for which

The algorithm MultiplyG (Algorithm 2) uses standard preconditioned iterative refinement. It is applied in the opposite from the usual way. Instead of using iterative refinement to solve a linear system given matrix-vector multiplication, we use iterative refinement to do matrix-vector multiplication given access to a linear system solver.

Reduction in residual and iteration bound: First, we show that

Since (I−LHLG†)LG(I−LG†LH)⪯3(1/900)LG(I-L_{H}L_{G}^{{\dagger}})L_{G}(I-L_{G}^{{\dagger}}L_{H})\preceq 3(1/900)L_{G},

Let xfinalx_{\text{final}} be the lowest element of the call stack and let kk be the number of recursive calls to MultiplyGAdditive (Algorithm 2). By Proposition 4.2,

Error: We start by bounding error in the LG†L_{G}^{{\dagger}} norm. Let bb be the output of \textscMultiplyGAdditive(x,τ)\textsc{MultiplyGAdditive}(x,\tau) (Algorithm 2). We bound the desired error recursively:

Because 0=\textscMultiplyGAdditive(xfinal,τ)0=\textsc{MultiplyGAdditive}(x_{\text{final}},\tau) (Algorithm 2),

By Proposition 4.2 applied to LG†L_{G}^{{\dagger}}, ∥b−LGx∥LG†≥∥b−LGx∥∞/(nwmax⁡)\|b-L_{G}x\|_{L_{G}^{{\dagger}}}\geq\|b-L_{G}x\|_{\infty}/(n\sqrt{w_{\max}}). Therefore,

Runtime: There is one call to SolveG and one multiplication by LHL_{H} per call to MultiplyGAdditive (Algorithm 2). Each multiplication by LHL_{H} takes O(Z)O(Z) time. As we have shown, there are only k≤O(log⁡(nα/ε))k\leq O(\log(n\alpha/\varepsilon)) calls to MultiplyGAdditive (Algorithm 2). Therefore, we are done. ∎

2 Matrix-Vector Multiplication Implies Solving Linear Systems

The converse is well-known to be true [ST04, KMP11]:

Consider an nn-vertex ww-weighted graph GG, let wmin⁡=min⁡e∈Gwew_{\min}=\min_{e\in G}w_{e}, wmax⁡=max⁡e∈Gwew_{\max}=\max_{e\in G}w_{e}, α=wmax⁡/wmin⁡\alpha=w_{\max}/w_{\min}, and HH be a known graph with at most ZZ edges for which

3 Lower bound for high-dimensional linear system solving

We have shown in this section that if a K\mathsf{K} graph can be efficiently sparsified, then there is an efficient Laplacian multiplier for K\mathsf{K} graphs if and only if ther is an efficient Laplacian system solver for K\mathsf{K} graphs. Here we give one example of how this connection can be used to prove lower bounds for Laplacian system solving:

Matrix-Vector Multiplication

AK,PA_{\mathsf{K},P} and LK,PL_{\mathsf{K},P} are the adjacency matrix and Laplacian matrix, respectively, of the complete weighted graph on nn nodes where the weight between node ii and node jj is K(xi,xj)\mathsf{K}(x_{i},x_{j}).

In this section, we study the algorithmic problem of computing the linear transformations defined by these matrices:

We make a few important notes about these problems:

In both of the above, problems, wmax⁡:=max⁡u,v∈P∣K(u,v)∣w_{\max}:=\max_{u,v\in P}|\mathsf{K}(u,v)|.

Suppose the function K\mathsf{K} can be evaluated in time TT (in this paper we’ve been assuming T=O~(1)T=\widetilde{O}(1)). Then, both the KAdjE\mathsf{KAdjE} and KLapE\mathsf{KLapE} problems can be solved in O(Tn2)O(Tn^{2}) time, by computing all n2n^{2} entries of the matrix and then doing a straightforward matrix-vector multiplication. However, since the input size to the problem is only O(nd)O(nd) real numbers, we can hope for much faster algorithms when d=o(n)d=o(n). In particular, we will aim for n1+o(1)n^{1+o(1)} time algorithms when d=no(1)d=n^{o(1)}.

For some functions K\mathsf{K}, like K(x,y)=∥x−y∥22\mathsf{K}(x,y)=\|x-y\|_{2}^{2}, we will show that a running time of n1+o(1)n^{1+o(1)} is possible for all d=no(1)d=n^{o(1)}. For others, like K(x,y)=1/∥x−y∥22\mathsf{K}(x,y)=1/\|x-y\|_{2}^{2} and K(x,y)=exp⁡(−∥x−y∥22)\mathsf{K}(x,y)=\exp(-\|x-y\|_{2}^{2}), we will show that such an algorithm is only possible when d≪log⁡(n)d\ll\log(n). More precisely, for these K\mathsf{K}:

When d=O(log⁡(n)/log⁡log⁡(n))d=O(\log(n)/\log\log(n)), we give an algorithm running in time n1+o(1)n^{1+o(1)}, and

For d=Ω(log⁡n)d=\Omega(\log n), we prove a conditional lower bound showing that n2−o(1)n^{2-o(1)} time is necessary.

Finally, for some functions like K(x,y)=∣⟨x,y⟩∣\mathsf{K}(x,y)=|\langle x,y\rangle|, we will show a conditional lower bound showing that Ω(n2−δ)\Omega(n^{2-\delta}) time is required even when d=2Ω(log⁡∗n)d=2^{\Omega(\log^{*}n)} is just barely super-constant.

In fact, assuming SETH\mathsf{SETH}, we will characterize the functions ff for which the KAdjE\mathsf{KAdjE} and KLapE\mathsf{KLapE} problems can be efficiently solved in high dimensions d=Ω(log⁡n)d=\Omega(\log n) in terms of the approximate degree of ff (see subsection 5.2 below). The answer is more complicated in low dimensions d=o(log⁡n)d=o(\log n), and for some functions ff we make use of the Fast Multipole Method to design efficient algorithms (in fact, we will see that the Fast Multipole Method solves a problem equivalent to our KAdjE\mathsf{KAdjE} problem).

Although our goal in this section is to study the K\mathsf{K} Laplacian Evaluation problem, it will make the details easier to instead look at the K\mathsf{K} Adjacency Evaluation problem. Here we show that any running time achievable for one of the two problems can also be achieved for the other (up to a log⁡n\log n factor), and so it will be sufficient in the rest of this section to only give algorithms and lower bounds for the K\mathsf{K} Adjacency Evaluation problem.

Suppose the KAdjE\mathsf{KAdjE} (Problem 5.1) can be solved in T(n,d,ε)\mathcal{T}(n,d,\varepsilon) time. Then, the KLapE\mathsf{KLapE} (Problem 5.2) can be solved in O(T(n,d,ε/2))O(\mathcal{T}(n,d,\varepsilon/2)) time.

Suppose the KLapE\mathsf{KLapE} (Problem 5.2) can be solved in T(n,d,ε)\mathcal{T}(n,d,\varepsilon) time, and that T\mathcal{T} satisfies T(n1+n2,d,ε)≥T(n1,d,ε)+T(n2,d,ε)\mathcal{T}(n_{1}+n_{2},d,\varepsilon)\geq\mathcal{T}(n_{1},d,\varepsilon)+\mathcal{T}(n_{2},d,\varepsilon) for all n1,n2,d,εn_{1},n_{2},d,\varepsilon. Then, the KAdjE\mathsf{KAdjE} (Problem 5.1) can be solved in O(T(nlog⁡n,d,0.5ε/log⁡n))O(\mathcal{T}(n\log n,d,0.5\varepsilon/\log n)) time.

We will show that the K\mathsf{K} Adjacency Evaluation problem can be solved in

time, and then apply the superadditive identity for TT to get the final running time. For a fixed dd, we proceed by strong induction on nn, and assume the K\mathsf{K} Adjacency Evaluation problem can be solved in this running time for all smaller values of nn.

in O(T(n,d,0.5ε/log⁡n))O(\mathcal{T}(n,d,0.5\varepsilon/\log n)) time.

and our two initial calls took time O(T(n,d,0.5ε/log⁡n))O(\mathcal{T}(n,d,0.5\varepsilon/\log n)), leading to the desired running time. Each output entry is ultimately the sum of at most 2log⁡n2\log n terms from calls to the given algorithm, and hence has error ε\varepsilon (since we perform all recursive calls with error 0.5ε/log⁡n0.5\varepsilon/\log n and the additive error guarantees in recursive calls can only be more stringent). ∎

In both Proposition 5.3 and Proposition 5.4, if the input to the KLapE\mathsf{KLapE} (resp. KAdjE\mathsf{KAdjE}) problem is a {0,1}\{0,1\} vector, then we only apply the given KAdjE\mathsf{KAdjE} (KLapE\mathsf{KLapE}) algorithm on {0,1}\{0,1\} vectors. Hence, the two problems are equivalent even in the special case where the input vector yy must be a {0,1}\{0,1\} vector.

2 Approximate Degree

The Stone-Weierstrass theorem says that, for any ε>0\varepsilon>0, and any continuous function ff which is bounded on $,thereisapositiveinteger, there is a positive integerksuchthatsuch thatfisis\varepsilon−closetoapolynomialofdegree-close to a polynomial of degreek.Thatsaid,. That said,kcanbequitelargeforsomenaturalandimportantcontinuousfunctionscan be quite large for some natural and important continuous functionsf$. For some examples:

Any polynomial p(x)p(x) such that ∣p(x)−1/(1+x)∣≤ε|p(x)-1/(1+x)|\leq\varepsilon for all x∈[0,1/2]x\in[0,1/2] has degree at least Ω(log⁡(1/ε))\Omega(\log(1/\varepsilon)).

For such a polynomial p(x)p(x), define q(x):=1−x⋅p(x−1)q(x):=1-x\cdot p(x-1). Thus, the polynomial qq has the two properties that ∣q(x)∣<ε|q(x)|<\varepsilon for all x∈[1,3/2]x\in[1,3/2], and q(0)=1q(0)=1. By standard properties of the Chebyshev polynomials (see e.g. [SV14, Proposition 2.4]), the polynomial qq with those two properties of minimum degree is an appropriately scaled and shifted Chebyshev polynomial, which requires degree Ω(log⁡(1/ε))\Omega(\log(1/\varepsilon)). ∎

In both of the above settings, for error ε=n−Ω(log⁡4n)\varepsilon=n^{-\Omega(\log^{4}n)}, the function ff is only ε\varepsilon-close to a polynomial of degree ω(log⁡n)\omega(\log n). We will see in Theorem 5.14 below that this implies that, for each of these functions ff, the ε\varepsilon-approximate ff KAdjE\mathsf{KAdjE} problem in dimension d=Ω(log⁡n)d=\Omega(\log n) requires time n2−o(1)n^{2-o(1)} assuming SETH\mathsf{SETH}.

3 ‘Kernel Method’ Algorithms

For any integer q≥0q\geq 0, let K(u,v)=(∥u−v∥22)q\mathsf{K}(u,v)=(\|u-v\|_{2}^{2})^{q}. The KAdjE\mathsf{KAdjE} problem (Problem 5.1) can be solved exactly (with error) in time O~(n⋅(2d+2q−12q))\widetilde{O}(n\cdot\binom{2d+2q-1}{2q}).

is a homogeneous polynomial of degree 2q2q in the variables u1,…,ud,v1,…,vdu_{1},\ldots,u_{d},v_{1},\ldots,v_{d}. Let

and let TT be the set of functions t:V→{0,1,2,… 2q}t:V\to\{0,1,2,\ldots\,2q\} such that ∑v∈Vt(v)=2q\sum_{v\in V}t(v)=2q.

The running time in Lemma 5.10 can be improved to O~(n⋅(d+q−1q))\widetilde{O}(n\cdot\binom{d+q-1}{q}) with more careful work, by noting that each monomial has either ‘xx-degree’ or ‘yy-degree’ at most dd, but we omit this here since the difference is negligible for our parameters of interest.

Let q,dq,d be positive integers which may be functions of nn, such that (2(d+q)2q)<no(1)\binom{2(d+q)}{2q}<n^{o(1)}. For example:

when d=o(log⁡n)d=o(\log n) and q≤O(log⁡n)q\leq O(\log n), or

when d=Θ(log⁡n)d=\Theta(\log n) and q<o(log⁡n)q<o(\log n).

This follows by applying Lemma 5.10 separately to each monomial of ff, and summing the results.

When d=o(log⁡n)d=o(\log n) and q≤O(log⁡n)q\leq O(\log n), then we can write d=1a(n)log⁡nd=\frac{1}{a(n)}\log n for some a(n)=ω(1)a(n)=\omega(1), and q=b(n)⋅log⁡nq=b(n)\cdot\log n for some b(n)=O(1)b(n)=O(1). It follows that

Apply Corollary 5.12 for the degree qq approximation of ff. ∎

4 Lower Bound in High Dimensions

We now prove that in the high dimensional setting, where d=Θ(log⁡n)d=\Theta(\log n), the algorithm from Corollary 5.13 is essentially tight. In that algorithm, we showed that (recalling Definition 5.6) functions ff which are ε\varepsilon-close to a polynomial of degree o(log⁡n)o(\log n) have efficient algorithms; here we show a lower bound if ff is not ε\varepsilon-close to a polynomial of degree O(log⁡n)O(\log n).

Then, assuming SETH\mathsf{SETH}, the KAdjE\mathsf{KAdjE} problem for K(x,y)=f(∥x−y∥22)\mathsf{K}(x,y)=f(\|x-y\|_{2}^{2}) in dimension dd and error (κ(d+1))O(d4)(\kappa(d+1))^{O(d^{4})} on n=1.01dn=1.01^{d} points requires time n2−o(1)n^{2-o(1)}.

This theorem will be a corollary of another result, which is simpler to use in proving lower bounds:

Then, assuming SETH\mathsf{SETH}, the KAdjE\mathsf{KAdjE} problem for K(x,y)=f(∥x−y∥22)\mathsf{K}(x,y)=f(\|x-y\|_{2}^{2}) in dimension dd and error (κ(d+1))O(d4)(\kappa(d+1))^{O(d^{4})} on n=1.01dn=1.01^{d} points requires time n2−o(1)n^{2-o(1)}.

To better understand Theorem 5.14 in the context of our dichotomy, think about the following example:

We now give a more concrete version of the proof outline described in the introduction. To prove Theorem 5.14 given Theorem 5.15, it suffices to show that for any function that is far from a degree kk polynomial, there exists a point with high (k+1)(k+1)-th derivative (Lemma 5.19). To prove Theorem 5.15, we start by showing that there exists an interval (not just a single point) with high (k+1)(k+1)-th derivative (Lemma 5.20). This is done by integrating over the (k+2)(k+2)-nd derivative, exploiting the fact that it is bounded for analytic functions (Proposition 5.18). Then, we further improve this derivative lower bound by showing that there is an interval on which all ii-th derivatives for i≤k+1i\leq k+1 are bounded from below (Lemma 5.21). This is done by induction, deriving a bound for ii-th derivatives by integrating over the (i+1)(i+1)-th derivative. The lower bound on the (i+1)(i+1)-th derivative ensures that it can only be close to 0 at a small interval around one point, so picking an interval far from that point suffices for the inductive step.

Up to this point, we have argued that there must be an interval I⊂I\subset on which all of ff’s ≤(k+1)\leq(k+1)-derivatives are large in absolute value (Lemma 5.21). We exploit this property to solve an exact bichromatic nearest neighbors problem in Hamming distance in d=Θ(log⁡n)d=\Theta(\log n) dimensions (Lemma 5.25). Since even approximate nearest neighbors cannot be solved in n2−δn^{2-\delta}-time for δ>0\delta>0 assuming SETH\mathsf{SETH} (Theorem 3.21), this suffices. To solve Hamming nearest neighbors a a pair of sets SS and TT with ∣S∣=∣T∣=n|S|=|T|=n, we set up d+1d+1 different ff-graph adjacency matrix multiplication problems. In problem ii, we scale the points in SS and TT by a factor of ζi\zeta i for some ζ0\zeta 0 and translate them by c∈c\in so that they are in the interval II. Then, with one adjacency multiplication, one can evaluate an expression ZiZ_{i}, where Zi=∑x∈S,y∈Tf(c+i2ζ2∥x−y∥22)Z_{i}=\sum_{x\in S,y\in T}f(c+i^{2}\zeta^{2}\|x-y\|_{2}^{2}). For each distance i∈[d]i\in[d], let uj=∣{x∈S,y∈T:∥x−y∥22=j}∣u_{j}=|\{x\in S,y\in T:\|x-y\|_{2}^{2}=j\}|. To solve bichromatic nearest neighbors, it suffices to compute all of the uju_{j}s. This can be done by setting up a linear system in the uju_{j}s, where there is one equation for each ZiZ_{i}. The matrix for this linear system has high determinant because ff has high ≤(k+1)\leq(k+1)-th derivatives on II (Lemma 5.23). Cramer’s Rule can be used to bound the error in our estimate of the uju_{j}s that comes from the error in the multiplication oracle (Lemma 5.24). Therefore, O(d)O(d) calls to a multiplication oracle suffices for computing the number of pairs of vertices in S×TS\times T that are at each distance value. Returning the minimum distance ii for which ui>0u_{i}>0 solves bichromatic nearest neighbors, as desired.

In Lemma 5.23, we will make use of the Cauchy-Binet formula:

and suppose that the sum defining CijC_{ij} converges absolutely for all i,ji,j. Then,

In this section, we exploit the following property of analytic functions:

We first show that, for any x∈x\in, ∣f(k)(x)∣<Bx2kk!|f^{(k)}(x)|<B_{x}2^{k}k! for some constant BxB_{x} depending on xx. Write ff’s Taylor expansion around xx:

Let y0=arg⁡max⁡a∈{0,1}∣a−x∣y_{0}=\arg\max_{a\in\{0,1\}}|a-x|. Note that ∣y0−x∣≥1/2|y_{0}-x|\geq 1/2. Since f(y0)f(y_{0}) is a convergent series, there exists a constant NxN_{x} dependent on xx such that for all i>Nxi>N_{x}, the absolute value of the ii-th term of the series for f(y0)f(y_{0}) is at most 1/2. Therefore, for all i>Nxi>N_{x}, ∣f(i)(x)∣<2(2i)i!|f^{(i)}(x)|<2(2^{i})i!. For all i≤Nxi\leq N_{x}, f(i)(x)f^{(i)}(x) is a constant depending on xx, so we are done with this part.

Next, we show that ∣f(k)(x)∣<B4kk!|f^{(k)}(x)|<B4^{k}k! for all x∈x\in and some constant BB depending only on ff. Let x0∈{i/8}i=08x_{0}\in\{i/8\}_{i=0}^{8} be the point that minimizes ∣x−x0∣|x-x_{0}|. Note that ∣x−x0∣<1/16|x-x_{0}|<1/16. Taylor expand ff around x0x_{0}:

Take derivatives for some k≥0k\geq 0 and use the triangle inequality:

By the first part, ∣f(i+k)(x0)∣≤Bx02i+k(i+k)!|f^{(i+k)}(x_{0})|\leq B_{x_{0}}2^{i+k}(i+k)!, so

Note that (i+k)!/i!≤(2i)k(i+k)!/i!\leq(2i)^{k} for i>ki>k (we are done for i≤ki\leq k). There is some constant CC for which ∑i=0∞ik4−i=C\sum_{i=0}^{\infty}i^{k}4^{-i}=C, so letting B=Bx0CB=B_{x_{0}}C suffices, as desired. ∎

We now move on to proving the main results of this section, which consists of several steps.

For the base case i=0i=0: note that gg is the difference between ff and a polynomial of degree kk, and so by our assumption that ff is not κ(k)\kappa(k)-close to a polynomial of degree kk, there must be an x0∈x_{0}\in such that ∣g(x0)∣>κ(k)|g(x_{0})|>\kappa(k).

For the inductive step, consider an integer i∈[k+1]i\in[k+1]. Notice that g(i−1)(0)=0g^{(i-1)}(0)=0 by definition of gg since i≤k+1i\leq k+1. By the inductive hypothesis, there is an xi−1∈x_{i-1}\in with ∣g(i−1)(xi−1)∣>κ(k)|g^{(i-1)}(x_{i-1})|>\kappa(k). Hence, by the mean value theorem, there must be an xi∈[0,xi−1]x_{i}\in[0,x_{i-1}] such that

For each of the infinitely many kks for which ff is κ(k)\kappa(k)-far from a degree kk polynomial, Lemma 5.19 implies the existance of an xkx_{k} for which ∣f(k+1)(xk)∣>κ(xk)|f^{(k+1)}(x_{k})|>\kappa(x_{k}). Thus, ff satisfies the input condition of Theorem 5.15, so applying Theorem 5.15 proves Theorem 5.14 as desired. ∎

Suppose that, for some sufficiently large positive integer kk, there is an x∈x\in for which ∣f(k+1)(x)∣>κ(k)|f^{(k+1)}(x)|>\kappa(k). Then, there exists an interval [a,b]⊆[a,b]\subseteq with the property that both b−a≥κ(k)/(32Bk4k⋅k!)b-a\geq\kappa(k)/(32Bk4^{k}\cdot k!) and, for all y∈[a,b]y\in[a,b], ∣f(k+1)(y)∣>κ(k)/2|f^{(k+1)}(y)|>\kappa(k)/2.

Since ff is analytic on $,Proposition5.18appliesanditfollowsthatthereisaconstant, Proposition 5.18 applies and it follows that there is a constantB>0dependentondependent onfsuchthatforeverysuch that for everyy\inandeverynonnegativeintegerand every nonnegative integerm,wehave, we have|f^{(m)}(y)|\leq Bm4^{m}\cdot m!.Inparticular,forall. In particular, for ally\in,wehave, we have|f^{(k+2)}(y)|\leq 16Bk4^{k}\cdot k!.Let. Let\delta=\kappa(k)/(32Bk4^{k}\cdot k!),thenlet, then leta=\max\{0,x-\delta\},and, andb=\min\{1,x+\delta\}.Wehave. We haveb-a\geq\delta=\kappa(k)/(32Bk4^{k}\cdot k!),sincewhen, since whenkislargeenough,wegetthatis large enough, we get that\delta<1/2,sowecannothaveboth, so we cannot have botha=0andandb=1.Meanwhile,forany. Meanwhile, for anyy\in[a,b]$, we have as desired that

Suppose that, for some sufficiently large positive integer kk, there exists an x∈x\in for which ∣f(k+1)(x)∣>κ(k)|f^{(k+1)}(x)|>\kappa(k). Then, there exists an interval [c,d]⊆[c,d]\subseteq with the property that both d−c>κ(k)/(128Bk42k+1⋅k!)d-c>\kappa(k)/(128Bk4^{2k+1}\cdot k!) and, for all y∈[c,d]y\in[c,d] and all i≤k+1i\leq k+1, ∣f(i)(y)∣>[κ(k)2/(64Bk42k+1⋅k!)]k+2−i|f^{(i)}(y)|>\left[\kappa(k)^{2}/(64Bk4^{2k+1}\cdot k!)\right]^{k+2-i}.

We will prove that, for all integers 0≤i≤k+10\leq i\leq k+1, there is an interval [ci,di]⊆[c_{i},d_{i}]\subseteq such that di−ci>κ(k)/(32Bk42k+1−i⋅k!)d_{i}-c_{i}>\kappa(k)/(32Bk4^{2k+1-i}\cdot k!), and for all integers i≤i′≤k+1i\leq i^{\prime}\leq k+1 and all y∈[ci,di]y\in[c_{i},d_{i}] we have ∣f(i′)(y)∣>[κ(k)2/(64Bk42k+1⋅k!)]k+2−i′|f^{(i^{\prime})}(y)|>\left[\kappa(k)^{2}/(64Bk4^{2k+1}\cdot k!)\right]^{k+2-i^{\prime}}. Plugging in i=0i=0 gives the desired statement. We will prove this by induction on ii, from i=k+1i=k+1 to i=0i=0. The base case i=k+1i=k+1 is given (with slightly better parameters) by Lemma 5.20.

For the inductive step, suppose the statement is true for i+1i+1. We will pick [ci,di][c_{i},d_{i}] to be a subinterval of [ci+1,di+1][c_{i+1},d_{i+1}], so the inductive hypothesis says that for every y∈[ci,di]y\in[c_{i},d_{i}] and every integer i<i′≤k+1i<i^{\prime}\leq k+1 we have ∣f(i′)(y)∣>[κ(k)2/(64Bk42k+1⋅k!)]k+2−i′|f^{(i^{\prime})}(y)|>\left[\kappa(k)^{2}/(64Bk4^{2k+1}\cdot k!)\right]^{k+2-i^{\prime}}. It thus remains to show that we can further pick cic_{i} and did_{i} such that di−ci≥14(di+1−ci+1)d_{i}-c_{i}\geq\frac{1}{4}(d_{i+1}-c_{i+1}) and ∣f(i)(y)∣>[κ(k)2/(64Bk42k+1⋅k!)]k+2−i|f^{(i)}(y)|>\left[\kappa(k)^{2}/(64Bk4^{2k+1}\cdot k!)\right]^{k+2-i} for all y∈[ci,di]y\in[c_{i},d_{i}].

Recall that ∣f(i+1)(y)∣>[κ(k)2/(64Bk42k+1⋅k!)]k+1−i|f^{(i+1)}(y)|>\left[\kappa(k)^{2}/(64Bk4^{2k+1}\cdot k!)\right]^{k+1-i} for all y∈[ci+1,di+1]y\in[c_{i+1},d_{i+1}]. Since f(i+1)f^{(i+1)} is continuous, we must have

either f(i+1)(y)>[κ(k)2/(64Bk42k+1⋅k!)]k+1−if^{(i+1)}(y)>\left[\kappa(k)^{2}/(64Bk4^{2k+1}\cdot k!)\right]^{k+1-i} for all such yy,

or −f(i+1)(y)>[κ(k)2/(64Bk42k+1⋅k!)]k+1−i-f^{(i+1)}(y)>\left[\kappa(k)^{2}/(64Bk4^{2k+1}\cdot k!)\right]^{k+1-i} for all such yy.

Let us assume we are in the first case; the second case is nearly identical. Let δ=(di+1−ci+1)/4\delta=(d_{i+1}-c_{i+1})/4, and consider the four subintervals

Since f(i+1)(y)>[κ(k)2/(64Bk42k+1⋅k!)]k+1−if^{(i+1)}(y)>\left[\kappa(k)^{2}/(64Bk4^{2k+1}\cdot k!)\right]^{k+1-i} for all yy in each of those intervals, we know that for each of the intervals, letting c′c^{\prime} denote its left endpoint and d′d^{\prime} denote its right endpoint, we have

In particular, f(i)f^{(i)} is increasing on the interval [ci+1,di+1][c_{i+1},d_{i+1}], and if we look at the five points y=ci+1+a⋅δy=c_{i+1}+a\cdot\delta for a∈{0,1,2,3,4}a\in\{0,1,2,3,4\} which form the endpoints of our four subintervals, f(i)f^{(i)} increases by more than [κ(k)2/(64Bk42k+1⋅k!)]k+2−i\left[\kappa(k)^{2}/(64Bk4^{2k+1}\cdot k!)\right]^{k+2-i} from each to the next. It follows by a simple case analysis (on where in our interval f(i)f^{(i)} has a root) that there must be one of our four subintervals with ∣f(i)(y)∣>[κ(k)2/(64Bk42k+1⋅k!)]k+2−i|f^{(i)}(y)|>\left[\kappa(k)^{2}/(64Bk4^{2k+1}\cdot k!)\right]^{k+2-i} for all yy in the subinterval. We can pick that subinterval as desired. ∎

To simplify notation in the rest of the proof, we will let ρ(k)=[κ(k)2/(64Bk42k+1⋅k!)]k+2\rho(k)=\left[\kappa(k)^{2}/(64Bk4^{2k+1}\cdot k!)\right]^{k+2}. We now use these properties of ff to reason about a certain matrix connected to ff that can be used to count the number of pairs of points at each distance.

Let MM be the counting matrix (Definition 5.22) for ff, kk, and ρ\rho. Then

Since ff is analytic on [c,d][c,d], we can Taylor expand it around cc:

Let δ=(ρ(k)/(B(200k)k))10k/k2\delta=(\rho(k)/(B(200k)^{k}))^{10k}/k^{2}. Note that for all values of i,j∈[k]i,j\in[k], the input to ff in MijM_{ij} is in the interval [c,d][c,d] by the lower bound on d−cd-c in Lemma 5.21. In particular, for all i,j∈[k]i,j\in[k],

for all i,j∈[k]i,j\in[k] and converges, so we may apply Lemma 5.17. By Lemma 5.17,

upper bound the contribution of every other term,

show that the lower bound dominates the sum.

Summing over all k!k! permutations σ\sigma yields an upper bound on the determinants of the blocks of AA and CC, excluding the top block:

where τ0=(k2)+1\tau_{0}=\binom{k}{2}+1. This completes part (2). Now, we do part (3). By Lemma 5.17,

Plugging in the part (1) lower bound and the part (2) upper bound yields

Let MM be an invertible kk by kk matrix with ∣Mij∣≤B|M_{ij}|\leq B for all i,j∈[k]i,j\in[k]. Let bb be a kk-dimensional vector for which ∣bi∣≤ε|b_{i}|\leq\varepsilon for all i∈[k]i\in[k]. Then, ∥M−1b∥∞≤εk!Bk/∣det⁡(M)∣\|M^{-1}b\|_{\infty}\leq\varepsilon k!B^{k}/|\det(M)|.

Cramer’s rule says that, for each i∈[k]i\in[k], the entry ii of the vector M−1bM^{-1}b is given by

where MiM_{i} is the matrix which one gets by replacing column ii of MM by bb. Let us upper-bound ∣det⁡(Mi)∣|\det(M_{i})|. We are given that each entry of MiM_{i} in column ii has magnitude at most ε\varepsilon, and each entry in every other column has magnitude at most BB. Hence, for any permutation σ∈Sk\sigma\in S_{k} on [k][k], we have

It follows from Cramer’s rule that ∣(M−1b)i∣≤ε⋅Bk−1⋅k!/∣det⁡(M)∣|(M^{-1}b)_{i}|\leq\varepsilon\cdot B^{k-1}\cdot k!/|\det(M)|, as desired. ∎

Suppose that there is an algorithm for ε\varepsilon-approximate matrix-vector multiplication by an n×nn\times n ff-matrix for points in d^{d} in T(n,d,ε)T(n,d,\varepsilon) time. Then, there is a

time algorithm for exact bichromatic Hamming nearest neighbors on nn-point sets in dimension dd.

Let us explain why this is sufficient to recover tt. Suppose we have computed this vector uu. We claim that if we compute M−1uM^{-1}u, and round each entry to the nearest integer, the result is the vector tt. Indeed, by Lemma 5.24, each entry of M−1uM^{-1}u differs from the corresponding entry of tt by at most an additive ε⋅Bk−1⋅k!/∣det⁡(M)∣\varepsilon\cdot B^{k-1}\cdot k!/|\det(M)|, where the constant BB is from Proposition 5.18 (since ∣f(z)∣≤B|f(z)|\leq B for all z∈z\in). Substituting our lower bound on ∣det⁡(M)∣|\det(M)| from Lemma 5.23, we see this additive error is at most 1/31/3 as long as we’ve picked a sufficiently large constant α>0\alpha>0. Thus, rounding each entry to the nearest integer recovers tt, as desired.

To do this, we will pick points y1,…,yn,z1,…,zn∈d+1y_{1},\ldots,y_{n},z_{1},\ldots,z_{n}\in^{d+1} such that

If the KAdjE\mathsf{KAdjE} problem for K(x,y)=f(∥x−y∥22)\mathsf{K}(x,y)=f(\|x-y\|_{2}^{2}) in dimension dd and error (κ(d+1))O(d4)(\kappa(d+1))^{O(d^{4})} on n=1.01dn=1.01^{d} points could be solved in time time n2−δn^{2-\delta} for any constant δ>0\delta>0, then one could immediately substitute this into Lemma 5.25 to refute SETH\mathsf{SETH} in light of Theorem 3.21. ∎

5 Lower Bounds in Low Dimensions

The landscape of algorithms available in low dimensions d=o(log⁡n)d=o(\log n) is a fair bit more complex. The Fast Multipole Method allows us to solve KAdjE\mathsf{KAdjE} for a number of functions ff, including K(x,y)=exp⁡(−∥x−y∥22)\mathsf{K}(x,y)=\exp(-\|x-y\|_{2}^{2}) and K(x,y)=1/∥x−y∥22\mathsf{K}(x,y)=1/\|x-y\|_{2}^{2}, for which we have a lower bound in high dimensions. Classifying when these multipole methods apply to a function ff seems quite difficult, as researchers have introduced more and more tools to expand the class of applicable functions. See Section 9, below, in which we give a much more detailed overview of these methods.

That said, in this subsection, we prove lower bounds for a number of functions K\mathsf{K} of interest. We show that for a number of functions K\mathsf{K} with applications to geometry and statistics, the KAdjE\mathsf{KAdjE} problem seems to become hard even in dimension d=3d=3 (see the end of this subsection for a list of such K\mathsf{K}).

For the function K(x,y)=∣⟨x,y⟩∣\mathsf{K}(x,y)=|\langle x,y\rangle|, the KAdjE\mathsf{KAdjE} problem (Problem 5.1) can be solved exactly in time n1+o(1)n^{1+o(1)} when d=2d=2.

We now show how to do each binary search step. Suppose we are testing whether the answer is ≤a\leq a, i.e. testing whether ⟨xi,xj⟩≤a\langle x_{i},x_{j}\rangle\leq a for all i≠ji\neq j. Let S1,…,Slog⁡n⊆{1,…,n}S_{1},\ldots,S_{\log n}\subseteq\{1,\ldots,n\} be subsets such that for each i≠ji\neq j, there is a kk such that ∣Sk∩{i,j}∣=1|S_{k}\cap\{i,j\}|=1. For each k∈{1,…,log⁡n}k\in\{1,\ldots,\log n\} we will show how to test whether there are i,ji,j with ∣Sk∩{i,j}∣=1|S_{k}\cap\{i,j\}|=1 such that ⟨xi,xj⟩≤a\langle x_{i},x_{j}\rangle\leq a, which will complete the binary search step.

Let vk∈{0,1}nv_{k}\in\{0,1\}^{n} be the vector with (vk)i=1(v_{k})_{i}=1 when i∈Pki\in P_{k} and (vk)i=0(v_{k})_{i}=0 when i∉Pki\notin P_{k}. Use the given algorithm to vector vkv_{k}, we can compute a (a±n−ω(1))(a\pm n^{-\omega(1)}) approximation to

in time O(T(n,d))O(\mathcal{T}(n,d)). Similarly, using the fact that the corresponding matrix has rank dd by definition, we can exactly compute

in time O(nd)O(nd). Our goal is to determine whether s1=−s2s_{1}=-s_{2}. Since each s1s_{1} and s2s_{2} is a polynomially-bounded integer, and we have a superpolynomially low error approximation to each, we can determine this as desired. ∎

Combining Lemma 5.27 with Theorem 3.23 we get:

Assuming SETH, there is a constant cc such that for the function K(x,y)=∣⟨x,y⟩∣\mathsf{K}(x,y)=|\langle x,y\rangle|, the KAdjE\mathsf{KAdjE} problem (Problem 5.1) with error 1/nω(1)1/n^{\omega(1)} and dimension d=clog⁡∗nd=c^{\log^{*}n} vectors of O(log⁡n)O(\log n) bit entries requires time n2−o(1)n^{2-o(1)}.

Similarly, combining with Theorem 3.24 we get:

The same proof, but using Theorem 3.25 instead of Theorem 3.23, can also show hardness of thresholds of distance functions:

Using essentially the same proof as for Lemma 8.4 in Section 8, we can further extend Corollary 5.30 to any non-Lipschitz functions ff:

6 Hardness of the n𝑛n-Body Problem

We now prove Corollary 1.2 from the Introduction, showing that our hardness results for the KAdjE\mathsf{KAdjE} problem (Problem 5.1) also imply hardness for the nn-body problem.

-time algorithm for one step of the nn-body problem.

Return −z/Ggrav-z/G_{\text{grav}} (Note that GgravG_{\text{grav}} is the Gravitational constant)

We now show that z=LGyz=L_{G}y. For x∈Xbx\in X_{b}, (LGy)x=(−1)1−b∑x′∈X1−bK(x,x′)(L_{G}y)_{x}=(-1)^{1-b}\sum_{x^{\prime}\in X_{1-b}}\mathsf{K}(x,x^{\prime}). We now check that zxz_{x} is equal to this by going through pairs {x,x′}\{x,x^{\prime}\} individually. Note that the (d+1)(d+1)-th coordinate of the force between (x,b)(x,b) and (x′,b)(x^{\prime},b) is 0. The (d+1)(d+1)-th coordinate of the force exerted by (x′,1)(x^{\prime},1) on (x,0)(x,0) is

Negating this gives the force exerted by (x′,0)(x^{\prime},0) on (x,1)(x,1). All of these contributions agree with the corresponding contributions to the sum (LGy)x(L_{G}y)_{x}, so −z/Ggrav=LG⋅y-z/G_{\text{grav}}=L_{G}\cdot y as desired.

The runtime of this reduction is O(n)O(n) plus the runtime of the nn-body problem. However, Theorem 1.1 shows that no almost-linear time algorithm exists for K\mathsf{K}-Laplacian multiplication, since ff is not approximable by a polynomial with degree less than Θ(log⁡n)\Theta(\log n). Therefore, no almost-linear time algorithm exists for nn-body either assuming SETH\mathsf{SETH}, as desired. ∎

7 Hardness of Kernel PCA

AK,PA_{\mathsf{K},P} and KK,PK_{\mathsf{K},P} differ only on their diagonal entries, so a n1+o(1)n^{1+o(1)} time algorithm for multiplying by one can be easily converted into such an algorithm for the other. Kernel PCA studies

We can now show a general hardness result for K\mathsf{K} PCA:

Theorem 5.34 follows almost directly from Theorem 5.14 when combined with the reduction from [BCIS18, Section 5]. The idea is as follows: Suppose we are able to estimate the nn eigenvalues of (In−Jn)×KK,P×(In−Jn)(I_{n}-J_{n})\times K_{\mathsf{K},P}\times(I_{n}-J_{n}). Then, in particular, we can estimate their sum, which is equal to:

Sparsifying Multiplicatively Lipschitz Functions in Almost Linear Time

In this section, we give an algorithm to compute sparsifiers for a large class of kernels K\mathsf{K} in almost linear time in ndnd, with logarithmic dependency on α\alpha and 1/ε21/\varepsilon^{2} dependence on ε\varepsilon. When d=log⁡nd=\log n, our algorithm runs in almost linear time in nn. To formally state our main theorem, we define multiplicatively Lipschitz functions:

Examples: Any polynomial with non-negative coefficients and maximum degree qq is (1+ε,q)(1+\varepsilon,q) multiplicatively Lipschitz for any ε>0\varepsilon>0. The function f(x)=1f(x)=1 when x<1x<1 and f(x)=2f(x)=2 when x≥1x\geq 1 is (2,1)(2,1) multiplicatively Lipschitz.

The following lemma is a simple consequence of our definition of multiplicatively Lipschitz functions:

We now state the core theorem of this section:

and outputs an ε\varepsilon-spectral sparsifier HH of the K\mathsf{K} graph with ∣EH∣=O(nlog⁡n/ε2)|E_{H}|=O(n\log n/\varepsilon^{2}).

and outputs an ε\varepsilon-spectral sparsifier HH of GG with ∣EH∣=O(nlog⁡n/ε2)|E_{H}|=O(n\log n/\varepsilon^{2}). If L=o(log⁡n/(log⁡log⁡n)2)L=o(\log n/(\log\log n)^{2}), this runs in time

Set k=Llog⁡nk=\sqrt{L\log n}, and the corollary follows from Theorem 6.3. ∎

This implies that if ff is a polynomial with non-negative coefficients, then sparsifiers of the corresponding K\mathsf{K}-graph can be found in almost linear time. The same result holds if ff is the reciprocal of a polynomial with non-negative coefficients.

We will need a few geometric preliminaries in order to present our core algorithm of this section, Sparsify-K\mathsf{K}-graph.

Given two sets of points AA and BB. We say A,BA,B is an ε\varepsilon-well separated pair if the diameter of AiA_{i} and BiB_{i} are at most ε\varepsilon times the distance between AiA_{i} and BiB_{i}.

∀i∈[s]\forall i\in[s], AiA_{i}, BiB_{i} are ε\varepsilon-well separated pair (Definition 6.5)

For any pair p,q∈Pp,q\in P, there is a unique i∈[s]i\in[s] such that p∈Aip\in A_{i} and q∈Biq\in B_{i}

A famous theorem of Callahan and Kosaraju [CK95] states:

Well-separated pairs can be interpreted as complete bipartite graphs on the vertex set, or bicliques. The biclique associated with a well-separated pair is the bipartite graph connecting all vertices on one side of the pair to another.

This concludes our definitions on well-separated pairs. We now give names to some algorithms in past work, which will be used in our algorithm sparsify-kk-graph. We define the algorithm \textscGenerateWSPD(P,ε)\textsc{GenerateWSPD}(P,\varepsilon) to output an ε\varepsilon-WSPD (Definition 6.6) of PP. We define the algorithm \textscRandomProject(P,k)\textsc{RandomProject}(P,k) to be a random projection of PP onto kk dimensions.

Let \textscBiclique(K,P,A,B)\textsc{Biclique}(\mathsf{K},P,A,B) be the complete biclique on the K\mathsf{K}-graph of PP with one side of the biclique having verticese corresponding to points in AA, and the other side having vertices corresponding to points in BB. We store this biclique implicitly as (A,B)(A,B) rather than as a collection of edges.

Let \textscRandSample(G,s)\textsc{RandSample}(G,s) be an algorithm uniformly at random sampling O(s)O(s) edges from GG, where the big OO is the same constant as the big OO in the nO(1/k)n^{O(1/k)} from Lemma 3.15.

Let \textscSpectralSparsify(G,ε)\textsc{SpectralSparsify}(G,\varepsilon) be any nearly linear time spectral sparsification algorithm that outputs a (1+ε)(1+\varepsilon) spectral sparsifier with O(nlog⁡n/ε2)O(n\log n/\varepsilon^{2}) edges, such as that in Theorem 3.7 from [SS11].

The rest of this section is devoted to proving Theorem 6.3.

We are nearly ready to prove Theorem 6.3. We start with a Lemma:

Consider a complete graph GG, and a complete graph G′G^{\prime}, where vertices of GG are identified with vertices of G′G^{\prime} (which induces an identification between edges). Let K≥1K\geq 1. Suppose each edge in GG satisfies:

If ff is a (C,L)(C,L) multiplicative Lipschitz function, and f(G)f(G) refers to the graph GG where ff is applied to each edge length, and C<KC<K then:

We view each well-separated pair (Ai′,Bi′)(A_{i}^{\prime},B_{i}^{\prime}) on P′P^{\prime} as a biclique, where the edge length between any two points in P′P^{\prime} corresponds to the edge length between those two points in the original K\mathsf{K}-graph. By the guarantees of Theorem 6.7, the longest edge divided by the shortest edge between two sides of a well-separated pair in P′P^{\prime} is at most 22. Thus, the longest edge divided by the shortest edge within any induced bipartite graph on the K\mathsf{K}-graph is 2⋅nO(1/k)2\cdot n^{O(1/k)}, by Lemma 6.8.

For each such biclique, the leverage score for each edge is overestimated by

This comes from first applying Lemma 6.8 to upper bound the ratio of the longest edge in a biclique divided by the shortest edge. This ratio comes out to be 2nO(L/k)2n^{O(L/k)}. Now recall the definition of leverage score on graphs as weRew_{e}R_{e}, where ReR_{e} is the effective resistance assuming conductances of wew_{e} on the graph, and wew_{e} is the edge weight. Here, wew_{e} is upper bounded by the longest edge length, and ReR_{e} is upper bounded by the leverage score of a biclique supported on the same edges, where all edges lengths are equal to the shortest edge length (this is an underestimate of effective resistance due to Rayleigh monotonicity, see [Chu97] for details). Therefore, a leverage score overestimate of the graph can be obtained by nO(L/k)⋅(∣Ai′∣+∣Bi′∣)/(∣Ai′∣∣Bi′∣)n^{O(L/k)}\cdot(|A_{i}^{\prime}|+|B_{i}^{\prime}|)/(|A_{i}^{\prime}||B_{i}^{\prime}|), as claimed. The union of these graphs is a spectral sparsifier of our K\mathsf{K}-graph.

Finally, our algorithm samples nO(L/k)(∣Ai′∣+∣Bi′∣)log⁡(∣Ai′∣+∣Bi′∣)n^{O(L/k)}(|A_{i}^{\prime}|+|B_{i}^{\prime}|)\log(|A_{i}^{\prime}|+|B_{i}^{\prime}|) edges uniformly at random from each biclique, scaling each sampled edge’s weight so that the expected value of the sampled graph is equal to the original biclique. Each vertex participates in at most log⁡α2O(k)\log\alpha 2^{O(k)} bicliques (see Theorem 6.7). Thus, this uniform sampling procedures’ run time is bounded above by

Finally, our algorithm runs a sparsification algorithm on our graph after uniform sampling, which gets the edge count of the final graph down to O(nlog⁡n/ε2)O(n\log n/\varepsilon^{2}). This completes our proof of Theorem 6.3. ∎

2 Low Dimensional Sparsification

We now present a result on sparsification in low dimensions, when dd is assumed to be small or constant.

Let L≥1L\geq 1. Consider a K\mathsf{K}-graph with nn vertices arising from a point set in dd dimensions, and let α\alpha be the ratio of the maximum Euclidean distance to the minimum Euclidean distance in the point set . Let ff be a (1+1/L,L)(1+1/L,L) multiplicatively Lipschitz function. Then an ε\varepsilon spectral sparsifier of the K\mathsf{K}-graph can be found in time

Taking the union of this number over all bicliques gives an algorithm that runs in time

Sparsifiers for |⟨x,y⟩|𝑥𝑦|\langle x,y\rangle|

In this section, we construct sparsifiers for Kernels of the form ∣⟨x,y⟩∣|\langle x,y\rangle|.

(1−ε)LG⪯LH⪯(1+ε)LG(1-\varepsilon)L_{G}\preceq L_{H}\preceq(1+\varepsilon)L_{G};

where GG is the K\mathsf{K}-graph on XX, where K(x,y)=∣⟨x,y⟩∣\mathsf{K}(x,y)=|\langle x,y\rangle|.

We start by showing that certain graphs that are related to unweighted versions of K\mathsf{K}-weighted graphs contain large expanders:

For a positive integer k>1k>1, call an unweighted graph GG kk-dependent if no independent set with size at least k+1k+1 exists in GG.

We start by observing that inner product graphs are (d+1)(d+1)-dependent.

We now show that these graphs are kk-dependent:

First, note that there must be a jj with ∣cj∣≥1+1/n|c_{j}|\geq 1+1/n. Otherwise, we would have

Assume without loss of generality that ∣c1∣≥∣cj∣|c_{1}|\geq|c_{j}| for all j∈{2,3,…,n−1}j\in\{2,3,\ldots,n-1\}, so in particular ∣c1∣≥1+1/n|c_{1}|\geq 1+1/n. Letting cn=−1c_{n}=-1, this means that ∑j=1ncjM[1,j]=0\sum_{j=1}^{n}c_{j}M[1,j]=0, and so M=−∑j=2n(cj/c1)M[1,j]M=-\sum_{j=2}^{n}(c_{j}/c_{1})M[1,j]. Thus,

For an independent set SS in the unweighted inner product graph GG for XX, define an S×SS\times S matrix MM with M[i,j]=⟨si,sj⟩M[i,j]=\langle s_{i},s_{j}\rangle where S={s1,s2,…,s∣S∣}S=\{s_{1},s_{2},\ldots,s_{|S|}\}. Then Lemma 7.4 coupled with the definition for edge presence in GG shows that MM is full rank. However, MM is a rank dd matrix because it is the matrix of inner products for dimension dd vectors. Therefore, d≥∣S∣d\geq|S|, so no independent set has size greater than dd. ∎

Next, we show that kk-dependent graphs are dense:

Any kk-dependent graph GG has at least n2/(2k2)n^{2}/(2k^{2}) edges.

Consider any k+1k+1-tuple of vertices in GG. There are (nk+1)\binom{n}{k+1} such k+1k+1-tuples. By definition of kk-dependence, there must be some edge with endpoints in any k+1k+1-tuple. The number of kk-tuples that any given edge can be a part of is at most (n−2k−1)\binom{n-2}{k-1}. Therefore, the number of edges in the graph is at least

Next, we argue that unweighted inner product graphs have large expanders:

Consider an unweighted graph GG with nn vertices and at least n2/cn^{2}/c edges for some c>1c>1. Then, there exists a set S⊆V(G)S\subseteq V(G) with the following properties:

(Expander) ΦG[S]≥1/(100clog⁡n)\Phi_{G[S]}\geq 1/(100c\log n)

(Degree) The degree of each vertex in SS within G[S]G[S] is at least n/(10000c)n/(10000c)

We start by partitioning the graph as follows:

While there exists a set U∈FU\in\mathcal{F} with (a) a partition U=U1∪U2U=U_{1}\cup U_{2} with U1U_{1} cut having conductance ≤1/(100clog⁡n)\leq 1/(100c\log n) or (b) a vertex uu with degree less than n/(10000c)n/(10000c) in G[U]G[U]

If (a), replace UU in F\mathcal{F} with U1U_{1} and U2U_{2}

Else if (b), replace UU in F\mathcal{F} with U∖{u}U\setminus\{u\} and {u}\{u\}

We now argue that when this procedure stops,

To prove this, think of each splitting of UU into U1U_{1} and U2U_{2} as deleting the edges in E(U1,U2)E(U_{1},U_{2}) from GG. Design a charging scheme that assigns deleted edges due to (a) steps to edges of GG as follows. Let cec_{e} denote the charge assigned to an edge ee and initialize each charge to 0. When UU is split into U1U_{1} and U2U_{2}, let U1U_{1} denote the set with ∣E(U1)∣≤∣E(U2)∣|E(U_{1})|\leq|E(U_{2})|. When UU is split, increase the charge cec_{e} for each e∈E(U1)∪E(U1,U2)e\in E(U_{1})\cup E(U_{1},U_{2}) by ∣E(U1,U2)∣/∣E(U1)∪E(U1,U2)∣|E(U_{1},U_{2})|/|E(U_{1})\cup E(U_{1},U_{2})|.

We now bound the charge assigned to each edge at the end of the algorithm. By construction, ∑e∈E(G)ce\sum_{e\in E(G)}c_{e} is the number of edges deleted over the course of the algorithm of type (a). Each edge is assigned charge at most log⁡∣E(G)∣≤2log⁡n\log|E(G)|\leq 2\log n times, because ∣E(U1)∣≤∣E(U1)∣+∣E(U2)∣2≤∣E(U)∣2|E(U_{1})|\leq\frac{|E(U_{1})|+|E(U_{2})|}{2}\leq\frac{|E(U)|}{2} when charge is assigned to edges in U1U_{1}. Furthermore, the amount of charge assigned is the conductance of the cut deleted, which is at most 1/(100clog⁡n)1/(100c\log n). Therefore,

for all edges in GG, which means that the total number of edges deleted of type (a) was at most n2/(100c)n^{2}/(100c). Each type (b) deletion reduces the number of edges in GG by at most n/(10000c)n/(10000c), so the total number of type (b) edge deletions is at most n2/(10000c)n^{2}/(10000c). Therefore, the total number of edges remaining is at least

By the stopping condition of the algorithm, each connected component of GG after edge deletions is a graph with all cuts having conductance at least 1/(100clog⁡n)1/(100c\log n) and all vertices having degree at least n/(10000c)n/(10000c). Next, we show that some set in F\mathcal{F} has at least n/(40c)n/(40c) vertices. If this is not the case, then

which leads to a contradiction. Therefore, there must be some connected component with at least n/(40c)n/(40c) vertices. Let SS be this component. By definition SS satisfies the Size guarantee. By the stopping condition for F\mathcal{F}, SS satisfies the other two guarantees as well, as desired. ∎

Proposition 7.7 does not immediately lead to an efficient algorithm for finding SS. Instead, we give an algorithm for finding a weaker but sufficient object:

(Size) ∣Q∣≥n/C1|Q|\geq n/C_{1}, where C1=320d2C_{1}=320d^{2}

(Low effective resistance diameter) For any pair of vertices u,v∈Qu,v\in Q, ReffG(u,v)≤C2n\mathtt{Reff}_{G}(u,v)\leq\frac{C_{2}}{n}, where C2=(10dlog⁡n)10C_{2}=(10d\log n)^{1}0

We prove this proposition in Section 7.2.

2 Efficient algorithm for finding sets with low effective resistance diameter

(Size) ∣S∣≥n/C3a|S|\geq n/C_{3a}, where C3a=40⋅8dC_{3a}=40\cdot 8d

(Expander) ΦG[S]≥1/C3b\Phi_{G[S]}\geq 1/C_{3b}, where C3b=800dlog⁡nC_{3b}=800d\log n

(Degree) The degree of each vertex in SS within G[S]G[S] is at least n/C3cn/C_{3c}, where C3c=10000⋅8dC_{3c}=10000\cdot 8d.

(Upper bound) For any pair u,v∈Su,v\in S, \textscReffQuery(u,v)≤C4ReffG(u,v)\textsc{ReffQuery}(u,v)\leq C_{4}\mathtt{Reff}_{G}(u,v), where C4=10C_{4}=10

(Lower bound) For any pair u,v∈Xu,v\in X, \textscReffQuery(u,v)≥ReffG(u,v)/2\textsc{ReffQuery}(u,v)\geq\mathtt{Reff}_{G}(u,v)/2.

We now implement this data structure. ReffPreproc uniformly samples O(log⁡n)O(\log n) subgraphs of GG and builds an effective resistance data structure for each one using [SS11]. ReffQuery queries each data structure and returns the maximum:

Bounding the runtime of these two routines is fairly straightforward. We now outline how we prove the approximation guarantee for ReffQuery. To obtain the upper bound, we use Theorem 3.6 to show that HiH_{i} contains a sparsifier for G[S]G[S], so effective resistances are preserved within SS. To obtain the lower bound, we use the following novel Markov-style bound on effective resistances:

Let GG be a ww-weighted graph with vertex set XX and assign numbers pe∈p_{e}\in to each edge. Sample a reweighted subgraph HH of GG by independently and identically selecting qq edges, with an edge chosen with probability proportional to pep_{e} and added to HH with weight twe/(peq)tw_{e}/(p_{e}q), where t=∑e∈Gpet=\sum_{e\in G}p_{e}. Fix a pair of vertices u,vu,v. Then for any κ>1\kappa>1,

For two vertices u,vu,v, define the (folklore) effective conductance between uu and vv in the graph II to be

It is well-known that CeffI(u,v)=1/ReffI(u,v)\mathtt{Ceff}_{I}(u,v)=1/\mathtt{Reff}_{I}(u,v).

Using q∗q^{*} as a feasible solution in the CeffH\mathtt{Ceff}_{H} optimization problem shows that

where weIw^{I}_{e} denotes the weight of the edge ee in the graph II.

where the first step follows from ReffG(u,v)=1/CeffG(u,v)\mathtt{Reff}_{G}(u,v)=1/\mathtt{Ceff}_{G}(u,v), and the last step follows from Markov’s inequality. ∎

Upper bound. Let peupper=C7/np_{e}^{\text{upper}}=C_{7}/n for each edge e∈E(G[S])e\in E(G[S]), where C7=2C3aC3b2C_{7}=2C_{3a}C_{3b}^{2}. We apply Theorem 3.6 to argue that Hi[S]H_{i}[S] is a sparsifier for G[S]G[S] for each ii. By choice of C7C_{7} and the Size condition on ∣S∣|S|, pu,vupper≥2ΦG[S]2∣S∣p_{u,v}^{\text{upper}}\geq\frac{2}{\Phi_{G[S]}^{2}|S|}. By Lemma 3.5 and the Expander condition on G[S]G[S], 2ΦG[S]2∣S∣≥ReffG[S](u,v)\frac{2}{\Phi_{G[S]}^{2}|S|}\geq\mathtt{Reff}_{G[S]}(u,v) for each pair u,v∈Su,v\in S. Therefore, the second condition of Theorem 3.6 is satisfied by the probabilities pep_{e}. Let q=10000C(n2/(C3aC3c))log⁡(n2/(C3aC3c))(C7/n)q=10000C(n^{2}/(C_{3a}C_{3c}))\log(n^{2}/(C_{3a}C_{3c}))(C_{7}/n), where CC is the constant in Theorem 3.6. This value of qq satisfies the first condition of Theorem 3.6.

Lower bound. Let pelower=1/∣E(G)∣p_{e}^{\text{lower}}=1/|E(G)| for each edge ee. Note that t=1t=1, so with q=∣E(Hi)∣q=|E(H_{i})|, all edges in the sampled graph should have weight twe/(peq)=∣E(G)∣/∣E(Hi)∣tw_{e}/(p_{e}q)=|E(G)|/|E(H_{i})|. Therefore, by Lemma 7.10, for a pair u,v∈Xu,v\in X

for each ii. Since the HiH_{i}s are chosen independently and identically,

We now describe the algorithm LowDiamSet. This algorithm simply picks random vertices vv and queries the effective resistance data structure to check that vv is in a set with the desired properties:

We now prove that this algorithm suffices:

Size and Low effective resistance diameter. Follows immediately from the return condition and the fact that for every u∈Qvu\in Q_{v} for the returned QvQ_{v},

by the Lower bound guarantee of Proposition 7.9.

for any x,y∈Sx,y\in S, where dS(w)d_{S}(w) denotes the degree of the vertex ww in G[S]G[S]. By the third property of SS, dS(x)≥n/(80000d2)d_{S}(x)\geq n/(80000d^{2}) and dS(y)≥n/(80000d2)d_{S}(y)\geq n/(80000d^{2}). By this and the second property of SS,

for any x,y∈Sx,y\in S. SS satisfies the conditions required of Proposition 7.9 by choice of the values C3aC_{3a}, C3bC_{3b}, and C3cC_{3c}. Therefore, by the Upper bound guarantee of Proposition 7.9,

3 Using low-effective-resistance clusters to sparsify the unweighted IP graph

In this section, we prove the following result:

For a ww-weighted graph GG with vertex set XX and n=∣X∣n=|X|, let S1,S2⊆XS_{1},S_{2}\subseteq X be two sets of vertices, let R1=max⁡u,v∈S1ReffG(u,v)R_{1}=\max_{u,v\in S_{1}}\mathtt{Reff}_{G}(u,v), and let R2=max⁡u,v∈S2ReffG(u,v)R_{2}=\max_{u,v\in S_{2}}\mathtt{Reff}_{G}(u,v). Then, for any u∈S1u\in S_{1} and v∈S2v\in S_{2},

Notice that d(1)+d(2)+d(12)=χd^{(1)}+d^{(2)}+d^{(12)}=\chi. Furthermore, notice that d(1)=∑x∈S1pxχ(ux)d^{(1)}=\sum_{x\in S_{1}}p_{x}\chi^{(ux)} and d(2)=∑y∈S2qyχ(yv)d^{(2)}=\sum_{y\in S_{2}}q_{y}\chi^{(yv)}, where χ(ab)\chi^{(ab)} is the signed indicator vector of the edge from aa to bb and ∑x∈S1px=1\sum_{x\in S_{1}}p_{x}=1, ∑y∈S2qy=1\sum_{y\in S_{2}}q_{y}=1, and px≥0p_{x}\geq 0 and qy≥0q_{y}\geq 0 for all x∈S1,y∈S2x\in S_{1},y\in S_{2}. The function f(d)=d⊤L†df(d)=d^{\top}L^{{\dagger}}d is convex, so by Jensen’s Inequality,

so we can upper bound ReffG(u,v)\mathtt{Reff}_{G}(u,v) in the following way

4 Sampling data structure

We use this sketching algorithm to obtain the desired sampling algorithm in the following subroutine:

Let n=∣S∣n=|S| and C=\textscSketchMatrix(n,δ,ε)C=\textsc{SketchMatrix}(n,\delta,\varepsilon). We will show that the following algorithm returns the desired estimate with probability at least 1−δ1-\delta:

Return \textscRecoverNorm(y,n,δ,ε)\textsc{RecoverNorm}(y,n,\delta,\varepsilon)

We use this corollary to obtain a sampling algorithm as follows, where n=∣S1∣+∣S2∣n=|S_{1}|+|S_{2}|:

Use the Corollary 7.15 data structure to (1±1/(100log⁡n))(1\pm 1/(100\log n))-approximate ∑v∈S2∣⟨u,v⟩∣\sum_{v\in S_{2}}|\langle u,v\rangle| for each u∈S1u\in S_{1}. Let tut_{u} be this estimate for each u∈S1u\in S_{1}. (one preprocess for S←S2S\leftarrow S_{2}, ∣S1∣|S_{1}| queries).

Form a balanced binary tree T\mathcal{T} of subsets of S2S_{2}, with S2S_{2} at the root, the elements of S2S_{2} at the leaves, and the property that for every parent-child pair (P,C)(P,C), ∣C∣≤2∣P∣/3|C|\leq 2|P|/3.

For every node SS in the binary tree, construct a (1±1/(100log⁡n))(1\pm 1/(100\log n))-approximate data structure for SS.

Sample a point u∈S1u\in S_{1} with probability tu/(∑a∈S1ta)t_{u}/(\sum_{a\in S_{1}}t_{a}).

Initialize S←S2S\leftarrow S_{2}. While ∣S∣>1|S|>1,

Let P1P_{1} and P2P_{2} denote the two children of SS in T\mathcal{T}

Let s1s_{1} and s2s_{2} be the (1±1/(100log⁡n))(1\pm 1/(100\log n))-approximations to ∑v∈P1∣⟨u,v⟩∣\sum_{v\in P_{1}}|\langle u,v\rangle| and ∑v∈P2∣⟨u,v⟩∣\sum_{v\in P_{2}}|\langle u,v\rangle| respectively obtained from the data structure for SS computed during preprocessing.

Reset SS to P1P_{1} with probability s1/(s1+s2)s_{1}/(s_{1}+s_{2}); otherwise reset SS to P2P_{2}.

Return the product of the O(log⁡n)O(\log n) probabilities attached to ancestor nodes of the node {v}\{v\} in T\mathcal{T} for uu, obtained from the preprocessing step (as during the sampling query)

We now expand on this intuition to prove Lemma 7.13:

We show that the algorithm given just before this proof satisfies this lemma:

Probability guarantee. Consider a pair u∈S1u\in S_{1}, v∈S2v\in S_{2}. Let A0=S2,A1,…Ak−1,Ak={v}A_{0}=S_{2},A_{1},\ldots A_{k-1},A_{k}=\{v\} denote the sequence of ancestor sets of the singleton set {v}\{v\} in T\mathcal{T}. For each i∈[k]i\in[k], let BiB_{i} be the child of Ai−1A_{i-1} besides AiA_{i} (unique because T\mathcal{T} is binary). For a node XX of T\mathcal{T}, let sXs_{X} be the (1±1/(100log⁡n))(1\pm 1/(100\log n))-approximation to ∑v∈X∣⟨u,v⟩∣\sum_{v\in X}|\langle u,v\rangle| used by the algorithm. The sampling probability puvp_{uv} is the following product of probabilities:

sAi+sBis_{A_{i}}+s_{B_{i}} is a (1±1/(100log⁡n))(1\pm 1/(100\log n))-approximation to ∑v∈Ai−1∣⟨u,v⟩∣\sum_{v\in A_{i-1}}|\langle u,v\rangle| by the approximation guarantee of Corollary 7.15. sAis_{A_{i}} is a (1±1/(100log⁡n))(1\pm 1/(100\log n))-approximation to ∑v∈Ai∣⟨u,v⟩∣\sum_{v\in A_{i}}|\langle u,v\rangle| by the approximation guarantee of Corollary 7.15. By these guarantees and the approximation guarantees for the tat_{a}s for a∈S1a\in S_{1}, puvp_{uv} is a (1±1/(100log⁡n))2k+2≤(1±1/2)(1\pm 1/(100\log n))^{2k+2}\leq(1\pm 1/2)-approximation to

We use this data structure via a simple reduction to implement the following data structure, which suffices for our applications:

where id:∪S∈GS→{0,1}log⁡n\text{id}:\cup_{S\in\mathcal{G}}S\rightarrow\{0,1\}^{\log n} is a function that outputs a unique ID for each element of ∪S∈GS\cup_{S\in\mathcal{G}}S. Define f(u)=fS(u)f(u)=f_{S}(u) for the unique SS containing uu (Without loss of generality assume that exactly one SS contains u ). Let S2′={(x,0log⁡n)∀x∈S2}S_{2}^{\prime}=\{(x,0^{\log n})\forall x\in S_{2}\}. Construct the data structure D\mathcal{D} from Lemma 7.13 on the pair of sets S1,S2′S_{1},S_{2}^{\prime}. Now, sample a pair of dd-dimensional vectors as follows:

Since the function id outputs values that are not proportional to one other, the function ff is injective.

(For the proof, let w=f−1(x)w=f^{-1}(x) and let SS be the unique set for which w∈Sw\in S)

5 Weighted IP graph sparsification

In this section, we use the tools developed in the previous sections to sparsify weighted inner product graphs. To modularize the exposition, we define a partition of the edge set of a weighted inner product graph:

For a ww-weighted graph GG and three functions on pairs of vertex sets ζ,κ,δ\zeta,\kappa,\delta, a collection of vertex set family-vertex set pairs F\mathcal{F} is called a (ζ,κ,δ)(\zeta,\kappa,\delta)-cover for GG iff the following property holds:

(Coverage) For any e={u,v}∈E(G)e=\{u,v\}\in E(G), there exists a pair (G,S1)∈F(\mathcal{G},S_{1})\in\mathcal{F} and an S0∈GS_{0}\in\mathcal{G} for which u∈S0,v∈S1u\in S_{0},v\in S_{1} or u∈S1,v∈S0u\in S_{1},v\in S_{0}, and

A (ζ,κ,δ)(\zeta,\kappa,\delta)-cover is said to be ss-sparse if ∑(G,S1)∈F∑S0∈G((δ(S0,S1)+κ(S0,S1))∣S0∣∣S1∣+ζ(S0,S1))≤s\sum_{(\mathcal{G},S_{1})\in\mathcal{F}}\sum_{S_{0}\in\mathcal{G}}((\delta(S_{0},S_{1})+\kappa(S_{0},S_{1}))|S_{0}||S_{1}|+\zeta(S_{0},S_{1}))\leq s. A (ζ,κ)(\zeta,\kappa)-cover is said to be ww-efficient if ∑(G,S1)∈F(∣S1∣+∑S0∈G∣S0∣)≤w\sum_{(\mathcal{G},S_{1})\in\mathcal{F}}\left(|S_{1}|+\sum_{S_{0}\in\mathcal{G}}|S_{0}|\right)\leq w. When δ=0\delta=0, we simplify notation to refer to (ζ,κ)(\zeta,\kappa)-covers instead.

Given a (ζ,κ)(\zeta,\kappa)-cover for a weighted or unweighted inner product graph, one can sparsify it using Theorem 3.6 and the sampling data structure from Proposition 7.16:

time algorithm for constructing an (1±ε)(1\pm\varepsilon)-sparsifier for GG with O(nlog⁡n/ε2)O(n\log n/\varepsilon^{2}) edges with probability at least 1−δ1-\delta.

Filling in algorithm details (the bolded parts). We start by filling in the details in the algorithm

OversamplingWithCover. First, we define ruvr_{uv} for each pair of distinct u,v∈Xu,v\in X. {u,v}\{u,v\} is a weighted edge in GG with weight wuvw_{uv}. Define

where puv(G,S1)p_{uv}^{(\mathcal{G},S_{1})} is the probability puvp_{uv} defined for the data structure D(G,S1)\mathcal{D}^{(\mathcal{G},S_{1})} in Proposition 7.16. Next, we fully describe how to sample pairs {u,v}\{u,v\} with probability proportional to ruvr_{uv}. Notice that tt can be computed in O(w)O(w) time because

can be computed in O(w)O(w) time. Sample a pair {u,v}\{u,v\} with probability equal to ruv/tr_{uv}/t as follows:

Sample a Bernoulli b∼Bernoulli(1t∑(G,S1)∈F(∑A∈Gζ(A,S1)))b\sim\text{Bernoulli}\left(\frac{1}{t}\sum_{(\mathcal{G},S_{1})\in\mathcal{F}}\left(\sum_{A\in\mathcal{G}}\zeta(A,S_{1})\right)\right).

Sample a pair (G,S1)∈F(\mathcal{G},S_{1})\in\mathcal{F} with probability proportional to ∑A∈Gζ(A,S1)\sum_{A\in\mathcal{G}}\zeta(A,S_{1}).

Sample the pair (u,v)(u,v) using the data structure D(G,S1)\mathcal{D}^{(\mathcal{G},S_{1})}.

Sample a pair (G,S1)∈F(\mathcal{G},S_{1})\in\mathcal{F} with probability proportional to ∑S0∈G∣S0∣∣S1∣(δ(S0,S1)+κ(S0,S1))\sum_{S_{0}\in\mathcal{G}}|S_{0}||S_{1}|(\delta(S_{0},S_{1})+\kappa(S_{0},S_{1})).

Sample an S0∈GS_{0}\in\mathcal{G} with probability proportional to ∣S0∣(δ(S0,S1)+κ(S0,S1))|S_{0}|(\delta(S_{0},S_{1})+\kappa(S_{0},S_{1})).

Sample (u,v)∈S0×S1(u,v)\in S_{0}\times S_{1} uniformly.

Sparsifier correctness. By the Coverage guarantee of F\mathcal{F} and the approximation guarantee for the puvp_{uv}s in Proposition 7.16, wuvReffG(u,v)≤ruvw_{uv}\mathtt{Reff}_{G}(u,v)\leq r_{uv} for all u,v∈Xu,v\in X. Therefore, Theorem 3.6 applies and shows that the graph HH returned is a (1±ε)(1\pm\varepsilon)-sparsifier for GG with probability at least 1−δ1-\delta. Spielman-Srivastava only worsens the approximation guarantee by a (1+ε)(1+\varepsilon) factor, as desired.

Number of edges in HH. It suffices to bound qq. In turn, it suffices to bound tt. Recall from above that

Let F=\textscUnweightedCover(X)\mathcal{F}=\textsc{UnweightedCover}(X) and define the functions ζ,κ\zeta,\kappa as follows: ζ(S0,S1)=3\zeta(S_{0},S_{1})=3 and κ(S0,S1)=C2(3∣S0∣+3∣S1∣)\kappa(S_{0},S_{1})=C_{2}\left(\frac{3}{|S_{0}|}+\frac{3}{|S_{1}|}\right) for any pair of sets S0,S1⊆XS_{0},S_{1}\subseteq X. Recall that C2C_{2} is defined in the statement of Proposition 7.8.

Runtime. The runtime follows immediately from the bound on the number of while loop iterations and the runtime bound on LowDiamSet from Proposition 7.8.

Coverage. For each S∈US\in\mathcal{U}, max⁡u,v∈SReffG(u,v)≤C2∣S∣\max_{u,v\in S}\mathtt{Reff}_{G}(u,v)\leq\frac{C_{2}}{|S|} by the Low effective resistance diameter guarantee of Proposition 7.8. Plugging this into Proposition 7.12 immediately shows that F\mathcal{F} is a (ζ,κ)(\zeta,\kappa)-cover for GG.

Efficiency bound. Follows immediately from the bound on ∣U∣|\mathcal{U}|.

5.2 (ζ,κ)𝜁𝜅(\zeta,\kappa)-cover for weighted IP graphs on bounded-norm vectors

Given a covers for unweighted inner product graphs, it is easy to construct covers for weighted inner product graphs on bounded norm vectors simply by removing edge weights and producing the cover. Edge weights only differ by a factor of O(d)O(d) in these two graphs, so effective resistances also differ by at most that amount. Note that the following algorithm also works for vectors with norms between zz and 2z2z for any real number zz.

Let G0G_{0} be the unweighted inner product graph on XX. Let G1G_{1} be the weighted graph GG with all edges that are not in G0G_{0} deleted. Let F\mathcal{F} be the (ζ0,κ0)(\zeta_{0},\kappa_{0})-cover given by Proposition 7.19 for G0G_{0}. Let this cover be the output of \textscBoundedCover(X)\textsc{BoundedCover}(X). It suffices to show that F\mathcal{F} is a (ζ,κ)(\zeta,\kappa)-cover for GG, where ζ=8dζ0\zeta=8d\zeta_{0} and κ=8dκ0\kappa=8d\kappa_{0}. By Rayleigh monotonicity,

for all u,v∈Xu,v\in X. Let wew_{e} denote the weight of the edge ee in G1G_{1}. For all edges ee in G1G_{1}, 1d+1≤we≤4\frac{1}{d+1}\leq w_{e}\leq 4 by the norm condition on XX. Therefore, for all u,v∈Xu,v\in X,

By the Coverage guarantee on F\mathcal{F}, there exists a pair (G,S1)(\mathcal{G},S_{1}) and an S0∈GS_{0}\in\mathcal{G} for which u∈S0,v∈S1u\in S_{0},v\in S_{1} or v∈S0,u∈S1v\in S_{0},u\in S_{1} and

By the upper bound on the edge weights for G1G_{1},

Since 4(d+1)≤8d4(d+1)\leq 8d, F\mathcal{F} is a (ζ,κ)(\zeta,\kappa)-cover for GG as well, as desired. ∎

By the previous subsection, it suffices to cover the pairs (u,v)(u,v) for which ∥u∥2∈\|u\|_{2}\in and ∥v∥2∈[z,2z]\|v\|_{2}\in[z,2z]. This can be done by clustering using LowDiamSet on the [z,2z][z,2z]-norm vectors. For each cluster S1S_{1}, let G={{u}:∀u∈X with ∥u∥2∈}\mathcal{G}=\{\{u\}:\forall u\in X\text{ with }\|u\|_{2}\in\}. This cover is sparse because of the fact that the clusters have low effective resistance diameter. It is efficient because of the small number of clusters.

Runtime. Follows immediately from the runtime bounds of LowDiamSet, BoundedCover, and the number of while loop iterations.

Coverage. Consider a pair u,v∈Xu,v\in X. We break the analysis up into cases:

Case 1: u,v∈Xlowu,v\in X_{\text{low}}. In this case, the Coverage property of \textscBoundedCover(Xlow)\textsc{BoundedCover}(X_{\text{low}}) implies that the pair (u,v)(u,v) is covered in F\mathcal{F} by Rayleigh monotonicity (since GlowG_{\text{low}} is a subgraph of GG, where GlowG_{\text{low}} is the weighted inner product graph for XlowX_{\text{low}}).

Case 2: u,v∈Xhighu,v\in X_{\text{high}}. In this case, the Coverage property of \textscBoundedCover(Xhigh)\textsc{BoundedCover}(X_{\text{high}}) implies that the pair (u,v)(u,v) is covered in F\mathcal{F} by Rayleigh monotonicity.

Case 3: u∈Xlowu\in X_{\text{low}} and v∈Xhighv\in X_{\text{high}}. Since U\mathcal{U} is a partition of XhighX_{\text{high}}, there is a unique pair (G,S1)∈F(\mathcal{G},S_{1})\in\mathcal{F} for which {u}∈G\{u\}\in\mathcal{G} and v∈S1v\in S_{1}. Let HH denote the unweighted inner product graph on XhighX_{\text{high}}. By Rayleigh monotonicity, the fact that z22d≤z2d+1≤wxy\frac{z^{2}}{2d}\leq\frac{z^{2}}{d+1}\leq w_{xy} for all {x,y}∈E(H)\{x,y\}\in E(H), and the Low effective resistance diameter guarantee of Proposition 7.8,

for any x,y∈S1x,y\in S_{1}. Since z>1z>1, wxy≤4z2w_{xy}\leq 4z^{2} for all x,y∈Xx,y\in X. Therefore,

for any x,y∈S1x,y\in S_{1}. Therefore, Proposition 7.12 implies the desired Coverage bound in this case.

Efficiency bound. We use the efficiency bounds of Proposition 7.20 along with the bound on ∣U∣|\mathcal{U}|:

5.4 (ζ,κ)𝜁𝜅(\zeta,\kappa)-cover for weighted IP graphs with polylogarithmic dependence on norm

We now apply the subroutine from the previous subsection to produce a cover for weighted inner product graphs on vectors with arbitrary norms. However, we allow the sparsity and efficiency of the cover to depend on the ratio τ\tau between the maximum and minimum norm of points in XX. To obtain this cover, we bucket vectors by norm and call TwoBoundedCover on all pairs of buckets.

Coverage. For any edge {u,v}∈E(G)\{u,v\}\in E(G), there exists a pair i,j∈{0,1,…,log⁡τ}i,j\in\{0,1,\ldots,\log\tau\} for which u,v∈Xi∪Xju,v\in X_{i}\cup X_{j}. Therefore, the Coverage property for \textscTwoBoundedCover(Xi∪Xj)\textsc{TwoBoundedCover}(X_{i}\cup X_{j}) (which is part of F\mathcal{F}) implies that the pair {u,v}\{u,v\} is covered by F\mathcal{F}.

5.5 Desired (ζ,κ,δ)𝜁𝜅𝛿(\zeta,\kappa,\delta)-cover

The second type consists of all other pairs, i.e. those with ∥v∥2>(dn)1000∥u∥2\|v\|_{2}>(dn)^{1000}\|u\|_{2}. For these pairs, we take care of them via a clustering argument. We cluster all vectors in XX into d+1d+1 clusters in a greedy fashion. Specifically, we sort vectors in decreasing order by norm and create a new cluster for a vector x∈Xx\in X if ∣⟨x,y⟩∣<1d+1∥x∥2∥y∥2|\langle x,y\rangle|<\frac{1}{d+1}\|x\|_{2}\|y\|_{2} for the first vector yy in each cluster. Otherwise, we assign xx to an arbitrary cluster for which ∣⟨x,y⟩∣≥1d+1∥x∥2∥y∥2|\langle x,y\rangle|\geq\frac{1}{d+1}\|x\|_{2}\|y\|_{2} for first cluster vector yy. We then cover the pair {u,v}\{u,v\} using the pair of sets ({u},C)(\{u\},C), where CC is the cluster containing vv. To argue that this satisfies the Coverage property, we exploit the norm condition on the pair {u,v}\{u,v\}. To bound efficiency, sparsity, and runtime, it suffices to bound the number of clusters, which is at most d+1d+1 by Proposition 7.5.

In order to define this algorithm, we use the notion of an interval family, which is exactly the same as the one-dimensional interval tree from computational geometry .

We start by defining the functions ζ,κ\zeta,\kappa, and δ\delta. Let ζi\zeta_{i} and κi\kappa_{i} denote the functions for which \textscLogCover(Yi)\textsc{LogCover}(Y_{i}) is a (ζi,κi)(\zeta_{i},\kappa_{i})-cover for the weighted inner product graph on YiY_{i}, where Yi=Xi∪Xi+1∪…∪Xi+⌈log⁡ξ⌉Y_{i}=X_{i}\cup X_{i+1}\cup\ldots\cup X_{i+\lceil\log\xi\rceil} for all i≤log⁡(dmax⁡/dmin⁡)−⌈log⁡ξ⌉i\leq\log(d_{\max}/d_{\min})-\lceil\log\xi\rceil. Let

Before proving that the required guarantees are satisfied, we bound some important quantities.

Bound on wyww_{yw} in terms of wuyw_{uy} for y∈Cwy\in C_{w} if ∥y∥2≥ξ∥u∥2\|y\|_{2}\geq\xi\|u\|_{2}. By definition of CwC_{w}, wyw≥1d+1∥y∥2∥w∥2w_{yw}\geq\frac{1}{d+1}\|y\|_{2}\|w\|_{2} for any y∈Cwy\in C_{w}. ww was the first member added to CwC_{w}, so ∥w∥2≥∥y∥2\|w\|_{2}\geq\|y\|_{2}. By the norm assumption on yy, ∥y∥2≥ξ∥u∥2\|y\|_{2}\geq\xi\|u\|_{2}. By Cauchy-Schwarz, ∥y∥2∥u∥2≥∣⟨y,u⟩∣=wuy\|y\|_{2}\|u\|_{2}\geq|\langle y,u\rangle|=w_{uy}. Therefore,

Bound on ReffG(u,w)\mathtt{Reff}_{G}(u,w) for w∈Bw\in B. We start by bounding the effective resistance between u∈Xu\in X and any w∈Bw\in B for which ∥w∥2>ξ∥u∥2\|w\|_{2}>\xi\|u\|_{2}. Recall that wxy=∣⟨x,y⟩∣w_{xy}=|\langle x,y\rangle| for any x,y∈Xx,y\in X. Consider any C∈CwC\in\mathcal{C}_{w} for which min⁡a∈C∥a∥2>ξ∥u∥2\min_{a\in C}\|a\|_{2}>\xi\|u\|_{2}. We show that

Consider all 2-edge paths of the form uu-yy-ww for y∈Cy\in C. By assumption on CC, ∥y∥2≥ξ∥u∥2\|y\|_{2}\geq\xi\|u\|_{2} for any y∈Cy\in C. Therefore, the bound on wyww_{yw} applies:

for any y∈Cy\in C. By series-parallel reductions, the uu-ww effective resistance is at most

Bound on ReffG(u,y)\mathtt{Reff}_{G}(u,y) for y∈Cy\in C. Any y∈Cy\in C has the property that ∥y∥2≥ξ∥u∥2\|y\|_{2}\geq\xi\|u\|_{2}. Therefore, for y∈Cy\in C, ReffG(y,w)≤d+1ξwuy≤1∣C∣wuy\mathtt{Reff}_{G}(y,w)\leq\frac{d+1}{\xi w_{uy}}\leq\frac{1}{|C|w_{uy}}. By the triangle inequality for effective resistance,

Coverage. For any pair {u,v}\{u,v\} for which there exists ii with u,v∈Yiu,v\in Y_{i}, {u,v}\{u,v\} is still covered by F\mathcal{F} by the Coverage property of \textscLogCover(Yi)\textsc{LogCover}(Y_{i}). Therefore, we may assume that this is not the case. Without loss of generality, suppose that ∥v∥2≥∥u∥2\|v\|_{2}\geq\|u\|_{2}. Then, by assumption, ∥v∥2≥ξ∥u∥2\|v\|_{2}\geq\xi\|u\|_{2}. By definition of the CwC_{w}s, there exists a w∈Bw\in B for which v∈Cwv\in C_{w}. By the first property of interval families, the set {x∈Cw:∥x∥2≥ξ∥u∥2}\{x\in C_{w}:\|x\|_{2}\geq\xi\|u\|_{2}\} is the disjoint union of O(log⁡n)O(\log n) sets in Cw\mathcal{C}_{w}. Let CC be the unique set among these for which v∈Cv\in C. By our effective resistance bound,

so the coverage property for the pair {u,v}\{u,v\} is satisfied within F\mathcal{F} by the pair (GC,C)(\mathcal{G}_{C},C), as desired.

Efficiency. The efficiency of F\mathcal{F} is at most the efficiency of the LogCovers and the remaining part for spread pairs. We start with the LogCovers. By Proposition 7.22,

Therefore, we just need to bound the efficiency of the remainder of F\mathcal{F}. The efficiency of F\mathcal{F} is at most

By the first property of interval families, each x∈Xx\in X is present as a singleton in at most O(log⁡n)O(\log n) GC\mathcal{G}_{C}s for CC that are a subset of a given CwC_{w}. Therefore,

Therefore, we may focus on the remaining part for spread pairs. In particular,

5.6 Proof of Lemma 7.1

Follows immediately from constructing the cover F\mathcal{F} given by Proposition 7.24 and plugging that into Proposition 7.18. ∎

Hardness of Sparsifying and Solving Non-Multiplicatively-Lipschitz Laplacians

We now define some terms to state our hardness results:

In this section, we show the following two hardness results:

Both of these results follow from the following reduction:

The reduction described starts by scaling the points in A∪BA\cup B by a factor of x0/kx_{0}/k to obtain A~\widetilde{A} and B~\widetilde{B} respectively. Then, it sparsifies the ff-graph for A~∪B~\widetilde{A}\cup\widetilde{B}. Finally, it computes the weight of the edges in the A~\widetilde{A}-B~\widetilde{B} cut. Because ff is not multiplicatively Lipschitz and the distance set for A~∪B~\widetilde{A}\cup\widetilde{B} is spaced, thresholding suffices for solving the A×BA\times B nearest neighbor problem.

Consider the following algorithm, BichromaticNearestNeighbor (Algorithm 9), given below:

We start by bounding the runtime of this algorithm. Constructing A~\widetilde{A} and B~\widetilde{B} and calculating the total weight of edges between A~\widetilde{A} and B~\widetilde{B} takes O(n)O(n) time since HH has O(n)O(n) edges. Since the sparsification algorithm is only called once, the total runtime is therefore T(n,L,d)+O(n)\mathcal{T}(n,L,d)+O(n), as desired. For the rest of the proof, we may therefore focus on correctness.

First, suppose that min⁡a∈A,b∈B∥a−b∥2≤k\min_{a\in A,b\in B}\|a-b\|_{2}\leq k. There exists a pair of points a~∈A~\widetilde{a}\in\widetilde{A}, b~∈B~\widetilde{b}\in\widetilde{B} with ∥a~−b~∥2≤x0\|\widetilde{a}-\widetilde{b}\|_{2}\leq\sqrt{x_{0}}. Since ff is a decreasing function, the edge between a~\widetilde{a} and b~\widetilde{b} in GG has weight at least f(x0)f(x_{0}), which means that the total weight of edges in the A~\widetilde{A}-B~\widetilde{B} cut in GG is at least f(x0)f(x_{0}). Since HH is a 2-approximate sparsifier for GG, the total weight of edges in the A~\widetilde{A}-B~\widetilde{B} cut is at least f(x0)/2f(x_{0})/2. This means that true\mathsf{true} is returned, as desired.

Next, suppose that min⁡a∈A,b∈B∥a−b∥2>k\min_{a\in A,b\in B}\|a-b\|_{2}>k. Since A∪BA\cup B is ρ\rho-spaced with distance set SS and k∈Sk\in S, ∥a−b∥2≥ρ⋅k\|a-b\|_{2}\geq\rho\cdot k for all a∈Aa\in A and b∈Bb\in B. Therefore, ∥a~−b~∥2≥ρ⋅x0\|\widetilde{a}-\widetilde{b}\|_{2}\geq\rho\cdot\sqrt{x_{0}} for all a~∈A~\widetilde{a}\in\widetilde{A} and b~∈B~\widetilde{b}\in\widetilde{B}.

Since ff is decreasing and not (ρ,L)(\rho,L)-multiplicatively Lipschitz, the weight of any edge between A~\widetilde{A} and B~\widetilde{B} in GG is at most

The total weight of edges between A~\widetilde{A} and B~\widetilde{B} is therefore at most

Since HH is a 2-approximate sparsifier for GG, the total weight between CC and DD is at most f(x0)/4<f(x0)/2f(x_{0})/4<f(x_{0})/2, so the algorithm returns false\mathsf{false}, as desired. ∎

-time algorithm for determining whether or not the closest pair has distance at most kk. Therefore, there is a

time on pairs of sets with nn points. But this is impossible given SETH by Theorem 3.21. This completes the result. ∎

Next, we prove hardness results for solving Laplacian systems. In these hardness results, we insist that kernels are bounded:

To prove these theorems, we use the following reduction from bichromatic nearest neighbors:

This reduction works in a similar way to the effective resistance data structure of Spielman and Srivastava [SS11], but with minor differences due to the fact that their data structure requires multiplication by incidence matrix of the graph, which in our case is dense. Our reduction uses Johnson-Lindenstrauss to embed the points

for vertices ss in the graph GG into O(log⁡n)O(\log n) dimensions in a way that distorts the distances

for vertices s,ts,t in GG by a factor of at most 2. After computing this embedding, we build an O(log⁡n)O(\log n)-approximate nearest neighbor data structure on the resulting points. This allows us to determine whether or not a vertex in AA has a high-weight edge in GG to BB in almost-constant time. After looping through all of the edges in AA in total time n1+o(1)n^{1+o(1)}, we determine whether or not there are any high-weight edges between AA and BB in GG, allowing us to answer the bichromatic nearest neighbors decision problem.

We start by proving a result that links norms of vsv_{s} to effective resistances:

In an nn-vertex graph GG with vertices ss and tt,

where third step follows from xt=xs−bst⊤LG†bstx_{t}=x_{s}-b_{st}^{\top}L_{G}^{\dagger}b_{st}.

Thus we complete the proof of the lower bound.

Upper bound. Next, we prove the upper bound. The maximum and minimum coordinates of xx are xtx_{t} and xsx_{s} respectively. By definition of the pseudoinverse, image(LG†)=image(LG)\text{image}(L_{G}^{\dagger})=\text{image}(L_{G}). Therefore, 1⊤x=0\textbf{1}^{\top}x=0, xs≤0x_{s}\leq 0, and xt≥0x_{t}\geq 0. xs≤0x_{s}\leq 0 implies that for all i∈[n]i\in[n],

xt≥0x_{t}\geq 0 implies that for all i∈[n]i\in[n],

Therefore, ∣xi∣≤bst⊤LG†bst=ReffG(s,t)|x_{i}|\leq b_{st}^{\top}L_{G}^{\dagger}b_{st}=\mathtt{Reff}_{G}(s,t) for all i∈[n]i\in[n]. Summing across i∈[n]i\in[n] yields the desired upper bound. ∎

Furthermore, the minimum effective resistance of an edge across a cut is related to the maximum weight edge across the cut:

In an mm-edge graph GG with vertex set SS,

Lower bound. The lower bound on min⁡e1/we\min_{e}1/w_{e} follows immediately from the fact that for any edge e={s,t}e=\{s,t\}, ReffG(s,t)≤re\mathtt{Reff}_{G}(s,t)\leq r_{e}.

Upper bound. For the upper bound, recall that

where the first step follows from definition of effective resistance, the third step follows from taking ww out, and the last step follows from Cauchy-Schwarz.

Since s∈Ss\in S and t∉St\notin S, ∑e∈∂S∣fe∣≥1\sum_{e\in\partial S}|f_{e}|\geq 1. Therefore,

∥zi−z~i∥LG≤0.01n−12wmin⁡2wmax⁡−2∥zi∥LG\|z_{i}-\widetilde{z}_{i}\|_{L_{G}}\leq 0.01n^{-12}w_{\min}^{2}w_{\max}^{-2}\|z_{i}\|_{L_{G}} for all i∈[k]i\in[k], where wmin⁡w_{\min} and wmax⁡w_{\max} are the minimum and maximum weights of edges in GG respectively

(1−ε/10)⋅∥LG†bst∥2≤∥Zbst∥2≤(1+ε/10)⋅∥LG†bst∥(1-\varepsilon/10)\cdot\|L_{G}^{\dagger}b_{st}\|_{2}\leq\|Zb_{st}\|_{2}\leq(1+\varepsilon/10)\cdot\|L_{G}^{\dagger}b_{st}\| for any vertices s,ts,t in GG

where the last step from property 1 in proposition statement.

By the upper bound on ∥Zbs′t′∥2\|Zb_{s^{\prime}t^{\prime}}\|_{2} for any vertices s′,t′s^{\prime},t^{\prime} in GG, (zi⊤be)2≤(1+ε)2be⊤(LG†)2be(z_{i}^{\top}b_{e})^{2}\leq(1+\varepsilon)^{2}b_{e}^{\top}(L_{G}^{\dagger})^{2}b_{e} for all edges ee in GG, so

where the first step follows from ∥zi∥LG2=∑e∈Ezi⊤webebe⊤zi\|z_{i}\|_{L_{G}}^{2}=\sum_{e\in E}z_{i}^{\top}w_{e}b_{e}b_{e}^{\top}z_{i}, the second step follows from wmax⁡=max⁡e∈Gwew_{\max}=\max_{e\in G}w_{e}, and the third step follows from (zi⊤be)2≤(1+ε)2be⊤(LG†)be(z_{i}^{\top}b_{e})^{2}\leq(1+\varepsilon)^{2}b_{e}^{\top}(L_{G}^{\dagger})b_{e}, the forth step follows from summation has at most n2n^{2} terms, the last step follows from (1+ε)2≤4(1+\varepsilon)^{2}\leq 4, ∀ε∈(0,1)\forall\varepsilon\in(0,1).

LG†beL_{G}^{\dagger}b_{e} is a vector that is maximized and minimized at the endpoints of ee. Furthermore, 1∈kernel(LG†)\textbf{1}\in\text{kernel}(L_{G}^{\dagger}) by definition of the pseudoinverse. Thus, we know LG†beL_{G}^{\dagger}b_{e} has both positive and negative coordinates and that ∥LG†be∥∞≤max⁡i≠j∣(LG†be)i−(LG†be)j∣≤be⊤LG†be\|L_{G}^{\dagger}b_{e}\|_{\infty}\leq\max_{i\neq j}|(L_{G}^{\dagger}b_{e})_{i}-(L_{G}^{\dagger}b_{e})_{j}|\leq b_{e}^{\top}L_{G}^{\dagger}b_{e} .

where the first step follows from max⁡e∈E(G)be⊤(LG†)2be=max⁡e∈E∥LG†be∥22≤nmax⁡e∈E∥LG†be∥∞2≤nmax⁡e∈E(G)(be⊤LG†be)2\max_{e\in E(G)}b_{e}^{\top}(L_{G}^{\dagger})^{2}b_{e}=\max_{e\in E}\|L_{G}^{\dagger}b_{e}\|_{2}^{2}\leq n\max_{e\in E}\|L_{G}^{\dagger}b_{e}\|_{\infty}^{2}\leq n\max_{e\in E(G)}(b_{e}^{\top}L_{G}^{\dagger}b_{e})^{2}, the second step follows from max⁡e(be⊤LG†be)2≤wmin⁡−2\max_{e}(b_{e}^{\top}L_{G}^{\dagger}b_{e})^{2}\leq w_{\min}^{-2} (the lower bound in Proposition 8.10), and the third step follows from wmax⁡−2≤n4(bstLG†bst)2w_{\max}^{-2}\leq n^{4}(b_{st}L_{G}^{\dagger}b_{st})^{2} (the upper bound in Proposition 8.10), and the last step follows from (bst⊤LG†bst)2≤2∥LG†bst∥22(b_{st}^{\top}L_{G}^{\dagger}b_{st})^{2}\leq 2\|L_{G}^{\dagger}b_{st}\|_{2}^{2} (Since LG†bstL_{G}^{\dagger}b_{st} is maximized and minimized at tt and ss respectively).

Summing over all ii and using the fact that k≤nk\leq n, ε>1/n\varepsilon>1/n, and wmin⁡≤wmax⁡w_{\min}\leq w_{\max} shows that

Combining this with the given upper and lower bounds on ∥Zbst∥2\|Zb_{st}\|_{2} using the triangle inequality yields the desired result. ∎

Consider the following algorithm BichromaticNearestNeighbor, given below:

First, we bound the runtime of BichromaticNearestNeighborProj (Algorithm 10). Computing the sets C,DC,D and the matrix PP trivially takes O~(n)\widetilde{O}(n) time. Computing the matrix Z~\widetilde{Z} takes

time since the point set C∪DC\cup D is ∣S∣O(1)|S|^{O(1)}-boxed. Computing C^\widehat{C} and D^\widehat{D} takes O~(n)\widetilde{O}(n) time, as computing Z^bi\widehat{Z}b_{i} takes O(log⁡n)O(\log n) time for each i∈C∪Di\in C\cup D since bib_{i} is supported on just one vertex. Computing tt takes n1+o(1)n^{1+o(1)} time by Theorem 3.17. In particular, one computes tt by preprocessing a O(log⁡n)O(\log n)-approximate nearest neighbors data structure on D^\widehat{D} (takes n1+o(1)n^{1+o(1)} time), queries the data structure on all points in C^\widehat{C} (takes n(no(1))=n1+o(1)n(n^{o(1)})=n^{1+o(1)} time), and returns the minimum of all of the queries. The subsequent if statement takes constant time. Therefore, the reduction takes

Next, suppose that there exists a∈Aa\in A and b∈Bb\in B for which ∥a−b∥2≤k\|a-b\|_{2}\leq k. We show that the reduction returns true\mathsf{true} with probability at least 1−1/n1-1/n. Let GG denote the ff-graph on C∪DC\cup D. By definition of CC and DD and the fact that ff is decreasing, there exists a pair of points in CC and DD with edge weight at least f(x0)f(x_{0}).

This means that there exists of vectors a∈C^,b∈D^a\in\widehat{C},b\in\widehat{D} with

By the approximation guarantee of the nearest neighbors data structure, t≤(3n/f(x0))log⁡nt\leq(3\sqrt{n}/f(x_{0}))\log n and the reduction returns true\mathsf{true} with probability at least 1−1/n1-1/n, as desired.

Next, suppose that there do not exist a∈Aa\in A and b∈Bb\in B for which ∥a−b∥2≤k\|a-b\|_{2}\leq k. We show that the reduction returns false\mathsf{false} with probability at least 1−1/n1-1/n. Since k∈Sk\in S and A∪BA\cup B is ρ\rho-spaced, ∥a−b∥2≥ρ⋅k\|a-b\|_{2}\geq\rho\cdot k for all a∈Aa\in A and b∈Bb\in B. Therefore, all edges between CC and DD in the ff-graph GG for C∪DC\cup D have weight at most f(ρx0)≤f(x0)100n16f(\rho x_{0})\leq\frac{f(x_{0})}{100n^{16}} since ff is not (ρ,L)(\rho,L)-multiplicatively Lipschitz.

for any pair of vertices s∈C,t∈Ds\in C,t\in D.

Recall from the discussion of the ∥a−b∥≤k\|a-b\|\leq k case that Theorem 3.14 and Proposition 8.11 apply. Therefore, with probability at least 1−1/n1-1/n, by the lower bound of Proposition 8.11,

Therefore, by the approximate nearest neighbors guarantee,

so the algorithm returns false\mathsf{false} with probability at least 1−1/n1-1/n, as desired. ∎

-time algorithm for determining whether or not the closest pair has distance at most kk. Therefore, there is a

time on pairs of sets with nn points. But this is impossible given SETH by Theorem 3.21. This completes the result. ∎

Fast Multipole Method

The fast multipole method (FMM) was described as one of the top-10 most important algorithms of the 20th century [DS00]. It is a numerical technique that was developed to speed up calculations of long-range forces in the nn-body problem in physics. In 1987, FMM was first introduced by Greengard and Rokhlin [GR87], based on the multipole expansion of the vector Helmholtz equation. By treating the interactions between far-away basis functions using the FMM, the corresponding matrix elements do not need to be explicitly computed or stored. This is technique allows us to improve the naive O(n2)O(n^{2}) matrix-vector multiplication time to o(n2)o(n^{2}).

Since Greengard and Rokhlin invented FMM, the topic has attracted researchers from many different fields, including physics, math, and computer science [GR87, Gre88, GR88, GR89, Gre90, GS91, EMRV92, Gre94, GR96, BG97, Dar00, YDGD03, YDD04, Mar12].

We first give a quick overview of the high-level ideas of FMM in Section 9.1. In Section 9.2, we provide a complete description and proof of correctness for the fast Gaussian transform, where the kernel function is the Gaussian kernel. Although a number of researchers have used FMM in the past, most of the previous papers about FMM either focus on the low-dimensional or low-error cases. We therefore focus on the superconstant-error, high dimensional case, and carefully analyze the joint dependence on ε\varepsilon and dd. We believe that our presentation of the original proof in Section 9.2 is thus of independent interest to the community. In Section 9.4, we give the analogous results for other kernel functions used in this paper.

Intuitively, if K\mathsf{K} has some nice property (e.g. smooth), we can hope to approximate K\mathsf{K} in the following sense

where PP is a small positive integer, usually called the interaction rank in the literature.

Now, we can construct uiu_{i} in two steps:

Intuitively, as long as B{\cal B} and C{\cal C} are well-separated, then u~j\widetilde{u}_{j} is very good estimation to uju_{j} even for small PP, i.e., ∣u~j−uj∣<ε|\widetilde{u}_{j}-u_{j}|<\varepsilon.

Recall that, at the beginning of this section, we assumed that all the sources are in the the same box B{\cal B} and C{\cal C}. This is not true in general. To deal with this, we can discretize the continuous space into a batch of boxes B1,B2,⋯{\cal B}_{1},{\cal B}_{2},\cdots and C1,C2,⋯{\cal C}_{1},{\cal C}_{2},\cdots. For a box Bl1{\cal B}_{l_{1}} and a box Cl2{\cal C}_{l_{2}}, if they are very far apart, then the interaction between points within them is small, and we can ignore it. If the two boxes are close, then we deal wit them efficiently by truncating the high order expansion terms in K\mathsf{K} (only keeping the first log⁡O(d)(1/ε)\log^{O(d)}(1/\varepsilon)). For each box, we will see that the number of nearby relevant boxes is at most log⁡O(d)(1/ε)\log^{O(d)}(1/\varepsilon).

for i∈[M]i\in[M] in O(M+N)O(M+N) time. In this section, we re-prove the algorithm described in [GS91], and determine the exact dependences on ε\varepsilon and dd in the running time.

By shifting the origin and rescaling δ\delta, we can assume that the sources sjs_{j} and targets tit_{i} all lie in the unit box B0=d{\cal B}_{0}=^{d}.

We use the following Fact to simplify e−(t−s)2/δe^{-(t-s)^{2}/\delta}.

Using Cramer’s inequality, we have the following standard bound.

It is easy to see that Hα(t)=e−∥t∥22⋅H~α(t)H_{\alpha}(t)=e^{-\|t\|_{2}^{2}}\cdot\widetilde{H}_{\alpha}(t)

Let B{\cal B} denote a box with center sBs_{\cal B} and side length r2δr\sqrt{2\delta} with r<1r<1. If source sjs_{j} is in box B{\cal B}, we say j∈Bj\in{\cal B}. Then the Gaussian evaluation from the sources in box B{\cal B} is,

where the coefficients AαA_{\alpha} are defined by

The rest of this section will present a batch of Lemmas that bound the error of the function truncated at certain degree of Taylor and Hermite expansion.

Using Eq. (4) to expand each Gaussian (see Definition 9.8) in the

and swap the summation over α\alpha and jj to obtain

The truncation error bound follows from Cramer’s inequality (Lemma 9.7) and the formula for the tail of a geometric series.

The next Lemma shows how to convert a Hermite expansion about sBs_{\cal B} into a Taylor expansion about tCt_{\cal C}. The Taylor series converges rapidly in a box of side length r2δr\sqrt{2\delta} about tCt_{\cal C}, where r<1r<1.

has the following Taylor expansion, at an arbitrary point t0t_{0} :

where the coefficients BβB_{\beta} are defined as

Each Hermite function in Eq. (6) can be expanded into a Taylor series by means of Eq. (5). The expansion in Eq. (8) is obtained by swapping the order of summation.

The truncation error bound can be proved as follows. Using Eq. (7) for AαA_{\alpha}, we can rewrite BβB_{\beta}:

By Eq. (5), the inner sum is the Taylor expansion of Hβ((sj−tC)/δ)H_{\beta}((s_{j}-t_{\cal C})/\sqrt{\delta}). Thus

The truncation error follows from summation the tail of a geometric series. ∎

For the purpose of designing our algorithm, we’d like to make a variant of Lemma 9.10 in which the Hermite series is truncated before converting it to a Taylor series. This means that in addition to truncating the Taylor series itself, we are also truncating the finite sum formula in Eq. (9) for the coefficients.

Let G(t)G(t) be defined as Def 9.8. For an integer pp, let Gp(t)G_{p}(t) denote the Hermite expansion of G(t)G(t) truncated at pp,

The function Gp(t)G_{p}(t) has the following Taylor expansion about an arbitrary point t0t_{0}:

where the the coefficients CβC_{\beta} are defined as

where K′≤2KK^{\prime}\leq 2K and r≤1/2r\leq 1/2.

We can write CβC_{\beta} in the following way:

Using Lemma 9.10, we can upper bound the first term in the Eq. (11) by,

To bound the second term in Eq. (11), we can do the following

Finally, the proof is complete since we know that

The proof of the following Lemma is almost identical. We omit the details here.

has the following Taylor expansion at tCt_{\cal C}

where the coefficients BβB_{\beta} is defined as

and the error in truncation after pdp^{d} terms is

2.2 Algorithm

The algorithm is based on subdividing B0B_{0} into smaller boxes with sides of length r2δr\sqrt{2\delta} parallel to the axes, for a fixed r≤1/2r\leq 1/2. We can then assign each source sjs_{j} to the box B{\cal B} in which it lies and each target tt, to the box C{\cal C} in which it lies.

For each target box C{\cal C}, we need to evaluate the total field due to sources in all boxes. Since boxed B{\cal B} have side lengths r2δr\sqrt{2\delta}, only a fixed number of source boxes B{\cal B} can contribute more than QεQ\varepsilon to the field in a given target box C{\cal C}, where Q=∥q∥1Q=\|q\|_{1} and ε\varepsilon is the precision parameter. If we cut off the sum over all B{\cal B} after including the (2k+1)d(2k+1)^{d} nearest boxes to C{\cal C}, it incurs an error which can be upper bounded as follows

where the first step follows from ∥⋅∥2≥∥⋅∥∞\|\cdot\|_{2}\geq\|\cdot\|_{\infty}, the second step follows from ∥t−sj∥∞≥kr2δ\|t-s_{j}\|_{\infty}\geq kr\sqrt{2\delta}, and the last step follows from a straightforward calculation.

For a box B{\cal B} and a box C{\cal C}, there are several possible ways to evaluate the interaction between B{\cal B} and C{\cal C}. We mainly need the following three techniques:

NBN_{\cal B} Gaussians, accumulated in Taylor series via definition BβB_{\beta} in Lemma 9.12

Hermite series, accumulated in Taylor series in Lemma 9.11

Essentially, having any two of the above three techniques is sufficient to give an algorithm that runs in (M+N)log⁡O(d)(∥q∥1/ε)(M+N)\log^{O(d)}(\|q\|_{1}/\varepsilon) time.

In the next a few paragraphs, we explain the details of the three techniques.

Consider a fixed source box B{\cal B}. For each target box C{\cal C} within range, we must compute pdp^{d} Taylor series coefficients

Each coefficient requires O(NB)O(N_{\cal B}) work to evaluate, resulting in a net cost O(pdNB)O(p^{d}N_{\cal B}). Since there are at most (2k+1)d(2k+1)^{d} boxes within range, the total work for forming all the Taylor series is O((2k+1)dpdN)O((2k+1)^{d}p^{d}N). Now, for each target tit_{i}, one must evaluate the pdp^{d}-term Taylor series corresponding to the box in which tit_{i} lies. The total running time of algorithm is thus

We form a Hermite series for each box B{\cal B} and evaluate it at all targets. Using Lemma 9.9, we can rewrite G(t)G(t) as

To compute each Aα(B)A_{\alpha}({\cal B}) costs O(NB)O(N_{\cal B}) time, so forming all the Hermite expansions takes O(pdN)O(p^{d}N) time. Evaluating at most (2k+1)d(2k+1)^{d} expansions at each target tit_{i} costs O((2k+1)dpd)O((2k+1)^{d}p^{d}) time per target, so this approach takes

Let N(B)N(B) denote the number of boxes. Note that N(B)≤min⁡((r2δ)−d/2,M)N(B)\leq\min((r\sqrt{2\delta})^{-d/2},M).

Suppose we accumulate all sources into truncated Hermite expansions and transform all Hermite expansions into Taylor expansions via Lemma 9.11. Then we can approximate the function G(t)G(t) by

and the coefficients Aα(B)A_{\alpha}({\cal B}) are defined as Eq. (13). Recall in Part 2, it takes O(pdN)O(p^{d}N) time to compute all the Hermite expansions, i.e., to compute the coefficients Aα(B)A_{\alpha}({\cal B}) for all α≤p\alpha\leq p and all sources boxes B{\cal B}.

Making use of the large product in the definition of Hα+βH_{\alpha+\beta}, we see that the time to compute the pdp^{d} coefficients of CβC_{\beta} is only O(dpd+1)O(dp^{d+1}) for each box B{\cal B} in the range. Thus, we know for each target box C{\cal C}, the running time is

Finally we need to evaluate the appropriate Taylor series for each target tit_{i}, which can be done in O(pdM)O(p^{d}M) time. Putting it all together, this technique 3 takes time

2.3 Result

Finally, in order to get ε\varepsilon additive error for each coordinate, we will choose k=O(log⁡(∥q∥1/ε))k=O(\log(\|q\|_{1}/\varepsilon)) and p=O(log⁡(∥q∥1/ε))p=O(\log(\|q\|_{1}/\varepsilon)).

time, and outputs MM numbers x1,⋯ ,xMx_{1},\cdots,x_{M} such that for each j∈[M]j\in[M]

The proof of fast Gaussian transform also implies a result for the online version:

3 Generalization

The fast multipole method described in the previous section works not only for the Gaussian kernel, but also for K(u,v)=f(∥u,v∥22)\mathsf{K}(u,v)=f(\|u,v\|_{2}^{2}) for many other functions ff. As long as ff has the following properties, the result of Theorem 9.13 also holds for ff:

ff is non-increasing, i.e., if x≥y≥0x\geq y\geq 0, then f(x)≤f(y)f(x)\leq f(y).

ff is decreasing fast, i.e., for any ε∈(0,1)\varepsilon\in(0,1), we have f(Θ(log⁡(1/ε)))≤εf(\Theta(\log(1/\varepsilon)))\leq\varepsilon.

ff’s Hermite expansion and Taylor expansions are truncateable: If we only keep log⁡d(1/ε)\log^{d}(1/\varepsilon) terms of the polynomial for K\mathsf{K}, then the error is at most ε\varepsilon.

Let us now sketch how each of these properties is used in discritizing the continuous domain into a finite number of boxes. First, note that Eq.(9.2.2) holds more generally for any function ff with these properties. Indeed, we can bound the error as follows (note that Q=∥q∥1Q=\|q\|_{1}):

where the first step follows from ∥⋅∥2≥∥⋅∥∞\|\cdot\|_{2}\geq\|\cdot\|_{\infty} and that ff is non-increasing, the second step follows from ∥t−sj∥∞≥kr2δ\|t-s_{j}\|_{\infty}\geq kr\sqrt{2\delta} and that ff is non-increasing, and the last step follows from the fact that ff is decreasing fast, and choosing k=O(log⁡(Q/ε)/r)k=O(\log(Q/\varepsilon)/r).

We next give an example of how the truncatable expansions property is used. Here we only show to generalize Definition 9.8 to Definition 9.15 and generalize Lemma 9.9 to Definition 9.16; the other Lemmas in the proof can be extended in a similar way.

Let B{\cal B} denote a box with center sBs_{\cal B} and side length r2δr\sqrt{2\delta} with r<1r<1. If source sjs_{j} is in box B{\cal B}, we say j∈Bj\in{\cal B}. Then the Gaussian evaluation from the sources in box B{\cal B} is,

where the coefficients AαA_{\alpha} are defined by

We say ff is Hermite truncateable, if Then we have

Similar ideas yield the following algorithm:

Neural Tangent Kernel

In this section, we show that the popular Neural Tangent Kernel K\mathsf{K} from theoretical Deep Learning can be rearranged into the form K(x,y)=f(∥x−y∥22)\mathsf{K}(x,y)=f(\|x-y\|_{2}^{2}) for an appropriate analytic function ff, so our results in this paper apply to it. We first define the kernel.

In the literature of convergence results for deep neural networks [LL18, DZPS19, AZLS19b, AZLS19a, SY19, BPSW21, LSS+20], it is natural to assume that all the data points are on the unit sphere, i.e., for all i∈[n]i\in[n] we have ∥xi∥2=1\|x_{i}\|_{2}=1 and datas are separable i.e., for all i≠ji\neq j, ∥xi−xj∥2≥δ\|x_{i}-x_{j}\|_{2}\geq\delta. One of the most standard and common used activation functions in neural network training is ReLU activation, which is σ(x)=max⁡{x,0}\sigma(x)=\max\{x,0\}. Using Lemma 10.2, we can figure out the corresponding kernel function. By Theorem 5.14, the multiplication task for neural tangent kernels is hard. In neural network training, the multiplication can potentially being used to speed the neural network training procedure(See [SY19]).

In the following lemma, we compute the kernel function for ReLU activation function.

If σ(x)=max⁡{x,0}\sigma(x)=\max\{x,0\}, then the Neural Tangent Kernel can be written as K(x,y)=f(∥x−y∥22)\mathsf{K}(x,y)=f(\|x-y\|_{2}^{2}) for

First, since ∥xi∥2=∥xj∥2\|x_{i}\|_{2}=\|x_{j}\|_{2}, we know that

Using properties of the Gaussian distribution N(0,Id){\cal N}(0,I_{d}), we have

We can rewrite Ki,j\mathsf{K}_{i,j} as follows:

Note that w∼N(0,Id)w\sim\mathcal{N}(0,I_{d}), so we know (xi⊤w,xj⊤w)∼N(0,Σi,j)(x_{i}^{\top}w,x_{j}^{\top}w)\sim\mathcal{N}(0,\Sigma_{i,j}), where the covariance matrix

since ∥xi∥2=∥xj∥2=1\|x_{i}\|_{2}=\|x_{j}\|_{2}=1. Thus,

Note xi⊤xj=−12∥xi−xj∥2+1x_{i}^{\top}x_{j}=-\frac{1}{2}\|x_{i}-x_{j}\|^{2}+1, so K(xi,xj)=f(∥xi−xj∥22)\mathsf{K}(x_{i},x_{j})=f(\|x_{i}-x_{j}\|_{2}^{2}) for some function ff, which completes the proof. ∎

References