Geometry of the matching distance for D filtering functions
Abstract.
In this paper we exploit the concept of extended Pareto grid to study the geometric properties of the matching distance for -valued regular functions defined on a Riemannian closed manifold. In particular, we prove that in this case the matching distance is realised either at special values or at values corresponding to vertical, horizontal or slope lines.
2010 Mathematics Subject Classification:
Primary 55N31, Secondary 57R191. Introduction
Feature extraction and comparison are the main tasks of data analysis. In topological data analysis this translates into the problem of comparing persistence modules, which encode the homological features extracted from geometric objects. In order to be able to compare persistence modules a distance is needed. There is a wide variety of distances in the space of -parameter persistence modules, such as the bottleneck and Wasserstein distances. However, such distances do not directly generalise to the multiparameter setting. Thus, different ones have been proposed over the past years, turning into a substantial catalogue, see for example [4, 5, 10]. One of those is the matching distance, which can be defined in particular for 2-parameter persistence modules. This pseudometric, introduced in [4], is a generalisation of the classical bottleneck distance for -parameter persistence modules and measures the difference between the -dimensional Betti numbers functions (also known as rank invariants) of persistence modules. The definition of matching distance is based on a foliation method, consisting of “slicing” the -parameter persistence module into infinitely many -dimensional components by means of lines of positive slope, that we refer to as filtering lines. The matching distance is then obtained by taking the supremum over all such lines of the bottleneck distances between the resulting persistence diagrams after a suitable normalisation.
According to the definition, in order to compute the matching distance between persistence modules, one should take into account infinitely many bottleneck distance computations. Many efforts have been devoted to make this computation efficient, for example, by identifying a finite number of filtering lines contributing to the actual computation [1, 3, 8] or approximation [6, 2, 9] of the distance. However, what many of these works have in common is that their starting point is a pair of -parameter persistence modules. Our approach is similar in scope, but different in nature. We consider regular filtering functions on a smooth manifold with values in . Their sublevel-set filtrations still return -parameter persistence modules, for which we can compute the -dimensional persistent Betti numbers functions and, hence, the matching distance between them. Our approach allows us to observe phenomena and exploit structures that are not visible when directly considering persistence modules. For example, it is possible to exploit the differentiable structure of the filtering functions to identify points in the persistence diagrams associated to each filtering line. This structure made of arcs and half-lines is known as extended Pareto grid [5] (see also [11]). The convenience of such an approach relies on the fact that, by using this approach, the changes in homology that occur when the filtering line changes are easy to follow and control.
In this context of -parameter persistence modules derived from regular filtering functions on smooth manifolds, we show that filtering lines of slope play a special role in the computation of the matching distance. Our main result shows that the matching distance between the -dimensional persistent Betti numbers functions of two filtering functions is indeed realised either on values corresponding to vertical, horizontal or slope lines, or on special values associated with the two functions. The authors of [1] recently obtained an analogous result in the discrete setting. They show that the matching distance is realised either on values corresponding to diagonal lines or on what they call switch values. One main difference is that the collection of special values that we encounter, called special set, is strongly related with the differentiable structure of our input. In particular, it relies on the structure of the extended Pareto grid associated with a function and on the Position Theorem, proved in [5], which relates points of a persistence diagram to points in the extended Pareto grid.
In this paper, we aim to prove the following:
Theorem.
The matching distance between and is realised either on a value associated with a line of slope , a vertical or horizontal line, or on a special value of .
2. Matching distance
Let be a closed -manifold with a Riemannian metric defined on it. Let be a smooth function. The filtered homology of the sublevel sets of is known as persistent homology. This information can be encoded as a multiset of points in , known as the persistence diagram of and denoted by . The subset is always considered to be in the persistence diagram of a function and, by convention, we treat it as a unique point with infinite multiplicity. See [7] for more details about -parameter persistent homology for sublevel set filtrations.
Let and be smooth functions. Consider the set of pairs in with the uniform metric . It parameterises all the lines of with positive slope in the following way: is the line containing points of the form with in . Each point of can be associated with the set . This defines a -dimensional filtration, depending on the line , which can be associated with a persistence diagram. Letting vary, one obtains a collection of persistence diagrams described by the D persistent Betti numbers function of . As observed in [4], is also equal to , where (see Figure 1). However, more commonly, is normalised, without changing the nature of the filtration, and is instead considered.
Given two functions and , the matching distance [4] is defined by
Here, is the bottleneck distance between the persistence diagrams of and , i.e.,
where , runs over all bijections, called matchings, between and and, if and , then
where . A matching realising the matching distance, whenever it exists, is called an optimal matching. Note that the matching distance can be seen both as a pseudo-metric between the persistent Betti numbers functions of and , and between the filtering functions and . For the sake of simplicity, we keep the notation for both cases. For more details about this definition and the foliation method we refer to [4].

3. Extended Pareto grid
In this section we recall the relation between a differential construction associated with a smooth function , called the extended Pareto grid, and the points of the persistence diagrams . This connection is established in the Position Theorem proved in [5].
Recall that the Jacobi set of is the collection
The Pareto critical set of is the subset of given by
Assume now that is not only smooth, but it also satisfies the following properties:
-
(i)
No point exists in at which both and vanish.
-
(ii)
is a -manifold smoothly embedded in consisting of finitely many components, each one diffeomorphic to a circle.
-
(iii)
is a -dimensional closed submanifold of M, with boundary in .
-
(iv)
If we denote by the subset of where and are orthogonal to , then the connected components of are finite in number, each one being diffeomorphic to an interval. With respect to any parameterisation of each component, one of and is strictly increasing and the other is strictly decreasing. Each component can meet critical points for , only at its endpoints.
Denote by and , respectively, the critical points of and . Since the function satisfies (i), then . The extended Pareto grid of is defined as the union
where is the vertical half-line and is the horizontal half-line . We refer to these half-lines as improper contours and to the closure of the image of the connected components of as proper contours of . Figure 2 shows an example of extended Pareto grid for the projection of a sphere in on the plane . The violet horizontal half-lines originate at critical values of , while the vertical ones originate at critical values of . The red arcs are the images of those arcs on the sphere in which the gradients and have the same direction but opposite orientation. Observe that, because of property (ii), the number of contours in is finite. Moreover, property (iv) ensures that every contour can be parameterised as a curve whose two coordinates are respectively strictly decreasing and strictly increasing. For more details about properties (i)-(iv) we refer the interested reader to [5, 11].

One may observe that the portions of contours delimited by points of intersection between different contours correspond to births and deaths of homology classes. For example, the red union of contours corresponds to the birth of a homology class in degree 0 and the green portions of contour to the birth of a homology class in degree 2. For a richer example we refer the reader to [5, Figure 8].
The Position Theorem (Theorem 2 in [5]) allows us to obtain the coordinates of the points in the persistence diagram of just by looking at the extended Pareto grid of the function and the filtering line . It reads as follows:
Theorem 3.1.
Let be in and in . Then, for each finite coordinate of , a point in exists such that .
In [5] the set of filtering functions considered is the set of normal functions. However, the reader can observe that the proof of this specific theorem is actually independent from this assumption and it is valid also in our current setting.
4. Extension of persistence diagrams
In this section we show that it is possible to extend each D persistent Betti numbers function from the open set , where it is defined, to the closed set . Moreover, we prove that the matching distance between and can be realised on the compact set , with .
Proposition 4.1.
Let be a positive real number. If and , then, for every ,
Proof.
Since , then and . Therefore, recalling that and observing that ,
∎
By observing that, if and , then , we obtain an analogous result to Proposition 4.1 for .
Proposition 4.2.
Let be a positive real number. If and , then, for every ,
As a consequence, the function
is locally Lipschitz. This is the content of the following result:
Theorem 4.3.
If , then for every and every ,
Proof.
In Theorem 4.3 we showed that the function is locally Lipschitz. As such, it can be extended to the parameter values (resp. ) as the limit (resp., ), for every in . Such a function is continuous, and the stability of persistence diagrams with respect to the uniform norm implies that the limit (resp. ) also exists and is equal to (resp. ). In other words, can be uniquely extended to and this extension is also a locally Lipschitz function. Therefore, in the rest of this paper, we will be allowed to consider the functions for any in . The limit functions and can be computed explicitly for any in :
Since Theorem 4.3 enables us to extend the functions and to , the function
can be extended to , too. Furthermore, it is continuous because of the stability of persistence diagrams and, hence, it admits a maximum in its compact domain.
Next, we show that it is not restrictive to compute the matching distance for parameters in , where .
Proposition 4.4.
There exists in , with , such that
Proof.
Our strategy is to check what happens when . There are four possible cases given by the combinations of or and or . Consider the case and . We have . However, and . Thus, and, similarly, . The bottleneck distance between their persistence diagrams will thus be . Therefore, is constant for and . Hence we can limit ourselves to computing its value for and .
Consider now and . We have and, similarly, . Fixing , we observe that in this case is constant with respect to . Since was chosen arbitrarily, and there is no dependence on , we can choose them to be and and conclude.
The other two cases follow the same strategy. ∎

The above proof also shows that the continuous function is constant on the segments and , non-increasing on the segment and non-decreasing on the segment . Moreover, it is on and (see Figure 3). Furthermore, we would like to point out that Proposition 4.4 gives us a new formulation for the definition of the matching distance as follows:
5. Special set and matching distance
In this section we introduce the special set associated with a pair of functions . We prove that the matching distance between two functions is realised either on values associated with vertical, horizontal or slope lines, or on this special set.
Definition 5.1.
Let be the set of all curves that are contours of or . The special set of , denoted by , is the collection of all in for which two distinct pairs , of contours in intersecting exist, such that and
-
•
, with , if ,
-
•
, with , if ,
where , , and , and , denote abscissas and ordinates of these points. An element of the special set is called a special value of the pair .
Special values are values of in which the optimal matching may abruptly change because of the presence of more than one pair of points with the same distance between abscissas (for ) or same distance between ordinates (for ). This discontinuity behaviour gives an obstruction to proving that the matching distance is realised only on vertical, horizontal and slope 1 lines. Indeed, the key for proving Theorem 5.4 is being able to continuously move in the space of parameters and not losing track of the points realising the optimal matching. When encountering a special value this continuity may be missing.
Figure 4 shows two examples of lines associated with special values of , with , and . The green and light blue lines correspond respectively to the parameter values and . The intersection points and , between the green line and the extended Pareto grid have equal difference between abscissas, thus is a special value. On the other hand, the intersection points and , between the light blue line and the extended Pareto grid have equal difference between ordinates. In particular, approximates a special value up to a error.

Proposition 5.2.
is closed in .
Proof.
First, we show that is closed. Consider a sequence in that converges to in . Since such a sequence consists of special values of , there exist two distinct sets and in such that , where , , and and , for every . Since has finitely many contours, we can assume, up to subsequences, that the sequences , , and lie respectively in the contours , , and , for every . For the same reason, we can assume that and , for every . Since is convergent, it is also bounded. In particular, besides , there is such that . Then is bounded below by the line and above by the line . Thus, , , and converge, respectively, to , , and , up to restriction to subsequences. Since , their limits are also equal, so we have . Since , , and all lie in , is also a special value of , concluding that is closed.
Analogously, one can see that is closed. The set is then a union of two closed sets, hence it is closed itself. ∎
Let be the set of all pairs in realising the matching distance between and , i.e., such that
As observed about (4), is a continuous function on , thus it admits a maximum in its domain and is not empty. Moreover, is compact because it is the preimage of a point in via a continuous function defined on a compact set.
Note that for any in , we have
where is an optimal matching. By applying a straightforward generalisation of Theorem 28 in [opt-matching] for arbitrary persistence diagrams, one can see that such a matching always exists. Theorem 4.3 and the stability of the bottleneck distance with respect to the uniform norm imply that can be seen as a continuous function in the variable in .
Definition 5.3.
Let be a matching between two persistence diagrams and let in be such that . The matching is of type if , and of type if .
Observe that a matching can be both of type and type . We use this terminology in the proof of the following theorem.
Theorem 5.4.
Proof.
Assume by contradiction that every in is not in and that . Since is compact, it is possible to take in minimising the distance from the line . Among these, consider and a corresponding matching of minimum cost between and . If , the Position Theorem 3.1 implies that there exist and in intersecting , such that and realise at least one of these properties:
-
(1)
, , and ;
-
(2)
or , and .
Observe that the former matching is of type and the latter of type . Note also that , and hence . If not, then , implying that any belongs to , including , which is a contradiction.
Consider a sequence in such that these are chosen to identify lines obtained by rotating around clockwise in such a way that , where is a decreasing sequence. Furthermore, given a sequence of optimal matchings between and we have that (see (5)). Since is closed, by Proposition 5.2, and does not belong to this set, we can assume that the sequence also has no points in this set. Hence, for any in there exists a pair in for which at least one of the following properties holds:
-
(A)
, and ;
-
(B)
or , and .
Up to subsequences, we can assume that the matchings are either all of type or all of type . We now show that and belong to the same contour in , and and also belong to the same contour in . Analogously to the proof of Proposition 5.2 we may observe that the set is a bounded subset of . Thus, and are convergent up to subsequences in the closed set , respectively, to and . By assumption, there are only a finite number of contours, thus there exists at least a contour in for each sequence, and , containing infinitely many points of the sequence. Hence, we can assume that each sequence, up to subsequences, lies entirely on a single contour in , i.e., we can suppose that for every in , is in and is in , with and in . Since contours are closed, belongs to and belongs to . We observe that . Furthermore, we have that
where in . If , then is a special value, contradicting the initial assumption. Thus, . Without loss of generality, by possibly exchanging the roles of the contours and , and of the points and , we can assume that , , and . Consequently, by the fact that and are contained in the same line and the same contour , for every , since a contour and a positive slope line can meet in at most one point.
Case 1. Assume that and are both of the same type for every . Since belongs to in for any , one can easily check that (see Figure 5), and hence . If the equality holds there is a contradiction with the assumption of minimising the distance from the line , since . If the strict inequality holds, there is a contradiction with the assumption of being in .
Case 2. Assume that all and are of different types. This means that , , with and in , and . However, since , . Thus, , which is a contradiction since and, hence, .
Inverting the role of abscissas and ordinates as described by the Position Theorem 3.1 and rotating the lines counterclockwise, one can see that an analogous procedure holds for . ∎

6. Conclusions
In this article we took advantage of the differential structure associated with smooth functions from a Riemannian manifold to to characterise some geometric properties of the matching distance. We proved that the filtering lines that actually contribute to the computation of the matching distance are horizontal, vertical, of slope 1, or they are associated with parameter values in the special set. This new approach to the computation of the matching distance could lead to new effective algorithms. In this direction, we would like to highlight an open question that arose during our work. We have not yet provided a characterisation of the special set. However, we conjecture that the special set consists of a collection of curves, up to a small perturbation of the filtering functions.
Figure 6 shows a selection of points in the special set for the functions , where , and . One may notice clear segments, two of which, on the left, correspond to values identifying lines through intersections of contours. Such lines are in fact always associated with special values.

References
- [1] Asilata Bapat, Robyn Brooks, Celia Hacker, Claudia Landi, Barbara I. Mahler, and Elizabeth R. Stephenson. Computing the matching distance of 2-parameter persistence. arXiv:2210.12868.
- [2] Silvia Biasotti, Andrea Cerri, Patrizio Frosini, and Daniela Giorgi. A new algorithm for computing the 2-dimensional matching distance between size functions. Pattern Recognition Letters, 32(14):1735–1746, 2011.
- [3] Havard Bjerkevik and Michael Kerber. Asymptotic improvements on the exact matching distance for 2-parameter persistence. arXiv: 2111.10303.
- [4] Andrea Cerri, Barbara Di Fabio, Massimo Ferri, Patrizio Frosini, and Claudia Landi. Betti numbers in multidimensional persistent homology are stable functions. Math. Methods Appl. Sci., 36(12):1543–1557, 2013.
- [5] Andrea Cerri, Marc Ethier, and Patrizio Frosini. On the geometrical properties of the coherent matching distance in 2D persistent homology. J. Appl. Comput. Topol., 3(4):381–422, 2019.
- [6] Andrea Cerri and Patrizio Frosini. A new approximation algorithm for the matching distance in multidimensional persistence. Journal of Computational Mathematics, 38(2):291–309, 2020.
- [7] Herbert Edelsbrunner and Dmitriy Morozov. Persistent homology: theory and practice. In European Congress of Mathematics, pages 31–50. Eur. Math. Soc., Zürich, 2013.
- [8] Michael Kerber, Michael Lesnick, and Steve Oudot. Exact computation of the matching distance on 2-parameter persistence modules. In 35th International Symposium on Computational Geometry, volume 129 of LIPIcs. Leibniz Int. Proc. Inform., pages Art. No. 46, 15. Schloss Dagstuhl. Leibniz-Zent. Inform., Wadern, 2019.
- [9] Michael Kerber and Arnur Nigmetov. Efficient approximation of the matching distance for 2-parameter persistence. In 36th International Symposium on Computational Geometry, volume 164 of LIPIcs. Leibniz Int. Proc. Inform., pages Art. No. 53, 16. Schloss Dagstuhl. Leibniz-Zent. Inform., Wadern, 2020.
- [10] Michael Lesnick. The theory of the interleaving distance on multidimensional persistence modules. Found. Comput. Math., 15(3):613–650, 2015.
- [11] Y. H. Wan. Morse theory for two functions. Topology, 14(3):217–228, 1975.