Space-Efficient Approximate Spherical Range Counting in High Dimensions
Abstract
We study the following range searching problem in high-dimensional Euclidean spaces: given a finite set , where each is assigned a weight , and radius , we need to preprocess into a data structure such that when a new query point arrives, the data structure reports the cumulative weight of points of within Euclidean distance from . Solving the problem exactly seems to require space usage that is exponential to the dimension, a phenomenon known as the curse of dimensionality. Thus, we focus on approximate solutions where points up to away from may be taken into account, where is an input parameter known during preprocessing. We build a data structure with near-linear space usage, and query time in , for some , where is the number of points of in the ambiguity zone, i.e., at distance between and from the query . To the best of our knowledge, this is the first data structure with efficient space usage (subquadratic or near-linear for any ) and query time that remains sublinear for any sublinear . We supplement our worst-case bounds with a query-driven preprocessing algorithm to build data structures that are well-adapted to the query distribution.
Keywords and phrases:
Approximate range counting, partition trees, high dimensionsFunding:
Andreas Kalavas: Supported in part by the U.S. National Science Foundation (NSF) Grants ECCS-2145713, CCF-2403194, CCF-2428569, and ECCS-2432545.Copyright and License:
2012 ACM Subject Classification:
Theory of computation Design and analysis of algorithmsAcknowledgements:
We would like to thank Dimitris Fotakis for valuable discussions on the topic.Editors:
Hee-Kap Ahn, Michael Hoffmann, and Amir NayyeriSeries and Publisher:
Leibniz International Proceedings in Informatics, Schloss Dagstuhl – Leibniz-Zentrum für Informatik
1 Introduction
Range searching is a fundamental problem with wide applications in areas such as computational geometry [13], databases [36], geographic information systems (GIS) [25], and computer graphics [4]. One fundamental variant of range searching is that of range counting, where given a dataset , we need to preprocess it into a data structure so that for a query range , we can efficiently estimate . Primary examples of types of query ranges include rectangles, balls, halfspaces, and simplices.
In this paper, we study the special case of range counting queries for Euclidean balls of fixed radius. Solving the problem exactly seems to require space usage that is exponential to the dimension, a phenomenon known as the curse of dimensionality. Therefore, aiming for solutions that scale well with the dimension, we focus on approximate solutions where points up to away from may be considered, where is an input parameter known during preprocessing. Formally, given as input a dataset , such that each point is assigned a weight , search radius , and approximation parameter , the approximate spherical range counting problem is to preprocess into a data structure that given any query point , it reports , where is a subset such that , where, for any , , denotes the Euclidean ball of radius centered at . Since we can uniformly rescale the dataset, we assume throughout the paper that the search radius is .
Related work.
We juxtapose the above problem definition with a different notion of approximate counting, adapted for example by Aronov and Har-Peled [10], where one is interested in approximating the number of points inside a query range. Given a query range , the data structure shall return a value such that . Aronov and Har-Peled [10] show that one can reduce such a counting query to a sequence of “emptiness” queries, determining if the query range is empty or not, of length polynomial in and . In contrast, our definition asks for an exact aggregate over a set whose geometry is allowed to vary within the annulus . This definition has been used, e.g., by Arya and Mount [11], although they study solutions in the low-dimensional regime.
In terms of known solutions, approximate spherical range counting in high dimensions is not clearly distinguished from other variants of approximate range searching. Perhaps the most promising approach for related problems in high dimensions is locality sensitive hashing (LSH) (see [26, 20, 6, 8]), which maps the points to buckets with the promise that near (resp. far) points are more (resp. less) likely to be mapped together. It is not clear how one could use an LSH-based approach to solve the counting variant without paying at least the cost of exploring all points in . This suggests that, within LSH-based frameworks, counting is unlikely to admit a fundamentally more efficient solution than reporting. In this work, we focus on designing solutions better suited to the counting variant.
Our Results.
Our main contribution is to design a data structure for the approximate range counting problem in high-dimensional Euclidean spaces. For any constant approximation parameter , our data structure uses near-linear space, polynomial preprocessing time, and query time that is sublinear for any sublinear number of points in the ambiguity zone, i.e., for any sublinear the query time is sublinear.
Our approach is reminiscent of classic results for the exact range searching problem in low-dimensional Euclidean spaces. In particular, a central notion of our approach is that of partition trees [32, 14]. We adapt well-studied relations between spanning trees with low stabbing numbers (which also appears as “crossing” in previous works) and partition trees (see, e.g., [15]) to our approximate setting. A key difference in our setting is that we use a stronger notion of stabbing; we say that a point -stabs a set if and (classic stabbing would correspond to the case where ). An important step in our preprocessing algorithm is finding a “light” edge, i.e., a pair of input points that is -stabbed by a polynomial in ratio of the relevant queries. Then, using the multiplicative weight update (MWU) method in a similar manner as [38, 15, 39], we are able to show that we can compute a spanning tree with low -stabbing number, implying that we can build a partition tree such that for any query, we only need to visit a bounded number of nodes. To traverse the partition tree, we need to be able to decide for each internal node if the corresponding subset is -stabbed by the query. We can only do this approximately, meaning that we may also explore nodes that are almost -stabbed, but the overall cost of this exploration is proportional to .
Theorem 1 (Simplified version of Theorem 17).
Given a set of points in , we can build a randomized data structure for the approximate range counting problem, with space usage in , preprocessing time in and sublinear query time if is also sublinear.
Our data structure is the first to achieve space usage that is near-linear in and polynomial in , and query time that is sublinear in and polynomial in for any sublinear . In Table 1, we juxtapose our result with previous known results that even implicitly solve the same problem. While LSH is originally proposed for the approximate near neighbor problem, where the data structure is only required to report one witness point within distance , Ahle et al. [2] proposed an LSH-based solution for the problem of reporting all points. Their data structure is adaptive; while building time and space can be that of an LSH table prepared for worst-case inputs (parameter in Table 1), query time is that of the best LSH parameters for the query/instance (parameter ). Moreover, LSH tuned for near-linear space [8] can solve the reporting problem with only a logarithmic overhead in space and query time, since we can amplify the probability that every near neighbor will eventually be encountered. Since both LSH-based methods can solve the reporting variant, they can also solve the counting problem. However, it is not clear whether one can modify such an approach to avoid looking into all near points. Although our result does not guarantee sublinear query time in the worst case, it advances prior space-efficient work in high dimensions by making the complexity depend on the number of points in the annulus rather than on all points inside the entire ball. Trivially, the bucketing method, when combined with a Johnson-Lindenstrauss dimension reduction (as in [20]), can solve the counting problem; after reducing the dimension, one can store the relevant information in grid cells near the dataset. Such methods that discretize the query space, while providing efficient query times, unavoidably have huge space requirements. Finally, when the dimension is constant, partition trees [14] solve the problem exactly, while BBD-trees [11] leverage improved query times for approximate solutions (although still exponential in ).
In addition to our worst-case guarantees, we present an algorithm inspired by learning theory. Specifically, this algorithm is query-driven, i.e., it receives a number of query samples and aims to construct the data structure that yields the best expected query runtime for the distribution of the queries. This way, we design a much faster preprocessing algorithm (from , the complexity falls to ), which gives us similar bounds for the average case.
Our approach is motivated by the viewpoint of analyzing algorithms through the lens of statistical learning (e.g., [19, 12]). While this has been influential in optimization and mechanism design, to the best of our knowledge, a similar treatment for data structures is absent. Although related ideas appear in learned index structures [31], LSH trees whose cutting rules are optimized with respect to the given dataset [7], learning-augmented binary trees with optimized search assuming access to advice from a frequency estimation oracle [30], these works do not directly cast the data structure construction itself as a PAC learning problem. We also remark that the related notions of self-improving [3] and instance-optimal algorithms [1] address different guarantees. A simplified version of our result follows:
Theorem 2 (Simplified version of Theorem 20).
Given a set of points in and a sample of queries from a query distribution , we can compute a partition tree with near-optimal expected visiting number for in time with high probability.
We believe this is a neat way to use tools from other areas to design efficient algorithms for difficult problems or problems with only existence guarantees, and it would be interesting to see what other data-structure problems might benefit from this viewpoint.
Organization.
In Section 2 we present notation and useful known results and prove auxiliary lemmas that will be used later. In Section 3 we analyze a data structure that supports approximate stabbing queries. Subsequently, in Section 4 we prove that a spanning tree with sublinear -stabbing number exists and can be computed in polynomial time, which we then use to prove that a partition tree with sublinear query time can be efficiently constructed in Section 5. In Section 6 we present our data-driven algorithm for building a partition tree with near-optimal expected visiting number. Missing proofs can be found in the full version.
| Method | Space | Prep. time | Query time |
|---|---|---|---|
| LSH [8] | |||
| Adaptive LSH [2] | |||
| Bucketing + JL [20] | |||
| BBD-Trees [11] | |||
| Partition trees [14] | |||
| Theorem 20 |
|
2 Preliminaries
We use the notation to hide the dependence on . For any , let be the grid of side length . Unless stated otherwise, denotes the Euclidean norm . For any and , denotes the Euclidean ball centered at , i.e., .
We say that a set of points is -stabbed by a point , if and only if there exists a point such that and there exists a point such that . We say that a pair of points (or an edge formed by them) is -stabbed by , if and only if is -stabbed by . For brevity, when , we say that a pair is -stabbed by if and only if it is -stabbed by . Given some and an edge set (if is a graph, we refer to its edges), denotes the -stabbing number of on , i.e., the number of edges in that are -stabbed by .
A partition tree built on a set of points is a tree where each node is associated with a subset , and for each node with children , we have and . For a partition tree , and a query , the visiting number of w.r.t. , denoted by is the number of nodes in which are either root of or their parent satisfies one of the following:
-
is -stabbed by , or
-
and , or
-
and .
Intuitively, the visiting number is an upper-bound estimate of the number of nodes that will be visited to answer a query approximately.
2.1 Range spaces
Fix a countably infinite domain set . The so-called Vapnik-Chernovenkis dimension [34, 35, 37] (VC dimension) of a set of functions from to , denoted by , is the largest such that there is a set , for which, for any there is a function such that . A range space is defined as a pair where is the domain and is a set of functions from to , or equivalently a pair of sets , where is the domain and is a set of ranges, i.e., subsets of . The dual range space of a range space defined by sets is a range space defined by sets , where . The dual VC dimension of a range space is the VC dimension of its dual. A set is an -net if .
Theorem 3 (-net theorem [24]).
Let be a range space of VC-dimension , where is a finite set. There exists a constant such that for any if we sample a set of points (independent picks with uniform probability) from , where
then, with probability at least , the resulting set is an -net for .
For any let . For any , let . By properly adjusting the parameters in Theorem 3.1 of [29], we obtain the following corollary. A similar result is obtained in [23].
Corollary 4.
Let be a countably infinite domain. Let be a set of functions from to with VC dimension and let be a probability distribution over . Also, let . There is a universal constant such that if then if we sample independently at random according to , then with probability at least , for any ,
A key requirement in building our data structures is to be able to efficiently sample from a multiset, which can also be updated. A multiset can be seen as a weighted set where weights correspond to multiplicities. In the following lemma, we show that one can maintain a multiset in a data structure that supports sampling and updates on the multiplicities.
Lemma 5.
[Multiset sampling data structure] Let , and let . Let be weights associated with the points of . There is an algorithm that preprocesses into a data structure, in time, using space, which supports the following operations:
-
1.
sampling of a point with probability in time,
-
2.
update of the weight of a point , in time.
Sampling uses random bits. If bit-complexity were taken into account, both preprocessing and updates would incur an additional bit-cost per arithmetic operation.
2.2 Embeddings
We use the following version of the Johnson-Lindenstrauss (JL) lemma [28], as expressed for a single vector and Gaussian matrices.
Theorem 6 ([27]).
Let be fixed and let . Draw a random matrix with i.i.d. entries . Then for any ,
We also make use of the following result on terminal embedding for Euclidean spaces.
Theorem 7 ([33]).
Let be a finite set of terminals. For every there exists a mapping with such that for all and all ,
For any , and any , we can compute a mapping in time such that the above property holds with probability at least . Moreover, for any , can be computed in time.
2.3 Model
We assume that our algorithms operate in the Real-RAM model with the additional assumption that the floor function can be computed in constant time. While it is known that this model is strictly more powerful than the classical word-RAM [16], it is often used in the Computational Geometry literature [22]. We stress that we do not use encodings that pack superpolynomial information into a single machine word or real number, and our use of is purely for convenience (e.g., discretization and bucketing).
One building block of our algorithms is a data structure known as the dictionary. A dictionary is a data structure which stores a set of (key, value) pairs and when presented with a key, either returns the corresponding value, or returns that the key is not stored in the dictionary. In our case, keys are typically vectors in and values are pointers to lists. In the Real-RAM model, we can use a balanced binary tree to build a dictionary with values, using preprocessing time and storage and query time.
3 Approximate stabbing queries
In this section, we design a solution for our main subproblem, that is, the problem of preprocessing a set of points to support queries that ask to determine if a query -stabs the given pointset. In particular, the data structure is required to determine if the query -stabs the pointset, if all points are near the query, or if all points are far from the query. The resulting data structure returns approximate answers, meaning that it allows for wrong decisions when the pointset is “nearly” -stabbed, as formalized in Theorem 10. This is sufficient for our purposes, which are building these data structures in internal nodes of a partition tree to assist in traversing the tree to answer a query.
Our main technical ingredient is a randomized embedding to the Hamming metric, which is implemented using LSH to partition the space into buckets and then applying random binarization of the buckets. A similar argument has been used in Alman et al. [5], where they first embed the points to and then use an LSH function to partition points into buckets; each bucket is then assigned to a random bit. Repeating the above sufficiently many times gives the desired embedding. We obtain a slightly more direct construction that does not need to embed the points in , but instead uses the LSH family of Datar et al. [18]. The final embedding succeeds in preserving distances with respect to a single scale; distances considered small with respect to a given threshold remain small, and large distances remain large. This is formally stated in the following lemma.
Lemma 8.
For any , there exists a randomized embedding , and specific , such that, for any , with probability at least ,
-
if then
-
if then .
Moreover, for any , can be computed in running time.
We aim to build a data structure that supports approximate “stabbing queries”. Given a query point we need to identify if there exists a pair of points in the input pointset that are (approximately) -stabbed by . Using the embedding of Lemma 8, we map points to keys in , and we store them in a dictionary, where each bucket is assigned the list of points mapped to it. We set slightly below to balance the number of buckets with the number of arbitrarily distorted distances from , in a way that both remain sublinear. To answer a query, we search the dictionary for an approximate near neighbor, i.e., a point within distance , and an approximate far neighbor, i.e., a point at a distance of at least . The following lemma indicates that a simple search over the buckets of a single dictionary is sufficient to guarantee that if there is a point within distance , we will find a point within distance with constant probability, and if there is a point at distance at least , we will find a point at distance at least with constant probability. We remark that for finding an approximate near neighbor, one could instead use the data structure of Andoni et al. [8] that provides near-linear space with comparable query time. However, we are not aware of a comparable result for computing an approximate far neighbor (which we also need and do).
Lemma 9.
Let and let . We can build a randomized data structure with preprocessing time and space in and query time in , such that for any query , it reports , , as follows:
-
if then ,
-
if then ,
where the probabilities are taken over the randomness during preprocessing.
Now using Lemma 9, we can prove the main result of this section, namely, a data structure that determines, with high probability, if a query point -stabs the preprocessed pointset, if it is near the entire pointset (the pointset is covered by ), or if it is far from the entire pointset (the pointset is disjoint from ). The data structure gives approximate answers in the following sense: if all points are within distance , and there is at least one point at a distance at most , it can falsely report that the pointset is -stabbed. Similarly, if all points are at a distance larger than , and there is at least one point at a distance of at least , it can falsely report that the pointset is -stabbed. If all points lie in the annulus then any answer is possible. Additionally, the success probability of the preprocessing is for each query individually, i.e., it is not for all queries simultaneously. Copies of this structure will be used as parts of the final data structure for the approximate spherical range counting problem.
Theorem 10.
Let be a set of points and let . We can build a randomized data structure such that for any query , it reports as follows:
-
if and then it returns “stabbed”,
-
if then it returns “covered”
-
if then it returns “disjoint”,
-
if and then it can return “stabbed”, or “covered”, and
-
if and then it can return “stabbed”, or “disjoint”.
-
if then it can return “stabbed”, or “disjoint”, or “covered”.
For each query and for any constant , the preprocessing of the data structure succeeds with probability , has preprocessing time and space and the query time is .
Proof.
We build independent data structures as in Lemma 9. For any query point , we query the data structures, and we report as follows. If we find a point such that and a point such that we return “stabbed”. Otherwise, if all returned points are within distance , we return “covered”. Else, we return “disjoint”.
If there is a pair in such that and then the probability that all data structures fail to return a point such that or a point such that is by union bound at most . Moreover, if all points of are within distance from (resp. at a distance of at least , then all returned points are within distance from (resp. at a distance of at least ), implying that the query algorithm correctly identifies “covered” (resp. “disjoint”).
4 Spanning trees with low -stabbing number
The -stabbing number of a spanning tree (or of a set of edges in general) is the maximum number of edges of that tree (or that set) that are -stabbed by any query range. Chazelle and Welzl showed in [15] a close relationship between the stabbing number of a spanning tree (the stabbing number is the special case of -stabbing number where ) and the maximum number of nodes visited, during a worst-case query, in a corresponding partition tree. Motivated by this, we wish to extend this notion to the -stabbing number and to achieve similar results, but without exponential dependency on as we deal with the approximation scheme. In this section, we show that a spanning tree with sublinear -stabbing number exists, and can be computed in polynomial time. Following [15], we use MWU to find a spanning tree with small -stabbing number. We remark that there are other alternatives [17, 21] in the literature for computing spanning trees with low stabbing numbers. While it is plausible that they can be modified to support our notion of -stabbing, they all share the same bottleneck, i.e., they depend at least linearly on the number of ranges.
Similarly, to [15], we start by showing that for any set of ball queries, we can always find a pair of points that is not -stabbed many times.
Lemma 11.
Let be a set of points and let be a multiset consisting of points from a universe set . Let . There exists a pair of points in which is not -stabbed by more than points of , where .
If is stored in a multiset sampling data structure as in Lemma 5, then for any constant , we can find such a pair of points in time with probability .
Proof.
If , then the statement trivially holds, since . Thus, we assume . For any two points , let be the set of points in that -stab . We define a range space . Notice that for any point , determining if reduces to evaluating the signs of the following four polynomials of degree in variables: , , , . This implies (see, e.g., [9][Theorem 8.3]) that the VC dimension of is . Hence, by Theorem 3, for any and constant , a random sample of points of is a -net for with probability . Moreover, we can find such a -net by randomly sampling from , using the assumed multiset sampling data structure of Lemma 5, in time.
By Theorem 7, there exists a terminal embedding to dimension such that , . The time needed to compute is in for the probability of success to be at least .
Now let be -stabbed by some , and further assume wlog that and . We obtain and . Hence, are -stabbed by . Moreover, by the triangle inequality, . Now consider the grid of side-length in and let be the set of all grid cells that intersect with at least one ball of radius centered at a point of . There are
such cells, where . Now let where is chosen sufficiently small (in terms of the hidden constants) so that . By the pigeonhole principle, there is either a pair of points of mapped to the same cell of , under , or there is a pair of points of that are not mapped to . In either case, the two points are not -stabbed by any point of . To see this, notice that if the two points are in the same cell, then they are within distance from each other, contradicting the fact that they are -stabbed (which would mean they are separated by a distance of at least ). If they are not mapped in then neither of them is within distance from any point of , also implying that they cannot be -stabbed by any point of . Since the two points are not -stabbed by any point of in the mapped space, their pre-images (under ) are not -stabbed by any point of . Since is a -net, it must be that at most points of -stab those two points.
We now focus on the running time needed to find a pair of points as above. By Theorem 7, we can map points under in time. To compute the two points, we essentially use the bucketing method (see, e.g., [20]) for balls centered at . We first store all cells of in a dictionary data structure. Then, for each point , we query the data structure to see if its cell is stored, i.e., . If then we store in a linked list in the bucket of . We can stop and output any two points stored in the same linked list, or any two points whose cells do not belong to . Iterating over all points of costs assuming that the dictionary is implemented using balanced binary trees. The overall probability of success follows from a union bound over failure events of the random sampling for computing and the failure event of computing the terminal embedding .
Knowing that a good pair exists, and that we can find it, we repeat the process times, in order to build a good forest, in the sense that it has a small -stabbing number. We use the MWU technique introduced in the context of trees with low stabbing number in [15].
Lemma 12.
Let be a set of points and let . There is a forest of trees on with at least edges, such that every point of -stabs edges, where , . For any , we can compute such a forest in time, with probability of success .
We conclude with the main result of this section, the tractability of a spanning tree with a sublinear -stabbing number. This follows from iterative applications of Lemma 12.
Theorem 13.
Let be a set of points. There is a spanning tree on such that every point of -stabs edges, where , .
Moreover, for any , we can compute such a spanning tree in time, with probability of success .
5 Spherical range counting
In this section, we show how to construct a partition tree for the approximate spherical range counting problem with sublinear query time. We first show how to get a partition tree with a sublinear visiting number given a spanning tree with a sublinear -stabbing number, by extending the procedure in [15] to accommodate the approximation scheme. Subsequently, we incorporate the data structures of Section 3 in the inner nodes of the partition tree to get sublinear worst-case guarantees.
We start by proving that having a spanning tree with low -stabbing number can give us a spanning path with low -stabbing number, which we then use to construct a partition tree with low visiting number. Lemmas 14 and 15 are adapted from [15] for -stabbing numbers, and the bounds become dependent on the ambiguity zone of the query.
Lemma 14.
Given a spanning tree on a pointset , we can build a spanning path on , in time, such that for any point , , where .
Lemma 15.
Given a spanning path on a pointset we can build a binary partition tree on , in time, such that for any point , we have , where .
We combine these results to get a bound on the visiting number of a partition tree.
Corollary 16.
Let be a set of points. For any , we can build a binary partition tree on , in time such that with probability every , with , visits nodes, where and .
Finally, we present the main contribution of our paper, which states that for the approximate spherical range counting problem, we can build a data structure in polynomial time that supports sublinear queries (if is also sublinear) and takes near-linear space. In our proof, we make use of Theorems 10, 13, and 15.
Theorem 17.
Let be a set of points, such that each is assigned a weight , and let . We can build a data structure for the approximate range counting problem with input , that uses space in , needs preprocessing time in and for each query , it returns an answer in time, where and . For each query, the preprocessing succeeds with probability , where is a constant hidden in the aforementioned time and space complexities.
Proof.
We first apply a JL transformation [28] to reduce the dimension to . By Theorem 6, and by applying a union bound over vectors, for any and any query , with probability , all distances from are approximately preserved within factors . This initial step costs time. For the rest of the proof, we assume that all points lie in . Then, we assume that queries are snapped to the grid , . This induces an additive error to the distances between and the query. Hence, points within distance from the query may be moved to a distance up to , and points at a distance of at least may be moved to a distance of at least . Notice that , hence it suffices to use a more refined error of for the rest of the construction and assume that the space is rescaled by a factor .
We build a binary partition tree on the input with error parameter using Corollary 16. The construction of can be done in time and be successful for a fixed , in that , with probability for any constant . For each internal node , let be the set of points in the leaves of the subtree rooted at . In each internal node , we build a data structure as in Theorem 10 on with error parameter , and we store the cumulative weight of the points in , i.e., . By Theorem 10, each construction of a data structure , can be done in time and be successful with probability for any constant . By a union bound over all inner nodes, we claim that all data structures are also successful for with probability . By Theorem 10, the time and space needed to build data structures for the inner nodes is near-linear per level of the tree (since each level defines a partition).
To answer a query , we traverse the tree and collect all cumulative weights in each internal node , whose associated data structure returns “covered”. We continue traversing the children of a node if and only if returns “stabbed”. By Corollary 16, assuming that the tree has been constructed correctly for , the number of nodes visited during the query algorithm for input is , where . By Theorem 10, the time needed to query a data structure in an internal node is , where . At each level of , the number of nodes whose data structures are queried is upper bounded by both and . Hence, the running time at level for query is , where is defined as follows:
because if then and if then . Now, since ,
where . We observe that the query algorithm will not explore any descendants of an internal node if returns “disjoint” when , or if returns “covered” when , in which case it takes into account . Thus, the answer is calculated by summing over cumulative weights of nodes corresponding to subsets such that .
6 Data-driven range searching
As we saw in the previous section, we can construct the partition tree in polynomial time. However, the exponent depends on , which we would like to avoid. In this section, we present an algorithm inspired by learning theory that constructs a partition tree with near-optimal visiting number in expectation, over the distribution of queries. Specifically, the algorithm will have access to a number of sample queries, and will construct a partition tree that is optimal for that sample - thus the algorithm is data-driven. Showing that uniform convergence is achieved, we prove that this partition tree is nearly optimal, in that its expected visiting number is nearly minimal.
In the next lemma, we show that using only a near-linear number of queries we can achieve uniform convergence for the expected -stabbing number, i.e., for any spanning tree, the estimation of the -stabbing number using only these queries is close to its real expected -stabbing number.
Lemma 18.
Let be a set of points in and let be a ball query distribution having as support a countably infinite set . It suffices to sample queries independently from , so that with probability at least , for any spanning tree of , is in .
The next lemma states that the number of nodes of a partition tree visited during a query search consists an upper bound on the -stabbing number of a corresponding spanning path of the points for the same query. Its proof is a straightforward adaptation of the third item of [15, Lemma 3.1].
Lemma 19.
If is a partition tree for P, then there exists a spanning path whose -stabbing number does not exceed the visiting number of .
We now prove the main result of this section.
Theorem 20.
Let be a set of points in and let be a ball query distribution having as support a countably infinite set . It suffices to sample a set of queries independently from , so that with probability at least , we can compute a partition tree such that
where . Moreover, given , the running time to compute is in .
Proof.
By Lemma 18, with probability at least , for any spanning tree of , is in
Now, let denote the edges of spanning tree and . Notice that for any spanning tree . Hence, we can compute , by first constructing a complete weighted graph on where we assign weight to each edge , and then computing the minimum spanning tree on that graph, using Kruskal’s algorithm. The running time of this step is , which corresponds to the step of building the graph.
References
- [1] Peyman Afshani, Jérémy Barbay, and Timothy M. Chan. Instance-optimal geometric algorithms. J. ACM, 64(1), 2017. doi:10.1145/3046673.
- [2] Thomas D. Ahle, Martin Aumüller, and Rasmus Pagh. Parameter-free locality sensitive hashing for spherical range reporting. In Philip N. Klein, editor, Proceedings of the Twenty-Eighth Annual ACM-SIAM Symposium on Discrete Algorithms, SODA 2017, Barcelona, Spain, Hotel Porta Fira, January 16-19, pages 239–256. SIAM, 2017. doi:10.1137/1.9781611974782.16.
- [3] Nir Ailon, Bernard Chazelle, Kenneth L. Clarkson, Ding Liu, Wolfgang Mulzer, and C. Seshadhri. Self-improving algorithms. SIAM J. Comput., 40(2):350–375, 2011. doi:10.1137/090766437.
- [4] Tomas Akenine-Möller, Eric Haines, Naty Hoffman, Angelo Pesce, Michał Iwanicki, and Sébastien Hillaire. Real-Time Rendering 4th Edition. A K Peters/CRC Press, Boca Raton, FL, USA, 2018.
- [5] J. Alman, T. M.Chan, and R. R. Williams. Polynomial representations of threshold functions and algorithmic applications. In IEEE 57th Annual Symposium on Foundations of Computer Science, FOCS 2016, 9-11 October 2016, Hyatt Regency, New Brunswick, New Jersey, USA, pages 467–476, 2016. doi:10.1109/FOCS.2016.57.
- [6] A. Andoni and P. Indyk. Near-optimal hashing algorithms for approximate nearest neighbor in high dimensions. Commun. ACM, 51(1):117–122, 2008. doi:10.1145/1327452.1327494.
- [7] Alexandr Andoni and Daniel Beaglehole. Learning to hash robustly, guaranteed. In Kamalika Chaudhuri, Stefanie Jegelka, Le Song, Csaba Szepesvári, Gang Niu, and Sivan Sabato, editors, International Conference on Machine Learning, ICML 2022, 17-23 July 2022, Baltimore, Maryland, USA, volume 162 of Proceedings of Machine Learning Research, pages 599–618. PMLR, 2022. URL: https://proceedings.mlr.press/v162/andoni22a.html.
- [8] Alexandr Andoni, Thijs Laarhoven, Ilya P. Razenshteyn, and Erik Waingarten. Optimal hashing-based time-space trade-offs for approximate near neighbors. In Philip N. Klein, editor, Proceedings of the Twenty-Eighth Annual ACM-SIAM Symposium on Discrete Algorithms, SODA 2017, Barcelona, Spain, Hotel Porta Fira, January 16-19, pages 47–66. SIAM, 2017. doi:10.1137/1.9781611974782.4.
- [9] Martin Anthony and Peter L. Bartlett. Neural Network Learning - Theoretical Foundations. Cambridge University Press, 2002. URL: http://www.cambridge.org/gb/knowledge/isbn/item1154061/?site_locale=en_GB.
- [10] Boris Aronov and Sariel Har-Peled. On approximating the depth and related problems. SIAM Journal on Computing, 38(3):899–921, 2008. doi:10.1137/060669474.
- [11] Sunil Arya and David M. Mount. Approximate range searching. Comput. Geom., 17(3-4):135–152, 2000. doi:10.1016/S0925-7721(00)00022-5.
- [12] Maria-Florina Balcan, Dan F. DeBlasio, Travis Dick, Carl Kingsford, Tuomas Sandholm, and Ellen Vitercik. How much data is sufficient to learn high-performing algorithms? J. ACM, 71(5):32:1–32:58, 2024. doi:10.1145/3676278.
- [13] Mark de Berg, Otfried Cheong, Marc van Kreveld, and Mark Overmars. Computational Geometry: Algorithms and Applications. Springer-Verlag TELOS, Santa Clara, CA, USA, 3rd ed. edition, 2008.
- [14] Timothy M Chan. Optimal partition trees. In Proceedings of the twenty-sixth annual symposium on Computational geometry, pages 1–10, 2010. doi:10.1145/1810959.1810961.
- [15] Bernard Chazelle and Emo Welzl. Quasi-optimal range searching in space of finite VC-dimension. Discret. Comput. Geom., 4:467–489, 1989. doi:10.1007/BF02187743.
- [16] Qi Cheng. On comparing sums of square roots of small integers. In Proceedings of the 31st International Conference on Mathematical Foundations of Computer Science, MFCS’06, pages 250–255, Berlin, Heidelberg, 2006. Springer-Verlag. doi:10.1007/11821069_22.
- [17] Mónika Csikós and Nabil H. Mustafa. Escaping the curse of spatial partitioning: Matchings with low crossing numbers and their applications. In Kevin Buchin and Éric Colin de Verdière, editors, 37th International Symposium on Computational Geometry, SoCG 2021, June 7-11, 2021, Buffalo, NY, USA (Virtual Conference), volume 189 of LIPIcs, pages 28:1–28:17. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2021. doi:10.4230/LIPIcs.SOCG.2021.28.
- [18] Mayur Datar, Nicole Immorlica, Piotr Indyk, and Vahab S. Mirrokni. Locality-sensitive hashing scheme based on p-stable distributions. In Jack Snoeyink and Jean-Daniel Boissonnat, editors, Proceedings of the 20th ACM Symposium on Computational Geometry, Brooklyn, New York, USA, June 8-11, 2004, pages 253–262. ACM, 2004. doi:10.1145/997817.997857.
- [19] Rishi Gupta and Tim Roughgarden. A PAC approach to application-specific algorithm selection. SIAM J. Comput., 46(3):992–1017, 2017. doi:10.1137/15M1050276.
- [20] S. Har-Peled, P. Indyk, and R. Motwani. Approximate nearest neighbor: Towards removing the curse of dimensionality. Theory of Computing, 8(1):321–350, 2012. doi:10.4086/toc.2012.v008a014.
- [21] Sariel Har-Peled. Approximating spanning trees with low crossing number, 2009. arXiv:0907.1131.
- [22] Sariel Har-peled. Geometric Approximation Algorithms. American Mathematical Society, USA, 2011.
- [23] Sariel Har-Peled and Micha Sharir. Relative (p,-Approximations in Geometry. Discrete & Computational Geometry, 45(3):462–496, April 2011. doi:10.1007/S00454-010-9248-1.
- [24] David Haussler and Emo Welzl. -nets and simplex range queries. Discrete & Computational Geometry, 2:127–151, 1987. URL: https://api.semanticscholar.org/CorpusID:27638326.
- [25] O. Huisman and R.A. de By. Principles of geographic information systems : an introductory textbook. ITC Educational Textbook Series. International Institute for Geo-Information Science and Earth Observation, Netherlands, 2009.
- [26] P. Indyk and R. Motwani. Approximate nearest neighbors: Towards removing the curse of dimensionality. In Proc. 30th Annual ACM Symp. Theory of Computing, STOC’98, pages 604–613, 1998. doi:10.1145/276698.276876.
- [27] P. Indyk and A. Naor. Nearest-neighbor-preserving embeddings. ACM Trans. Algorithms, 3(3), 2007. doi:10.1145/1273340.1273347.
- [28] William B. Johnson and Joram Lindenstrauss. Extensions of lipschitz mappings into hilbert space. Contemporary mathematics, 26:189–206, 1984. URL: https://api.semanticscholar.org/CorpusID:117819162.
- [29] Yi Li, Philip M. Long, and Aravind Srinivasan. Improved bounds on the sample complexity of learning. In Proceedings of the Eleventh Annual ACM-SIAM Symposium on Discrete Algorithms, SODA ’00, pages 309–318, USA, 2000. Society for Industrial and Applied Mathematics. URL: http://dl.acm.org/citation.cfm?id=338219.338267.
- [30] Honghao Lin, Tian Luo, and David P. Woodruff. Learning augmented binary search trees. In Kamalika Chaudhuri, Stefanie Jegelka, Le Song, Csaba Szepesvári, Gang Niu, and Sivan Sabato, editors, International Conference on Machine Learning, ICML 2022, 17-23 July 2022, Baltimore, Maryland, USA, volume 162 of Proceedings of Machine Learning Research, pages 13431–13440. PMLR, 2022. URL: https://proceedings.mlr.press/v162/lin22f.html.
- [31] Qiyu Liu, Maocheng Li, Yuxiang Zeng, Yanyan Shen, and Lei Chen. How good are multi-dimensional learned indexes? an experimental survey. VLDB J., 34(2):17, 2025. doi:10.1007/S00778-024-00893-6.
- [32] Jirí Matousek. Efficient partition trees. Discret. Comput. Geom., 8:315–334, 1992. doi:10.1007/BF02293051.
- [33] Shyam Narayanan and Jelani Nelson. Optimal terminal dimensionality reduction in euclidean space. In Moses Charikar and Edith Cohen, editors, Proceedings of the 51st Annual ACM SIGACT Symposium on Theory of Computing, STOC 2019, Phoenix, AZ, USA, June 23-26, 2019, pages 1064–1069. ACM, 2019. doi:10.1145/3313276.3316307.
- [34] Norbert Sauer. On the density of families of sets. Journal of Combinatorial Theory Series A, 13:145–147, 1972. doi:10.1016/0097-3165(72)90019-2.
- [35] Saharon Shelah. A combinatorial problem; stability and order for models and theories in infinitary languages. Pacific Journal of Mathematics, 41(1), 1972.
- [36] Abraham Silberschatz, Henry Korth, and S. Sudarshan. Database Systems Concepts. McGraw-Hill, Inc., USA, 5 edition, 2005.
- [37] Vladimir Vapnik and Alexey Chervonenkis. On the uniform convergence of relative frequencies of events to their probabilities. Theory of Probability and its Applications, 16:264–280, 1971.
- [38] Emo Welzl. Partition trees for triangle counting and other range searching problems. In Herbert Edelsbrunner, editor, Proceedings of the Fourth Annual Symposium on Computational Geometry, Urbana-Champaign, IL, USA, June 6-8, 1988, pages 23–33. ACM, 1988. doi:10.1145/73393.73397.
- [39] Emo Welzl. On spanning trees with low crossing numbers. In Burkhard Monien and Thomas Ottmann, editors, Data Structures and Efficient Algorithms, Final Report on the DFG Special Joint Initiative, volume 594 of Lecture Notes in Computer Science, pages 233–249. Springer, 1992. doi:10.1007/3-540-55488-2_30.
