Spatiotemporal Persistent Homology for Dynamic Metric Spaces


Characterizing the dynamics of time-evolving data within the framework of topological data analysis (TDA) has been attracting increasingly more attention. Popular instances of time-evolving data include flocking/swarming behaviors in animals and social networks in the human sphere. A natural mathematical model for such collective behaviors is a dynamic point cloud, or more generally a dynamic metric space (DMS). In this paper we extend the Rips filtration stability result for (static) metric spaces to the setting of DMSs. We do this by devising a certain three-parameter “spatiotemporal” filtration of a DMS. Applying the homology functor to this filtration gives rise to multidimensional persistence module derived from the DMS. We show that this multidimensional module enjoys stability under a suitable generalization of the Gromov–Hausdorff distance which permits metrization of the collection of all DMSs. On the other hand, it is recognized that, in general, comparing two multidimensional persistence modules leads to intractable computational problems. For the purpose of practical comparison of DMSs, we focus on both the rank invariant or the dimension function of the multidimensional persistence module that is derived from a DMS. We specifically propose to utilize a certain metric d for comparing these invariants: In our work this d is either (1) a certain generalization of the erosion distance by Patel, or (2) a specialized version of the well-known interleaving distance. In either case, the metric d can be computed in polynomial time.

This is a preview of subscription content, access via your institution.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7


  1. 1.

    Under a certain notion of distance arising from the integration over time of the bottleneck distance between the instantaneous persistence diagrams.

  2. 2.

    Contour Realization Of Computed k-dimensional hole Evolution in the Rips complex.

  3. 3.

    In [55], in order to compare two dynamic point clouds, Munch considered the integrated Hausdorff distance \(\int d_\mathrm{H}\) over time. Since the metric \(\int d_\mathrm{H}\) takes account of relative position of two dynamic point clouds inside an ambient metric space, we do not consider utilizing \(\int d_\mathrm{H}\) for the purpose of comparing intrinsic behaviors of two dynamic metric data. Also, Munch considered the integrated bottleneck distance \(\int d_\mathrm{B}\) by computing the Rips filtrations of dynamic point clouds at each time. However, by [22, Thm. 3.1], the metric \(\int d_\mathrm{B}\) is upper-bounded by (twice) the integrated Gromov–Hausdorff distance, which in this case vanishes. Therefore, \(\int d_\mathrm{B}\) does not discriminate the two dynamic point clouds given as in Fig. 1.

  4. 4.

    In [46], the original \(\lambda \)-slack interleaving distance \(d_{\lambda }(\gamma _X,\gamma _Y)\), \(\lambda \in [0,\infty )\) is defined as the infimum amount of time \(\varepsilon \) for which there exists a tripod R between X and Y such that

    $$\begin{aligned} \hbox {for all }t\in \mathbf{R},\ \ \bigvee _{[t]^{\varepsilon }}d_X\le _R d_Y(t)+\lambda \varepsilon \quad \hbox {and}\quad \bigvee _{[t]^\varepsilon }d_Y\le _R d_X(t)+\lambda \varepsilon . \end{aligned}$$

    In this original definition, the units of \(\lambda \) is (distance units)/(time units), whereas the units of \(\lambda \) for \(d_{\lambda }^{\bullet }\) is (time units)/(distance units).

  5. 5.

    The quantity in the LHS allows for picking a different correspondence for each time t whereas the RHS demands that a single correspondence is adequate for all times.

  6. 6.

    We call \((X,d_X)\) a semi-metric space if the function \(d_X:X\times X\rightarrow \mathbf{R}_+\) satisfies: (1) for all \(x\in X\), \(d_X(x,x)=0\), and (2) for all \(x,x'\in X\), \(d_X(x,x')=d_X(x',x)\).

  7. 7.

    To illustrate this, the 0-th CROCKER plot \(C_0(\gamma _X)\) is obtained by restricting \(\beta _0^{\gamma _X}\) to the front diagonal vertical plane \(\{[t,t]: t\in \mathbf{R}\}\times \mathbf{R}_+\subset \mathbf{Int}\times \mathbf{R}_+\), which is colored brown in the middle picture of Fig. 4.

  8. 8.

    A persistence module \(M:\mathbf{R}^d\rightarrow \mathbf{Vec}\) is nice if there exists a value \(\varepsilon _0\in \mathbf{R}_+\) such that for every \(\varepsilon <\varepsilon _0\), each internal morphism \(\varphi _M(\mathbf{a},\mathbf{a}+\mathbf {\varepsilon })\) is either injective or surjective (or both).


  1. 1.

    Agarwal, P.K., Fox, K., Nath, A., Sidiropoulos, A., Wang, Y.: Computing the Gromov–Hausdorff distance for metric trees. International Symposium on Algorithms and Computation. Lecture Notes in Computer Science, vol. 9472, pp. 529–540. Springer, Heidelberg (2015)

    Chapter  Google Scholar 

  2. 2.

    Babichev, A., Morozov, D., Dabaghian, Y.: Robust spatial memory maps encoded by networks with transient connections. PLoS Comput. Biol. 14(9), e1006433 (2018)

    Article  Google Scholar 

  3. 3.

    Bauer, U., Edelsbrunner, H., Jablonski, G., Mrozek, M.: Persistence in sampled dynamical systems faster. arXiv preprint arXiv:1709.04068 (2017)

  4. 4.

    Bendich, P., Edelsbrunner, H., Morozov, D., Patel, A.: Homology and robustness of level and interlevel sets. Homology Homotopy Appl. 15(1), 51–72 (2013)

    MathSciNet  MATH  Article  Google Scholar 

  5. 5.

    Benkert, M., Gudmundsson, J., Hübner, F., Wolle, T.: Reporting flock patterns. Comput. Geom. 41(3), 111–125 (2008)

    MathSciNet  MATH  Article  Google Scholar 

  6. 6.

    Biasotti, S., Cerri, A., Frosini, P., Giorgi, D.: A new algorithm for computing the 2-dimensional matching distance between size functions. Pattern Recognit. Lett. 32(14), 1735–1746 (2011)

    Article  Google Scholar 

  7. 7.

    Bjerkevik, H.B., Botnan, M.B.: Computational complexity of the interleaving distance. In: Proceedings of the 34th International Symposium on Computational Geometry (SoCG 2018), pp. 13:1–13:15 (2018)

  8. 8.

    Bjerkevik, H.B., Botnan, M.B., Kerber, M.: Computing the interleaving distance is NP-hard. Found. Comput. Math. (2019).

    Article  Google Scholar 

  9. 9.

    Botnan, M., Lesnick, M.: Algebraic stability of zigzag persistence modules. Algebra. Geom. Topol. 18(6), 3133–3204 (2018)

    MathSciNet  MATH  Article  Google Scholar 

  10. 10.

    Bubenik, P., Scott, J.A.: Categorification of persistent homology. Discrete Comput. Geom. 51(3), 600–627 (2014)

    MathSciNet  MATH  Article  Google Scholar 

  11. 11.

    Buchin, K., Buchin, M., van Kreveld, M.J., Speckmann, B., Staals, F.: Trajectory grouping structure. JoCG 6(1), 75–98 (2015)

    MathSciNet  MATH  Google Scholar 

  12. 12.

    Burago, D., Burago, Yu., Ivanov, S.: A Course in Metric Geometry, vol. 33. American Mathematical Society, Providence (2001)

  13. 13.

    Carlsson, G.: Topology and data. Bull. Am. Math. Soc. 46, 255–308 (2009)

    MathSciNet  MATH  Article  Google Scholar 

  14. 14.

    Carlsson, G., de Silva, V.: Zigzag persistence. Found. Comput. Math. 10(4), 367–405 (2010)

    MathSciNet  MATH  Article  Google Scholar 

  15. 15.

    Carlsson, G., de Silva, V., Morozov, D.: Zigzag persistent homology and real-valued functions. In: Proceedings of the 25th Annual Symposium on Computational Geometry, pp. 247–256. ACM (2009)

  16. 16.

    Carlsson, G., Mémoli, F.: Characterization, stability and convergence of hierarchical clustering methods. J. Mach. Learn. Res. 11, 1425–1470 (2010)

    MathSciNet  MATH  Google Scholar 

  17. 17.

    Carlsson, G., Zomorodian, A.: The theory of multidimensional persistence. Discrete Comput. Geom. 42(1), 71–93 (2009)

    MathSciNet  MATH  Article  Google Scholar 

  18. 18.

    Cerri, A., Di Fabio, B., Ferri, M., Frosini, P., Landi, C.: Betti numbers in multidimensional persistent homology are stable functions. Math. Methods Appl. Sci. 36(12), 1543–1557 (2013)

    MathSciNet  MATH  Article  Google Scholar 

  19. 19.

    Cerri, A., Di Fabio, B., Jabłoński, G., Medri, F.: Comparing shapes through multi-scale approximations of the matching distance. Comput. Vis. Image Understand. 121, 43–56 (2014)

    Article  Google Scholar 

  20. 20.

    Cerri, A., Frosini, P.: A new approximation algorithm for the matching distance in multidimensional persistence. (2011)

  21. 21.

    Chazal, F., Cohen-Steiner, D., Glisse, M., Guibas, L.J., Oudot, S.: Proximity of persistence modules and their diagrams. In: Proceeding of 25th ACM Symposium on Computational Geometry, pp. 237–246 (2009)

  22. 22.

    Chazal, F., Cohen-Steiner, D., Guibas, L.J., Mémoli, F., Oudot, S.Y.: Gromov–Hausdorff stable signatures for shapes using persistence. In: Proceedings of SGP (2009)

  23. 23.

    Chazal, F., De Silva, V., Oudot, S.: Persistence stability for geometric complexes. Geom. Dedicata 173(1), 193–214 (2014)

    MathSciNet  MATH  Article  Google Scholar 

  24. 24.

    Cohen-Steiner, D., Edelsbrunner, H., Harer, J.: Stability of persistence diagrams. Discrete Comput. Geom. 37(1), 103–120 (2007)

    MathSciNet  MATH  Article  Google Scholar 

  25. 25.

    Cohen-Steiner, D., Edelsbrunner, H., Morozov, D.: Vines and vineyards by updating persistence in linear time. In: Proceedings of the 22nd Annual Symposium on Computational Geometry, pp. 119–126. ACM (2006)

  26. 26.

    De Silva, V., Munch, E., Patel, A.: Categorified Reeb graphs. Discrete Comput. Geom. 55(4), 854–906 (2016)

    MathSciNet  MATH  Article  Google Scholar 

  27. 27.

    Dey, T.K., Juda, M., Kapela, T., Kubica, J., Lipiński, M., Mrozek, M.: Persistent homology of morse decompositions in combinatorial dynamics. SIAM J. Appl. Dyn. Syst. 18(1), 510–530 (2019)

    MathSciNet  MATH  Article  Google Scholar 

  28. 28.

    Dey, T.K., Xin, C.: Computing bottleneck distance for 2-D interval decomposable modules. In: Proceedings of the Thirty-Fourth International Symposium on Computational Geometry (SoCG 2018), pp. 32:1–32:15 (2018)

  29. 29.

    Edelsbrunner, H., Harer, J.: Persistent homology: a survey. Contemp. Math. 453, 257–282 (2008)

    MathSciNet  MATH  Article  Google Scholar 

  30. 30.

    Edelsbrunner, H., Harer, J.: Computational Topology: An Introduction. American Mathematical Society, Providence (2010)

    MATH  Google Scholar 

  31. 31.

    Edelsbrunner, H., Harer, J., Mascarenhas, A., Pascucci, V., Snoeyink, J.: Time-varying Reeb graphs for continuous space-time data. Comput. Geom. 41(3), 149–166 (2008)

    MathSciNet  MATH  Article  Google Scholar 

  32. 32.

    Edelsbrunner, H., Jabłoński, G., Mrozek, M.: The persistent homology of a self-map. Found. Comput. Math. 15(5), 1213–1244 (2015)

    MathSciNet  MATH  Article  Google Scholar 

  33. 33.

    Ghrist, R.: Barcodes: the persistent topology of data. Bull. Am. Math. Soc. 45(1), 61–75 (2008)

    MathSciNet  MATH  Article  Google Scholar 

  34. 34.

    Giusti, C., Ghrist, R., Bassett, D.S.: Two’s company, three (or more) is a simplex. J. Comput. Neurosci. 41(1), 1–14 (2016)

    MathSciNet  Article  Google Scholar 

  35. 35.

    Giusti, C., Pastalkova, E., Curto, C., Itskov, V.: Clique topology reveals intrinsic geometric structure in neural correlations. Proc. Natl. Acad. Sci. 112(44), 13455–13460 (2015)

    MathSciNet  MATH  Article  Google Scholar 

  36. 36.

    Gudmundsson, J., van Kreveld, M.: Computing longest duration flocks in trajectory data. In: Proceedings of the 14th Annual ACM International Symposium on Advances in Geographic Information Systems, pp. 35–42. ACM (2006)

  37. 37.

    Gudmundsson, J., van Kreveld, M., Speckmann, B.: Efficient detection of patterns in 2d trajectories of moving points. Geoinformatica 11(2), 195–215 (2007)

    Article  Google Scholar 

  38. 38.

    Hajij, M., Wang, B., Scheidegger, C., Rosen, P.: Visual detection of structural changes in time-varying graphs using persistent homology. In: Pacific Visualization Symposium (PacificVis), 2018 IEEE, pp. 125–134. IEEE (2018)

  39. 39.

    Huang, Y., Chen, C., Dong, P.: Modeling herds and their evolvements from trajectory data. International Conference on Geographic Information Science, pp. 90–105. Springer, New York (2008)

    Chapter  Google Scholar 

  40. 40.

    Hwang, S.-Y., Liu, Y.-H., Chiu, J.-K., Lim, E.-P.: Mining mobile group patterns: a trajectory-based approach. PAKDD, vol. 3518, pp. 713–718. Springer, New York (2005)

    Google Scholar 

  41. 41.

    Jeung, H., Yiu, M.L., Zhou, X., Jensen, C.S., Shen, H.T.: Discovery of convoys in trajectory databases. Proc. VLDB Endow. 1(1), 1068–1080 (2008)

    Article  Google Scholar 

  42. 42.

    Kahle, M., Meckes, E.: Limit the theorems for Betti numbers of random simplicial complexes. Homology Homotopy Appl. 15(1), 343–374 (2013)

  43. 43.

    Kalnis, P., Mamoulis, N., Bakiras, S.: On discovering moving clusters in spatio-temporal data. SSTD, vol. 3633, pp. 364–381. Springer, Berlin (2005)

    Google Scholar 

  44. 44.

    Kerber, M., Lesnick, M., Oudot, S.: Exact computation of the matching distance on 2-parameter persistence modules. In: Proceedings of the 35th International Symposium on Computational Geometry, pp. 46:1–46:15 (2019)

  45. 45.

    Kerber, M., Morozov, D., Nigmetov, A.: Geometry helps to compare persistence diagrams. J. Exp. Algorithm. 22, 1–4 (2017)

    MathSciNet  MATH  Article  Google Scholar 

  46. 46.

    Kim, W., Mémoli, F.: Stable signatures for dynamic graphs and dynamic metric spaces via zigzag persistence. arXiv preprint arXiv:1712.04064 (2017)

  47. 47.

    Kim, W., Mémoli, F.: Formigrams: Clustering summaries of dynamic data. In: Proceedings of 30th Canadian Conference on Computational Geometry (CCCG18) (2018)

  48. 48.

    Kim, W., Mémoli, F., Smith, Z.:

  49. 49.

    Knight, W.J.: Search in an ordered array having variable probe cost. SIAM J. Comput. 17(6), 1203–1214 (1988)

    MathSciNet  MATH  Article  Google Scholar 

  50. 50.

    Kostitsyna, I., van Kreveld, M.J., Löffler, M., Speckmann, B., Staals, F.: Trajectory grouping structure under geodesic distance. In: 31st International Symposium on Computational Geometry, SoCG 2015, June 22–25, 2015, Eindhoven, The Netherlands, pp. 674–688 (2015)

  51. 51.

    Landi, C.: The rank invariant stability via interleavings. Research in Computational Topology, pp. 1–10. Springer, Berlin (2018)

    Google Scholar 

  52. 52.

    Lesnick, M.: The theory of the interleaving distance on multidimensional persistence modules. Found. Comput. Math. 15(3), 613–650 (2015)

    MathSciNet  MATH  Article  Google Scholar 

  53. 53.

    Li, Z., Ding, B., Han, J., Kays, R.: Swarm: mining relaxed temporal moving object clusters. Proc. VLDB Endow. 3(1–2), 723–734 (2010)

    Article  Google Scholar 

  54. 54.

    Mac Lane, S.: Categories for the Working Mathematician. Graduate Texts in Mathematics, vol. 5. Springer, New York (2013)

    MATH  Google Scholar 

  55. 55.

    Munch, E.: Applications of persistent homology to time varying systems. PhD thesis (2013)

  56. 56.

    Oesterling, P., Heine, C., Weber, G.H., Morozov, D., Scheuermann, G.: Computing and visualizing time-varying merge trees for high-dimensional data. Topological Methods in Data Analysis and Visualization, pp. 87–101. Springer, Berlin (2015)

    Google Scholar 

  57. 57.

    Parrish, J .K., Hamner, W M e: Animal Groups in Three Dimensions: How Species Aggregate. Cambridge University Press, Cambridge (1997)

    Book  Google Scholar 

  58. 58.

    Patel, A.: Generalized persistence diagrams. J. Appl. Comput. Topol. 1, 397–419 (2018)

    MathSciNet  MATH  Article  Google Scholar 

  59. 59.

    Puuska, V.: Erosion distance for generalized persistence modules. arXiv preprint arXiv:1710.01577 (2017)

  60. 60.

    Schmiedl, F.: Shape Matching and Mesh Segmentation. PhD thesis, Technische Universität München (2014)

  61. 61.

    Schmiedl, F.: Computational aspects of the Gromov–Hausdorff distance and its application in non-rigid shape matching. Discrete Comput. Geom. 57(4), 854–880 (2017)

    MathSciNet  MATH  Article  Google Scholar 

  62. 62.

    Scolamiero, M., Chachólski, W., Lundman, A., Ramanujam, R., Öberg, S.: Multidimensional persistence and noise. Found. Comput. Math. 17(6), 1367–1406 (2017)

    MathSciNet  MATH  Article  Google Scholar 

  63. 63.

    Sumpter, D.J.: Collective Animal Bbehavior. Princeton University Press, Princeton (2010)

    MATH  Book  Google Scholar 

  64. 64.

    Topaz, C.M., Ziegelmeier, L., Halverson, T.: Topological data analysis of biological aggregation models. PloS ONE 10(5), e0126383 (2015)

    Article  Google Scholar 

  65. 65.

    Ulmer, M., Ziegelmeier, L., Topaz, C.M.: Assessing biological models using topological data analysis. arXiv preprint arXiv:1811.04827 (2018)

  66. 66.

    van Goethem, A., van Kreveld, M.J., Löffler, M., Speckmann, B., Staals, F.: Grouping time-varying data for interactive exploration. In: 32nd International Symposium on Computational Geometry, SoCG 2016, June 14–18, 2016, Boston, MA, USA, pp. 61:1–61:16 (2016)

  67. 67.

    van Kreveld, M.J., Löffler, M., Staals, F.: Central trajectories. J. Comput. Geom. 8(1), 366–386 (2017)

    MathSciNet  MATH  Google Scholar 

  68. 68.

    van Kreveld, M.J., Löffler, M., Staals, F., Wiratma, L.: A refined definition for groups of moving entities and its computation. In: 27th International Symposium on Algorithms and Computation, ISAAC 2016, December 12–14, 2016, Sydney, Australia, pp. 48:1–48:12 (2016)

  69. 69.

    Vieira, M.R., Bakalov, P., Tsotras, V.J.: On-line discovery of flock patterns in spatio-temporal data. In: Proceedings of the 17th ACM SIGSPATIAL International Conference on Advances in Geographic Information Systems, pp. 286–295. ACM (2009)

  70. 70.

    Wang, Y., Lim, E.-P., Hwang, S.-Y.: Efficient algorithms for mining maximal valid groups. VLDB J. 17(3), 515–535 (2008)

    Article  Google Scholar 

Download references


FM thanks Justin Curry and Amit Patel for beneficial discussions. This work was partially supported by NSF Grants IIS-1422400, CCF-1526513, DMS-1723003, and CCF-1740761.

Author information



Corresponding author

Correspondence to Facundo Mémoli.

Additional information

Publisher's Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Editor in Charge: Kenneth Clarkson


Appendix A: Discretization of DMSs

In order to compute the lower bound for the distance \(d_{\texttt {dyn} }\) given in Theorems 4.4 and 4.5 in practice, we need to discretize DMSs, i.e. turn DMSs into a locally constant DMSs. This discretization depends on the resolution parameter \(\alpha \in (0,\infty )\), described as below. We will show that, if \(\alpha \) is small and DMSs \(\gamma _X\) and \(\gamma _Y\) satisfy a mild assumption, then the lower bounds for \(d_{\texttt {dyn} }(\gamma _X,\gamma _Y)\) given in Theorems 4.4 and 4.5 can be well-approximated using the \(\alpha \)-discretized DMSs associated to \(\gamma _X\) and \(\gamma _Y\).

We call any map \(i:\mathbf{Z}^d\rightarrow \mathbf{R}^d\)grid-like if i is an strictly injective poset morphism, i.e.

  1. (i)

    for any pair \(\mathbf{a}=(a_1,\ldots ,a_d)<\mathbf{b}=(b_1,\ldots ,b_d)\) with \(a_i<b_i\), \(i=1,\ldots ,d\) in \(\mathbf{Z}^d\), for \(i(\mathbf{a})=(a_1',\ldots ,a_d')\) and \(i(\mathbf{b})=(b_1',\ldots ,b_d')\), we have \(a_i'<b_i'\), \(i=1,\ldots ,d\).

  2. (ii)

    For all \(\mathbf{c}=(c_1,\ldots ,c_d) \in \mathbf{R}^d\), there are \(\mathbf{a},\mathbf{b}\in \mathbf{Z}^d\) such that \(i(\mathbf{a})\le \mathbf{c}\le i(\mathbf{b})\).

Given a grid-like \(i:\mathbf{Z}^d \rightarrow \mathbf{R}^d\), for any \(\mathbf{a}\in \mathbf{R}^d\), define \(\lfloor \mathbf{a}\rfloor _i\) to be the maximum element in the image of \(\mathbf{Z}^d\) by i which does not exceed \(\mathbf{a}\).

Definition A.1

(Discrete persistence modules) We call a persistence module \(M:\mathbf{R}^d\rightarrow {\mathscr {C}}\)discrete if there exists a grid-like map \(i:\mathbf{Z}^d\rightarrow \mathbf{R}^d\) such that for each \(\mathbf{a}\in \mathbf{R}^d\), the morphism \(\varphi _M(\lfloor \mathbf{a}\rfloor _i,\mathbf{a}):M_{\lfloor \mathbf{a}\rfloor _i}\rightarrow M_{\mathbf{a}}\) is an isomorphism.

Let \(\alpha \in (0,\infty )\). For any \(t\in \mathbf{R}\), let \(\lfloor t\rfloor _\alpha \in \alpha \mathbf{Z}\) be the greatest element in \(\alpha \mathbf{Z}\) which does not exceed t. Given any DMS \(\gamma _X=(X,d_X(\cdot ))\), we define the \(\alpha \)-discretization of \(\gamma _X\):

Definition A.2

(Discretization of a DMS) Let \(\gamma _X=(X,d_X(\cdot ))\) be any DMS and let \(\alpha \in (0,\infty )\). The \(\alpha \)-discretization of \(\gamma _X\) is the \(\mathbf{R}\)-parametrized family of finite (pseudo-)metric spaces \(\gamma _X^\alpha :=\left\{ \left( X,d_X^{\alpha \mathbf{Z}}(t)\right) :t\in \mathbf{R}\right\} \), where

$$\begin{aligned} d_X^{\alpha \mathbf{Z}}(t):=d_X(\lfloor t \rfloor _\alpha ):X\times X\rightarrow \mathbf{R}_+. \end{aligned}$$

Notice that the discretization \(\gamma _X^\alpha \) of \(\gamma _X\) does not necessarily satisfy Definition 2.1 (ii) and (iii) and hence \(\gamma _X^\alpha \) does not deserve to be called a DMS. However, for convenience, we will call \(\gamma _X^\alpha \) the \(\alpha \)-discretized DMS of \(\gamma _X\) or simply the discretized DMS.

We can regard \(d_{\texttt {dyn} }\) as an extended pseudometric on a collection containing both all DMSs and all discretized DMSs: Indeed, items (ii) and (iii) in Definition 2.1 are not necessary to claim that \(d_{\texttt {dyn} }\) satisfies the triangle inequality (see the proof of [46, Thm. 9.14] in [46, Sect. 11.4.2]).

A DMS \(\gamma _X=(X,d_X(\cdot ))\) is said to be l-Lipschitz if \(d_X(\cdot )(x,x'):\mathbf{R}\rightarrow \mathbf{R}_+\) is l-Lipschitz for every \(x,x'\in X\). Assuming that \(\gamma _X\) is l-Lipschitz, the smaller the resolution parameter \(\alpha \) is, the closer the discretized DMS \(\gamma _X^\alpha \) to \(\gamma _X\) is:

Proposition A.3

Let \(\gamma _X=(X,d_X(\cdot ))\) be any l-Lipschitz DMS. Then

$$\begin{aligned} d_{\texttt {dyn} }\left( \gamma _X,\gamma _X^{\alpha }\right) \le l\alpha . \end{aligned}$$

Note that for the discretized DMS \(\gamma _X^\alpha \), we can define the rank invariant and the Betti-0 function of \(\gamma _X^\alpha \) in the same way as in Definitions 2.23 and 2.24, respectively. Furthermore, in a bounded time interval \(I\subset \mathbf{R}\), it is not difficult to check that both the Betti-0 function \(\beta _0^{\gamma _X^\alpha }\) and the rank invariant \(\mathrm{rk}_k(\gamma _X^\alpha ),\ k\in \mathbf{Z}_+\) are discrete (Definition A.1). Therefore, one can straightforwardly utilize the results in Sect. 5 for computing \(d_{\mathrm{I}}\).

Proposition A.4

(Approximating \(d_{\texttt {dyn} }\) from below with discretized DMSs) Let \(\gamma _X=(X,d_X(\cdot ))\) and \(\gamma _Y=(Y,d_Y(\cdot ))\) be any two l-Lipschitz DMSs.

$$\begin{aligned} d_{\mathrm{I}}\left( \beta _0^{\gamma _X^\alpha },\beta _0^{\gamma _Y^\alpha }\right) -4l\alpha \quad \le \quad 2\cdot d_{\texttt {dyn} }(\gamma _X,\gamma _Y) \quad \hbox {and}\\ d_{\mathrm{I}}\left( \mathrm{rk}_k(\gamma _X^\alpha ),\mathrm{rk}_k(\gamma _Y^\alpha )\right) -4l\alpha \quad \le \quad 2\cdot d_{\texttt {dyn} }(\gamma _X,\gamma _Y), k\in \mathbf{Z}_+. \end{aligned}$$

Proof of Proposition A.3

For ease of notation, we prove the statement assuming that \(\alpha =1\), without loss of generality. Consider the tripod (Definition 2.6). We prove that R is a l-tripod between \(\gamma _X\) and \(\gamma _X^{\alpha \mathbf{Z}}\) (Definition 2.9). Fix \(t\in \mathbf{R}\). Since \(\lfloor t\rfloor \in [t-1,t+1]=[t]^1\), it is clear that \(\bigvee _{[t]^1}d_X\le _R d_X^{\alpha }(t)\) and hence \(\bigvee _{[t]^1}d_X\le _R d_X^{\alpha \mathbf{Z}}(t)+2l.\) It remains to show that \(\bigvee _{[t]^1}d_X^{\alpha \mathbf{Z}}\le _R d_X(t)+2l.\) Observe that, for any \(x,x'\in X\), \(\left( \bigvee _{[t]^1}d_X^{\alpha \mathbf{Z}}\right) (x,x')\) is the minimum among \(d_X(\lfloor t\rfloor -1)(x,x'),\ d_X(\lfloor t\rfloor )(x,x')\) and \(d_X(\lfloor t\rfloor +1)(x,x').\) Also, observe that all of \(\lfloor t\rfloor -1, \lfloor t\rfloor , \lfloor t\rfloor +1\) belong to the closed interval \([t]^2=[t-2,t+2]\). Therefore, invoking that \(\gamma _X\) is l-Lipschitz, for any \(x,x'\in X\),

$$\begin{aligned} \left( \bigvee _{[t]^1}d_X^{\alpha \mathbf{Z}}\right) (x,x')\le d_X(t)(x,x')+2l. \end{aligned}$$

This implies that \(\bigvee _{[t]^1}d_X^{\mathbf{Z}}\le _R d_X(t)+2l\), as desired. \(\square \)

Proof of Proposition A.4

We have

$$\begin{aligned} d_{\texttt {dyn} }(\gamma _X^\alpha ,\gamma _Y^\alpha )&\le d_{\texttt {dyn} }(\gamma _X^\alpha ,\gamma _X)+d_{\texttt {dyn} }(\gamma _X,\gamma _Y)+d_{\texttt {dyn} }(\gamma _Y,\gamma _Y^\alpha )\\&\qquad \quad \hbox {(by the triangle inequality),}\\&\le 2l\alpha +d_{\texttt {dyn} }(\gamma _X,\gamma _Y)\quad \hbox {(by Proposition}\, A.3). \end{aligned}$$

Also, by Theorem 4.5, we obtain \(d_{\mathrm{I}}\big (\beta _0^{\gamma _X^\alpha },\beta _0^{\gamma _Y^\alpha }\big )\le 2\cdot d_{\texttt {dyn} }(\gamma _X^\alpha ,\gamma _Y^\alpha )\), and in turn the first inequality in the statement. The second inequality can be proved in a similar way. \(\square \)

Appendix B: Relationship Between the Rank Invariant and CROCKER-Plot

We relate the rank invariant of a DMS to the CROCKER plot of [64]:

Definition B.1

(The CROCKER plots of a DMS [64]) Let \(\gamma _X=(X,d_X(\cdot ))\) be a DMS. For \(k\in \mathbf{Z}_+\), the k-th CROCKER plot \(C_k(\gamma _X)\) of \(\gamma _X\) is a map \(\mathbf{R}\times \mathbf{R}_+\rightarrow \mathbf{Z}_+\) sending \((t,\delta )\in \mathbf{R}\times \mathbf{R}_+\) to the dimension of the vector space \(\mathrm{H}_k\left( {\mathscr {R}}_\delta (X,d_X(t))\right) \).

Let \(\gamma _X=(X,d_X(\cdot ))\) be any DMS. Note that for any time \(t_0\in \mathbf{R}\) and scale \(\delta _0\in \mathbf{R}_+\), the value of \(\mathrm{rk}_k(\gamma _X)\) associated to the repeated pair \(([t_0,t_0],\delta _0),([t_0,t_0],\delta _0)\in \mathbf{Int}\times \mathbf{R}_+\) is identical to the dimension of the vector space \(\mathrm{H}_k({\mathscr {R}}_{\delta _0}(X,d_X(t_0)))\), i.e. \(C_k(\gamma _X)(t_0,\delta _0)\). This implies that \(\mathrm{rk}_k(\gamma _X)\) is an enriched version of the k-th CROCKER plot \(C_k(\gamma _X)\) of \(\gamma _X\).Footnote 7 Therefore, Theorem 4.4 can be interpreted somehow as establishing the stability of the CROCKER plots of a DMS.

Recall Definition 2.24, the Betti-0 function of a DMS.

Remark B.2

(Comparison between the Betti-0 function and the 0-th CROCKER plot) Consider the DMSs \(\gamma _X\) and \(\gamma _Y\) in Fig. 1. Since the two metric spaces \(\gamma _X(t)\) and \(\gamma _Y(t)\) are isometric at each time \(t\in \mathbf{R}\), the two CROCKER plots \(C_0(\gamma _X)\) and \(C_0(\gamma _Y)\) are identical. On the other hand, the Betti-0 function \(\beta _0^{\gamma _X}\) is distinct from \(\beta _0^{\gamma _Y}\) as illustrated in Fig. 4. This implies that, in comparison with the 0-th CROCKER plot, the Betti-0 function is more sensitive invariant of a DMS.

Appendix C: Other Relevant Metrics

Bottleneck Distance. Let us define:

  • \(\overline{\mathbf{R}}:=\mathbf{R}\cup \{+\infty ,-\infty \}\),

  • \(\mathbf{U}:=\{(u_1,u_2)\in \mathbf{R}^2: u_1\le u_2\}\), which is the upper-half plane above the line \(y=x\) in \(\mathbf{R}^2\).

  • \(\overline{{\mathbf{U}}}:=\{(u_1,u_2)\in \overline{\mathbf{R}}^2: u_1\le u_2\}\), which is the upper-half plane above the line \(y=x\) in the extended plane \(\overline{\mathbf{R}}^2\).

For \(\mathbf{u}=(u_1,u_2),\ \mathbf{v}=(v_1,v_2)\in \overline{{\mathbf{U}}}\), let

$$\begin{aligned} \left\Vert \mathbf{u}-\mathbf{v}\right\Vert _\infty :=\max \left( \left|u_1-v_1\right|, \left|u_2-v_2\right|\right) . \end{aligned}$$

Let \(X_1\) and \(X_2\) be multisets of points. Let \(\alpha :X_1\nrightarrow X_2\) be a matching, i.e. a partial injection. By \(\mathrm{dom}(\alpha )\) and \(\mathrm{im}(\alpha )\), we denote the points in \(X_1\) and \(X_2\) respectively, which are matched by \(\alpha \).

Definition C.1

(The bottleneck distance [24]) Let \(X_1,X_2\) be multisets of points in \(\overline{{\mathbf{U}}}\). Let \(\alpha :X_1\nrightarrow X_2\) be a matching. We call \(\alpha \) an \(\varepsilon \)-matching if

  1. (i)

    for all \(\mathbf{u}\in \mathrm{dom}(\alpha )\), \(\left\Vert \mathbf{u}-\alpha (\mathbf{u})\right\Vert _\infty \le \varepsilon \),

  2. (ii)

    for all \(\mathbf{u}=(u_1,u_2)\in X_1\setminus \mathrm{dom}(\alpha )\), \(u_2-u_1 \le 2\varepsilon \),

  3. (iii)

    for all \(\mathbf{v}=(v_1,v_2)\in X_2 \setminus \mathrm{im}(\alpha )\), \(v_2-v_1 \le 2\varepsilon \).

Their bottleneck distance \(d_\mathrm{B}(X_1,X_2)\) is defined as the infimum of \(\varepsilon \in [0,\infty )\) for which there exists an \(\varepsilon \)-matching \(\alpha :X_1\nrightarrow X_2\).

Erosion Distance. Recently, Patel generalized the notion of persistence diagrams and proposed a new metric, the erosion distance, for comparing generalized persistence diagrams [58]. We review a particular case of the erosion distance. Let \(\mathbf{P}\) and \(\mathbf{Q}\) be any two posets. Given any two maps \(f,g:\mathbf{P}\rightarrow \mathbf{Q}\), we write \(f\le g\) if \(f(p)\le g(p)\) for all \(p\in \mathbf{P}\).

Let \(\mathbf{U}:=\{(x,y)\in \mathbf{R}^2:x\le y\}\) equipped with the partial order inherited from \(\mathbf{R}^{\mathrm{op}}\times \mathbf{R}\). For any \(\varepsilon \in [0,\infty ),\) let \(\mathbf {\varepsilon }:=(-\varepsilon ,\varepsilon )\in \mathbf{U}\). Given any map \(Y:\mathbf{U}\rightarrow \mathbf{Z}_+\) and \(\varepsilon \in [0,\infty )\), define another map \(\nabla _\varepsilon Y:\mathbf{U}\rightarrow \mathbf{Z}_+\) as \(\nabla _\varepsilon Y(I):=Y(I+\mathbf {\varepsilon }).\) If Y is order-reversing, it is clear that \(\nabla _\varepsilon Y \le Y.\)

Definition C.2

(Erosion distance [58]) Let \(Y_1,Y_2:\mathbf{U}\rightarrow \mathbf{Z}_+\) be any two order-reversing maps. The erosion distance between \(Y_1\) and \(Y_2\) is defined as

$$\begin{aligned} d_{\mathrm{E}}(Y_1,Y_2):=\inf \left\{ \varepsilon \in [0,\infty ): \nabla _\varepsilon Y_i\le Y_j,\ \hbox {for}\ i,j\in \{1,2\}\right\} , \end{aligned}$$

with the convention that \(d_{\mathrm{E}}(Y_1,Y_2)=\infty \) when there is no \(\varepsilon \in [0,\infty )\) satisfying the condition in the above set.

Note that since \(\mathbf{U}\) is a subposet of \(\mathbf{R}^{\mathrm{op}}\times \mathbf{R}\), we can regard \(d_{\mathrm{E}}\) is a particular case of \(d_{\mathrm{I},2}\) from Sect. 3.2. The erosion distance is further generalized in [59].

Matching Distance [18, 51]. In brief, the matching distance \(d_{\mathrm{match}}\) compares rank invariants via one-dimensional reduction along lines. Namely, for any \(M,N:\mathbf{R}^d\rightarrow \mathbf{Vec}\), the matching distance between \(\mathrm{rk}(M)\) and \(\mathrm{rk}(N)\) is defined as

$$\begin{aligned} d_{\mathrm{match}}(\mathrm{rk}(M),\mathrm{rk}(N)):=\sup _{L:u=s\mathbf {m}+b}m^*d_\mathrm{B}({\mathscr {B}}(M|_L),{\mathscr {B}}(N|_L)), \end{aligned}$$

where L varies in the set of all the lines parametrized by \(u=s\mathbf {m}+b\), with \(m^*:=\min _i m_i>0\), \(\max _i m_i=1\), \(\sum _{i}^n b_i=0\). Specifically, \(d_{\mathrm{match}}\) is upper bounded by \(d_{\mathrm{I}}^\mathbf{Vec}\) [51]. We briefly discuss about the algorithms for \(d_{\mathrm{match}}\) and their computational cost:

  • For \(d=1\), the RHS of equation (21) reduces to the bottleneck distance between the barcodes of M and N. The bottleneck distance can be computed in time \(O(n^{1.5}\log n)\) where n is the total cardinality of the two barcodes [45]. See also [19].

  • For \(d=2\), \(d_{\mathrm{match}}\) can be computed exactly in time \(O(n^{11})\) where n is the size of finite presentations of M and N [44].

  • For \(d\ge 2\), algorithms for approximating \(d_{\mathrm{match}}\) within any threshold \(\varepsilon >0\) are proposed in [6, 20]. In particular, for the case \(d\ge 3\) which is of our interest, the running time for the proposed algorithm is proportional to \(\left( \frac{d}{\varepsilon }\right) ^d\) in the worst case [20, Sect. 3.1].

Dimension Distance [28, Sect. 4]. Let \(M,N:\mathbf{R}^d\rightarrow \mathbf{Vec}\) be any two persistence modules. If MN are niceFootnote 8, then the dimension distance\(d_0\) between \(\mathrm{dm}(M)\) and \(\mathrm{dm}(N)\) serves as a lower bound for \(d_{\mathrm{I}}^\mathbf{Vec}(M,N)\) [28, Thm. 39]. A strength of \(d_0\) is the computational efficiency. Let \(M',N':[n]^d\rightarrow \mathbf{Vec}\) be any two finite persistence modules. The entire computation for \(d_0(\mathrm{dm}(M'),\mathrm{dm}(N'))\) takes only \(O(n^2\log n)\) [28, Sect. 4.2].

If a persistence module M is obtained by applying the 0-th homology functor to the spatiotemporal Rips filtration of a DMS \(\gamma _X\) (Definition 2.21), then every internal morphim \(\varphi _M(\cdot ,\cdot )\) is surjective, and hence M is nice. Specifically, \(\mathrm{dm}(M)\) coincides with the Betti-0 function \(\beta _0^{\gamma _X}\) (Definition 2.24). Therefore, one can utilize \(d_0\) for comparing Betti-0 functions of DMSs and for obtaining a lower bound of \(d_{\texttt {dyn} }\) (by virtue of Theorem 4.1).

On the other hand, for \(k\ge 1\), a persistence module M obtained by applying the k-th homology functor to the spatiotemporal Rips filtration of a DMS does not necessarily satisfy the “nice” condition. This prevents us from freely utilizing \(d_0\) in order to obtain a lower bound for \(d_{\texttt {dyn} }\).

Appendix D: Stability of the Single Linkage Hierarchical Clustering Method

We review the single linkage hierarchical clustering (SLHC) method and its stability under the Gromov–Hausdorff distance. We begin by reviewing the Gromov–Hausdorff distance.

Appendix D.1: The Gromov–Hausdorff Distance

The Gromov–Hausdorff distance \(d_\mathrm{GH}\) (Definition D.1) measures how far two metric spaces are from being isometric.

Let \((X,d_X)\) and \((Y,d_Y)\) be any two metric spaces and let be a tripod between X and Y. Then the distortion of R is defined as

$$\begin{aligned} \displaystyle \mathrm{dis}(R):=\sup _{\begin{array}{c} z,z'\in Z \end{array}}\left|d_X\left( \varphi _X(z),\varphi _X(z')\right) -d_Y\left( \varphi _Y(z),\varphi _Y(z')\right) \right|. \end{aligned}$$

Definition D.1

(Gromov–Hausdorff distance [12, Sect. 7.3.3]) Let \((X,d_X)\) and \((Y,d_Y)\) be any two metric spaces. Then

$$\begin{aligned} d_\mathrm{GH}\left( (X,d_X),(Y,d_Y)\right) =\frac{1}{2}\inf _R\ \mathrm{dis}(R), \end{aligned}$$

where the infimum is taken over all tripods R between X and Y. In particular, any tripod R between X and Y with \(\mathrm{dis}(R)\le \varepsilon \) is said to be an \(\varepsilon \)-tripod between \((X,d_X)\) and \((Y,d_Y)\).

The computation cost of \(d_\mathrm{GH}\) leads to NP-hard problem, even for metric spaces of simple structure [1, 61]. Therefore, one of practical approaches for estimating \(d_\mathrm{GH}\) is to search for tractable lower bounds.

Appendix D.2: Single Linkage Hierarchical Clustering (SLHC) Method

Let \((X,d_X)\) be a finite metric space. For each \(\delta \in \mathbf{R}_+\), we define the equivalence relation \(\sim _\delta \) on X as

$$\begin{aligned} x\sim _\delta x'\ \hbox {if and only if}\ \exists x=x_0,\ldots ,x_n \ \hbox {in}\ X\ \hbox {s.t.}\ d_X(x_i,x_{i+1})\le \delta . \end{aligned}$$

Observe that for any \(\delta \le \delta '\) in \(\mathbf{R}_+\), the inclusion \(\sim _\delta \ \subset \ \sim _{\delta '}\) holds, leading to \((X{/}\sim _\delta ) \le (X/\sim _{\delta '})\) in \(\mathbf{Part}(X)\) (Definition 6.14).

Definition D.2

(The dendrogram from the SLHC) Let \((X,d_X)\) be a finite metric space. The dendrogram \(\theta (X,d_X):\mathbf{R}_+\rightarrow \mathbf{Part}(X)\) defined by sending \(\delta \in \mathbf{R}_+\) to \(X/\sim _\delta \) is called the SLHC dendrogram of \((X,d_X)\). \(\square \)

The Ultrametric Induced by the Single Linkage Hierarchical Clustering Method [16]. An ultrametric space \((X,u_X)\) is a metric space satisfying the strong triangle inequality: for all \(x,x',x''\in X\), \(u_X(x,x')\le \max \left\{ u_X(x,x''),u_X(x'',x') \right\} \).

Let \((X,d_X)\) be a finite metric space and consider its SLHC dendrogram \(\theta (X,d_X):\mathbf{R}_+\rightarrow \mathbf{Part}(X)\). For any \(x,x'\in X\), define

$$\begin{aligned} u_X(x,x'):=\min \{\delta \in [0,\infty ):\ x,x'\hbox { belong to the same block of }X/\sim _\delta \}. \end{aligned}$$

It is not difficult to check that \(u_X:X\times X\rightarrow \mathbf{R}_+\) is a ultrametric and that \(u_X(x,x')\le d{(x,x')}\), for all \(x,x'\in X\).

Definition D.3

(The ultrametrics induced by the single linkage hierarchical clustering [16]) Given any finite metric space \((X,d_X)\), the ultrametric space \((X,u_X)\) defined as above is said to be the ultrametric space induced by the SLHC on\((X,d_X)\) and we write \((X,u_X)={\mathscr {H}}^\mathrm{SL}(X,d_X).\)

The assignment \((X,d_X)\mapsto {\mathscr {H}}^\mathrm{SL}(X,d_X)\) is known to be 1-Lipschitz with respect to the Gromov–Hausdorff distance:

Theorem D.4

(Stability of the SLHC [16]) For any two finite metric spaces \((X,d_X)\) and \((Y,d_Y)\), let \((X,u_X)\) and \((Y,u_Y)\) be the ultrametric spaces induced from \((X,d_X)\) and \((Y,d_Y)\) by the SLHC method. Then

$$\begin{aligned} d_\mathrm{GH}((X,u_X),(Y,u_Y))\le d_\mathrm{GH}((X,d_X),(Y,d_Y)). \end{aligned}$$

Remark D.5

The term \(d_\mathrm{GH}((X,u_X),(Y,u_Y))\) in (22) cannot be approximated within any factor less than 3 in polynomial time, unless P = NP [47, Thm. 3]. Therefore, in a practical viewpoint, it is desirable to find another lower bound for \(d_\mathrm{GH}\).

The Gromov–Hausdorff distance can be bounded from below by the bottleneck distance between persistence diagrams associated to Rips filtrations: see inequality (11). Computing the LHS of inequality (11) can be carried out in polynomial time [45].

Remark D.6

Observe that both of the LHSs of the inequalities in (22) and (11) with \(k=0\) measure the difference between clustering features of \((X,d_X)\) and \((Y,d_Y)\). In fact, for any two finite metric spaces \((X,d_X)\) and \((Y,d_Y)\), the persistence modules \(\mathrm{H}_0\left( {\mathscr {R}}_{\bullet }(X,d_X)\right) \) and \(\mathrm{H}_0\left( {\mathscr {R}}_{\bullet }(Y,d_Y)\right) \) are isomorphic to \(\mathrm{H}_0\left( {\mathscr {R}}_{\bullet }(X,u_X)\right) \) and \(\mathrm{H}_0\left( {\mathscr {R}}_{\bullet }(Y,u_Y)\right) \), respectively. Therefore,

$$\begin{aligned}&d_\mathrm{B}\left( \mathrm{dgm}_0\left( {\mathscr {R}}_{\bullet }(X,d_X)\right) , \mathrm{dgm}_0\left( {\mathscr {R}}_{\bullet }(Y,d_Y)\right) \right) \\&\quad \le d_\mathrm{GH}\left( (X,u_X),(Y,u_Y)\right) \le 2\cdot d_\mathrm{GH}\left( (X,d_X),(Y,d_Y)\right) . \end{aligned}$$

Rights and permissions

Reprints and Permissions

About this article

Verify currency and authenticity via CrossMark

Cite this article

Kim, W., Mémoli, F. Spatiotemporal Persistent Homology for Dynamic Metric Spaces. Discrete Comput Geom (2020).

Download citation


  • Computational topology
  • Dynamic metric spaces
  • Gromov–Hausdorff distance
  • Multiparameter persistent homology
  • Rank invariant
  • Persistent Betti numbers

Mathematics Subject Classification

  • 55U10
  • 37N25