Generalized Permutants and Graph GENEOs

In this paper we establish a bridge between Topological Data Analysis and Geometric Deep Learning, adapting the topological theory of group equivariant non-expansive operators (GENEOs) to act on the space of all graphs weighted on vertices or edges. This is done by showing how the general concept of GENEO can be used to transform graphs and to give information about their structure. This requires the introduction of the new concepts of generalized permutant and generalized permutant measure and the mathematical proof that these concepts allow us to build GENEOs between graphs. An experimental section concludes the paper, illustrating the possible use of our operators to extract information from graphs. This paper is part of a line of research devoted to developing a compositional and geometric theory of GENEOs for Geometric Deep Learning.


Introduction
In recent years, the need for an extension of Deep Learning to non-Euclidean domains has led to the development of Geometric Deep Learning (GDL) [9][10][11].This line of research focuses on applying neural networks on manifolds and graphs, so making available new geometric models for artificial intelligence.In doing that, GDL uses techniques coming from differential geometry, combinatorics, and algebra.In particular, it largely uses the concepts of group action and equivariant operator [1-3, 13, 25, 26, 30, 31], which allow for a strong reduction in the number of parameters involved in machine learning.
Topological Data Analysis (TDA) [12,14,[16][17][18] is giving a contribution to the development of GDL, grounding on the use of non-expansive equivariant operators [6].The main idea is to benefit from classical and new results of TDA to study the "shape" of the spaces of equivariant operators by employing suitable topologies and metrics.The topological, geometric, and algebraic properties of these spaces have indeed a relevant impact on the identification of the operators that are more efficient for our application purposes.We stress that the assumption of non-expansivity is fundamental in this framework, since it guarantees that the space of group equivariant non-expansive operators (GENEOs) is compact (and hence finitely approximable), provided that the data space is compact for a suitable topology [6].We also observe that, from a practical point of view, non-expansivity can be seen as the property of simplifying the metric structure of data.While particular applications may require locally violating this property, we remark that the usual longterm purpose of observers is the one of simplifying the available information by representing it in a much simpler and more meaningful way.
The approach based on TDA has allowed us to start shaping a compositional and topological theory for GENEOs.In particular, it has been proved that some operations are available to combine GENEOs and obtain other GENEOs, including composition, convex combination, minimization, maximization, and direct product.The compositional theory based on such operations leads us to think of GENEOs as elementary components that could be used to replace neurons in neural networks [15].This new kind of network could be much more transparent in its behavior, because of the intrinsic interpretability of its components.Modularity is indeed a key tool for interpretability in machine learning, since it can make clear which processes control the behavior of artificial agents.The attention to this property corresponds to the rising interest in the so-called "explainable deep learning" [23,28,29].
To use GENEOs in applications, we need methods to build such operators for the transformation groups we are interested in.If we restrict our attention to linear operators, a constructive procedure is available for the case that the functions representing our data have a finite domain X.This procedure is based on the concept of "permutant", i.e., a set of permutations of X that is invariant under the conjugation action of arXiv:2206.14798v2[math.CO] 25 Sep 2022 the equivariance group G we are considering [15].While the classical way of building equivariant operators requires integration on the (possibly large) group G [20], this construction method may be based on a simpler sum computed on a small permutant.We can prove that any linear GENEO can be obtained as a weighted arithmetic mean related to a suitable permutant, provided that the domains of the signals are finite and the equivariance groups transitively act on those domains [7].By replacing the weighted arithmetic mean with other normalized symmetric functions, the method based on permutants can be easily extended to the construction of non-linear GENEOs [15].
In this paper we explore the possibility of applying the previous ideas to graphs weighted on vertexes or edges, focusing on the important role that these graphs have in GDL [11].To do that, we illustrate a way of using GENEOs with graphs, defining the concept of graph GENEO.Moreover, we extend the definition of permutant to the one of generalized permutant, showing how this new concept allows us to build GENEOs between graphs.Our final purpose is the one of developing a new technique to build operators that can transform graphs according to our needs, and make these operators available as components for application in GDL.This is the outline of our paper.In Section 2 we recall our mathematical setting, based on the concepts of perception pair, GENEO, and permutant.Section 3 introduces and describes the new concepts of generalized permutant and generalized permutant measure, proving that each of them can be used to build a GENEO (Theorems 1 and 3).In Section 4 we introduce the concepts of vertex-weighted/edge-weighted graph GE-NEO and illustrate our new mathematical model with several examples.A section devoted to experiments (Section 5) concludes the paper, showing how graph GENEOs allow us to extract useful information from graphs.

The Set-theoretical Setting
Let X be a non-empty set, Φ be a subspace of with respect to the composition of functions.Definition 1.We say that (Φ, G) is a perception pair.
The elements ϕ of Φ are often called measurements.The fact that X is the common domain of all maps in Φ will be expressed as dom(Φ) = X.
The space Φ of measurements endows X and Aut Φ (X) (and therefore every subgroup G of Aut Φ (X)) with topologies induced respectively by the extended pseudometrics It is known that each g ∈ Aut Φ (X) is an isometry of X [6].
Definition 2. Let (Φ, G) and (Ψ, K) be perception pairs with dom(Φ) = X and dom(Ψ ) = Y , and T : G → K be a group homomorphism.An operator F : Φ → Ψ is said to be a group equivariant non-expansive operator (GENEO, for short) from (Φ, G) to (Ψ, K) with respect to T if and For the sake of conciseness, we often write a GENEO as (F, T ) : (Φ, G) → (Ψ, K).
An operator that satisfies the first condition in this definition is called a group equivariant operator (GEO, for short), while one satisfying the second condition is said to be non-expansive.
The set F all T of all GENEOs (F, T ) : (Φ, G) → (Ψ, K), with respect to a fixed homomorphism T , is a metric space with the distance function given by A method to build GENEOs by means of the concept of a permutant is illustrated in [15].If G is a subgroup of Aut Φ (X), then the conjugation map given by f → g • f • g −1 , g ∈ G, plays a key role in this technique.Definition 3. Let H be a finite subset of Aut Φ (X).We say that H is a permutant for Example 1.Let Φ be the set of all functions ϕ : that are non-expansive with respect to the Euclidean distances on S 1 and [0, 1].Let us consider the group G of all isometries of R 2 , restricted to S 1 .If h is the clockwise rotation of radians for a fixed ∈ R, then the set Other examples of permutants will be given in Example 10, Example 11 and Proposition 4. We recall the following result.As usual, in the following we will denote the set of all functions from the set A to the set B by the symbol B A .Proposition 1.Let (Φ, G) be a perception pair with dom(Φ) = X.If H is a nonempty permutant for G ⊆ Aut Φ (X), then the restriction to Φ of the operator F : R X → R X defined by The reader is referred to [7,15,27] for further details.
3 Generalized Permutants in the Set-theoretical Setting In this paper, we introduce a generalization of the concept of a permutant to the case when we may have distinct perception pairs, and show that the new concept we introduce here too can be used to populate the space of GENEOs.
In this case, we have the following commutative diagram: O O We observe that the map h → g • h • T (g −1 ) is a bijection from H to H, for any g ∈ G.
Definition 4 extends Definition 3 in two different directions.First of all, it does not require that the origin perception pair (Φ, G) and the target perception pair (Ψ, K) coincide.Secondly, it does not require that the elements of the set H are bijections.In Section 5.2 we will see how the concept of generalized permutant can be applied.
Example 2. Let X, Y be two nonempty finite sets, with Y ⊆ X.Let G be the group of all permutations of X that preserve Y , and K be the group of all permutations of Y .Set Φ = R X and Ψ = R Y .Assume that T : G → K takes each permutation of X to its restriction to Y .Define H as the set of all functions h : Y → X such that the cardinality of Im h is smaller than a fixed integer m.Then H is a generalized permutant for T .
In the following two subsections, we will express two other ways to look at generalized permutants, beyond their definition.To this end, we will assume that two perception pairs (Φ, G), (Ψ, K) and a group homomorphism T : G → K are given, with dom(Φ) = X and dom(Ψ ) = Y .

Generalized Permutants as unions of equivalence classes
In view of Definition 4, we can define an equivalence relation ∼ on X Y : It is easy to see that ∼ is indeed an equivalence relation on X Y .Proposition 2. A subset H of X Y is a generalized permutant for T if and only if H is a (possibly empty) union of equivalence classes for ∼.
Proof.Assume that H is a generalized permutant for T .If h ∈ H and h ∼ h ∈ X Y , then the definition of the relation ∼ and the definition of generalized permutant imply that h ∈ H as well, and therefore H is a union of equivalence classes for ∼.Conversely, if H is a union of equivalence classes for the relation ∼,

Generalized Permutants as unions of orbits
The map α from Proposition 2 the following result immediately follows.Proposition 3. A subset H of X Y is a generalized permutant for T if and only if H is a (possibly empty) union of orbits for the group action α.
The main use of the concept of generalized permutant is expressed by the following theorem, extending Proposition 1.
Theorem 1.Let (Φ, G), dom(Φ) = X and (Ψ, K), dom(Ψ ) = Y be perception pairs, T : G → K a group homomorphism, and H be a generalized permutant for T .Then the restriction to Φ of the operator F : R X → R Y defined by Then by the definition of a generalized permutant and the change of variable h = g • h • T (g −1 ), we have whence F is non-expansive, and hence a GENEO.

Generalized permutant measures
As shown in [7], the concept of permutant can be extended to the one of permutant measure, provided that the set X is finite.This is done by the following definition, referring to a subgroup G of the group Aut(X) of all permutations of the set X, and to the perception pair (R X , G).

Definition 6. [7]
A finite signed measure µ on Aut(X) is called a permutant measure with respect to G if each subset H of Aut(X) is measurable and µ is invariant under the conjugation action of G (i.e., µ(H) = µ(gHg −1 ) for every g ∈ G).
With a slight abuse of notation, we will denote by µ(h) the signed measure of the singleton {h} for each h ∈ Aut(X).The next example shows how we can apply Definition 6.
Example 3. Let us consider the set X of the vertices of a cube in R 3 , and the group G of the orientationpreserving isometries of R 3 that take X to X. Set T = id G .Let π 1 , π 2 , π 3 be the three planes that contain the center of mass of X and are parallel to a face of the cube.Let h i : X → X be the orthogonal symmetry with respect to π i , for i ∈ {1, 2, 3}.We have that the set {h 1 , h 2 , h 3 } is an orbit under the action expressed by the map α defined in Section 3.2.We can now define a permutant measure µ on Aut(X) by setting µ(h 1 ) = µ(h 2 ) = µ(h 3 ) = c, where c is a positive real number, and µ(h) = 0 for any h ∈ Aut(X) with h / ∈ {h 1 , h 2 , h 3 }.We also observe that while the cardinality of G is 24, the cardinality of the support supp(µ) := {h ∈ Aut(X) : µ(h) = 0} of the signed measure µ is 3.
The concept of permutant measure is important because it makes available the following representation result.
Theorem 2. [7] Assume that G ⊆ Aut(X) transitively acts on the finite set X and F is a map from R X to R X .The map F is a linear group equivariant non-expansive operator from (R X , G) to (R X , G) with respect to the homomorphism id G : G → G if and only if a permutant measure µ exists such that We now state a definition that extends the concept of permutant measure.Definition 7. Let X, Y be two finite nonempty sets.Let us choose a subgroup G of Aut(X), a subgroup K of Aut(Y ), and a homomorphism T : G → K.A finite signed measure µ on X Y is called a generalized permutant measure with respect to T if each subset H of X Y is measurable and µ g • H • T (g −1 ) = µ (H) for every g ∈ G.
Definition 7 extends Definition 6 in two different directions.First of all, it does not require that the origin perception pair (R X , G) and the target perception pair (R Y , K) coincide.Secondly, the measure µ is not defined on Aut(X) but on the set X Y .
Example 4. Let X, Y be two nonempty finite sets, with Y ⊆ X.Let G be the group of all permutations of X that preserve Y , and K be the group of all permutations of Y .Set Φ = R X and Ψ = R Y .Assume that T : G → K takes each permutation of X to its restriction to Y .For any positive integer m, define H m as the set of all functions h : Y → X such that the cardinality of Im h is equal to m.For each h ∈ H m , let us set µ(h) := 1 m|Hm| .Then µ is a generalized permutant measure with respect to T .
We can prove the following result, showing that every generalized permutant measure allows us to build a GENEO between perception pairs.Theorem 3. Let X, Y be two finite nonempty sets.Let us choose a subgroup G of Aut(X), a subgroup K of Aut(Y ), and a homomorphism T : G → K.If µ is a generalized permutant measure with respect to T , then the map Proof.It is immediate to check that F µ is linear.Moreover, by applying the change of variable f = g • f • T (g −1 ) and the equality µ g • f • T (g −1 ) = µ(f ), for every ϕ ∈ R X and every g ∈ G we get This implies that the linear map F µ is non-expansive, and concludes the proof of our theorem.
The condition |supp(µ)| |G| is not rare in applications (cf., e.g., Example 3) and is the main reason to build GEOs by means of (generalized) permutant measures, instead of using the representation of GEOs as G-convolutions and integrating on possibly large groups.
In the following, we will apply the aforementioned concepts to graphs.For the sake of simplicity, we will drop the word "generalized" and use the expression "graph permutant".
The notions of perception pair, permutant, and GENEO can be easily applied in a graph-theoretic setting.In this section, we develop a model for graphs with weights assigned to their vertices (vw-graphs, for short), and another for graphs with weights assigned to their edges (ew-graphs, for short), often called "weighted graphs" in literature.Our vertex model has implications for the rapidly growing field of graph convolutional neural networks, while the edge model we propose owes its significance to the widely recognized importance of weighted graphs.
As a graph [8] we shall mean a triple Γ = (V Γ , E Γ , ψ Γ ), where ψ Γ assigns to each edge of E Γ the unordered pair of its end vertices in V Γ .Since we only consider simple graphs (i.e. with no loops and no multiple edges) we write e = {A, B} to mean ψ Γ (e) = {A, B}.Let us recall that an automorphism g of Γ is a pair g = (g V , g E ), where g V : V Γ → V Γ and g E : E Γ → E Γ are bijections respecting the incidence function ψ Γ .The group Aut(Γ ) of all automorphisms of Γ induces two particular subgroups, here denoted as Aut(V Γ ) and Aut(E Γ ), of the groups of permutations of V Γ and of E Γ .We represent permutations as cycle products.
For any k ∈ N, put Let a graph Γ = (V Γ , E Γ , ψ Γ ) with n vertices and m edges be given.By fixing an indexing of the vertices (resp.edges), we can identify Aut(V Γ ) (resp.Aut(E Γ )) with some subgroup of S n (resp.S m ), for the sake of simplicity.Analogously, a real function defined on V Γ (resp.E Γ ) will be represented as an n-tuple (resp.mtuple) of real numbers.Anyway, we shall denote vertices (resp.edges) by consecutive capital (resp.lowercase) letters and not by numerical indexes.
In this section, we will consider a space Φ V Γ of real valued functions on V Γ , as a subspace of R n endowed with the sup-norm • ∞ ; i.e., the real valued functions ϕ ∈ Φ V Γ on the vertex set V Γ are given by vectors ϕ = (ϕ 1 , ϕ 2 , • • • , ϕ n ) of length n.Analogously, the symbol Φ E Γ will refer to a subspace of R m endowed with the sup-norm; i.e., the real valued functions ϕ ∈ Φ E Γ on the edge set E Γ are given by vectors ϕ Let G be a subgroup of the group Aut(V Γ ) (resp.Aut(E Γ )) corresponding to the group of all graph automorphisms of Γ .By the previous convention, the elements of G can be considered to be permutations of the set N n (resp.N m ).

GENEOs on graphs weighted on vertices
The concepts of perception pair, GEO/GENEO, and (generalized) permutant can be applied to vw-graphs.Definition 8. Let Φ V Γ be a set of functions from V Γ to R and G be a subgroup of Aut(V Γ ).If (Φ V Γ , G) is a perception pair, we will call it a vw-graph perception pair for Γ = (V Γ , E Γ , ψ Γ ), and will write dom(Φ with respect to T , we will say that F is a vw-graph GEO (resp.vw-graph GENEO).and Φ V Γ be the subspace of R 4 given by

Let us consider some examples of vw-graph perception pairs, vw-graph
) is a vw-graph perception pair for Γ .
The next example shows that we can have different perception pairs with the same graph and the same group.
Example 6.Let G be as in Example 5 and Then (Φ V Γ , G) is a vw-graph perception pair.
We can now define a simple class of GENEOs.
Example 7. Let (Φ V Γ , G) be as in Example 5 and a map F be defined by 2 ) ∈ Φ V Γ , whence F is non-expansive.Therefore, the map F defined above is a vw-graph GENEO if and only if d 1 = d 3 and d 2 = d 4 .
We now prepare for the first instances of graph permutants in Examples 10 and 11.
If Φ V Γ is the same as in Example 5, then (Φ V Γ , G) is not a vw-graph perception pair.However, if we define , and therefore (Φ V Γ , G), are vw-graph perception pairs.Example 9. Let G be as in Example 8 and Example 10.Let G be as in Example 8 and Then H is a vw-graph permutant for T = id G .
Example 11.Let Γ be as in Example 8 and then H is a vw-graph permutant for T = id G .
As usual, in the following we will denote by K n the complete graph on n vertices.
As stated in Theorem 1, the concept of a vw-graph permutant can be used to define vw-graph GENEOs.
Example 12. Let (Φ V Γ , G) be the same as in Example 9 and H be the same as in Example 10.Set

GENEOs on graphs weighted on edges
The concepts of perception pair, GEO/GENEO, and (generalized) permutant can be applied to ew-graphs as well.
Definition 11.Let Φ E Γ be a set of functions from E Γ to R and G be a subgroup of Aut(E Γ ).If (Φ E Γ , G) is a perception pair, we will call it an ew-graph perception pair for Γ = (V Γ , E Γ , ψ Γ ), and will write dom( with respect to T , we will say that F is an ew-graph GEO (resp.ew-graph GENEO).
The group Aut(Γ ) of all graph automorphisms of a graph Γ induces a particular subgroup Aut(E Γ ) of the group S m of all permutations of E Γ .The elements of Aut(E Γ ) can be considered to be those permutations of E Γ that directly correspond to the permutations of V Γ defining all graph automorphisms of Γ .
If Γ = K n , the group Aut(Γ ) is isomorphic to S n , and we have Therefore, we will consider Aut(Γ ) and Aut(E Γ ) to be the same in this case.
Let us consider some examples of perception pairs and GENEOs in the context of ew-graphs.Moreover, a simple computation shows that

Experiments
We illustrate the model of Section 4.2 and show how graph GENEOs allow us to extract useful information from graphs.This can be done by "smart forgetting" of differences: by some sort of average, but keeping the same dimension of the space of functions (as in Sect.5.1) or by dimension reduction (as in Sect.5.2).

Subgraphs of K 4
The choice of a permutant determines how different functions are mapped to the same "signature" by the corresponding GENEO.In this subsection, we consider functions on the edge set of a complete graph K n , taking values that are either 0 or 1; this means that each such a function identifies a subgraph of K n .A GENEO will, in general, produce functions that can have any real value, so not representing subgraphs anymore.With the aim of getting equal results for "similar" subgraphs, we have chosen as a permutant the set of edge permutations produced by swapping two vertices in any possible way.
Let Γ be the complete graph K 4 (Fig. 2) with Φ E Γ := R 6 .We have The subset H := {(q, r)(s, t), (p, q)(s, u), (p, t)(r, u), (p, r)(t, u), (p, s)(q, u), (q, t)(r, s)} of G = Aut(E K4 ) consisting of permutations of E K4 induced by all transpositions of V K4 is an ew-graph permutant for T = id G .Therefore, the operator F : R 6 → R 6 defined by is an ew-graph GENEO.Subgraphs of K 4 can be represented by elements of and the restriction F 4 of F to Φ 4 ⊆ Φ E K 4 can be used to draw meaningful comparisons between them (see Fig. 3).
Definition 14.We say that the image F 4 (ϕ) is an F 4 −code for the subgraph ϕ ∈ Φ 4 of K 4 .
Definition 15.We say that an F 4 −code c 1 is F 4 −equivalent to an F 4 −code c 2 , and write c 1 ∼ 4 c 2 , if c 2 is the result of a permutation of c 1 .
Definition 16.We say that ϕ : We say that ϕ 1 and ϕ 2 are complementary if We wrote a simple program to compute all F 4 -codes and found that Fig. 3: The subgraphs of K 4 up to isomorphisms, the 6-tuples representing each of them (above) and their F 4 -codes (multiplied by 6, below).
1. Naturally enough, isomorphic subgraphs have F 4 -equivalent codes.Therefore, in some cases, it suffices to consider only the 11 non-isomorphic subgraphs of K 4 .
We wrote a program to compute F 5 −codes for the 34 non-isomorphic subgraphs of K 5 as well and found that they were never F 5 −equivalent.A similar statement holds for the complete graph K 3 .

Graph GENEOs for C 6 and C 3
A more drastic way of quotienting differences away is dimension reduction of the space of functions.In this subsection, we use the generalized notion of permutant (Sect.3), by mapping the edges of a small, auxiliary graph to the edges of the graph of interest.Note that we have great freedom, in that we are not bound to stick to graph homomorphisms.
Let X := (V X , E X , ψ X ) be the cycle graph C 6 (see Fig. 4) with Their automorphisms groups respectively are the dihedral groups There are 216 functions p : E Y → E X and the equivalence class of each is an ew-graph permutant H p (Sect.3.1).For the sake of conciseness, we will denote the function p := {(g → e 1 ), (h → e 2 ), (i → e 3 )} simply by p := e 1 e 2 e 3 .For example, p := {(g → c), (h → a), (i → f )} will be written as p := caf.
The ew-graph permutants H p , p ∈ E E Y X are of four possible sizes: 1.There is only 1 ew-graph permutant with 2 elements.It corresponds to the function aec. 2. There is only 1 ew-graph permutant with 4 elements.It is induced by bfd. 3.There are 5 ew-graph permutants with 6 elements each that correspond to the functions aaa, abc, ace, add, and afb. 4.There are 15 ew-graph permutants with 12 elements each that correspond to the functions aab, aac, aad, aae, aaf, abd, acb, acd, adb, adc, baa, bad, bca, bce, and bdb.Considering only the weights in {0, 1}, we wrote programs for computing the ew-graph GENEOs corresponding to the functions aec and bfd.Similar computations can be made for the rest of the functions listed above.This detailed analysis on particular functions raised a number of questions and conjectures that we plan to study in the near future.

Discussion
GENEOs represent the possibility to embed observers into Machine Learning processes, one step towards Explainable AI [23,28,29].On the other hand, they are precisely defined mathematical tools; as such, they were first conceived in a topological setting for TDA.In the same environment, permutants turn out to be effective gears for the production of GENEOs.The ever-growing use of graphs in data representation and Geometrical Deep Learning [11,19,21,22,24] motivated the present extension to the graph-theoretical domain, mirroring an analogous generalization already carried out in Topological Persistence [4,5].
The extension to graphs was performed here on two different lines: the first sees data as functions defined on the vertices of a graph; this is perhaps the most common use of graphs in ML.The second development line deals with functions defined on the graph edges; this is best suited for processing filtered graphs and for comparing different graphs with the same vertex set.In both lines, we applied a generalized definition of permutant, introduced in this same paper.
The examples studied here are just meant to show some realizations of the introduced abstract concepts: our goal was mainly to establish a solid mathematical background.Extensions to digraphs and possibly hypergraphs will follow.We are confident that experimenters, interested in concrete applied problems, will make good use of the flexibility and modularity of the theory, for translating their viewpoints and biases into GENEOs and permutants also in the graph-theoretical setting.
whence F is non-expansive.Therefore, the map F defined above is an ew-graph GENEO if and only if d 1 = d 6 , d 2 = d 5 , and d 3 = d 4 .