 # Threshold-Based Graph Reconstruction Using Discrete Morse Theory

Discrete Morse theory has recently been applied in metric graph reconstruction from a given density function concentrated around an (unknown) underlying embedded graph. We propose a new noise model for the density function to reconstruct a connected graph both topologically and geometrically.

## Authors

##### This week in AI

Get the week's most popular data science and artificial intelligence research sent straight to your inbox every Saturday.

## 1 Introduction

Graph-like or filamentary structures are very common in science and engineering. Examples include road networks, sensor networks, and earthquake trails. With the advent of modern sampling techniques, very large amounts of data, sampled around such (often hidden) structures, are becoming widely available to data analysts.

### Problem Statement.

Given a set of points sampled around an unknown metric graph  embedded in , output a metric graph that has the same homotopy type as and has a small Hausdorff distance to .

### Background.

Graph reconstruction from noisy samples has been studied extensively in the last decade; see e.g., [2, 4, 5, 1]

. One can typically classify noise models for reconstruction problems into two categories: Hausdorff noise and non-Hausdorff noise. A sample

may not lie exactly on , however is sampled from a very small offset of . In this case, the Hausdorff distance between the sample and ground truth is assumed to be very small. We call such a noise Hausdorff

noise. The situation becomes different in the presence of outliers in

. If outliers in are far away from , they contribute to an uncontrollably large Hausdorff distance. In this paper, we aim at geometric reconstruction of Euclidean graphs under non-Hausdorff noise model.

Several non-Hausdorff based graph reconstruction approaches use the density of the sample points in the ambient space. In this density-based reconstruction regime, a density function over a rectangular grid of pixels in the plane is computed from the raw sample

. There are several ways one can define density on the planar grid. A histogram computation or a kernel density estimate are usually very popular and easy to implement in practice. Then, an appropriate threshold is chosen to get a thickened graph as the super-level set of the density at the threshold. Some algorithms work by choosing this threshold empirically, whereas some others, e.g.,



, use systematic topological techniques like persistent homology to choose a set of thresholds just big enough to capture the desired topological changes in the sub-level set filtration dictated by the density function. While most of the previous approaches gained success in practice, not much has been proved theoretically to guarantee the desired topological or geometric correctness. Also, the output is usually a region around the underlying graph. Finally, one prunes the region to extract a graph like structure from it using some heuristic thinning algorithm.

### Related Work.

Our work is inspired by the recent work by Dey et al. . The authors use a topological technique called discrete Morse theory to extract the cycles of the underlying graph  from a density function. They show that if the density function satisfies a noise model, that the authors call an -approximation, then the output of their algorithm has the same homotopy type as . However, the noise model is too simplistic to capture degree one vertices of . For this reason, the leaves or the “hairs” of cannot be reconstructed, resulting in a large (undirected) Hausdorff distance between and .

### Our Contribution.

In order to overcome the above mentioned limitations of the algorithm developed in , we propose a two-threshold based noise model for the density function that is more practical and that can localize all vertices of . Using different thresholds for the graph vertices and the graph edges, we develop an algorithm (alg:main) that can output a reconstruction that is also geometrically close to . We prove in thm:hom that the output of our algorithm successfully captures both the topology and geometry of the underlying graph .

## 2 Discrete Morse Theory

Let be a finite simplicial complex. A

discrete vector field

on is a collection of pairs of simplices of such that and each simplex of appears in at most one of such pair. Here, the symbol ‘’ denotes the face relation and the superscript denotes the dimension of the simplex. A simplex is called critical if does not take part in any pair. We define a V-path as a sequence of simplices

 τ(p)0,σ(p+1)0,τ(p)1,σ(p+1)1,…,σ(p+1)r,τ(p)r+1,

where , and for all . The Morse cancellation of a pair of critical simplices takes place when there is a unique V-path from a co-dimension one face of to . This process of cancellation reverses the vectors along that V-path to obtain another vector field on . For more details see . Finally, for a critical simplex we define its stable manifold to be the union of the V-paths that end at . Similarly, we define its unstable manifold to be the union of the V-paths that start at . For definitions and more details see [3, 2].

## 3 Double Threshold

For ease of presentation, we define the noise model in the smooth set-up. Let be a planar rectangle, and let be a finite planar graph embedded inside . Let be a small positive number such that , the -offset of , is contained in and has a deformation retraction onto . Also, for each vertex  of , we call the -ball centered at the vertex region of . Now, let be the union of all vertex regions of . We call a density function on an -approximation of if

 f(x)∈⎧⎨⎩[β1,β1+ν], if x∈Vω, if x∈Gω−Vω, otherwise

where . In this case, we call and  the thresholds for . Throughout this paper, we assume our density function is an -approximation. In practice, these four parameters are unknown. However, in our algorithm, we use a cut-off such that
and which is assumed to be known to us.

In order to reconstruct , the density is expected to assume very large values inside relative to the outside region. Here, a small noise or perturbation has been assumed. The above mentioned two thresholds make this noise model close to real-world applications involving the extraction of road-networks from GPS trajectory data. Because points along trajectories make the density higher near the intersections than than the edges, this noise model enables us to correctly reconstruct not only the topology but also the geometry of as shown in thm:hom.

## 4 Algorithm

We devise our reconstruction algorithm, alg:main, by using discrete Morse cancellation guided by persistence pairs.

### Analysis of Algorithm

We start with a discretization of the planar rectangle . For example, can be a planaer two-dimensional cubical complex. Let the density function be an -approximation and let cutoff . Our goal is to construct a discrete vector field on that is associated to a discrete Morse function that is much simpler than . This way, we clean the density function from the noise administered by . We initialize with the initial vector field in which all simplices are critical. In order to remove non-genuine critical simplices, we run persistence on the super-level set filtration of defined by . Then, for each persistence pair with persistence smaller than , we try to perform Morse cancellation of the Morse pair to update . After the cancellations are done, we get which is a cleaner discrete gradient field on . We can show that the resulting only contains genuine critical points, i.e., for each graph vertex we have a critical vertex of in its vertex region and for each edge of we have a critical edge in . All these critical vertices and edges will be contained in . Moreover, these critical vertices and edges are characterized by their persistence being larger than . Therefore, to extract the edges of we consider each edge of with persistence and compute their stable manifolds. The union of their stable manifolds is the reconstruction .

## 5 Reconstruction Guarantees

The two thresholds help us to localize the critical vertices of the discrete gradient field inside the vertex regions. The output has the same homotopy type as as shown in the following theorem.

[Graph Reconstruction] If is a connected, embedded planar graph in a cubical complex and is an -
approximation of then the output of alg:main has the same homotopy type as . Moreover, .

We prove the homotopy type by showing that and have the same first Betti numbers, as the homotopy type of a connected graph is completely characterized by its first
Betti number.

After the termination of alg:main, by the assumption on the density function, for each graph vertex of we will have exactly one critical vertex of inside the vertex region of . This vertex is the local maximum of inside the vertex region of . For the persistence pairings in with persistence larger than , a vertex of has to be paired with either or with a critical edge of from the edge region of a graph edge of . And, will be incident to , as illustrated in fig:critical. Now, for each critical edge of , must lie inside one of the edge regions of . Moreover, for each each of we have exactly one critical edge of . For the pairings of with persistence larger than , each edge is either paired with a vertex from the vertex region of an incident edge or a triangle from the complement of .

The one-to-one correspondence of the edges of and the critical edges of and the vertices of and the critical vertices of in , shows that the stable manifold of a critical edge of that lies in the edge region of a graph edge of will be a path in joining the critical vertices of the vertex regions of the end-points of . This concludes that and will have the same first Betti numbers. Also, since the critical vertices and edges are localized inside the corresponding regions we conclude that . other direction.

## 6 Discussion

The nature of our project is ongoing. The noise model discussed in the paper is only a rough approximation of realistic noise models. We are still in the process of finding a better noise model. We also hope to find a condition on the density that enables us to guarantee a small Fréchet distance between the edges of and the reconstruction.

### Acknowledgments

The authors acknowledge the generous support of the National Science Foundation under grants CCF-1618469 and CCF-1618605. The authors also thank Yusu Wang for her feedback.

## References

•  M. Ahmed, B. T. Fasy, M. Gibson, and C. Wenk (2015) Choosing thresholds for density-based map construction algorithms. In Proceedings of the 23rd SIGSPATIAL International Conference on Advances in Geographic Information Systems, SIGSPATIAL ’15, New York, NY, USA, pp. 24:1–24:10. External Links: ISBN 978-1-4503-3967-4, Link, Document Cited by: §1, §1.
•  T. K. Dey, J. Wang, and Y. Wang (2018) Graph reconstruction by discrete Morse theory. In 34th International Symposium on Computational Geometry, pp. 31:1–31:15. Cited by: §1, §1, §1, §2.
•  R. Forman (2002) A user’s guide to discrete Morse theory. Séminaire Lotharingien de Combinatiore (48), pp. Art. B48c. Cited by: §2.
•  X. Ge, I. Safa, M. Belkin, and Y. Wang (2011) Data skeletonization via reeb graphs. In Proceedings of the 24th International Conference on Neural Information Processing Systems, NIPS’11, USA, pp. 837–845. External Links: ISBN 978-1-61839-599-3, Link Cited by: §1.
•  S. Wang, Y. Wang, and Y. Li (2015) Efficient map reconstruction and augmentation via topological methods. In Proceedings of the 23rd SIGSPATIAL International Conference on Advances in Geographic Information Systems - GIS ’15, pp. 1–10. External Links: ISBN 978-1-4503-3967-4, Link, Document Cited by: §1.