SlowGuess/NeurIPS_2023_OCR huggingface dataset:
Lemma 4.6. Assume Euclidean  $V$ . Suppose that  $K \in \mathcal{M}(X) \cap \mathcal{M}(X')$ . If  $f: X \stackrel{\kappa}{\approx}_K X' \text{ for } \kappa < \frac{1}{2} \lambda_{\mathrm{ball}, X}(K)$  then  $\frac{1}{2} \lambda_{\mathrm{ball}, X}(K) - \kappa \leq \lambda_{\sup, X'}(K)$ .
The proof of Lemma 4.6 is a triangle-inequality argument in the Supplemental Material. The other results are immediate observations from the definitions.
5 Homological Matching
From Section 1, our purpose is to determine whether the geometry of  $K$  matches the geometry of  $X$ . In Section 4, we introduced "local simplicial matching" as a way to compare small-scale geometry. In this section, we introduce "homological matching" as way to compare large-scale geometry. Generally this is done by asking whether highly persistent features of  $X$  in  $V$  (as measured by  $HR$ ) are also highly persistent as features of  $X$  in  $K$  (as measured by  $HP$ ). This comparison is sensible if  $X$  and  $K$  are  $\lambda$ -locally simplicially matched, so that cycles can be identified between  $HR_{\lambda} = HP_{\lambda,0}$ . We phrase it algebraically in Definition 5.1, but Lemma 5.3 provides the interpretation that, among cycles born before  $\lambda$ , those of long persistence  $(\delta - \lambda)$  in  $HR$  have even longer persistence  $(\omega - \lambda)$  in  $HL$ , meaning that  $K$  has large-scale homological features corresponding to those of  $X$ .
Definition 5.1 (Homologically Matched). For  $K \in \mathcal{M}(X)$ , and  $0 \leq \lambda < \lambda_{\sup, X}(K) < \delta \leq \omega$ , we say that  $X$  and  $K$  are  $(\lambda, \delta, \omega)$ -homologically matched [HM] if the transition maps of  $HR$  and  $HP$  satisfy  $\ker HR_{\lambda \to \delta} \subset \ker HP_{(\lambda, \varepsilon_1) \to (\omega, \varepsilon_2)}$  for some  $0 \leq \varepsilon_1 \leq \varepsilon_2$ . Equivalently, if  $\ker HR_{\lambda \to \delta} \subset \ker HL_{\lambda \to \omega}$  for some Rips-like path  $L$ .
Definition 5.1 is guided by the Void Lemma (5.2) and the Matching Lemma (5.3).
Lemma 5.2 (Void Lemma). Suppose  $K \in \mathcal{M}(X)$  and  $0 < \lambda_{lo,X}(K)$ . Let  $L$  be any Rips-like path. If  $[Y] \in HR(X,V)$  with birth  $b < \lambda_{lo,X}(K)$ , then the deaths  $c, d, e$  of  $[Y]$  in  $HR(X,V)$ ,  $HR(X,K)$ ,  $HL$ , respectively, satisfy  $c \leq d \leq e$ . Moreover,  $c < e$  implies that  $K$  has a void that disrupts the death of  $[Y]$ , and that void contains a ball of radius  $r$  satisfying  $(\pi - 2)r \leq 2(d - c) \leq 2(e - c)$ .
In particular, if the class  $[Y]$  has  $e = \infty$  for the "inflexible" path  $L_{t} = P_{t,0}$ , then  $K$  contains a void. The proof of Lemma 5.2 appears in the Supplementary Material and uses simple distance estimates.
Lemma 5.3 (Matching Lemma). Suppose that all pairs in  $X$  have distinct lengths, and that  $X$  and  $K \in \mathcal{M}(X)$  are  $(\lambda, \delta, \omega)$ -HM. Then there is a Rips-like path  $L$  for which each dot  $(b, d)$  in the persistence diagram of  $L$  (or bar in the barcode) with  $b \leq \lambda < \omega < d$  corresponds via  $\lambda$ -LSM to a dot  $(b, c)$  in the persistence diagram of  $R$  with  $b \leq \lambda < \delta < c$ .
Note: to check whether  $X$  and  $K$  are  $(\lambda, \delta, \omega)$ -HM, it suffices to check a Rips-like path through  $P_{\lambda,0}$  and  $P_{\omega,\infty}$ . At the other extreme, we get an overly-strict bound by checking the "inflexible" Rips-like path  $L_t = P_{t,0}$ .
Because of the filtration stability of  $HP$  in Corollary 3.5,  $(\lambda, \delta, \omega)$ -HM is also stable to perturbation in  $X$ , as seen in Theorem 5.4.
Theorem 5.4 (Stability of Homological Matching). Suppose that  $X$  and  $K$  are  $(\lambda, \delta, \omega)$ -HM. If  $f: X \stackrel{\kappa}{\approx}_K X'$  such that  $X'$  and  $K$  are  $(\lambda - \kappa)$ -LSM, then  $(X', K)$  are  $(\lambda - \kappa, \delta - \kappa, \omega + \kappa)$ -homologically matched.
The proof of Lemma 5.3 is functorial, and Theorem 5.4 is a diagram chase. Both are given in the Supplemental Material.
Definition 5.5. Given  $X$  and  $K \in \mathcal{M}(X)$  let  $\lambda_{\mathrm{hi},X}(K)$  denote the minimum of those  $\delta$  for which  $X, K$  are  $(\lambda_{\mathrm{lo},X}(K), \delta, \infty)$ -HM.
6 Interpretation and Specification
Therefore, to answer our original purpose, we can assess whether a model  $K \in \mathcal{M}(X)$  is a "good geometric match" for  $X$  using the following procedure: (1) Regardless of  $K$ , examine the persistence diagram of  $R(X, V)$  to identify dots with early birth and long persistence, which TDA theory tells us (e.g. the Homology Inference Theorem [11]) should indicate genuine geometric features of  $X$ ; (2) for a model  $K \in \mathcal{M}(X)$ , compute  $\lambda_{\mathrm{lo}, X}(K)$  and  $\lambda_{\mathrm{hi}, X}(K)$ ; and (3) check whether those dots are born before  $\lambda_{\mathrm{lo}, X}(K)$  and die after  $\lambda_{\mathrm{hi}, X}$ .
If we believe that the multiscale geometric patterns among the points in  $X$  is meaningful, then this procedure is essentially a specification for how a "good" model ought to behave.
This process can give a "bad geometric match" in various ways, for example: if step (1) does not show a clear collection of well-separated dots, then it is unlikely that  $X$  actually has computable geometry that can be captured with the Rips complex; if step (2) yields  $\lambda_{\mathrm{lo},X}(K) = 0$ , then  $K$  has
voids between every pair of points in  $X$ , possibly due to under-sampling or over-fitting, and should not be trusted for any interpolative purpose; or if step (3) shows that the quadrant to the upper-left of  $(\lambda_{\mathrm{lo},X}(K),\lambda_{\mathrm{hi},X}(K))$  in the birth-death plane does not capture the desired dots of  $X$ , then  $K$  is failing to capture specific high-persistence features of  $X$ .
7 Computational Methods
In this section, we provide algorithms to estimate  $P_{\alpha,\varepsilon}$  in the practical case  $V = \mathbb{R}^n$ . These algorithms are implemented in Python (and development continues) in our open-source software at https://gitlab.com/geomdata/topological-parallax
The Rips complex  $R$  can be computed efficiently, using [26, 33]. But, the set  $K$  is known only through the indicator function  $k$ , and the Rips complex  $R(X,K)$  cannot be computed directly.
Consider  $x, y \in X$  joined by a  $V$ -geodesic (line segment)  $\overline{xy}$  of length  $2\rho_{V}(e)$ , representing a Rips edge  $e \in R(X, V)_{\rho_{V}(e)}$ . We would like to estimate  $\rho_{K}(e)$ , thus giving  $e \in P_{\alpha, \varepsilon}$  for  $\alpha = \rho_{K}(e)$  and  $\varepsilon = \alpha - \rho_{V}(e)$ . Some simple geometric observations allow us to estimate  $\alpha$  and  $\varepsilon$ .
Lemma 7.1. If there exists  $p \in \overline{xy}$  such that  $k(p) = 0$ , then  $e \notin P_{\alpha,0}$ .
This is because in  $\mathbb{R}^n$ ,  $\overline{xy}$  is the only path of minimal length.
Algorithm 7.2 (Estimation of  $e \in P_{\alpha,0}$ ). For each  $e \in R_{\alpha}$ , sample points  $p \sim \overline{xy}$  along the corresponding line segment  $\overline{xy}$ . (One method of sampling is simply to check the barycenter.) Return True for  $e$  if and only if “ $k(p) = 1 \forall p \sim \overline{xy}$ ”
Definition 7.3 (Transverse Disk). Let  $V = \mathbb{R}^n$ . Given an edge  $e \in R$  and a radius  $r$ , let  $D_r(e)$  denote the codimension-1 disk, oriented perpendicular to  $\overline{xy}$ , and centered at  $e$ 's barycenter  $\frac{x + y}{2}$ .
Any continuous path from  $x$  to  $y$  that does not intersect  $D_r(e)$ , must have length exceeding  $2\sqrt{(\rho_V(e))^2 + r^2}$ . If  $k(B_r(e)) = \{0\}$ , then all  $K$ -paths avoid  $D_r(e)$ , so all  $K$ -paths representing  $e$  must have length exceeding  $2\sqrt{(\rho_V(e))^2 + r^2}$ , giving the following Lemma.
Lemma 7.4. If  $K \cap D_r(e) = \emptyset$ , then  $\sqrt{(\rho_V(e))^2 + r^2} < \rho_K(e)$  and  $\frac{1}{2\rho_v(e)} r^2 < \rho_K(e) - \rho_V(e)$ .
For the second inequality, recall the 2nd order Taylor approximation  $\rho_V(e) + \frac{1}{2\rho_V(e)} r^2 \leq \sqrt{(\rho_V(e))^2 + r^2}$ .
Algorithm 7.5 (Bounding  $e \in P_{\alpha, \varepsilon}$ ). For each  $e \in R(X, V)$ , from  $r = 0$ , loop:
1. Evaluate  $k(p)$  for samples  $p \sim D_r(e)$ .
2. If  $k(p) = 0 \forall p$ , increment  $r$ . Else, break.
Return the lower bounds  $\sqrt{(\rho_V(e))^2 + r^2} \leq \alpha$  and  $\alpha - \rho_V(e) = \varepsilon$ .
These algorithms can be extended easily to sample radii along a sequence of points on the edge  $e$ , thus providing an estimated  $K$ -path for  $e$ .
7.1 Back-Propagation
Recent work has shown that various topological properties can be expressed as loss functions that are compatible with back-propagation methods; for example [9, 30, 32]. The method in [32] allows backpropagation for a piecewise-smooth loss function of the form  $\Phi (\mathrm{PDiag}(f))$ , where  $f$  is the filtration function on a simplicial complex, and  $\mathrm{PDiag}(f)$  is the persistence diagram for the  $f$ -persistent homology of that complex. Lemma 5.3 allows us to interpret homological matching via persistence diagrams  $\mathrm{PDiag}(f(Y))$ , where  $f(Y) = \min \{t:Y\in L_t\}$  for some Rips-like path  $L$ .
The following function  $\Phi$  could be used to improve homological matching in this framework. Suppose that  $X$  and  $K$  are  $\lambda_{\mathrm{lo}}$ -LSM. Consider the persistence diagrams  $\mathrm{PDiag}(R)$  and  $\mathrm{PDiag}(L)$ , where  $L$  is some Rips-like path through  $P(X, K)$ . By  $\lambda_{\mathrm{lo}}$ -LSM, we know that  $\mathrm{PDiag}(R)$  and  $\mathrm{PDiag}(L)$  are identical to the lower-left of  $(\lambda_{\mathrm{lo}}, \lambda_{\mathrm{lo}})$ . Choose a desired target value of  $\lambda_{\mathrm{hi}}$ . Now, we alter the filtration on  $L$  by the following  $\Phi$ : for dots  $(x, y)$  to the lower-left of  $\mathrm{PDiag}(L)$ ,
Figure 3: (1) Valid cyclo-octane data under 3D Isomap, colored for viewability. (2) Persistence Diagram of valid data, showing two 2-cycles and one 1-cycle. (3) Persistence Diagram from Parallax of model  $K_{2}$ , showing  $\lambda_{\mathrm{sup}}$  in magenta and three homologically matched cycles moved to infinity. These diagrams use diameter, not radius, via gudhi.
Figure 4: Distributions of bond lengths for conformations of cyclo-octane. Left: Bond lengths for the original data set, distributed tightly around  $1.52\AA$ , standard deviation of  $4.09\times 10^{-5}$  Å. Right: Bond lengths for all barycenters of edges  $e$  with  $2\rho_{V}(e) < 1.0$ , as would be allowed by the model  $K_{2}$  described in Figure 3. The bond lengths vary from 1.3844 to 1.5201 Å with a mean of 1.5059 Å. Also, bond lengths for all barycenters of edges  $e$  with  $2\rho_{V}(e) > 3.0$ , which are all allowed by the model  $K_{1}$ . The bond lengths vary from 0.8537 to 1.5201 Å with a mean of 1.2876 Å. The extremely narrow blue lines in the Right plot overlays the distribution from the original data set on the Left.
we penalize Wasserstein distance to  $\mathrm{PDiag}(R)$ . For dots  $(x,y) \in \mathrm{PDiag}(L)$  with  $x \leq \lambda_{\mathrm{lo}} < \lambda_{\mathrm{hi}} \leq y$ , we penalize by the quantity  $\| x - x_0\| \exp(-y)$ , where  $(x_0, y_0)$  is the best-match dot from  $\mathrm{PDiag}(R)$ . This loss function should force  $L$  to express long-lived topological features similar to those of  $\mathrm{PDiag}(L)$ , while minimizing the error introduced at scales below  $\lambda_{\mathrm{lo}}$ . As of this June 2023 publication, our code does not implement back-propagation to improve homological matching of models, but it is planned as upcoming work.
8 Example: Cyclo-Octane
The conformation space of cyclo-octane [18] is well-known to have novel topological structure. From physical principles, Martin et al. [22] show that real data sampled from the conformation space  $X$  can be reduced to lie in  $V = \mathbb{R}^{24}$ , and furthermore  $X$  must lie near a 2-dimensional stratified space consisting of a sphere and a Klein bottle. As in Section 1, we suggest that a machine-learning model  $k: V \to \{0,1\}$  trained to recognize cyclo-octane should not be considered "good" or trustworthy unless  $K = \{x : k(x) = (1)\}$  also takes this geometric form at the appropriate scale. In this section, we demonstrate how topological parallax can support or reject the hypothesis that the geometry of a model  $K$  matches the geometry of  $X$ .
Figure 3 visualizes the dataset  $X \subset \mathbb{R}^{24}$  using a 3D Isomap projection. Following the workflow from Section 5, we compute the 0-, 1-, and 2-dimensional persistence diagrams of  $X \subset \mathbb{R}^{24}$  using gudhi [34], and we observe that there are highly persistent features—one 1-cycle and two 2-cycles. The insight from [22] provides the meaning of these cycles, but the precise structure of the "data manifold" is typically not known a priori in examples. What we know in any case is that we want any potential  $K$  to respect these cycles, because the geometry of  $K$  should match the geometry of  $X$ , whatever it might be.
To understand the validity of a generated conformation, we compute its bond lengths—the distances between adjacent carbon atoms in the conformation. Bond length is an important physical property, together with bond angle, torsion angle, and energy [18]. Given the rigid geometry assumptions of the cyclo-octane data [22], we expect individual conformations generated by trained models to have similar bond lengths, and therefore the distribution of bond lengths from valid conformations should be similar to that of generated conformations. See Figure 4 to compare the bond lengths of conformations from the dataset  $X$  versus those at barycenters for short edges and long edges in the Rips complex  $R$  of  $X$ . Notably, interpolation across longer edges leads to invalid conformer geometries with too short of bond lengths and thus too sharp of bond angles for realistic molecules.
Suppose someone trains a standard neural network  $k_{1}$  to recognize this data. For this demonstration, we used a 3-layer fully connected network with a ReLU and a SoftMax, implemented in PyTorch. The network was trained to near-perfect accuracy within a few minutes on a two class problem of real data versus a nearby background. (Hyperparameters and training details are provided in the Supplementary Material.) Thus, the model  $k_{1}$  represents a common starting point that any data analyst might find encouraging. We apply Algorithm 7.2 to estimate which edges in  $R$  are accepted by  $k_{1}$ , and discover  $2\lambda_{\mathrm{lo},X}(K_1) = 3.45$ , which is the longest edge available. So, the Rips complex cannot distinguish  $K_{1}$  from the convex hull; the model does not reflect the geometry of  $X$ . This is particularly unfortunate in this case, because the model  $k_{1}$  might be used to generate many new conformations (any interpolation between two valid conformations), the vast majority of which will not be valid conformations. An alternative model  $k_{2}$  is offered, which is built from many local charts (details in Supplementary Material). The new model has  $2\lambda_{\mathrm{lo},X}(K_2) = 1.0$ . Moreover, the most persistent cycles in  $X$  have infinite death as measured by the Rips-like path  $L_{t} = P_{t,0}$ , so  $X$  and  $K_{2}$  are homologically matched with  $2\lambda_{\mathrm{hi}} \approx 1.25$ . Therefore, we can claim that the geometry of  $K$  matches the geometry of  $X$  at these scales.
The parallax complex and associated objects are well-defined only for datasets and models that satisfy Definition 1.1. The algorithms in Section 7 assume that  $V = \mathbb{R}^n$  with the Euclidean metric, but could be adapted for other geodesic spaces. Computation of the Rips complex and its persistence diagram scale favorably with the intrinsic dimension of the dataset  $X$ ; however, the sampling methods discussed in Section 7 scale with the dimension of  $V$ , which might invoke the Curse of Dimensionality. A deeper question is whether real-life datasets  $X$  of applied interest actually have enough sample density to exhibit a multiscale metric geometry, to which  $K$  can be compared. This question suggests a followup study to verify whether datasets and models with demonstrated real-world efficacy actually have computable and comparable geometries; that is, future work should use parallax to assess the profound epistemological question of whether metric geometry is a valid metaphor for understanding deep learning in real-life applications.
Work by all authors was partially supported by the DARPA AIE Geometries of Learning Program under contract HR00112290076, and by the National Institute of Aerospace (NIA) under sub-award C21-202066-GDA. We are very grateful to Bruce Draper of DARPA and Alywn Goodloe of NASA for their technical guidance during these efforts. We are also very grateful to Matt Dwyer, Rory McDaniel, Tom Fletcher, Yinzhu Jin, Jay Hineman, and Joey Tatro for technical discussions.
Note that the pinch in the middle is an artifact of the projection and does not represent a singularity in the actual dataset.
Gudhi uses diameter, not radius, as the filtration parameter.
[30] Adrien Poulenard, Primoz Skraba, and Maks Ovsjanikov. Topological Function Optimization for Continuous Shape Matching. Computer Graphics Forum, 37(5):13-25, August 2018. ISSN 01677055. doi: 10.1111/cgi.f.13487. URL https://onlinelibrary.wiley.com/doi/10.1111/cgi.f.13487.
[31] Elchanan Solomon, Alexander Wagner, and Paul Bendich. From Geometry to Topology: Inverse Theorems for Distributed Persistence, February 2022. URL http://arxiv.org/abs/2101.12288. arXiv:2101.12288 [cs, math, stat].
[32] Yitzchak Solomon, Alexander Wagner, and Paul Bendich. A Fast and Robust Method for Global Topological Functional Optimization. In Proceedings of The 24th International Conference on Artificial Intelligence and Statistics, pages 109-117. PMLR, March 2021. URL https://proceedings.mlr.press/v130/solomon21a.html.
[33] Guillaume Tauzin, Umberto Lupo, Lewis Tunstall, Julian Burella Pérez, Matteo Caorsi, Anibal M. Medina-Mardones, Alberto Dassatti, and Kathryn Hess. giotto-tda: : A Topological Data Analysis Toolkit for Machine Learning and Data Exploration. Journal of Machine Learning Research, 22(39):1-6, 2021. ISSN 1533-7928. URL http://jmlr.org/papers/v22/20-325.html.
[34] The GUDHI Project. GUDHI User and Reference Manual. GUDHI Editorial Board, 3.8.0 edition, 2023. URL https://gudhi.inria.fr/doc/3.8.0/.
[35] Shiqi Wang, Kexin Pei, Justin Whitehouse, Junfeng Yang, and Suman Jana. Efficient formal safety analysis of neural networks. In Proceedings of the 32nd International Conference on Neural Information Processing Systems, NIPS'18, pages 6369-6379, Red Hook, NY, USA, December 2018. Curran Associates Inc.
[36] Matthew Wheeler, Jose Bouza, and Peter Bubenik. Activation Landscapes as a Topological Summary of Neural Network Performance. In 2021 IEEE International Conference on Big Data (Big Data), pages 3865-3870, Orlando, FL, USA, December 2021. IEEE. ISBN 978-1-66543-902-2. doi: 10.1109/BigData52589.2021.9671368. URL https://ieeexplore.ieee.org/document/9671368/.
[37] Afra Zomorodian and Gunnar Carlsson. Computing Persistent Homology. Discrete Comput Geom, 33(2):249-274, February 2005. ISSN 1432-0444. doi: 10.1007/s00454-004-1146-y. URL https://doi.org/10.1007/s00454-004-1146-y.
A Supplementary Material: Formal Proofs
Proof of Corollary 2.5. The hypothesis  $[Y] \mapsto [0]$  implies that for some  $\alpha_0 \leq \alpha_2$  and  $\varepsilon_0 \leq \varepsilon_2$ , there exist chains  $Y \in P_{\alpha_1, \varepsilon_1}$  and  $Z \in P_{\alpha_2, \varepsilon_2}$  and  $W \in P_{\alpha_0, \varepsilon_0}$  such that  $\partial Z = Y - W$  in  $P_{\alpha_2, \varepsilon_2}$ . By Lemma 2.4, these chain can be included to their respective levels in  $R$ , giving  $Y \in R_{\alpha_1}$ ,  $Z \in R_{\alpha_2}$ , and  $W \in R_{\alpha_0}$ , still satisfying  $\partial Z = Y - W$  in  $R_{\alpha_2}$ . Hence, applying  $\iota_*$ , either  $\iota_*([Y])$  is trivial in  $HR_{\alpha_1}$ , or the transition map  $HR_{\alpha_1} \to HR_{\alpha_2}$  takes  $\iota_*([Y]) \mapsto [0]$ .
Proof of Lemma 2.6. If  $\varepsilon \geq \alpha$ , then the second condition in Definition 2.2 becomes  $\rho_K(Y) - \rho_V(Y) \leq \alpha$ , which is a trivial condition for  $0 \leq \rho_V(Y) \leq \rho_K(Y) \leq \alpha$ . Thus, the sets  $P_{\alpha, \varepsilon}$  are identical for all  $\varepsilon \geq \alpha$ .
Proof of Lemma 3.4. Suppose an edge  $e = (x_i, x_j)$  lies in  $P_{\alpha, \varepsilon}$ , meaning that  $e$  is represented by a  $V$ -geodesic of length  $2\rho_V(e)$  satisfying  $\rho_V(e) \leq \alpha$  and a  $K$ -geodesic of length  $2\rho_K(e)$  satisfying  $\rho_V(e) \leq \rho_K(e) \leq \min \{ \alpha, \rho_V(e) + \varepsilon \}$ . By Lemma 3.3, the corresponding edge  $e' = f_{\sharp}(e) = (f(x_i), f(x_j))$  satisfies  $\rho_V(e) - \kappa \leq \rho_V(e') \leq \rho_V(e) + \kappa$ . Moreover, by the data perturbation lemma on  $K$ , we know  $e'$  is represented by a  $K$ -geodesic with length  $2\rho_K(e')$  satisfying  $\rho_K(e') \leq \rho_K(e) + \kappa$ . Combining these overall, we have the parallax bounds
$$
\rho_ {V} (e ^ {\prime}) \leq \rho_ {K} (e ^ {\prime}) \leq \min \{\alpha , \rho_ {V} (e) + \varepsilon \} + \kappa
$$
which implies both  $\rho_{K}(e^{\prime})\leq \rho_{V}(e^{\prime}) + \varepsilon +2\kappa$  and  $\rho_{K}(e^{\prime})\leq \alpha +\kappa$
Proof of Lemma 4.6. Fix  $\lambda' = \frac{1}{2}\lambda_{\mathrm{ball},X}(K) - \kappa$ . We aim to show that  $X'$  and  $K$  are  $\lambda'$ -LSM. Fix any edge  $e' = (x',y')$  in  $R'$  satisfying  $\rho_V(e') \leq \lambda'$ . (The set of such edges might be empty, which is allowed by Definition 4.1.) For any such  $e'$ , there is a corresponding  $e = (x,y) \in R$  with  $f(x) = x'$ ,  $f(y) = y'$ , and  $f_{\sharp}(e) = e'$ . The triangle inequality provides  $\|y - x\| \leq \|y - y'\| + \|y' - x'\|$  +  $\|x' - x\| = 2\lambda' + 2\kappa \leq \lambda_{\mathrm{ball},X}(K)$ . We are assuming  $V$  is Euclidean, so all balls in  $V$  are convex. Since  $x',y,y'$  are all within the ball of radius  $\lambda_{\mathrm{ball},X}(K)$  around  $x$ , all their pairwise geodesics are included in  $K$ . Hence,  $e' \in P_{\lambda',0}'$ .
Proof of Lemma 5.2. The relationship  $c \leq d$  follows from Lemma 2.5. The relationship  $d \leq e$  follows from Lemma 2.3 and the observations that  $P_{\alpha, \alpha} = P_{\alpha, \infty} = R(X, K)$ . Suppose  $L$  is parameterized as  $L_{\alpha} = P_{\alpha, \varepsilon(\alpha)}$ . Suppose that  $c < e$ , so either  $c < d$  or  $d < e$ .
If  $c < d$ , then we can conclude that the edge that killed  $[Y]$  in  $HR(X, V)$  is not present in  $HR(X, K)$ , so that edge intersected  $K^c$ , which is an open set. Hence, that killing edge intersects a void in the sense of Defn 1.2. Let  $B_r$  be an open ball in  $K^c$  centered on some point on the  $V$ -geodesic of length  $2c$ . If  $B_r = K^c$ , then the shortest  $K$ -geodesic replaces the diameter  $2r$  with the half-circumference  $\pi r$ . Therefore,  $\pi r - 2r \leq 2d - 2c$ .
If  $d < e$ , then  $[Y] \mapsto [0]$  via  $HP_{b,b} \to HP_{d,d}$  and via  $HP_{b,b} \to HP_{e,\varepsilon(e)}$ , but not for any  $HP_{b,b} \to HP_{\alpha, \varepsilon(\alpha)}$  with  $\alpha < e$ . Therefore, there is a  $K$ -geodesic of length  $2d$  and a different  $K$ -geodesic of length  $2e$ , either of which could kill  $[Y]$ . The former edge is not allowed in  $L$  because  $0 \leq \varepsilon(d) < d - c$ . Hence,  $c < d$ , returning us to the first case.
Proof of Lemma 5.3. Let  $L$  be a Rips-like path given by Definition 5.1. Because  $X$  and  $K$  are  $\lambda$ -locally simplicially matched, the filtrations levels of  $R$  and  $L$  are identical up to  $\lambda$ . Therefore, there is a bijection between the persistence diagrams of  $R$  and  $L$  for all dots born by  $\lambda$ .