Persistent homology detects curvature
In topological data analysis, persistent homology is used to study the “shape of data”. Persistent homology computations are completely characterized by a set of intervals called a bar code. It is often said that the long intervals represent the “topological signal” and the short intervals represent “noise”. We give evidence to dispute this thesis, showing that the short intervals encode geometric information. Specifically, we prove that persistent homology detects the curvature of disks from which points have been sampled. We describe a general computational framework for solving inverse problems using the average persistence landscape, a continuous mapping from metric spaces with a probability measure to a Hilbert space. In the present application, the average persistence landscapes of points sampled from disks of constant curvature results in a path in this Hilbert space which may be learned using standard tools from statistical and machine learning.
Key words and phrases:topological data analysis, persistent homology, average persistence landscape
2010 Mathematics Subject Classification:55N99
Persistent homology is an important tool of topological data analysis (TDA). A goal of TDA is to summarize and learn from the “shape of data”. Often this “shape” is interpreted as the topological structure, such as the number of connected components and other homological features such as holes and voids. However, persistent homology is also sensitive to geometry.
The result of a persistent homology computation may be summarized as a set of intervals called a bar code or a set of points with called a persistence diagram. These give the parameter values for which a homological feature persists. In either case, one hopes to use this summary to make inferences on the underlying object from which the data has been sampled. An oft-repeated philosophy is that the long intervals in the bar code or the points distant to the diagonal in the persistence diagram represent the “topological signal” while the short intervals or the points close to the diagonal represent “noise”.
However, TDA has been used to understand geometric structures in many applications, such as: force networks in particulate systems [25, 23]; protein compressibility ; fullerene molecules ; amorphous solids ; the dynamics of flow patterns ; phase transitions ; sphere packing and colloids ; brain arteries ; craze formation in glassy polymers ; and pores in rocks .
We will provide a justification for this work by proving that the short intervals can in fact be used to infer the geometry of the underlying object from which the object has been sampled. Furthermore, we will present a general framework for solving inverse problems using a continuous mapping of bar codes or persistence diagrams to a Hilbert space, called the average persistence landscape [5, 8]. We will apply this framework to learning curvature.
1.1. Theoretical results: short bars detect geometry
Let denote the unit disk in the surface of constant curvature , with . For , , and , these surfaces are the Euclidean plane, the unit sphere, and the hyperbolic plane. All of these disks are contractible, so their reduced singular homology is trivial, and thus homology is unable to distinguish between them. In fact, the spaces are homeomorphic. Endow with the probability measure proportional to the surface area measure. We will show that the persistent homology of points sampled from can both recover in theory and effectively estimate in practice.
We prove that for three points sampled from the persistence of the corresponding cycle in the Čech complex is largest when the points are pairwise equidistant (Theorem 3.6). Furthermore if this pairwise distance is fixed then we derive an analytic expression for the corresponding persistence as a function of , which is continuous and increasing (Theorem 3.7). Combining these results, we have the following.
Let denote the maximum (Čech) persistence for three points on a surface of constant curvature with pairwise distances at most some fixed constant. Then is an invertible function.
We will also give several procedures for estimating from the persistent homology of the Vietoris-Rips complex on points sampled from . Before we summarize our computational results we describe our general framework.
1.2. A framework for solving inverse problems: inference using average persistence landscapes
Consider a compact metric space together with a Borel probability measure with full support. Call a metric measure space. Let be the diameter of . Let . Sample independently according to and consider the pairwise distances . From this data one may compute the persistent homology of the corresponding Vietoris-Rips complex, which may be represented by the corresponding persistence landscape . Sampling is equivalent to sampling a point in according to . Let be the measure induced by on , the convex hull of the persistence landscapes of persistence diagrams consisting of at most points with . The average persistence landscape is , the expectation of the random variable with respect to the probability measure .
We may estimate the average persistence landscape as follows. If we sample as above times and average the resulting persistence landscapes, we obtain the empirical average persistence landscape . The empirical average persistence landscape converges to the average persistence landscape (pointwise  and uniformly ).
Now assume that is a compact subset and that we have a continuous map from to metric measure spaces with the Gromov-Wasserstein metric . Fix . By [8, Remark 6], the map from metric measure spaces with the Gromov-Wasserstein metric to their average persistence landscapes is continuous. Thus, composing with the average persistence landscape we have a continuous map from to , a Hilbert space containing the persistence landscapes and average persistence landscapes .
Assume that for some unknown , we are able to sample points from the metric measure space and compute their pairwise distances. In this case we can compute the empirical average persistence landscape . We now have the following inverse problem. Given training data , can we estimate from ?
We will demonstrate the feasibility of solving this inverse problem for the case in which and is the unit disk in the surface of constant curvature with probability measure proportional to the surface area measure. In this case, the composition of with the average persistence landscape is a parametrized path in . Our goal is to learn this parametrized path and to use it to estimate curvatures from empirical average persistence landscapes.
1.3. Computational results
We apply the framework in the previous section to estimating curvature from sampled points and pairwise distance data.
We estimate curvature in the supervised and unsupervised settings. In the supervised setting we start with training data given by curvatures and corresponding empirical average persistence landscapes for homology in degree and homology in degree , for points. In both settings, we sample values of iid from and compute the corresponding empirical average persistence landscapes. Using these empirical average persistence landscapes, we estimate the corresponding curvatures: using both nearest neighbors and support vector regression in the supervised setting; and using principal components analysis in the unsupervised setting. See Figure 1, where we use the concatenations of the degree and degree persistence landscapes. The root mean squared error in our estimates is 0.056 for nearest neighbors, 0.017 for support vector regression, and 0.128 for principal components analysis. For more computational results, see Table 1. Furthermore, we estimate the fifth and ninety-fifth percentiles using quantile support vector regression. See Figure 9.
We also repeat most of the above estimates for the much more difficult computational setting in which all nonzero pairwise distances are sorted and replaced with their corresponding ordinal numbers. This is appropriate for neuroscience data in which the distances are only known up to rescaling by an unknown monotonic function . In this case, the set of nonzero pairwise distances is the same for all curvatures. Nevertheless, we are still able to provide reasonable curvature estimates. See Figure 11. The root mean squared error in our estimates is 0.262 for nearest neighbors, 0.171 for support vector regression, and 0.392 for principal components analysis. For more computational results, see Table 2. This example makes it clear that the short bars in persistent homology do indeed encode subtle geometric information.
1.4. Expected impact
Our theoretical work may be used to justify the use of persistent homology to study geometric structures in applications, such as those listed in the start of the introduction.
We have outlined a framework for using topological data analysis for solving inverse problems. Persistent homology together with the average persistence landscape gives a continuous mapping from metric spaces with a probability measure to a Hilbert space. In situations in which it is easy to sample or subsample points and measure pairwise distances one may compute empirical average persistence landscapes. Convergence results are known  and in practice, they quickly converge with little noise. Furthermore this mapping is sensitive to the starting metric structure. Finally, as our constructions lie a Hilbert space, one can apply tools from statistical and machine learning. This approach should facilitate learning geometric structures in a broad range of applications.
1.5. Related work
Persistence landscapes have been used to study the geometry of microstructures ; protein conformations ; and financial times series . Average persistence landscapes and average death vectors were used to detect differences in images of leaves in . B. Schweinhart recently proved that persistent homology of random samples may be used to determine the fractal dimension of certain metric spaces .
In this section we provide some necessary background from persistent homology, geometry, and statistics. For details, we refer the reader to [14, 15, 28] for persistent homology, [10, 2, 7] for geometry, and [33, 32] for statistics.
2.1. Filtered simplicial complexes from points
A simplicial complex is a collection of subsets of a set of vertices, such that if and then . A filtered simplicial complex is a collection of simplicial complexes with the property that whenever , there is an inclusion .
Let be a metric space and let be a finite subset. There are two common ways ways to turn into a filtered simplicial complex and we will use of both of them. First, for let be the simplicial complex where the 0-simplices of are the points of and for , contains a –simplex if and only if
where denotes the closed ball of radius centered at the point . The collection forms a filtered simplicial complex, called the Čech complex of .
Now for , let be the simplicial complex whose 0-simplices are the points of and which includes the -simplex if and only if for all , . This filtered simplicial complex is called the Vietoris-Rips Complex. Notice that unlike the Čech complex, which depends on , the Vietoris-Rips complex depends only on .
2.2. Persistent homology
Let be a simplicial complex. Taking reduced simplicial homology in degree with coefficients in some fixed field yields a vector space . Furthermore an inclusion of simplicial complexes induces a linear map between the corresponding vector spaces [1, Chapter 8]. Let be a filtered simplicial complex. Taking homology in degree with coefficients in some fixed field yields a persistence module, , given by the collection of vector spaces and linear maps induced by the inclusions whenever . As a special case, one has the interval persistence modules which are one dimensional on an interval, zero outside the interval, and all linear maps are the identity whenever not forced to be zero. The structure theorem of persistent homology says that under mild hypotheses, every persistence module is isomorphic to a direct sum of interval modules. The collection of these intervals is called the bar code of . Replacing an interval with its ordered pair of endpoints, we instead obtain the persistence diagram of . To enable us to use ideas from statistics and machine learning, we construct the following vector summaries.
For homology in degree of both the Čech complex and the Vietoris-Rips complex, all of the intervals in the bar code have left endpoint . In this case we can represent the bar code by a sorted list of the right end points in decreasing order. We call this order statistic a death vector. Note that since we are using reduced homology and all of our complexes are eventually connected, all of the values in the death vector are finite.
In other cases, we need a more sophisticated vector encoding. The persistent Betti number of M corresponding to is defined to be dim(image()). The persistence landscape of  is the function
We discretize this function to obtain a vector,
which we also call the persistence landscape. The persistence landscape can be efficiently computed from the bar code . Note that since we are using reduced homology and all of our simplicial complexes are eventually contractible, all of the values in the persistence landscape are finite.
For homology in degree , we prefer the death vector to the persistence landscape since it provides a sparser encoding of the same information.
2.3. Geometries of constant curvature
Let be the complete, simply-connected 2-dimensional Riemannian manifold of constant Gaussian curvature . Note that is unique up to isometry by the Killing-Hopf Theorem. When , we can identify with with the standard Euclidean metric. When we can identify with the sphere of radius centered at the origin in , that is . When , we identify with the Poincaré disk model of the hyperbolic plane of curvature . That is, for , with Riemannian metric
The geodesics in this model correspond to the intersection of and a (Euclidean) line through the origin in or a (Euclidean) circle which is orthogonal to the boundary circle .
We think of as a model for hyperbolic, Euclidean, and spherical geometry when , , and respectively. The results in Section 3 will be derived using only elementary properties of these geometries. We review some of these properties next. First, however, we note that if is a surface with a Riemannian metric of constant Gaussian curvature , then we can naturally identify the universal cover with . Hence will be locally isometric . So while the model spaces that we work with are all simply-connected, we will see the same behavior locally on any surface of constant curvature. Note also that by the Uniformization Theorem, every orientable surface admits a Riemannian metric of constant Gaussian curvature.
Let be distinct points in . Unless and and are antipodal, there is a unique line containing and and a unique shortest geodesic between and whose image is a subset of .
Let , , and be three points in which are assumed to not be collinear. If , then this implies that no pair of these points is a pair of antipodal points on the sphere. It follows that there is a unique shortest geodesic segment between each pair of points. Let called the triangle with vertices , , , and edges or sides , , . The subspace has two components. If then exactly one of these has finite area, called the interior of . If then the component with smaller area is called the interior of .
A circumcircle of a triangle is a circle containing the vertices of . A center of this circle is called a circumcenter and the corresponding radius is a called a circumradius. In , every triangle has a unique circumcircle with a unique circumcenter. If , then each triangle in has a unique circumcircle with two circumcenters. If , then a triangle in may or may not have a circumcircle, but if it does then the circumcenter is unique.
Let and be points in . Then the perpendicular bisector of a line segment consists of those points equidistant to and .
Suppose is equidistant from and . Let be the line through which bisects the angle , and let be the point where intersects . Then by Side-Angle-Side. Hence , so is the midpoint of . Also , and since these angles sum to they must both be right angles. Hence is the perpendicular bisector of .
Conversely, if lies on the perpendicular bisector of and is the midpoint of , then triangles and are congruent by Side-Angle-Side, so . ∎
For a triangle in , the following statements are equivalent.
The perpendicular bisectors of two of the sides intersect.
The triangle has a circumcircle.
The perpendicular bisectors of the sides have a common intersection.
Moreover, when these equivalent statements holds then the intersection point of the perpendicular bisectors of the sides is the circumcenter of the triangle.
Let , , be the vertices of triangle .
(a) implies (b). Assume that a point is in the intersection of the perpendicular bisectors of two of the sides of . Then is equidistant from , , and . So is a circumcenter of .
(b) implies (c). Let be a circumcenter. Then is equidistant from , , . So lies on the perpendicular bisector of each side.
(c) implies (a) is immediate. ∎
2.6. Areas of disks
We will use the following basic fact. The area of a disk of radius on a surface of constant curvature is given by
2.7. Distances between points on a unit disk
We will want to compute the distances between points sampled from a disk of radius one on . We will represent the points in this disk using polar coordinates , where and .
For the Euclidean case, , we convert to Cartesian coordinates and compute the Euclidean distance.
In the spherical case, , is realized as the sphere of radius centered at the origin in , where . We consider our disk to be a spherical cap of this sphere. The point on the disk corresponding to can be written in spherical coordinates as . Converting to Cartesian coordinates, we have . The distance between two such points and is given by . However, is not numerically stable near zero, so instead we use the following robust formula, . More specifically, we will use the two-argument arctangent function .
For the hyperbolic case, , is realized as the Poincaré disk, with . We consider our disk of hyperbolic radius one to be centered at the origin. The point on the disk corresponding to can be written in Cartesian coordinates as . The hyperbolic distance between between to points and in the Poincaré -disk is given by where and are thought of as complex numbers.
2.8. Laws of sines and cosines
We will need the laws of sines and cosines for a triangle on a surface of constant curvature .
Generalized Law of Sines
Let be a triangle in with lengths and angles respectively. When K=0,
Generalized Law of Cosines
Let be a triangle in with lengths and angles respectively. When ,
2.9. Inversion sampling
The following theorem allows us to sample points from a distribution knowing only the inverse of the cumulative distribution F by sampling a point uniformly from and then calculating . This method of sampling from F is called inversion sampling.
 Let F be an invertible continuous cumulative distribution function on some domain D. If U is distributed uniformly on , then has cumulative distribution function F.
2.10. Support vector regression
We assume that our data with and is drawn from some unknown joint distribution on . Our goal is to estimate a functional relationship between the variables.
(Linear) support vector regression (SVR) is an approach to this problem which computes a predictor by solving the following convex optimization problem:
for each . The slack variables and and cost parameter allow for some errors among the training data. A larger value of increases the penalty for an error in the training data. If then this problem corresponds to using the linear loss function . For , we instead have the -insensitive loss function given by
This function ignores errors within of the true values.
For quantile regression (Section 4.3.3) we will use the pinball loss function,
where . This loss function allows us to estimate the -quantile.
3. Persistence of triangles
In this section we study how triangles contribute to the persistent homology of the Čech complex formed from points on . Specifically, we show the maximal interval of parameter values for which three points contribute a non-trivial element to the homology in degree one of the Čech complex depends on . Moreover, we will show that for all this interval is maximized by the vertices of an equilateral triangle and give formulas depending on and the length of the sides of .
3.1. Triangles and their persistent homology
Let be a finite set of points on . Let , and be points in which we assume are not collinear. When , we will also assume that no pair of these points is antipodal, or equivalently the pairwise distances are all less then . There are two triangles of interest corresponding to the vertices , , and . There is the (geometric) triangle , which is a subset of (Section 2.4). There is also the abstract triangle which may be an element of the Čech complex on . It will be convenient to refer to both of these as the triangle corresponding to the vertices , , and . It should be clear from the context which of these we mean.
The boundary of the triangle contributes a 1–cycle in in the Čech complex whenever , where
The value is called the birth of the triangle . In the other direction, contributes a 2–simplex to whenever , where
The value of is called the death of . Hence induces an element of for all , and this element is trivial for all . In particular, if , then does not contribute any non-trivial elements to the persistent homology.
The persistence of an interval is usually given by the difference , the length of the time that is contributing to homology. However, in situations where a scale-free version is desired , it is preferable to use logarithmic coordinates and to instead consider the ratio , which we will refer to as the persistence of and denote by .
We now we fix notation that will be used for the rest of this section. Let denote a triangle with vertices , , and . Let , , and be the lengths of the sides of opposite , , and , respectively. We assume is labeled such that . See Figure 2. When , we let , that is is the radius of the sphere realizing . Recall that in this case we are also assuming that . Note that the birth of is simply half the length of the longest side, so with this notation we have . We will also let denote the midpoint of the side , and let denote the distance from to . If has a circumcircle then we denote the corresponding circumcenter by .
In this section we will prove the following.
The following are equivalent:
produces persistent in the Čech complex. That is, .
has a circumcircle and the circumcenter is in the interior of .
Furthermore, if these equivalent conditions hold, then equals and equals the circumradius.
Let and be points in and let be a line through which is perpendicular to . If , then we also assume that . Let . Let be a half plane bounded by and let be the point in on such that . Then is a strictly increasing function of .
Since , this follows from the Generalized Law of Cosines (Theorem 2.4). ∎
The next lemma explains the role of the distance from to the midpoint of .
if and only if .
Note that is the unique element of . Hence if and only if , thus if and only if . Therefore, if and only if . ∎
Suppose that . Then the triangle has a circumcenter , and is contained in the interior of .
Assume that . Note that the distance from to is , so . Let denote the perpendicular bisector of . Then must intersect one of the other two sides of . Since , intersects in a point . If , then . Hence for any we can apply Lemma 3.2 to get that . Since the length of is , we must have . Thus .
Now, as a point moves along from to , by the continuity of the distance function and the intermediate value theorem there must exist a point in the interior of where the . Since is on the perpendicular bisector of , we also have the distance from to is equal to the distance from to . Thus, is a circumcenter of . Since is in the interior of and this segment is contained in by construction, we have that is in the interior of . ∎
Suppose and there exists an and a point such that but is not the circumcenter of triangle . Then there exists such that .
Since is not the circumcenter, there must exist at least one vertex whose distance to is less then . Suppose without loss of generality that . First, suppose that . Let be a line that contains and is perpendicular to . Let be a point on the segment of from to such that . Hence . Also, by construction and Lemma 3.2 is closer to and than , hence and similarly . Letting , we get that and .
Now suppose . Suppose without loss of generality that . Then either , or since is the midpoint of in this case. Either way we get that , so we can repeat the same proof as above using the point instead of . ∎
Proof of Proposition 3.1.
(a) and (b) are equivalent by Lemma 3.3. Lemma 3.4 shows that (b) implies (c). Assume now that (c) holds, that is has a circumcircle and the circumcenter is in the interior of . Since lies on the perpendicular bisector of , by Lemma 3.2 we get that .
Now let be a point on such that is perpendicular to . Then and are both perpendicular to . When , this means that and are parallel. When , this means that the two intersection points of and both have distance from . Furthermore, the line must intersect either or . Since , intersects . So . Thus, for all we get that does not intersect . Thus, and are on the same side of . By a similar argument, it also follows that does not intersect .
We also note that cannot be in the interior of . Indeed, suppose is in the interior of , and let Let be the point where and intersect. Hence lies in the interior of the segment . Since intersects one side of triangle , it must intersect one of the other two sides. We have already shown that does not intersect , hence it must intersect . But this means that and must intersect in two non-antipodal points, a contradiction.
Since and are on the same side of and is in the interior of and is not, we must have . Thus, we get that , and so by Lemma 3.2 . Combining this with the previous inequality gives that .
Finally, suppose (a), (b), and (c) hold. Let . By definition, . Lemma 3.5 then implies that must be the unique element of , and hence , that is is the circumradius of . ∎
3.2. The most persistent triangles
In this section we show that among triangles with fixed birth , those with maximal persistence are the equilateral triangles.
Let be a triangle with vertices , , and , and corresponding edge lengths . Assume that . If then we also assume that , where . This assumption is necessary for an equilateral triangle with side lengths to exist on .
Suppose is not an equilateral triangle. Then there exists an equilateral triangle such that and .
We will first show that can be replaced by an isosceles triangle with two sides of length . If is not already of this form, then longest side of is strictly bigger then the length of the other two sides, that is . Let , , and be the perpendicular bisectors to ,,and respectively. By Proposition 3.1, these bisectors intersect in the point , that is the circumcenter of , which is in the interior of .
Let be the point on such that is between and and . Let be the triangle formed by ,, and . See Figure 3. By construction, has two sides of length , and is still the length of the longest side of . Thus .
We will show that satisfies using Proposition 3.1. Let be the midpoint of . Since , intersects at a point . Since is inside , is on the opposite side of as .
This means that and are on the same side of , and hence and are on opposite sides of .
Now let be the point on such that is perpendicular to . Then and are both perpendicular to . When , this means that and are parallel. When , this means that the two intersection points of and both have distance from . In this case, . Hence for all we get that the segment does not intersect . Thus and are on the same side of , which means that and are on opposite sides of .
Let be the circumcenter of triangle and be the perpendicular bisector of . Then lies on and . Since is perpendicular to , the distance from a point on to increases as that point moves away from . Hence , or equivalently .
Thus, we can assume has two sides of length , that is .
Consider the circles of radius centered at and , see Figure 4. When , it is easy to see that they intersect at two points, one on each side of . When , let denote the point on the sphere that is antipodal to . Then and since we assumed that , . Note that and both lie on , hence there exist two points on , one on each side of , whose distance to is equal to . Since these points lie on , they also have distance to , and hence they lie on the intersection of the two circles.
Let be the intersection point of these two circles on the same side of as . Again, let be the triangle with vertices , , and . By construction is an equilateral triangle with side lengths , hence .
Let be the perpendicular bisector of . By construction, the angle of at vertex is smaller then the angle of at vertex . Since these are both isosceles triangles, and bisect these angles respectively. Hence, the angle formed by and is smaller then the angle formed by and . It follows that the point where intersects is closer to then the point where intersects . As before, this means that . Since and are the circumcenters of and , we get that . ∎
3.3. Persistence of equilateral triangles
In this section, we give formulas for the persistence where is an equilateral triangle in . In general it is possible to give formulas for the persistence of arbitrary triangles in in terms of the side lengths of and since is half the length of the longest side of and is the circumradius of . In the general case these formulas are not particularly enlightening, however for equilateral triangles the generalized law of sines (Theorem 2.3) allows us to simplify the formulas considerably.
Let be an equilateral triangle in with side length .
Let be a equilateral triangle in with vertices , , and and side lengths a. Let be the midpoint of , and let be the circumcenter of . See Figure 5. Since is the circumcenter, it is the intersection of the perpendicular bisectors of the sides of . Thus, . Moreover, these perpendicular bisector split into 6 congruent triangles which all contain and surround the vertex . It follows that the angles of these triangles at the vertex sum to , and since the angles are all congruent we get . Furthermore, the length of is and the length of is .
We apply the generalized law of sines (Theorem 2.3) to the triangle . For , we have
For , we have
Similarly when ,
From these formulas, on can easily compute that for any fixed , the function which assigns to the persistence of an equilateral triangle of side length in is an increasing, continuous function. Indeed, the fact that this function converges to as is straightforward application of l’Hôpital’s rule. To get a sense of scale, if then the values for for ,, , , and are approximately , , , , and .
4. Estimating curvature using persistence
In this section, we demo