Steady and ranging sets in graph persistence

Topological data analysis can provide insight on the structure of weighted graphs and digraphs. However, some properties underlying a given (di)graph are hardly mappable to simplicial complexes. We introduce steady and ranging sets: two standardized ways of producing persistence diagrams directly from graph-theoretical features. The two constructions are framed in the context of indexing-aware persistence functions. Furthermore, we introduce a sufficient condition for stability. Finally, we apply the steady- and ranging-based persistence constructions to toy examples and real-world applications.


Introduction
Weighted graphs are a common data structure in many real-world scenarios.Recently, persistent homology became a widespread tool for data analysis, classification, comparison, and retrieval.However, this technique is by its very own nature limited to the analysis of weighted simplicial complexes.Although a graph is a one-dimensional complex, relevant information is not always carried by its topology, but, for instance, by graph-theoretical structures.A common choice to overcome this issue is to associate auxiliary simplicial complexes to the graph, see for instance [5].This strategy has been successfully applied in many interesting applications, e.g.[29,23,31,32,34,10,30,7,2].
It is possible to define and compute persistence in other categories than simplicial complexes or topological spaces [6,4] and, in a different sense, [28,24,20,25,19].We introduce a further class of indexing-aware persistence functions (ip-functions), defined on (R, ≤)-indexed diagrams in a given category, that can be described via persistence diagrams.Additionally, we display a specific way of building ip-functions for filtered graphs and digraphs, introducing the concepts of steady and ranging sets.
We are rather far from the categorifications of [8,22,27,33,19]: we aim to provide a simple and agile tool that can be applied directly to graphs (i.e., without mapping graphs to simplicial complexes), and possibly to other structures arising naturally from applications.The constructions derived from the framework we propose have a topological counterpart obtainable considering the simplicial complex associated with a poset (see [4,Rem. 1]).Here, we show how to bypass that topological construction.Section 1.1 briefly recalls the classical notions of persistence diagram and bottleneck distance.Section 2 focuses on graphs.First, we define ip-functions, and balanced ip-functions and discuss their stability.Then, we introduce steady and ranging sets as swift generators of ip-functions based directly on graphtheoretical features.These constructions are the theoretical core of the work.Thereafter, we apply them to study persistent Eulerian sets and monotone features on some elementary graphs.Section 2.5 showcases how the steady and ranging constructions can be leveraged in hub-detection tasks.Concrete applications follow in Section 3: we compute steady and ranging hubs in a network of airports, the character co-occurrence networks of Les Misérables and Game of Thrones, and a set of languages.Section 4 extends to weighted digraphs the theory developed in the previous sections.Code for application is available as a Python package at the repository https://github.com/MGBergomi/hubpersistence.git.The Appendix contains examples showing that most ip-functions of the paper are not balanced.

Persistence diagrams
The main object of study in persistent homology [14] are filtered spaces, i.e. pairs (X, f ) where X is a topological space (e.g., the space of a simplicial complex) and f : X → R is a map called filtering function: sublevel sets X u = f −1 (−∞, u] are compared through homology morphisms induced by inclusion, in particular the so-called Persistent Betti Number functions.From such a function a persistence diagram (see Def. 1) can be built [11,Sect. 2].In turn, Persistent Betti Number functions can be recovered from the persistence diagram, [11].
Persistence diagrams are the most widely used "fingerprints" of filtered spaces.The bottleneck distance between persistence diagrams yields an effective lower bound to distances between filtered spaces.This makes persistence diagrams a powerful tool in shape classification, analysis and retrieval.The strategic advantage of the generalisation started in [6,4] consists in the fact that also categorical persistence functions (Def.4) can be represented by persistence diagrams: see [6,Sec. 3.9]. In In a multiset, the multiplicity of an element will be the number of times that the element appears.Definition 1. [11,9] A persistence diagram D is a multiset of points of ∆+ where every point of the diagonal ∆ appears with infinite multiplicity.
The points of D belonging to ∆ + are called cornerpoints; they are said to be proper if both their coordinates are finite, cornerpoints at infinity otherwise.A persistence diagram is said to be finite if so is its set of cornerpoints.We shall only consider finite persistence diagrams.Definition 2. Given persistence diagrams D, D , let Γ be the set of all bijections between D and D .We define the bottleneck (formerly matching) distance as the real number First, this distance function checks the maximum displacement between corresponding points for a given matching either between cornerpoints of the two diagrams or cornerpoints and their projections on the diagonal ∆.Then, the minimum among these maxima is computed.Minima and maxima are actually attained because of the requested finiteness.

Graph-theoretical persistence
Let Graph be the category having finite simple undirected graphs as objects and injective simplicial applications as morphisms, seen as a subcategory of the category of finite simplicial complexes.In what follows, a graph will be considered as the pair of its vertex set and edge set, i.e.G = (V, E), G = (V , E ) and so on.≤) .The (R, ≤)-indexed diagram is said to be monic if all morphisms of its image are monomorphisms of C.
We consider (R, ≤)-indexed diagrams in Graph that are constant on a finite set of left-closed, right-open intervals.Because of the choice of monomorphisms as the only acceptable morphisms, every such (R, ≤)-indexed diagram is monic, see Def. 3, and can be seen, up to natural isomorphisms, as a filtration of a graph G coming from a filtering function f : V ∪ E → R ∪ {+∞}.Moreover, we shall limit our study to (R, ≤)-indexed diagrams whose associated filtration has no isolated vertices at any level.In other words, the filtering function f takes value +∞ if a vertex is isolated, and the minimum of its values on the edges incident to the vertex, otherwise.Thus, f is determined by its restriction to E; therefore the weighted graphs considered here are pairs (G, f ) with f : E → R. By construction, the subgraphs of the corresponding filtrations are induced by their edge sets.
the following inequalities hold: In what follows we focus on C = (R, ≤).In this case a morphism u → v is simply the relation u ≤ v, which is represented as the point (u, v) in the persistence diagrams.Definition 5. Let p be a map assigning to each monic (R, ≤)-indexed diagram M in a category C a categorical persistence function p M on (R, ≤), such that p M = p M whenever a natural isomorphism between M and M exists.All the resulting categorical persistence functions p M are called indexing-aware persistence functions in C ( ip-functions for brevity).The map p itself is called an ip-function generator.
Remark 2. An ip-function generator is actually a categorical function (in the sense of Rem. 1) on the functor category C (R,≤) .An ip-function in Graph (Def.5) p M , where M is an (R, ≤)-indexed diagram, will be denoted p (G,f ) , where M corresponds to the filtration produced by the weighted graph (G, f ).The associated persistence diagram will be denoted by D(f ), for the sake of simplicity and if no confusion may occur.
We can now observe that ip-functions are a particular case of categorical persistence functions in the category Graph.We recall that categorical persistence functions generalise Persistent Betti Number (PBN) functions.The difference between any of the categorical persistence functions introduced in [4] and an ipfunction defined here is that the former comes from a functor defined on Graph, while the latter strictly depends on the filtration, so comes from a functor defined on (R, ≤).
Remark 3. The graph depicted in Fig. 1 shall be our running toy example along the entire manuscript.In the figure, we report the PBN functions of degree 0 and 1 to allow the reader to compare those classical results with the ones we shall obtain through ip-functions.
In Section 4, we extend the notions introduced above to the category of directed graphs.

Balanced ip-functions
The categorical functions introduced in [4] are stable, i.e. the bottleneck distance between their persistence diagrams is a lower bound for their interleaving distance.The same does not automatically hold for ip-functions.However, we shall state a condition (Def.6) which implies stability (as proved in Thm. 1).This condition corresponds to [12,Prop. 10]: there, it is proved for 0-degree PBNs, and from it the stability theorem [12,Thm. 29] follows through a sequence of lemmas; here, it is postulated.Definition 6.Let p be a ip-function generator on Graph.The map p itself and the resulting ip-functions are said to be balanced if the following condition is satisfied.Let (G, f ) and (G , f ) be any two weighted graphs, and p (G,f ) , p (G ,f ) their associated ip-functions.If an isomorphism ψ : G → G and a positive real number h exists, such that Let (G, f ), (G , f ) be as above.Let also H be the (possibly empty) set of graph isomorphisms between G and G .We can now take to Graph some definitions given in [16,12,22].
Some simple adjustments of the proof of [12,Thm. 29] and of its preceding lemmas yield the following theorem.
Theorem 1 (Stability).Let p be a balanced ip-function generator in Graph and (G, f ), (G , f ) be two weighted graphs.Then we have where D(f ) and D(f ) are the persistence diagrams realized by the ip-functions p (G,f ) and p (G ,f ) respectively.
Through [15,Thm. 5.8], this also implies stability with respect to the interleaving distance.Universality [22,Sec. 5.2] is generally not granted for stable persistence functions: it needs ad hoc constructions.
When discussing stability above, we introduced two distinct graphs.However, the following proposition describes stability when considering a single graph and two filtering functions.This result will be useful in the remainder of the paper.
Proposition 1.The ip-function generator p is balanced if and only if the following condition is satisfied.Let G = (V, E) be any graph, f and g be two filtering functions on G, and p G,f ) and p (G,g) their ip-functions.If a positive real number h exists, such that sup e∈E |f (e) − g(e)| ≤ h, then for all (u, v) Proof.One of the two implications is immediate.The other is proved by the fact that p (G,g) = p (G ,f ) where g = f • ψ, with the notation of Def. 6.
Remark 4. The condition is symmetric: if it holds as in the statement of Prop. 1, then also

Steady and ranging sets
Definition 9. Let F be a feature of G.We define the maximal feature mF associated with F as follows: for any it is an F-set at all levels w with u ≤ w ≤ v.We call X a ranging F-set (rF-set) at (u, v) if there exist levels w ≤ u and w ≥ v at which it is an F-set.
Let S F (G,f ) (u, v) be the set of sF-sets at (u, v) and let R F (G,f ) (u, v) be the set of rF-sets at (u, v).
Remark 5. Intuitively, the adjective "steady" stresses that a steady set enjoys a given feature F throughout the entire interval [u, v)."Ranging", instead, refers to the fact that a ranging set spans, with feature F, the range [u, v) although possibly with gaps.Of course, steady implies ranging.This implication is granted by the "≤" and "≥" signs in the definitions.With strict inequalities the implication fails.There are features for which steady is equivalent to ranging, e.g., features for which a set can be an F-set only in a (possibly unbounded) interval.A simple example is the feature F which assigns true only to singletons consisting of a vertex of a fixed degree.
where the equalities hold if Proof.By the definitions themselves of steady and ranging F-set.
Definition 11.Let F be a feature.For any graph G, for any filtering function f : We denote by σ F and F the maps assigning σ F (G,f ) and F (G,f ) respectively to the (R, ≤)-indexed diagram corresponding to (G, f ).
Proposition 2. The maps σ F and F are ip-function generators.
Proof.We prove conditions 1 and 2 of Def. 4, recalling that the source category is (R, ≤), so the existence of a morphism u → v (with | is the number of rF-sets at (u 2 , v 1 ) which fail to be F-sets at all levels w with w ≤ u 1 .Analogously for |. Now, every rF-set at (u 1 , v 2 ) which fails to be an F-set at all levels w with w ≤ u 1 is also an rF-set at (u 1 , v 1 ) failing at the same levels The value of both functions σ F (G,f ) and F (G,f ) at a point P on a vertical (resp.horizontal) discontinuity line is the same as the value at the points in a right (resp.upper) neighbourhood of P Of course, there are many features which give valid but meaningless ipfunctions: the features F such that, if X is an F-set at level u, then it is an F-set also at level v for all v > u.
We still don't know which general hypothesis on F would imply that σ F or F are balanced ip-function generators (Def.6).Such features exist: Section 2.4 presents a whole class of features giving rise to balanced ip-functions.

Steady and ranging persistence on Eulerian sets
We now give an example of the framework exposed in Section 2.2.Given any graph G, we define EU : 2 V ∪E → {true, f alse} to yield true on a set A if and only if A is a set of vertices whose induced subgraph of G is nonempty, Eulerian and maximal with respect to these properties; in that case A is said to be a EU-set of G. EU is then the maximal version of a feature we are not going to deal with.Let now (G, f ) be a weighted graph.We apply Def. 10 to feature EU.Definition 12.For any real number w, the subset are respectively the sets of sEU-sets and of rEU-sets at (u, v).We define σ EU (G,f ) : We denote by σ EU and EU the maps assigning σ EU (G,f ) and EU (G,f ) respectively to the (R, ≤)-indexed diagram corresponding to (G, f ).By Prop.2, σ EU and EU are ip-function generators.(middle) and EU (H,h) (right).
Consider the example displayed in Fig. 1.In that particular example, the functions σ EU (G,f ) and EU (G,f ) are the same.Furthermore, they also coincide with the PBN function in degree 1 shown in the same figure.We show that this is not always the case in Fig. 2.
Both functions σ EU and EU are not balanced (see the Appendix).

Monotone features
For a given graph G = (V, E), we shall consider as subgraphs only the ones induced by sets of edges.The next definition is a variation on the notion of monotone (sometimes dubbed hereditary) property defined in [1].
Definition 13.We say that a feature F is monotone if A paradigmatic monotone feature is independence: independent (or stable) sets and matchings are examples of sets of vertices, respectively of edges, with monotone features.
For the remainder of this section, let (G, f ) be a weighted graph, G = (V, E), and F a monotone feature in G.By Prop.2, σ F and F are ip-function generators.
Lemma 2. Let X ⊆ (V ∪E).Then, either there is no value u for which The interval [u 1 , v 1 ) of Lemma 2, i.e. the widest interval for which Let now g be another filtering function on G; in order to avoid confusion, for each real number u, we denote by G f,u (resp.G g,u ) the subgraph of G induced by the edge set Lemma 3. Assume that there exists a positive real h such that Proof.Assume that, for e ∈ E, f (e) = u; then g(e) ≤ u+h.This proves that, for each u, G f,u is a subgraph of G g,u+h .Swapping the roles, also G g,u is a subgraph of G f,u+h .Therefore, if X exists in G f,u it also exists in G g,u+h .Symmetrically, if X exists in G g,u it also exists in G f,u+h .Recalling, by Lemma 2, the meaning of u 1 and, correspondingly, u 2 , we obtain that Recalling, by Lemma 2, the meaning of v 1 and, correspondingly, of v 2 , we obtain that Proof.We shall prove for σ F (and consequently for F , by Prop.3) the property stated in Prop. 1.With the notation and the assumptions of Lemma 2, assume that for u < v we have σ Monotone features-although balanced-often give rise to extremely rich persistence diagrams.For this reason, it is possible to consider instead the maximal version (that could be non-balanced) of those features.In Fig. 3, we show how maximal independent sets give rise to complex persistence diagrams, even considering as graph our running toy example (the one shown originally in Fig. 1).For the monotone feature I which identifies independent sets of vertices, mI is not balanced (see the Appendix).
Anyway, the maximal version of the feature M, which identifies matchings, produces balanced ip-function generators (Prop.5).See Fig. 4 for the functions σ mM and mM of the usual example of Fig. 1.
Proposition 5.The ip-function generators σ mM and mM coincide and are balanced.
Proof.If the edge set X is a matching in a graph, it is a matching in all supergraphs.In a weighted graph (G, f ), the set of levels w such that an edge set X is a maximal matching in G w = (V w , E w ) is either empty or the interval [u 2 , v 2 ) where u 1 is the left end-point of the M-interval of X and v 2 is either +∞ or the left end-point of the M-interval of a matching Y containing X.This proves that σ mM (G,f ) = mM (G,f ) .Let now g be another filtering function on G, such that sup e∈E |f (e) − g(e)| ≤ h, with h > 0. Assume that the interval [u 2 , v 2 ) on which X is a maximal matching is such that u 2 + 2h < v 2 < +∞.Then, by Lemma 3, for the left end-point u 3 of the M-interval of X in (G, g) and the left end-point Fig. 4: A weighted graph (G, f ) (left) and its functions σ mM (G,f ) = mM (G,f ) (right).

Hubs
Although the informal concept of hub is intuitively clear, it is not as easy to formalize in graph-theoretical terms.The simple idea of a vertex with (locally) maximum degree is not entirely satisfactory: in a social network it is common to find users with a lot of contacts, with whom, however, they interact poorly.Even a high sum of traffic intensities (e.g. the number of messages exchanged between a user and their connections) is not enough to bestow a vertex the central role implied by the word hub.
There is an important line of research on a probabilistic concept of "persistent hubs" based on degree maximality [13,17,3] with some intersection with what we are proposing.
We shall use local degree prevalence as feature for building two ip-function generators: for any graph G we define H : 2 V ∪E → {true, f alse} to yield true only on singletons containing a vertex whose degree is greater than the ones of its neighbours.Such a vertex is called an H-vertex or simply a hub.This feature, combined with the indexing-aware persistence framework and the notion of ranging and steady feature, allows for the identification of those vertices whose role is indeed central throughout the filtration of a given weighted graph (G, f ).
Importantly, we preserve the flexibility granted in the realm of classical persistence: as one of the many possible variations, we could consider a vertex to be a hub if the sum of values of f on the edges incident to it (instead of the degree) is greater then the sum at its neighbours.
Our proposal is to build persistence diagrams in our generalized framework, and thereafter use the selection procedure presented in [21] (see 3.1) to identify relevant cornerpoints, thus identifying the "persistent" hubs (with a different meaning of the adjective than in [13,17,3]) of a given weighted graph.Definition 14.For any real number w, a vertex is a hub (or Fig. 5 shows the two ip-functions σ H and H for the usual example of Fig. 1.Also σ H and H are not balanced (see the Appendix).

Persistent hubs
In this Section we present a first approach to hub detection implementable on real-world graphs.We consider this work in progress a sort of exploration of the meaning of steady and ranging hubs in different contexts; however, we will not compare our results to a ground truth.
In the following examples, instead of the functions σ H (G,f ) and H (G,f ) , we will only show the corresponding persistence diagrams, to make the selection procedure clearer.

A selection procedure
It is well-known in persistence that noise is represented by cornerpoints close to the diagonal ∆.However, not all cornerpoints close to ∆ necessarily represent noise, then how wide is the strip along ∆ to get rid of?A smart, simple answer is offered in [21], where a remarkable application to segmentation of very noisy data is given.We summarize it here for a given persistence diagram D.
Call diagonal gap a maximal region of the form {(u, v) ∈ ∆ + | a < v − a < b} where no cornerpoints of D lie; b − a is its width.We can then form a hierarchy of diagonal gaps by decreasing width; out of it we get a hierarchy of sets of cornerpoints: We can consider the cornerpoints lying above the first, widest gap as the most relevant.Empirically, we may decide that also the cornerpoints sitting above the second, or the third widest gap are relevant, and so on.Equivalently, we consider the cornerpoints below the chosen gap to be ignored as a possible result of noise.In Fig. 6 it is possible to observe how the selection of cornerpoints above the widest diagonal gap allows to traceback those maxima (or classes of maxima depending on the multiplicity of the cornerpoints), that are more relevant with respect to the trend of the time series.In the next Sections we apply this selection criterion to the persistence diagrams corresponding to the functions σ H (G,f ) and H (G,f ) , computed for some networks and some filtering functions.The vertices identified by the so selected cornerpoints will be called persistent hubs, in particular persistent steady hubs or persistent ranging hubs.

Airports
A first attempt of the search for relevant hubs has been realized on a set of 44 major North-American cities (41 in the US, three in Canada; the ones in capital letters in the Amtrak railway map; see Table 1).The edges connect cities between which there have been flights in a randomly chosen but fixed week (June 11 to 17, 2018).Flight data have been obtained from Google Flights by selecting direct flights with Business Class; distances have been found at Prokerala.com.
A single vertex has been considered for each city with more than one airport.
As filtering functions we used: distance number of flights in the fixed week their product and their opposites (+their maximum).For each such choice we looked for steady and ranging hubs, for a total of twelve different persistence diagrams.Note that the same vertex can contribute to several cornerpoints of the persistence diagram of σ H (G,f ) , whereas this cannot happen for H (G,f ) .Next, we report results in which where the interest resides in the identification of hubs which do not rank very high by their degree.In particular, we do not find of particular interest that Atlanta, Dallas, Chicago and Houston turn out to be often persistent ranging or steady hubs, since they have the highest degrees in the graph (42, 41, 40 and 40 respectively).The first occurrence of a persistent hub which is rather far from having highest degrees is with the filtering function distance: Seattle is just twelfth in the degree rank, but appears above the widest diagonal gap as a steady hub (Figure 7).Persistent steady hubs are: Atlanta (with two cornerpoints), Dallas, Seattle.
Surprisingly, if we use the opposite of distance (summed to the maximum distance, for ease of representation), the cornerpoints corresponding to vertices with highest degrees are located under the widest diagonal gap (Figure 8).Persistent steady hubs are: Los Angeles, San Francisco, Seattle.

Ranging hubs Cosette Courfeyrac Enjolras Marius Myriel Valjean
Clique-community centrality Enjolras Fantine Gavroche Marius Valjean Table 2: Hubs in Les Misérables characters co-occurrence.Comparing results obtained via the steady and ranging persistence construction and clique-community centrality.
New York City has the eighth highest degree (35, together with Detroit, Phoenix and San Francisco).Still, we would expect it to appear as a hub, in the common sense of the term.In fact, it occurs as one of the few ranging hubs when the filtering functions (max minus number of flights) and distance•(max minus number of flights) are used.Ranging hubs for (max minus number of flights): Atlanta, Chicago, Dallas, New York.Ranging hubs for the product filtering function are Atlanta, Chicago, Dallas, New York, Vancouver.

Characters co-occurrence in a novel
A classical benchmark for the analysis of hubs in co-occurrence graphs is given by Les Misérables.The network representing the co-occurrence of its characters is freely available at Graphistry.The graph has 77 major characters as vertices; each of the 254 edges joins two characters which appear together in at least one scene; the weight on an edge is the number of common occurrences.We used the inverse of the weight as a filtering function.We compare our results with the ones of [32], where the notion of clique-community centrality was used to spot particularly important characters: Table 2.
Our method spots Cosette as a hub, whereas clique-community centrality does not.On the contrary, our technique misses Gavroche and Fantine.Both methods miss Javert.We are particularly puzzled by the result of Kurlin's selection method: above the second widest diagonal gap (the first obviously isolates Jean Valjean) we find only Enjolras.

Time-varying hubs
Weighted graphs can represent discrete dynamics in time-varying process.It is possible to keep track of persistence hubs obtaining a concise representation of the relative importance of each hub in time.We considered the characters cooccurrence in five subsequent books of the Game of Thrones saga, and applied the algorithm mentioned above for the analysis of character co-occurrence in Les Misérables.In this case, however, characters evolve throughout the books.A global analysis, i.e., computing hubs on the graphs obtained considering summary statistics on the five book hardly carries dynamical information.On the contrary, persistence hubs yield an easily visualizable summary of the characters' roles in time.See Fig. 9

Languages
The website TerraLing.comcontains much information, consisting of 165 properties, about several languages.It was used in an interesting research [30] on persistent cycles in language families.Unfortunately the amount of information varies quite a lot from language to language.We analysed the mutual relations of 19 languages (18 of the European Union plus Turkish: Table 3) for which at least 50% of the 165 properties are checked.The graph is the complete one with 19 vertices.The filtering function defined on each edge is the opposite of the normalised quantity of common properties of the two languages that it connects.Ranging and steady hubs coincide and are: Castilian, Catalan, Dutch, English, Portuguese, Swedish.Apart from the presence of English, which might also be biased by the great quantity of information available, we have no key for interpreting these results.For this and for the previous applications, we would very much like to set up a research with specific experts.

Digraph persistence
In this section, let (G, f ), with G = (V, A), be any weighted digraph.Given a feature F : 2 V ∪A → {true, f alse}, it is straightforward to extend the definitions of balanced ip-function (Def.6), of natural pseudodistance (Def.7), the stability theorem (Thm. 1) and the definitions of steady and ranging sets (Def.10) and of the ip-function generators σ F and F (Def. 11, Prop.2) to this setting.
We define DH : 2 V ∪A → {true, f alse} to yield true only on singletons containing a vertex whose outdegree is greater than the ones of its neighbours.Also in this case, there are many possible variations of this feature: we recover the notions of hub, steady hub and ranging hub and ip-function generators σ DH and DH as in Section 2.5.
Fig. 10a presents all tournaments on three vertices, with injective functions with values in the set {1, 2, 3}.Fig. 10b shows the values of some ip-functions.The correspondence between weighted tournaments and functions is given in Table 4. On these digraphs, σ DH and DH yield coinciding functions.However, this is not always the case, as shown in Fig. 11.There are two opposite definitions of a kernel of a digraph; we shall consider the one given in [26].However, alternative definitions (see, e.g., [18]) give also rise to admissible features in our framework.We define the feature K : 2 V ∪A → {true, f alse} to yield true only on kernels, i.e. independent sets X of vertices such for every vertex w ∈ V − X, there exists at least one arc a ∈ A with    4 and Table 5. w as tail and head in X, where independence is defined with respect to the underlying undirected graph.Then σ K and K are ip-function generators.The correspondence between weighted tournaments and functions is given in Table 5 Kernels 000 001 010 011 100 101 110 111 The correspondence between the weighted digraphs of Fig. 10a and the diagrams of Fig. 10b for feature K.
None of the ip-function generators σ DH , DH , σ K , K is balanced (see the Appendix).

Conclusions
We introduced ip-functions in a fairly general setting and studied their stability.We have then restricted our scope to the categories of graphs and digraphs, where we have defined steady and ranging sets according to features relative to the given (di)graphs.
We showed how graph-theoretical features can be used directly to obtain a concise representation of weighted undirected and directed graphs as persistence diagrams.In particular, we believe that the steady and ranging ip-function generators allow for a more streamlined analysis of graphs and networks bypassing the construction of auxiliary simplicial complexes.Although the steady and ranging sets yield equivalent results in some cases, persistence diagrams associated with ranging sets are generally simpler than the ones derived from steady sets, so the information is represented in a more condensed way.This is not the only reason for considering both representations.In our applications, we focused on the notion of hub.There, we showcased how the ranging representation of hubs is relevant for hub detection: a vertex might be relevant for the global dynamics of a network if it has local degree prevalence at far enough levels.For example, in a graph whose vertices represent users of a social network, edges represent "friendship", and weights represent geographical distance, we conjecture that high-persistence ranging hubs might be crucial for the diffusion of "viral" documents.Analogously, we thought that an airport might have a key role if it has a sort of centrality both at a regional and international level, but not necessarily at all intermediate ones.

Appendix: Unbalanced
In order to show that some of the proposed ip-functions are not balanced-so their persistence diagrams do not generally enjoy stability-we give examples which do not respect Def. 6.
The ip-function generator σ EU is not balanced, as the example of Fig. 12 shows: in fact, the maximum absolute value of the weight difference on the same edges is 1, and σ EU (G,f ) (4.5 − 1, 10 + 1) = 1 > 0 = σ EU (G,g) (4.5, 10).Also the ip-function generator EU is not balanced, as the example of Fig. 13 shows: in fact, the maximum absolute value of the weight difference on the same edges is 1, and EU (G,f ) (7.5 − 1, 10 + 1) = 1 > 0 = EU (G,g) (7.5, 10).).σ H is not a balanced ip-function generator, as the example of Fig. 16 shows: the maximum absolute value of the weight difference on the same edges is 2, but σ H (G,f ) (4 − 2, 9 + 2) = 1 > 0 = σ H (G,g) (4, 9).There are counterexamples which are even simpler than this and the one of Fig. 17.These have the advantage to hold also if ">" is substituted by"≥" in the definition of hub (what we don't think to be a good idea).The ip-function generator σ K is not balanced: consider the weighted tournaments 010 as (G, f ) and 011 as (G , f ).For the isomorphism ψ which swaps vertices a and b, one has |f (e) − f ψ(e) | ≤ 1 for all e ∈ A, but σ K (G,f ) (2.5 − 1, 4 + 1) = 1 > 0 = σ K (G ,f ) (2.5, 4).

Proposition 4 .
The ip-function generators σ F = F are balanced.

Fig. 3 :
Fig. 3: A weighted graph (G, f ) (left) and its functions σ mI (G,f ) (middle) and mI (G,f ) are respectively the sets of sH-vertices and of rHvertices at (u, v).We define σ H (G,f ) : ∆ + → R as the function which assigns to (u, v) ∈ ∆ + the number |S H (G,f ) (u, v)| and H (G,f ) : ∆ + → R as the function which assigns to (u, v) ∈ ∆ + the number |R H (G,f ) (u, v)|.We denote by σ H and H the maps assigning σ H (G,f ) and H (G,f ) respectively to the (R, ≤)-indexed diagram corresponding to (G, f ).

Fig. 6 :
Fig. 6: Selecting maxima in a time series.Left.Flow of the Nile from 1871 to 1970.Data freely available at vincentarelbundock.github.io.Right.Cornerpoints selected by considering the widest diagonal gap (in yellow).

Fig. 7 :
Fig. 7: Filtering function: distance; steady hubs.Persistent steady hubs above the widest diagonal gap: two cornerpoints represent Atlanta, one Dallas and one Seattle.

Fig. 9 :
Fig. 9: Evolution of Game of Thrones hub characters throughout five books.The legend reports the first six hubs and their persistence values per book.

Table 4 :
Hubs 000 001 010 011 100 101 110 111σ DH (G,f ) = DH (G,f ) A B C C D D A BThe correspondence between the weighted digraphs of Fig.10aand the diagrams of Fig.10bfor feature DH.
The ip-functions corresponding to the digraphs of Fig.10awith respect to features DH and K.

Fig. 13 :
Fig. 13: EU is not balanced: filtering function f left, g right.

Fig. 15 :
Fig. 15: mI is not balanced: filtering function f left, g right.

Fig. 17 :
Fig. 17: H is not balanced: filtering function f left, g right.