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].
-body simulation (one step): For each , make a weighted graph on the points in , in which the weight of the edge between the points in is , where is the gravitational constant and is the mass of the point . Let denote the weighted adjacency matrix of . Then is the vector of th coordinates of force vectors. In particular, gravitational force can be computed by doing adjacency matrix-vector multiplications, where each adjacency matrix is that of the -graph on for some .
Spectral clustering: Make a graph on . In applications, , where is often chosen to be [vL07, NJW02]. Instead of directly running a spectral clustering algorithm on , one popular method is to construct a sparse matrix approximating and run spectral clustering on 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 is a spectral sparsifier of , it has been suggested that spectral clustering with the top eigenvectors of performs just as well in practice as spectral clustering with the top eigenvectors of [CFH16]. One justification is that since is a spectral sparsifier of , the eigenvalues of are at most a constant factor larger than those of , so cuts with similar conductance guarantees are produced. Moreover, spectral clustering using sparse matrices like is known to be faster than spectral clustering on dense matrices like [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 and then using near-linear time algorithms [SS11, CKM+14] to multiply, sparsify, and solve systems. However, this requires a minimum of time, as 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 and (b) dimensions there is a much faster, -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 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 , including .
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 (-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 and the accuracy for which algorithms are possible (part (b)). Define , a measure of the ‘diameter’ of the point set and , as
It is helpful to have the following two questions in mind when reading our results:
(Low-dimensional algorithms, e.g. ) Is there an algorithm which runs in time for multiplication and Laplacian solving? Is there a sparsification algorithm which runs in time when ?
We will see that there are many important functions for which there are such efficient low-dimensional algorithms, but no such efficient high-dimensional algorithms. In other words, these functions suffer from the classic ‘curse of dimensionality.’ At the same time, other functions 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 for which our results hold, but afterwards in Section 1.4 we summarize the results for a few particular functions of interest. The main goal of our results is as follows:
Goal: For each problem of interest (part (c)) and dimension (part (b)), find a natural parameter associated with the function for which the following dichotomy holds:
If is high, then the problem cannot be solved in subquadratic time assuming on points in dimension .
If is low, then the problem of interest can be solved in almost-linear time ( time) on points in dimension .
As we will see shortly, the two parameters which will characterize the difficulties of our problems of interest in most settings are the approximate degree of , and a parameter related to how multiplicatively Lipschitz is. We define both of these in the next section.
If can be -additively-approximated by a polynomial of degree at most , then the problem can be solved in time.
Otherwise, assuming , the problem requires time .
The same holds for , the Laplacian matrix of , replaced by , the adjacency matrix of .
While Theorem 1.1 yields a parameter 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 has a single point with large -th derivative, then the problem requires time assuming . The Strong Exponential Time Hypothesis () 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 , the curse of dimensionality is inherent in performing adjacency matrix-vector multiplication. In particular, we directly apply this result to the -body problem discussed at the beginning:
Assuming , in dimension one step of the -body problem requires time .
The fast multipole method of Greengard and Rokhlin [GR87, GR89] solves one step of this -body problem in time . Our Corollary 1.2 shows that assuming , such an exponential dependence on 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 , as well.
1.2 Sparsification
This Theorem applies even when . When is constant, the running time simplifies to . This covers the case when is any rational function with non-negative coefficients, like or .
It may seem more natural to instead define -multiplicatively Lipschitz functions, without the parameter , as functions with for all and . Indeed, an -multiplicatively Lipschitz function is also -multiplicative Lipschitz for any , so our results show that efficient sparsification is possible for such functions. However, the parameter is necessary to characterize when efficient sparsification is possible. Indeed, as in Theorem 1.3 above, it is sufficient for to be -multiplicative Lipschitz for a that is bounded away from 1. To complement this result, we also show a lower bound for sparsification for any function which is not -multiplicatively Lipschitz for any and sufficiently large :
For example, when for some constant , Theorem 1.4 shows that there is a for which, whenever is not -multiplicatively Lipschitz, the sparsification problem cannot be solved in time assuming .
Bounding in terms of above is important. For example, if is small enough that , then could be close to constant. Such -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 versus 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 graph can be efficiently sparsified, then there is an efficient Laplacian multiplier for graphs if and only if there is an efficient Laplacian system solver for 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 . Next, we state our second hardness result:
This yields a quadratic time hardness result when . By comparison, the first hardness result, Corollary 1.7, only applied for . 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 .
2 Our Techniques
We begin by showing a simple, generic equivalence between and for any : 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 .
We use two primary algorithmic tools: the Fast Multipole Method (FMM), and a ‘kernel method’ for approximating by a low-rank matrix.
FMM is an algorithmic technique for computing aggregate interactions between bodies which has applications in many different areas of science. Indeed, when the interactions between bodies is described by our function , then the problem solved by FMM coincides with our problem.
Most past work on FMM either considers the low-dimensional case, in which is a small constant, or else the low-error case, in which is a constant. Thus, much of the literature does not consider the simultaneous running time dependence of FMM on and . In order to solve , 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 , 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 can be approximated by a sufficiently low-degree polynomial (e.g. any degree suffices in dimension ), then we can quickly find a low-rank approximation of the adjacency matrix , 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 implies that time is required for .
The simplest way to show that 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 gives a good approximation to . 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 , including that 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 for many functions in high enough dimensions (typically ), assuming . Although 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 is useful for solving nearest neighbor search problems.
Similarly, for any nonnegative reals , we can take an appropriate affine transformation of so that an algorithm for can estimate
The main tool we need for this approach is a way to pick for a function which cannot be approximated by a low degree polynomial so that has large determinant. We do this by decomposing in terms of the derivatives of using the Cauchy-Binet formula, and then noting that if 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 -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 like . 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 . 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 matrix to preprocess, then afterwards one is given a stream of length- vectors, and for each , one must output before being given . The OMV Conjecture posits that one cannot solve this problem in total time for a general matrix . At first glance, our lower bound may seem to have implications for the OMV Conjecture: For some kernels , our lower bound shows that for an input set of points and corresponding adjacency matrix , and input vector , there is no algorithm running in time for multiplying , so perhaps multiplying by vectors cannot be done in time . However, this is not necessarily the case, since the OMV problem allows time for preprocessing , which our lower bound does not incorporate. More broadly, the matrices 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 , when is a 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 dimensions. This preserves all pairs distance, with a distortion of at most . Then, using a -well-separated pair decomposition partitions the set of projected distances into bicliques, such that each biclique has edges that are no more than 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 -graph. Each biclique in the set of projected distances has a one-to-one correspondence to a biclique in the original -graph. Thus to sparsify our -graph, we sparsify each biclique in the -graph by uniform sampling, and take the union of the resulting sparsified bicliques. Due to the -Lipschitz nature of our function, it is guaranteed that the longest edge in any biclique (measured using ) is at most . This upper bounds the maximum leverage score of an edge in this biclique with respect to the -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 is constant, we get almost linear time sparsification algorithms.
For low dimensional sparsification, we skip the Johnson Lindenstrauss step, and use a -well separated pair decomposition. This gives us a nearly linear time algorithm for sparsifying multiplicative Lipschitz functions, when is small, which covers the case when is constant and . See Theorem 6.9 for details.
To prove lower bounds on sparsification for decreasing functions that are not -multiplicatively Lipschitz, we reduce from exact bichromatic nearest neighbors on two sets of points and . In high dimensions, nearest neighbors is hard even for Hamming distance [Rub18], so we may assume that . In low dimensions, we may assume that the coordinates of points in and consist of integers on at most bits. In both cases, the set of possible distances between points in and is discrete. We take advantage of the discrete nature of these distance sets to prove a lower bound. In particular, is set so that is the smallest ratio between any two possible distances between points in and . To see this in more detail, see Lemma 8.4.
Let be a point at which the function is not -multiplicatively Lipschitz and suppose that we want to solve the decision problem of determining whether or not . We can do this using sparsification by scaling the points in and by a factor of , sparsifying the -graph on the resulting points, and thresholding based on the total weight of the resulting - cut. If there is a pair with distance at most , there is an edge crossing the cut with weight at least because is a decreasing function. Therefore, the sparsifier has total weight at least crossing the - cut by the cut sparsification approximation guarantee. If there is not a pair with distance at most , no edges crossing the cut with weight larger than by choice of . Therefore, the total weight of the - cut is at most , which means that it is at most 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 in each of these settings. In all high-dimensional settings, we have found a definition of that characterizes the complexity of the problem. In some low-dimensional settings, we do not know of a suitable definition for and leave this as an open problem. For simplicity, we focus here only on decreasing functions , although all of our algorithms, and most of our hardness results, hold for more general functions as well.
High dimensions: is the minimum degree of any polynomial that -additively approximates . implies subquadratic-time hardness (Theorem 1.1 part 2), while 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, is the minimum value for which is -multiplicatively Lipschitz, where for some constant independent of .
High dimensions: If and is nonincreasing, then no subquadratic time algorithm exists (Theorem 1.4). If , then an almost-linear time algorithm for sparsification exists (Theorem 1.3).
Low dimensions: There is some constant such that if and is nonincreasing, then no subquadratic time algorithm exists (Theorem 2.5).If , then there is a subquadratic time algorithm (Theorem 2.4).
High dimensions: is the maximum of the values in the Adjacency matrix-vector multiplication and Sparsification settings, with hardness occurring for decreasing functions if (Corollary 1.7 combined with Theorem 1.8) and an algorithm existing when (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 such that if is nonincreasing and where 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 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) values for natural functions are often either very low or very high. For example, for all problems for the Gaussian kernel (), while for sparsification and for multiplication for the gravitational potential (). Resolving the gap may also be difficult, as for intermediate values of , the true best running time is likely an intermediate running time of for some constant . 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 given below, make the -graph, where :
for a positive integer constant .
for a negative constant or a positive non-integer constant .
if and if for some parameter (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 time, is the exponent of matrix multiplication [AW21]. The solver can run faster when matrix 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 can be estimated in time which depends only polynomially on the dimension , but which depends polynomially on the error . We are unfortunately unable to use their algorithms in our setting, where we need to solve with , 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 , but often have exponential dependences on .
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 , 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 -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 exist; such algorithms can still be efficient in low dimensions .
The prior work on the fast multipole method [GR87, GR88, GR89] yields algorithms with runtime for -approximate adjacency matrix-vector multiplication for a number of functions , including when for a constant and when . In order to explain what functions the fast multipole methods work well for, and to clarify dependencies on 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 ; 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 Here, denotes the very slowly growing iterated logarithm of ., 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 in nearly constant dimensions. By comparison, we are able to sparsify for this function , even in very high 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 be a -multiplicatively Lipschitz function and let . Then an -spectral sparsifier for the -graph on points can be found in time.
Thus, geometric graphs for piecewise exponential functions with can be sparsified in almost-linear time when is constant, unlike in the case when . In particular, spectral clustering can be done in time for clusters in low dimensions. Unfortunately, not all geometric graphs can be sparsified, even in nearly constant dimensions:
There are constants and a value given for which any decreasing function that is not -multiplicatively Lipschitz does not have an time sparsification algorithm for -graphs on dimensional points, where .
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 .
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 , including most kernel functions of interest in applications. We prove most of these using the aforementioned connection from Section 4: if a graph can be efficiently sparsified, then there is an efficient Laplacian multiplier for graphs if and only if there is an efficient Laplacian system solver for graphs.
For the kernels for constants 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 -graphs for yields an almost-linear time algorithm for -adjacency multiplication. However, no such algorithm exists assuming by Theorem 2.3 above. Therefore, 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 , we write to denote . In addition to notation, for two functions , we use the shorthand (resp. ) to indicate that (resp. ) for an absolute constant . We use to mean for constants .
For a matrix , we use to denote the spectral norm of . Let denote the transpose of . Let denote the Moore-Penrose pseudoinverse of . Let denote the inverse of a full rank square matrix.
We use to denote the Gravitational constant.
We define slightly differently in different sections. Note that both are less than the value of 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 is defined as
Using effective resistance, we can define leverage score
The leverage score of an edge is defined as
We define a useful notation called electrical flow
We let denote the degree of vertex . For any set , we define volume of : . It is obvious that . For any two sets , let be the set of edges connecting a vertex in with a vertex in . We call to be the conductance of a set of vertices , 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 is defined as follows:
A graph with minimum conductance has the property that for every pair of vertices ,
where is the sum of the weights of edges incident with . Furthermore, for every pair of vertices ,
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 with edge weights and probabilities assigned to each edge and parameters . Generate a reweighted subgraph of with edges, with each edge sampled with probability and added to with weight , where . If
, where is a sufficiently large constant
for all edges in
then with probability at least .
There is a time algorithm which on input and with computes a matrix such that with probability at least ,
The following is an immediate corollary of Theorems 3.6 and 3.7:
There is a time algorithm which on input and with , produces an -approximate sparsifier for .
4 Woodbury Identity
where and all denote matrices of the correct (conformable) sizes: For integers and , is , is , is and is .
The Woodbury identity is useful for solving linear systems in a matrix which can be written as the sum of a diagonal matrix and a low-rank matrix for (setting ).
5 Tail Bounds
We will use several well-known tail bounds from probability theory.
Let , where with probability and with probability , and all are independent. Let . Then 1. , ; 2. , .
Let denote independent bounded variables in . Let , then we have
6 Fine-Grained Hypotheses
Impagliazzo and Paturi [IP01] introduced the Strong Exponential Time Hypothesis () to address the complexity of CNF-SAT. Although it was originally stated only for deterministic algorithms, it is now common to extend to randomized algorithms as well.
For every there exists an integer such that CNF-SAT on formulas with clause size at most (the so called -SAT problem) and variables cannot be solved in time even by a randomized algorithm.
For every , there is a such that OV cannot be solved in time on instances with .
In particular, it is known that implies OVC [Wil05]. 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 dimensions:
For , with high probability the maximum distortion in pairwise distance obtained from projecting points into dimensions (with appropriate scaling) is at most .
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 for each of these distance measures other than edit distance runs in time about [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 denotes the pseudo-inverse of and matrix norm is defined as .
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 and a vector , we say that is an -approximate multiplication of if
Given a vector , we say that a vector is an -approximate solution to if is an -approximate multiplication of .
Before stating the desired reductions, we state a folklore fact about the Laplacian norm:
Lower Bound for : Let and denote the minimum nonzero and maximum eigenvalues of respectively, where is the diagonal matrix of vertex degrees. Since is connected, all cuts have conductance at least . Therefore, by Cheeger’s Inequality [Che70], . It follows that,
Upper bound for : . Therefore,
Proposition 4.2 implies the following equivalent definition of -approximate multiplication:
,, and , then is an -approximate multiplication of .
Since , also. By the upper bound for -norms in Proposition 4.2,
Since , has both nonnegative and nonpositive coordinates. Therefore, since is connected, there exists vertices in for which is an edge and for which . Therefore,
This is the desired result by definition of -approximate multiplication. ∎
Since , as well. By the lower bound for -norms in Proposition 4.2 and the fact that is an approximate multiplication for ,
Taking square roots gives the desired result. ∎
Consider an -vertex -weighted graph , let , , , and 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 ,
Let be the lowest element of the call stack and let be the number of recursive calls to MultiplyGAdditive (Algorithm 2). By Proposition 4.2,
Error: We start by bounding error in the norm. Let be the output of (Algorithm 2). We bound the desired error recursively:
Because (Algorithm 2),
By Proposition 4.2 applied to , . Therefore,
Runtime: There is one call to SolveG and one multiplication by per call to MultiplyGAdditive (Algorithm 2). Each multiplication by takes time. As we have shown, there are only 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 -vertex -weighted graph , let , , , and be a known graph with at most edges for which
3 Lower bound for high-dimensional linear system solving
We have shown in this section that if a graph can be efficiently sparsified, then there is an efficient Laplacian multiplier for graphs if and only if ther is an efficient Laplacian system solver for graphs. Here we give one example of how this connection can be used to prove lower bounds for Laplacian system solving:
Matrix-Vector Multiplication
and are the adjacency matrix and Laplacian matrix, respectively, of the complete weighted graph on nodes where the weight between node and node is .
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, .
Suppose the function can be evaluated in time (in this paper we’ve been assuming ). Then, both the and problems can be solved in time, by computing all entries of the matrix and then doing a straightforward matrix-vector multiplication. However, since the input size to the problem is only real numbers, we can hope for much faster algorithms when . In particular, we will aim for time algorithms when .
For some functions , like , we will show that a running time of is possible for all . For others, like and , we will show that such an algorithm is only possible when . More precisely, for these :
When , we give an algorithm running in time , and
For , we prove a conditional lower bound showing that time is necessary.
Finally, for some functions like , we will show a conditional lower bound showing that time is required even when is just barely super-constant.
In fact, assuming , we will characterize the functions for which the and problems can be efficiently solved in high dimensions in terms of the approximate degree of (see subsection 5.2 below). The answer is more complicated in low dimensions , and for some functions 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 problem).
Although our goal in this section is to study the Laplacian Evaluation problem, it will make the details easier to instead look at the 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 factor), and so it will be sufficient in the rest of this section to only give algorithms and lower bounds for the Adjacency Evaluation problem.
Suppose the (Problem 5.1) can be solved in time. Then, the (Problem 5.2) can be solved in time.
Suppose the (Problem 5.2) can be solved in time, and that satisfies for all . Then, the (Problem 5.1) can be solved in time.
We will show that the Adjacency Evaluation problem can be solved in
time, and then apply the superadditive identity for to get the final running time. For a fixed , we proceed by strong induction on , and assume the Adjacency Evaluation problem can be solved in this running time for all smaller values of .
in time.
and our two initial calls took time , leading to the desired running time. Each output entry is ultimately the sum of at most terms from calls to the given algorithm, and hence has error (since we perform all recursive calls with error 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 (resp. ) problem is a vector, then we only apply the given () algorithm on vectors. Hence, the two problems are equivalent even in the special case where the input vector must be a vector.
2 Approximate Degree
The Stone-Weierstrass theorem says that, for any , and any continuous function which is bounded on $kf\varepsilonkkf$. For some examples:
Any polynomial such that for all has degree at least .
For such a polynomial , define . Thus, the polynomial has the two properties that for all , and . By standard properties of the Chebyshev polynomials (see e.g. [SV14, Proposition 2.4]), the polynomial with those two properties of minimum degree is an appropriately scaled and shifted Chebyshev polynomial, which requires degree . ∎
In both of the above settings, for error , the function is only -close to a polynomial of degree . We will see in Theorem 5.14 below that this implies that, for each of these functions , the -approximate problem in dimension requires time assuming .
3 ‘Kernel Method’ Algorithms
For any integer , let . The problem (Problem 5.1) can be solved exactly (with error) in time .
is a homogeneous polynomial of degree in the variables . Let
and let be the set of functions such that .
The running time in Lemma 5.10 can be improved to with more careful work, by noting that each monomial has either ‘-degree’ or ‘-degree’ at most , but we omit this here since the difference is negligible for our parameters of interest.
Let be positive integers which may be functions of , such that . For example:
when and , or
when and .
This follows by applying Lemma 5.10 separately to each monomial of , and summing the results.
When and , then we can write for some , and for some . It follows that
Apply Corollary 5.12 for the degree approximation of . ∎
4 Lower Bound in High Dimensions
We now prove that in the high dimensional setting, where , the algorithm from Corollary 5.13 is essentially tight. In that algorithm, we showed that (recalling Definition 5.6) functions which are -close to a polynomial of degree have efficient algorithms; here we show a lower bound if is not -close to a polynomial of degree .
Then, assuming , the problem for in dimension and error on points requires time .
This theorem will be a corollary of another result, which is simpler to use in proving lower bounds:
Then, assuming , the problem for in dimension and error on points requires time .
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 polynomial, there exists a point with high -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 -th derivative (Lemma 5.20). This is done by integrating over the -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 -th derivatives for are bounded from below (Lemma 5.21). This is done by induction, deriving a bound for -th derivatives by integrating over the -th derivative. The lower bound on the -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 on which all of ’s -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 dimensions (Lemma 5.25). Since even approximate nearest neighbors cannot be solved in -time for assuming (Theorem 3.21), this suffices. To solve Hamming nearest neighbors a a pair of sets and with , we set up different -graph adjacency matrix multiplication problems. In problem , we scale the points in and by a factor of for some and translate them by so that they are in the interval . Then, with one adjacency multiplication, one can evaluate an expression , where . For each distance , let . To solve bichromatic nearest neighbors, it suffices to compute all of the s. This can be done by setting up a linear system in the s, where there is one equation for each . The matrix for this linear system has high determinant because has high -th derivatives on (Lemma 5.23). Cramer’s Rule can be used to bound the error in our estimate of the s that comes from the error in the multiplication oracle (Lemma 5.24). Therefore, calls to a multiplication oracle suffices for computing the number of pairs of vertices in that are at each distance value. Returning the minimum distance for which 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 converges absolutely for all . Then,
In this section, we exploit the following property of analytic functions:
We first show that, for any , for some constant depending on . Write ’s Taylor expansion around :
Let . Note that . Since is a convergent series, there exists a constant dependent on such that for all , the absolute value of the -th term of the series for is at most 1/2. Therefore, for all , . For all , is a constant depending on , so we are done with this part.
Next, we show that for all and some constant depending only on . Let be the point that minimizes . Note that . Taylor expand around :
Take derivatives for some and use the triangle inequality:
By the first part, , so
Note that for (we are done for ). There is some constant for which , so letting suffices, as desired. ∎
We now move on to proving the main results of this section, which consists of several steps.
For the base case : note that is the difference between and a polynomial of degree , and so by our assumption that is not -close to a polynomial of degree , there must be an such that .
For the inductive step, consider an integer . Notice that by definition of since . By the inductive hypothesis, there is an with . Hence, by the mean value theorem, there must be an such that
For each of the infinitely many s for which is -far from a degree polynomial, Lemma 5.19 implies the existance of an for which . Thus, 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 , there is an for which . Then, there exists an interval with the property that both and, for all , .
Since is analytic on $B>0fy\inm|f^{(m)}(y)|\leq Bm4^{m}\cdot m!y\in|f^{(k+2)}(y)|\leq 16Bk4^{k}\cdot k!\delta=\kappa(k)/(32Bk4^{k}\cdot k!)a=\max\{0,x-\delta\}b=\min\{1,x+\delta\}b-a\geq\delta=\kappa(k)/(32Bk4^{k}\cdot k!)k\delta<1/2a=0b=1y\in[a,b]$, we have as desired that
Suppose that, for some sufficiently large positive integer , there exists an for which . Then, there exists an interval with the property that both and, for all and all , .
We will prove that, for all integers , there is an interval such that , and for all integers and all we have . Plugging in gives the desired statement. We will prove this by induction on , from to . The base case is given (with slightly better parameters) by Lemma 5.20.
For the inductive step, suppose the statement is true for . We will pick to be a subinterval of , so the inductive hypothesis says that for every and every integer we have . It thus remains to show that we can further pick and such that and for all .
Recall that for all . Since is continuous, we must have
either for all such ,
or for all such .
Let us assume we are in the first case; the second case is nearly identical. Let , and consider the four subintervals
Since for all in each of those intervals, we know that for each of the intervals, letting denote its left endpoint and denote its right endpoint, we have
In particular, is increasing on the interval , and if we look at the five points for which form the endpoints of our four subintervals, increases by more than from each to the next. It follows by a simple case analysis (on where in our interval has a root) that there must be one of our four subintervals with for all in the subinterval. We can pick that subinterval as desired. ∎
To simplify notation in the rest of the proof, we will let . We now use these properties of to reason about a certain matrix connected to that can be used to count the number of pairs of points at each distance.
Let be the counting matrix (Definition 5.22) for , , and . Then
Since is analytic on , we can Taylor expand it around :
Let . Note that for all values of , the input to in is in the interval by the lower bound on in Lemma 5.21. In particular, for all ,
for all 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 permutations yields an upper bound on the determinants of the blocks of and , excluding the top block:
where . 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 be an invertible by matrix with for all . Let be a -dimensional vector for which for all . Then, .
Cramer’s rule says that, for each , the entry of the vector is given by
where is the matrix which one gets by replacing column of by . Let us upper-bound . We are given that each entry of in column has magnitude at most , and each entry in every other column has magnitude at most . Hence, for any permutation on , we have
It follows from Cramer’s rule that , as desired. ∎
Suppose that there is an algorithm for -approximate matrix-vector multiplication by an -matrix for points in in time. Then, there is a
time algorithm for exact bichromatic Hamming nearest neighbors on -point sets in dimension .
Let us explain why this is sufficient to recover . Suppose we have computed this vector . We claim that if we compute , and round each entry to the nearest integer, the result is the vector . Indeed, by Lemma 5.24, each entry of differs from the corresponding entry of by at most an additive , where the constant is from Proposition 5.18 (since for all ). Substituting our lower bound on from Lemma 5.23, we see this additive error is at most as long as we’ve picked a sufficiently large constant . Thus, rounding each entry to the nearest integer recovers , as desired.
To do this, we will pick points such that
If the problem for in dimension and error on points could be solved in time time for any constant , then one could immediately substitute this into Lemma 5.25 to refute in light of Theorem 3.21. ∎
5 Lower Bounds in Low Dimensions
The landscape of algorithms available in low dimensions is a fair bit more complex. The Fast Multipole Method allows us to solve for a number of functions , including and , for which we have a lower bound in high dimensions. Classifying when these multipole methods apply to a function 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 of interest. We show that for a number of functions with applications to geometry and statistics, the problem seems to become hard even in dimension (see the end of this subsection for a list of such ).
For the function , the problem (Problem 5.1) can be solved exactly in time when .
We now show how to do each binary search step. Suppose we are testing whether the answer is , i.e. testing whether for all . Let be subsets such that for each , there is a such that . For each we will show how to test whether there are with such that , which will complete the binary search step.
Let be the vector with when and when . Use the given algorithm to vector , we can compute a approximation to
in time . Similarly, using the fact that the corresponding matrix has rank by definition, we can exactly compute
in time . Our goal is to determine whether . Since each and 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 such that for the function , the problem (Problem 5.1) with error and dimension vectors of bit entries requires time .
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 :
6 Hardness of the n𝑛n-Body Problem
We now prove Corollary 1.2 from the Introduction, showing that our hardness results for the problem (Problem 5.1) also imply hardness for the -body problem.
-time algorithm for one step of the -body problem.
Return (Note that is the Gravitational constant)
We now show that . For , . We now check that is equal to this by going through pairs individually. Note that the -th coordinate of the force between and is 0. The -th coordinate of the force exerted by on is
Negating this gives the force exerted by on . All of these contributions agree with the corresponding contributions to the sum , so as desired.
The runtime of this reduction is plus the runtime of the -body problem. However, Theorem 1.1 shows that no almost-linear time algorithm exists for -Laplacian multiplication, since is not approximable by a polynomial with degree less than . Therefore, no almost-linear time algorithm exists for -body either assuming , as desired. ∎
7 Hardness of Kernel PCA
and differ only on their diagonal entries, so a 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 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 eigenvalues of . 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 in almost linear time in , with logarithmic dependency on and dependence on . When , our algorithm runs in almost linear time in . To formally state our main theorem, we define multiplicatively Lipschitz functions:
Examples: Any polynomial with non-negative coefficients and maximum degree is multiplicatively Lipschitz for any . The function when and when is 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 -spectral sparsifier of the graph with .
and outputs an -spectral sparsifier of with . If , this runs in time
Set , and the corollary follows from Theorem 6.3. ∎
This implies that if is a polynomial with non-negative coefficients, then sparsifiers of the corresponding -graph can be found in almost linear time. The same result holds if 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--graph.
Given two sets of points and . We say is an -well separated pair if the diameter of and are at most times the distance between and .
, , are -well separated pair (Definition 6.5)
For any pair , there is a unique such that and
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--graph. We define the algorithm to output an -WSPD (Definition 6.6) of . We define the algorithm to be a random projection of onto dimensions.
Let be the complete biclique on the -graph of with one side of the biclique having verticese corresponding to points in , and the other side having vertices corresponding to points in . We store this biclique implicitly as rather than as a collection of edges.
Let be an algorithm uniformly at random sampling edges from , where the big is the same constant as the big in the from Lemma 3.15.
Let be any nearly linear time spectral sparsification algorithm that outputs a spectral sparsifier with 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 , and a complete graph , where vertices of are identified with vertices of (which induces an identification between edges). Let . Suppose each edge in satisfies:
If is a multiplicative Lipschitz function, and refers to the graph where is applied to each edge length, and then:
We view each well-separated pair on as a biclique, where the edge length between any two points in corresponds to the edge length between those two points in the original -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 is at most . Thus, the longest edge divided by the shortest edge within any induced bipartite graph on the -graph is , 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 . Now recall the definition of leverage score on graphs as , where is the effective resistance assuming conductances of on the graph, and is the edge weight. Here, is upper bounded by the longest edge length, and 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 , as claimed. The union of these graphs is a spectral sparsifier of our -graph.
Finally, our algorithm samples 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 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 . This completes our proof of Theorem 6.3. ∎
2 Low Dimensional Sparsification
We now present a result on sparsification in low dimensions, when is assumed to be small or constant.
Let . Consider a -graph with vertices arising from a point set in dimensions, and let be the ratio of the maximum Euclidean distance to the minimum Euclidean distance in the point set . Let be a multiplicatively Lipschitz function. Then an spectral sparsifier of the -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 .
;
where is the -graph on , where .
We start by showing that certain graphs that are related to unweighted versions of -weighted graphs contain large expanders:
For a positive integer , call an unweighted graph -dependent if no independent set with size at least exists in .
We start by observing that inner product graphs are -dependent.
We now show that these graphs are -dependent:
First, note that there must be a with . Otherwise, we would have
Assume without loss of generality that for all , so in particular . Letting , this means that , and so . Thus,
For an independent set in the unweighted inner product graph for , define an matrix with where . Then Lemma 7.4 coupled with the definition for edge presence in shows that is full rank. However, is a rank matrix because it is the matrix of inner products for dimension vectors. Therefore, , so no independent set has size greater than . ∎
Next, we show that -dependent graphs are dense:
Any -dependent graph has at least edges.
Consider any -tuple of vertices in . There are such -tuples. By definition of -dependence, there must be some edge with endpoints in any -tuple. The number of -tuples that any given edge can be a part of is at most . 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 with vertices and at least edges for some . Then, there exists a set with the following properties:
(Expander)
(Degree) The degree of each vertex in within is at least
We start by partitioning the graph as follows:
While there exists a set with (a) a partition with cut having conductance or (b) a vertex with degree less than in
If (a), replace in with and
Else if (b), replace in with and
We now argue that when this procedure stops,
To prove this, think of each splitting of into and as deleting the edges in from . Design a charging scheme that assigns deleted edges due to (a) steps to edges of as follows. Let denote the charge assigned to an edge and initialize each charge to 0. When is split into and , let denote the set with . When is split, increase the charge for each by .
We now bound the charge assigned to each edge at the end of the algorithm. By construction, is the number of edges deleted over the course of the algorithm of type (a). Each edge is assigned charge at most times, because when charge is assigned to edges in . Furthermore, the amount of charge assigned is the conductance of the cut deleted, which is at most . Therefore,
for all edges in , which means that the total number of edges deleted of type (a) was at most . Each type (b) deletion reduces the number of edges in by at most , so the total number of type (b) edge deletions is at most . Therefore, the total number of edges remaining is at least
By the stopping condition of the algorithm, each connected component of after edge deletions is a graph with all cuts having conductance at least and all vertices having degree at least . Next, we show that some set in has at least vertices. If this is not the case, then
which leads to a contradiction. Therefore, there must be some connected component with at least vertices. Let be this component. By definition satisfies the Size guarantee. By the stopping condition for , satisfies the other two guarantees as well, as desired. ∎
Proposition 7.7 does not immediately lead to an efficient algorithm for finding . Instead, we give an algorithm for finding a weaker but sufficient object:
(Size) , where
(Low effective resistance diameter) For any pair of vertices , , where
We prove this proposition in Section 7.2.
2 Efficient algorithm for finding sets with low effective resistance diameter
(Size) , where
(Expander) , where
(Degree) The degree of each vertex in within is at least , where .
(Upper bound) For any pair , , where
(Lower bound) For any pair , .
We now implement this data structure. ReffPreproc uniformly samples subgraphs of 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 contains a sparsifier for , so effective resistances are preserved within . To obtain the lower bound, we use the following novel Markov-style bound on effective resistances:
Let be a -weighted graph with vertex set and assign numbers to each edge. Sample a reweighted subgraph of by independently and identically selecting edges, with an edge chosen with probability proportional to and added to with weight , where . Fix a pair of vertices . Then for any ,
For two vertices , define the (folklore) effective conductance between and in the graph to be
It is well-known that .
Using as a feasible solution in the optimization problem shows that
where denotes the weight of the edge in the graph .
where the first step follows from , and the last step follows from Markov’s inequality. ∎
Upper bound. Let for each edge , where . We apply Theorem 3.6 to argue that is a sparsifier for for each . By choice of and the Size condition on , . By Lemma 3.5 and the Expander condition on , for each pair . Therefore, the second condition of Theorem 3.6 is satisfied by the probabilities . Let , where is the constant in Theorem 3.6. This value of satisfies the first condition of Theorem 3.6.
Lower bound. Let for each edge . Note that , so with , all edges in the sampled graph should have weight . Therefore, by Lemma 7.10, for a pair
for each . Since the s are chosen independently and identically,
We now describe the algorithm LowDiamSet. This algorithm simply picks random vertices and queries the effective resistance data structure to check that 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 for the returned ,
by the Lower bound guarantee of Proposition 7.9.
for any , where denotes the degree of the vertex in . By the third property of , and . By this and the second property of ,
for any . satisfies the conditions required of Proposition 7.9 by choice of the values , , and . 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 -weighted graph with vertex set and , let be two sets of vertices, let , and let . Then, for any and ,
Notice that . Furthermore, notice that and , where is the signed indicator vector of the edge from to and , , and and for all . The function is convex, so by Jensen’s Inequality,
so we can upper bound in the following way
4 Sampling data structure
We use this sketching algorithm to obtain the desired sampling algorithm in the following subroutine:
Let and . We will show that the following algorithm returns the desired estimate with probability at least :
Return
We use this corollary to obtain a sampling algorithm as follows, where :
Use the Corollary 7.15 data structure to -approximate for each . Let be this estimate for each . (one preprocess for , queries).
Form a balanced binary tree of subsets of , with at the root, the elements of at the leaves, and the property that for every parent-child pair , .
For every node in the binary tree, construct a -approximate data structure for .
Sample a point with probability .
Initialize . While ,
Let and denote the two children of in
Let and be the -approximations to and respectively obtained from the data structure for computed during preprocessing.
Reset to with probability ; otherwise reset to .
Return the product of the probabilities attached to ancestor nodes of the node in for , 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 , . Let denote the sequence of ancestor sets of the singleton set in . For each , let be the child of besides (unique because is binary). For a node of , let be the -approximation to used by the algorithm. The sampling probability is the following product of probabilities:
is a -approximation to by the approximation guarantee of Corollary 7.15. is a -approximation to by the approximation guarantee of Corollary 7.15. By these guarantees and the approximation guarantees for the s for , is a -approximation to
We use this data structure via a simple reduction to implement the following data structure, which suffices for our applications:
where is a function that outputs a unique ID for each element of . Define for the unique containing (Without loss of generality assume that exactly one contains u ). Let . Construct the data structure from Lemma 7.13 on the pair of sets . Now, sample a pair of -dimensional vectors as follows:
Since the function id outputs values that are not proportional to one other, the function is injective.
(For the proof, let and let be the unique set for which )
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 -weighted graph and three functions on pairs of vertex sets , a collection of vertex set family-vertex set pairs is called a -cover for iff the following property holds:
(Coverage) For any , there exists a pair and an for which or , and
A -cover is said to be -sparse if . A -cover is said to be -efficient if . When , we simplify notation to refer to -covers instead.
Given a -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 -sparsifier for with edges with probability at least .
Filling in algorithm details (the bolded parts). We start by filling in the details in the algorithm
OversamplingWithCover. First, we define for each pair of distinct . is a weighted edge in with weight . Define
where is the probability defined for the data structure in Proposition 7.16. Next, we fully describe how to sample pairs with probability proportional to . Notice that can be computed in time because
can be computed in time. Sample a pair with probability equal to as follows:
Sample a Bernoulli .
Sample a pair with probability proportional to .
Sample the pair using the data structure .
Sample a pair with probability proportional to .
Sample an with probability proportional to .
Sample uniformly.
Sparsifier correctness. By the Coverage guarantee of and the approximation guarantee for the s in Proposition 7.16, for all . Therefore, Theorem 3.6 applies and shows that the graph returned is a -sparsifier for with probability at least . Spielman-Srivastava only worsens the approximation guarantee by a factor, as desired.
Number of edges in . It suffices to bound . In turn, it suffices to bound . Recall from above that
Let and define the functions as follows: and for any pair of sets . Recall that 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 , by the Low effective resistance diameter guarantee of Proposition 7.8. Plugging this into Proposition 7.12 immediately shows that is a -cover for .
Efficiency bound. Follows immediately from the bound on .
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 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 and for any real number .
Let be the unweighted inner product graph on . Let be the weighted graph with all edges that are not in deleted. Let be the -cover given by Proposition 7.19 for . Let this cover be the output of . It suffices to show that is a -cover for , where and . By Rayleigh monotonicity,
for all . Let denote the weight of the edge in . For all edges in , by the norm condition on . Therefore, for all ,
By the Coverage guarantee on , there exists a pair and an for which or and
By the upper bound on the edge weights for ,
Since , is a -cover for as well, as desired. ∎
By the previous subsection, it suffices to cover the pairs for which and . This can be done by clustering using LowDiamSet on the -norm vectors. For each cluster , let . 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 . We break the analysis up into cases:
Case 1: . In this case, the Coverage property of implies that the pair is covered in by Rayleigh monotonicity (since is a subgraph of , where is the weighted inner product graph for ).
Case 2: . In this case, the Coverage property of implies that the pair is covered in by Rayleigh monotonicity.
Case 3: and . Since is a partition of , there is a unique pair for which and . Let denote the unweighted inner product graph on . By Rayleigh monotonicity, the fact that for all , and the Low effective resistance diameter guarantee of Proposition 7.8,
for any . Since , for all . Therefore,
for any . 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 :
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 between the maximum and minimum norm of points in . To obtain this cover, we bucket vectors by norm and call TwoBoundedCover on all pairs of buckets.
Coverage. For any edge , there exists a pair for which . Therefore, the Coverage property for (which is part of ) implies that the pair is covered by .
5.5 Desired (ζ,κ,δ)𝜁𝜅𝛿(\zeta,\kappa,\delta)-cover
The second type consists of all other pairs, i.e. those with . For these pairs, we take care of them via a clustering argument. We cluster all vectors in into clusters in a greedy fashion. Specifically, we sort vectors in decreasing order by norm and create a new cluster for a vector if for the first vector in each cluster. Otherwise, we assign to an arbitrary cluster for which for first cluster vector . We then cover the pair using the pair of sets , where is the cluster containing . To argue that this satisfies the Coverage property, we exploit the norm condition on the pair . To bound efficiency, sparsity, and runtime, it suffices to bound the number of clusters, which is at most 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 , and . Let and denote the functions for which is a -cover for the weighted inner product graph on , where for all . Let
Before proving that the required guarantees are satisfied, we bound some important quantities.
Bound on in terms of for if . By definition of , for any . was the first member added to , so . By the norm assumption on , . By Cauchy-Schwarz, . Therefore,
Bound on for . We start by bounding the effective resistance between and any for which . Recall that for any . Consider any for which . We show that
Consider all 2-edge paths of the form -- for . By assumption on , for any . Therefore, the bound on applies:
for any . By series-parallel reductions, the - effective resistance is at most
Bound on for . Any has the property that . Therefore, for , . By the triangle inequality for effective resistance,
Coverage. For any pair for which there exists with , is still covered by by the Coverage property of . Therefore, we may assume that this is not the case. Without loss of generality, suppose that . Then, by assumption, . By definition of the s, there exists a for which . By the first property of interval families, the set is the disjoint union of sets in . Let be the unique set among these for which . By our effective resistance bound,
so the coverage property for the pair is satisfied within by the pair , as desired.
Efficiency. The efficiency of 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 . The efficiency of is at most
By the first property of interval families, each is present as a singleton in at most s for that are a subset of a given . 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 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 by a factor of to obtain and respectively. Then, it sparsifies the -graph for . Finally, it computes the weight of the edges in the - cut. Because is not multiplicatively Lipschitz and the distance set for is spaced, thresholding suffices for solving the nearest neighbor problem.
Consider the following algorithm, BichromaticNearestNeighbor (Algorithm 9), given below:
We start by bounding the runtime of this algorithm. Constructing and and calculating the total weight of edges between and takes time since has edges. Since the sparsification algorithm is only called once, the total runtime is therefore , as desired. For the rest of the proof, we may therefore focus on correctness.
First, suppose that . There exists a pair of points , with . Since is a decreasing function, the edge between and in has weight at least , which means that the total weight of edges in the - cut in is at least . Since is a 2-approximate sparsifier for , the total weight of edges in the - cut is at least . This means that is returned, as desired.
Next, suppose that . Since is -spaced with distance set and , for all and . Therefore, for all and .
Since is decreasing and not -multiplicatively Lipschitz, the weight of any edge between and in is at most
The total weight of edges between and is therefore at most
Since is a 2-approximate sparsifier for , the total weight between and is at most , so the algorithm returns , as desired. ∎
-time algorithm for determining whether or not the closest pair has distance at most . Therefore, there is a
time on pairs of sets with 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 in the graph into dimensions in a way that distorts the distances
for vertices in by a factor of at most 2. After computing this embedding, we build an -approximate nearest neighbor data structure on the resulting points. This allows us to determine whether or not a vertex in has a high-weight edge in to in almost-constant time. After looping through all of the edges in in total time , we determine whether or not there are any high-weight edges between and in , allowing us to answer the bichromatic nearest neighbors decision problem.
We start by proving a result that links norms of to effective resistances:
In an -vertex graph with vertices and ,
where third step follows from .
Thus we complete the proof of the lower bound.
Upper bound. Next, we prove the upper bound. The maximum and minimum coordinates of are and respectively. By definition of the pseudoinverse, . Therefore, , , and . implies that for all ,
implies that for all ,
Therefore, for all . Summing across 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 -edge graph with vertex set ,
Lower bound. The lower bound on follows immediately from the fact that for any edge , .
Upper bound. For the upper bound, recall that
where the first step follows from definition of effective resistance, the third step follows from taking out, and the last step follows from Cauchy-Schwarz.
Since and , . Therefore,
for all , where and are the minimum and maximum weights of edges in respectively
for any vertices in
where the last step from property 1 in proposition statement.
By the upper bound on for any vertices in , for all edges in , so
where the first step follows from , the second step follows from , and the third step follows from , the forth step follows from summation has at most terms, the last step follows from , .
is a vector that is maximized and minimized at the endpoints of . Furthermore, by definition of the pseudoinverse. Thus, we know has both positive and negative coordinates and that .
where the first step follows from , the second step follows from (the lower bound in Proposition 8.10), and the third step follows from (the upper bound in Proposition 8.10), and the last step follows from (Since is maximized and minimized at and respectively).
Summing over all and using the fact that , , and shows that
Combining this with the given upper and lower bounds on 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 and the matrix trivially takes time. Computing the matrix takes
time since the point set is -boxed. Computing and takes time, as computing takes time for each since is supported on just one vertex. Computing takes time by Theorem 3.17. In particular, one computes by preprocessing a -approximate nearest neighbors data structure on (takes time), queries the data structure on all points in (takes 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 and for which . We show that the reduction returns with probability at least . Let denote the -graph on . By definition of and and the fact that is decreasing, there exists a pair of points in and with edge weight at least .
This means that there exists of vectors with
By the approximation guarantee of the nearest neighbors data structure, and the reduction returns with probability at least , as desired.
Next, suppose that there do not exist and for which . We show that the reduction returns with probability at least . Since and is -spaced, for all and . Therefore, all edges between and in the -graph for have weight at most since is not -multiplicatively Lipschitz.
for any pair of vertices .
Recall from the discussion of the case that Theorem 3.14 and Proposition 8.11 apply. Therefore, with probability at least , by the lower bound of Proposition 8.11,
Therefore, by the approximate nearest neighbors guarantee,
so the algorithm returns with probability at least , as desired. ∎
-time algorithm for determining whether or not the closest pair has distance at most . Therefore, there is a
time on pairs of sets with 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 -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 matrix-vector multiplication time to .
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 and . 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 has some nice property (e.g. smooth), we can hope to approximate in the following sense
where is a small positive integer, usually called the interaction rank in the literature.
Now, we can construct in two steps:
Intuitively, as long as and are well-separated, then is very good estimation to even for small , i.e., .
Recall that, at the beginning of this section, we assumed that all the sources are in the the same box and . This is not true in general. To deal with this, we can discretize the continuous space into a batch of boxes and . For a box and a box , 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 (only keeping the first ). For each box, we will see that the number of nearby relevant boxes is at most .
for in time. In this section, we re-prove the algorithm described in [GS91], and determine the exact dependences on and in the running time.
By shifting the origin and rescaling , we can assume that the sources and targets all lie in the unit box .
We use the following Fact to simplify .
Using Cramer’s inequality, we have the following standard bound.
It is easy to see that
Let denote a box with center and side length with . If source is in box , we say . Then the Gaussian evaluation from the sources in box is,
where the coefficients 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 and 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 into a Taylor expansion about . The Taylor series converges rapidly in a box of side length about , where .
has the following Taylor expansion, at an arbitrary point :
where the coefficients 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 , we can rewrite :
By Eq. (5), the inner sum is the Taylor expansion of . 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 be defined as Def 9.8. For an integer , let denote the Hermite expansion of truncated at ,
The function has the following Taylor expansion about an arbitrary point :
where the the coefficients are defined as
where and .
We can write 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
where the coefficients is defined as
and the error in truncation after terms is
2.2 Algorithm
The algorithm is based on subdividing into smaller boxes with sides of length parallel to the axes, for a fixed . We can then assign each source to the box in which it lies and each target , to the box in which it lies.
For each target box , we need to evaluate the total field due to sources in all boxes. Since boxed have side lengths , only a fixed number of source boxes can contribute more than to the field in a given target box , where and is the precision parameter. If we cut off the sum over all after including the nearest boxes to , it incurs an error which can be upper bounded as follows
where the first step follows from , the second step follows from , and the last step follows from a straightforward calculation.
For a box and a box , there are several possible ways to evaluate the interaction between and . We mainly need the following three techniques:
Gaussians, accumulated in Taylor series via definition 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 time.
In the next a few paragraphs, we explain the details of the three techniques.
Consider a fixed source box . For each target box within range, we must compute Taylor series coefficients
Each coefficient requires work to evaluate, resulting in a net cost . Since there are at most boxes within range, the total work for forming all the Taylor series is . Now, for each target , one must evaluate the -term Taylor series corresponding to the box in which lies. The total running time of algorithm is thus
We form a Hermite series for each box and evaluate it at all targets. Using Lemma 9.9, we can rewrite as
To compute each costs time, so forming all the Hermite expansions takes time. Evaluating at most expansions at each target costs time per target, so this approach takes
Let denote the number of boxes. Note that .
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 by
and the coefficients are defined as Eq. (13). Recall in Part 2, it takes time to compute all the Hermite expansions, i.e., to compute the coefficients for all and all sources boxes .
Making use of the large product in the definition of , we see that the time to compute the coefficients of is only for each box in the range. Thus, we know for each target box , the running time is
Finally we need to evaluate the appropriate Taylor series for each target , which can be done in time. Putting it all together, this technique 3 takes time
2.3 Result
Finally, in order to get additive error for each coordinate, we will choose and .
time, and outputs numbers such that for each
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 for many other functions . As long as has the following properties, the result of Theorem 9.13 also holds for :
is non-increasing, i.e., if , then .
is decreasing fast, i.e., for any , we have .
’s Hermite expansion and Taylor expansions are truncateable: If we only keep terms of the polynomial for , then the error is at most .
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 with these properties. Indeed, we can bound the error as follows (note that ):
where the first step follows from and that is non-increasing, the second step follows from and that is non-increasing, and the last step follows from the fact that is decreasing fast, and choosing .
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 denote a box with center and side length with . If source is in box , we say . Then the Gaussian evaluation from the sources in box is,
where the coefficients are defined by
We say 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 from theoretical Deep Learning can be rearranged into the form for an appropriate analytic function , 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 we have and datas are separable i.e., for all , . One of the most standard and common used activation functions in neural network training is ReLU activation, which is . 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 , then the Neural Tangent Kernel can be written as for
First, since , we know that
Using properties of the Gaussian distribution , we have
We can rewrite as follows:
Note that , so we know , where the covariance matrix
since . Thus,
Note , so for some function , which completes the proof. ∎