Adaptive Metrics for Adaptive Samples

In this paper we consider adaptive sampling's local-feature size, used in surface reconstruction and geometric inference, with respect to an arbitrary landmark set rather than the medial axis and relate it to a path-based adaptive metric on Euclidean space. We prove a near-duality between adaptive samples in the Euclidean metric space and uniform samples in this alternate metric space which results in topological interleavings between the offsets generated by this metric and those generated by an linear approximation of it. After smoothing the distance function associated to the adaptive metric, we apply a result from the theory of critical points of distance functions to the interleaved spaces which yields a computable homology inference scheme assuming one has Hausdorff-close samples of the domain and the landmark set.


From Surface Reconstruction to Homology Inference
To reconstruct a surface from a point set, one needs a sample that is sufficiently dense with respect to not just the local curvature of the surface, but also the distance to parts of the surface that are close in the embedding but far in geodesic distance. Otherwise, algorithms have no way of identifying which geometrically close sample points correspond to local neighborhoods in the surface. Adaptive sampling with respect to the so-called local feature size, introduced by Amenta and Bern [1], neatly characterized said "good" samples and was then used in many later works on surface reconstruction with topological guarantees [2]. Such adaptive samples are in contrast to uniform samples, where a single parameter determines the density, usually chosen as the minimum of the local feature size, which results in amuch larger sample.
Later work on geometric and homological inference related the topology of unions of balls centered at a sample X near the unknown set X to the topology of X itself. A union of balls with a fixed radius can be viewed as a sublevel set of the distance function to X. If we have an adaptive sample, then we would like to scale the radii of the balls as well. However, if the sample is adaptive with respect to a local feature size defined as the distance to an unknown set L, another approximation L near L is necessary. Indeed, one interpretation of some Voronoi-based surface reconstruction algorithms is that first an approximation L to the medial axis L is computed from the Voronoi diagram of the sample X of the unknown surface X.
We present a new perspective on adaptive samples. For any pair of disjoint, compact sets X and L, we define a metric on R d \ L with the property that a uniform sample of X in the new metric corresponds to an adaptive sample in the Euclidean metric. This metric can be viewed as a smoothing of an adaptive metric used by Clarkson [3] and this formulation has connections to recent work on path planning [4,5] and density-based distances [6]. The main motivation is establishing a connection between adaptive sampling theory and the critical point theory of distance functions used extensively to prove topological guarantees in topological data analysis [7,8,9]. The latter theory gives natural topological equivalences between sublevel sets of smooth Riemannian distance functions. By considering these topological equivalences with respect to constructed interleavings between the sublevel sets of a smooth adaptive metric distance function and the unions of Euclidean balls constructed from approximations to X and L we are able to to provide a computable homology inference method for the domain.

Background
For the duration of this section, let L and X denote disjoint subsets of R d that are compact with respect to the standard Euclidean topology. For x, y ∈ R d , denote by Path(x, y) the set of continuous paths from x to y, parametrized by Euclidean arc-length. In a similar fashion, denote by Path(x, Y ) the set of continuous paths from x to any y ∈ Y . For any compact set .
This is only well-defined over R d \ L as f L (l) = 0 for all l ∈ L so any path achieving a finite integral is entirely contained in this region, and notably this implies the paths are bounded away from L. We leave it to the reader to confirm that this is indeed a metric. The length of a unitspeed path γ : [0, a] → R d is denoted as |γ| := γ dz = a 0 dt. We use the descriptor adaptive for the metric as the definition naturally describes a collection of metrics dependent on the choice of L. The adaptive metric notably coincides with the minimum cost of the paths between two given points as used in the robot motion-planning works of Wein et al. and later Agarwal et al. [5,4]. In particular, the cost of a path is the line integral of the inverse of the "clearance" of each point along the path to the obstacle, where the obstacles in consideration are the polygons in the plane they consider for their obstacles. Visualizing (and computing) the optimal paths becomes quite complicated as L becomes more irregular. In [5] it is proven that when L is a single point in R 2 the minimal paths are logarithmic spirals, and when L is a line segment the minimal paths are circular arcs. For . Note that f L X (·) is a proper distance function and f L X (·) is not, however the latter can be viewed as a first-order approximation of the former. The distance function f L X (·) is not smooth in general, but a smooth Riemannian distance function can be constructed that approximates it arbitrarily well (see Section 6), however it is a 1-Lipschitz function as shown in Lemma 2. A function f between two metric spaces (X, d X ) and (Y, d Y ) is said to be K-Lipschitz for some constant K > 0, if for all x, y ∈ X, d Y (f (x), f (y)) ≤ Kd X (x, y).
Proof. Consider any a, b ∈ R d and ε > 0. By definition there exists x ∈ X and γ 1 ∈ Path(a, x) By construction the concatenation of the two paths γ 1 * γ 2 is in Path(b, X) with an appropriate reparameterization, so for all ε > 0, .
As both f L X and f L X are real-valued functions, they generate sublevel sets, also known as offsets in the topological data analysis. The sublevel sets of former are the true offsets generated by the adaptive metric d L while the latter's are approximations of the true offsets.
Definition 4. For any compact set X ⊂ R d \ L, for some compact set L ⊂ R d , the approximate α-offsets with respect to d L are Note the approximate offsets can also be expressed as the union of metric balls of varying radii. One of the basic goals of this work is to relate the adaptive offsets with respect to X and L to the approximate offsets with respect to X and L via topological interleaving, where L and X are samples of L and X respectively. Once this achieved one may apply the Persistent Nerve Lemma to the interleaving as each B L X (α) at each scale is a collection of Euclidean balls, leading to a computational homology inference method.
We can extend an adaptive metric d L to the associated Hausdorff distance, which is a measure of the dissimilarity between two subsets of the metric space are.
The Hausdorff distance between a space and a sample is a measure of the quality of the sample, namely the uniformity of it with respect to the space it is sampled from. In this paper when we say a uniform sample, we mean one that is Hausdorff-close to the original space. By assuming a bound on the Hausdorff distance between a compact set X and a point sample X, we can provide containments between the offsets generated by f L X and f L X for particular scales. The constructed symmetric relationship between the offsets over all scales is an example of a so-called filtration interleaving.
. By a symmetric argument, the latter assertion holds.
In contrast to the aforementioned uniform samples with respect to the adaptive metric, the following definition describes our realization of adaptive sampling with respect to the Euclidean metric.

Definition 7. Given compact set L ⊂ R d and compact sets
Recall that the local feature size at a point on a manifold is the distance from it to the manifold's medial axis-the closure of the collection of points with more than one closest point to the manifold. Our definition of an ε-sample is a generalization of the original notion of an adaptive sample defined by Amenta and Bern [1], which only considers L to be the medial axis of X, and also presumes that X is a manifold rather than just a compact set.
Also, note that the relation between an ε-sample and the approximate offsets. If one has an ε-sample X of X, then for all

Adaptive Sampling
In this section we prove that a uniform sample with respect to the adaptive metric corresponds to an adaptive sample with respect to the Euclidean metric and vice versa under mild parameter assumptions. The following lemma is an analogous correspondence for the case of two points between a bound on the adaptive distance between them and their proximity with respect to the Euclidean metric. The choice of a being the central point in the two statements is chosen arbitrarily. Theorem 9 is a direct result of this lemma.
Note that as a − b is the length of the shortest path between a and b in the Euclidean metric, a − b ≤ |γ|. We then have the following inequalities resulting from this fact and f L being 1-Lipschitz.
Considering ε going to 0 and rearranging the resulting inequality we have that |γ| ≤ δ . For all points z in the straight line segment ab a − z ≤ a − b so the following chain of inequalities holds, leading to the desired inequality.
This lemma directly leads to our theorem relating adaptive samples in the Euclidean metric to uniform samples in the adaptive metric d L with respect to some compact set L.
Theorem 9. Let L and X be compact sets, let X ⊂ X be a sample, and let ε ∈ [0, 1) be a constant. If X is an ε-sample of X with respect to the distance to L,

Interleavings
A filtration is an increasing sequence of sets or topological spaces F = (F α ) α≥0 where for all α, F (α) ⊂ R d and F (α) ⊆ F (β) iff α ≤ β. We specifically consider filtrations that are generated by the sub-level sets of a real-valued function f : R d → R, i.e. the filtration F whose set at scale α is defined as Interleavings provide a concrete relationship between two filtrations' sets. In topological data analysis, researchers primarily focus on or utilize interleavings that are symmetric, ones where h 1 = h 2 , and are interleaved over either the intervals (−∞, ∞), (0, ∞) or [0, ∞). Relaxing what is considered an interleaving allows us to define specific sampling conditions for which the homology inference result is valid. The following is a generalization of the standard notion of a (symmetric) interleaving, in which we allow for asymmetry and restrictions of the intervals over which the filtrations' elements are interleaved. r)) whenever r, h 1 (r) ∈ (s, t) and G(r) ⊆ F (h 2 (r)) whenever r, h 2 (r) ∈ (s, t). We require that the functions h 1 , h 2 be non-decreasing over the interval (s, t).
Proving the existence of an interleaving between filtrations, explicitly or implicitly, is used in topological data analysis to provide insight into the topological and geometric differences (and similarities) between the filtrations when one filtration is generated by a particularly nice function. This idea, as it applies to this work, will be expanded upon and utilized in Section 6 by considering the smoothing of f L X . The following lemma gives us an iterative way to combine pairs of interleavings over the intersections of their interleaving intervals and will ultimately be used to construct the desired relationship. h 1 (r))). Similarly, given r, h 2 (h 4 (r)) ∈ (s 3 , t 3 ), we have H(r) ⊆ G(h 4 (r)) ⊆ F (h 2 (h 4 (r))).
For the rest of this section, let L ⊆ L ⊂ R d and X ⊆ X ⊂ R d \ L be compact sets, with L and X representing samples of L and X respectively. The desired relationship between the adaptive offset filtration A L X and the approximate offset filtration B L X will be provided by an interleaving that is built up by multiple applications of Lemma 11 to the interleavings constructed in the remainder of this section.

Approximating
Proof. This lemma is identical to Lemma 6 expressed in our interleaving notation.

Approximating the Adaptive Metric
Next we show that we may reasonably approximate the sublevel sets of f L X by Euclidean balls, which are much easier to work with than arbitrary sublevel sets, particularly when computing intersections. These results may be viewed as an extension of the adaptive sampling results of the previous section, Lemma 8 and Theorem 9.
Proof. Consider r ∈ [0, 1) and y ∈ A L X (r) such that f L X (y) ≤ r. By definition there exists x ∈ X such that d L (x, y) ≤ r. By Lemma 8, this implies that x − y ≤ r 1−r f L (x), which implies that y ∈ B L X ( r 1−r ). Now consider r ∈ [0, 1 2 ) and y ∈ B L X (r). By definition, y ∈ ball(x, rf L (x)) for some x ∈ X so x − y ≤ rf L (x). Applying Lemma 8, we have then have that d L (x, y) ≤ r 1−r , and as f L X (y) ≤ d L (x, y), y ∈ A L X ( r 1−r ).
Proof. This follows from considering Lemma 13 with respect to the interleaving notation.

Approximating L with L
A landmark set L is often only approximate-able as it is frequently dependent on X whose shape is object of interest in the first place. One may only be able to construct a finite point set sampled from it. For example, in the case where L is the medial axis of X there are several known techniques for approximating L, e.g. taking some vertices of the Voronoi diagram [1,2]. By default this uncertainty prevents accurate evaluation of f L and by extension d L . We would like to provide some sampling conditions that allow us to reasonably infer information about L, and said functions, by only looking at a sample L.
Interestingly, the sampling conditions we use for X are dual to those used for L. Specifically we assume an upper-bound on d X H (L, L), or alternatively by Theorem 9, L must be an adaptive sample of L with respect to the distance to X.
Proof. Begin with arbitrary r ∈ (0, ∞) and x ∈ B L X (r). There is a point p ∈ X such that x−p f L (p) ≤ r and there is also a closest point z ∈ L to p, because L is compact, so that f L (p) = p − z .
Theorem 9 and our assumption that d X H (L, L) ≤ δ together imply that there exists y ∈ L such that We also know by the definition of the distance-to-set function that so we can relate f L (p) to f L (p) as follows [by (1) and (2)] .
Collectively the following holds,

Putting it all together
We can now combine all the previous interleaving results using Lemma 11 to arrive at our penultimate theorem which establishes an interleaving between the approximate offsets filtration for the approximate spaces to the adaptive metric offsets filtration for the true spaces.

Critical Points of Distance Functions
Here we give a minimal presentation of the critical point theory of distance functions that motivates the need for interleavings of sublevel sets of the distance functions we consider. Given a smooth Riemannian manifold M and a compact subset X ⊂ M consider the function f X : M → R that maps each point in M to the distance to its nearest point in X as determined by the metric on the manifold. The gradient of f X is well-defined on M and its critical points are those points on which the gradient evaluates to 0. The critical values of f X are the values r ∈ R ≥0 such that f −1 X {r} contains a critical point. The critical point theory of distance functions developed by Grove [9] and others extends ideas from Morse theory to these distance functions. In particular, the theory provides us the following result.
This implies that for intervals that don't contain critical values, the inclusion maps between elements of the filtration on those intervals are all all homotopy equivalences and therefore induce natural isomorphisms at the homology level. We will use this in the next section to infer information about the homology of filtrations that are interleaved with such a filtration generated by a Riemannian distance function.

Smooth Adaptive Distance and Homology Inference
We will now introduce the smoothed distance function f L X and use it in conjunction with the results proved in Section 5 to provide a method to infer the homology of the so-called smooth adaptive offsets by looking solely at the approximate offsets.
For a compact set L ⊂ R d and β ≥ 0 denote by L β := {x ∈ R d | min y∈L x − y ≤ β} the offsets of L with respect to the Euclidean metric. The following lemmas gives upper and lower bounds on the value of a smoothing of the distance-to-set function f L , f L , which is defined on an arbitrarily smaller subset of Euclidean space.
Lemma 17. Consider a compact set L ⊂ R d . Given α ∈ (0, 1), for all β ∈ (0, 1), there exists smooth function f L : Proof. By a result from [10], for all ε > 0, there exists a smoothing f L : Choose ε = βα, for the given α ∈ (0, 1). By the approximation property of f L , for all Consider f L as defined in Lemma 17. Using this we can define a smooth adaptive distance function f L X and provide upper and lower bounds on its value with respect to the original adaptive distance function f L X . For x, y ∈ R d \ L β , we define and f L X (y) := d L (y, X).
Lemma 18. Given α, β ∈ (0, 1) and a smooth function f L defined on R d \ L β as constructed in the proof of Lemma 17, consider a compact set X ⊂ R d \ L β . The Riemannian distance function f L X (·) := d L (·, X) satisfies the following property for all y ∈ R d \ L β , Proof. Given two points x, y ∈ R d \ L β , and any ε > 0, consider γ, γ ′ ∈ Path(x, y) such that We then have the following inequalities resulting from inverting the inequalities in Lemma 17.
. Since these equalities hold for all ε > 0, then we can conclude that for all pairs x, y ∈ R d \ L β , 1 1+α d L (x, y) < d L (x, y) < 1 1−α d L (x, y). Now consider y ∈ R d \ L β . Denote x ′ = argmin x∈X d L (y, x) and x ′′ = argmin x∈X d L (y, x). We remind the reader that these points' existences are guaranteed by the Extreme Value Theorem. By examining these variables with respect to the previous inequality we know that By applying the definitions of both adaptive distance functions to the previous expression we obtain the desired inequality, Define the Riemannian adaptive offsets of X as A L X (α) := {x ∈ R d | f L X (x) ≤ α}, and denote the corresponding filtration by A L X . The following result reestablishes Lemma 18 in the language of filtrations and establishes an interleaving of the Riemannian adaptive offsets with the original adaptive offsets.
Proof. By Lemma 18, there exists a Riemannian distance function f L X : R d → R, such that for all y ∈ R d \ L β , so for r ∈ (0, ∞) and y ∈ A L X (r), f L X (y) ≤ r, and thus f L X (y) ≤ (1 + α)r, which implies that y ∈ A L X ((1 + α)r), so A L X (r) ⊆ A L X ((1 + α)r). On the other hand, for r ∈ (0, ∞) and y ∈ A L X (r), f L X (y) ≤ r, and thus f L X (r) ≤ r 1−α , so A L X (r) ⊆ A L X ( r 1−α ). Combining the previous corollary with Theorem 15 in Subsection 4.4, we obtain an interleaving between the Riemannian adaptive offsets and the approximate offsets. This will then allow us to apply Lemma 16 and standard topological data analysis techniques to this interleaving to give a method of homology inference for arbitrary small offsets of X as we have a Reimannian distance function generating the smooth adaptive offsets filtration.
Furthermore, if we assume that our approximation X of X is a finite sample, then each B L X (α) at any scale is the union of a finite number of Euclidean balls. We may then consider the good covers {ball(x, αf L (x))} x∈ X of each B L X (α), and thus the corresponding good cover filtration of B L X . Note these are good covers as each element is a Euclidean balls and thus their intersections are contractible so by the Nerve Theorem [12], H * (Nrv({ball(x, αf L (x))} x∈ X )) ∼ = H * (B L X (α)). As the interleaving maps are inclusions, the Persistent Nerve Lemma [13] applies to the result of Diagram 4 combined with the above isomorphisms. This allows us to examine the nerves to compute the homology of the arbitrarily small adaptive offset of X. Explicitly it yields the following computable inference equality.