Skip to main content
Scientific Reports logoLink to Scientific Reports
. 2025 Feb 20;15:6259. doi: 10.1038/s41598-025-90152-7

A novel approach to graph distinction through GENEOs and permutants

Giovanni Bocchi 1,✉, Massimo Ferri 2, Patrizio Frosini 3
PMCID: PMC11842813  PMID: 39979336

Abstract

The theory of Group Equivariant Non-Expansive Operators (GENEOs) was initially developed in Topological Data Analysis for the geometric approximation of data observers, including their invariances and symmetries. This paper departs from that line of research and explores the use of GENEOs for distinguishing r-regular graphs up to isomorphisms. In doing so, we aim to test the capabilities and flexibility of these operators. Our experiments show that GENEOs offer a good compromise between efficiency and computational cost in comparing r-regular graphs, while their actions on data are easily interpretable. This supports the idea that GENEOs could be a general-purpose approach to discriminative problems in Machine Learning when some structural information about data and observers is explicitly given.

Subject terms: Pure mathematics, Computer science, Applied mathematics

Introduction

Explainable machine learning models have recently emerged as an important part of the research in artificial intelligence and aim at devising methods and techniques that are understandable for humans1–3. In this field, the use of concepts from topology and geometry has enabled developments that promise to make machine learning more easily interpretable, as required in many critical applications, where security and reliability are crucial elements. The research about group equivariant non-expansive operators (GENEOs) fits into this scientific context, offering the possibility of building small networks of operators that process the available information in a transparent and easily controllable way4–6.

GENEOs have their roots in Topological Data Analysis and make available a mathematical theory for the approximation of observers, including their symmetries and shifting the attention from the data alone to the pairs (data, observer), seen as the main object of study. This change of perspective is justified by the fact that in many applications, the interest is not directly focused on data, but on approximating the experts’ behavior in the presence of some given information7. It is indeed well known that different agents can react in completely different ways to the presence of the same data, and this implies that data comparison cannot be separated from the problem of understanding observers’ characteristics and preferences. We stress that an approach to data comparison based on geometrical operators offers various advantages. First, it allows us to translate the study of the “shape of data” into a precise mathematical problem concerning the approximation of observers. Secondly, it benefits from sound techniques and procedures that come from TDA, the area in which the GENEO theory was born. Thirdly, it makes available a modular setting, and a great reduction in the number of components and parameters to be managed.

In the theory of GENEOs, data are represented by real-valued or vector-valued functions. GENEOs transform data belonging to a given functional space Inline graphic into data belonging to another functional space Inline graphic, and their definition is based on two mathematical properties: these operators are equivariant for the action of a given transformation group G and do not increase the distance between data. The first property means that GENEOs commute with each transformation in G. As a simple example, we can think of the blurring operator, acting on grey-level images seen as functions from Inline graphic to [0, 1]: if the blurring is performed by a convolution using a rotationally symmetric kernel Inline graphic with Inline graphic, and G is the group of isometries of the real plane, then the blurring commutes with every transformation Inline graphic. This means that GENEOs respect data symmetries. We remind here that equivariance has taken a key role in the research about Deep Learning, making explicit the use of symmetries and consequently reducing the number of parameters required in the learning process8–16. The second property concerns the metric relation between the input and output of the operator: it guarantees that the distance between the input data is greater or equal to the distance between the output data. In other words, GENEOs simplify the information, in a metric sense.

Each GENEO space Inline graphic benefits from good mathematical properties, such as compactness and convexity, when suitable assumptions are made on the space of data and appropriate topologies are chosen4. In particular, compactness guarantees that for every Inline graphic, we can find a finite set Inline graphic such that any operator in Inline graphic has a distance less than Inline graphic from at least one Inline graphic. In other words, GENEO spaces can be finitely approximated with arbitrary precision.

Since graphs can be represented as adjacency matrices and adjacency matrices can be interpreted as functions, GENEOs can be applied to compare graphs. In this framework, a technique for building GENEOs based on the concept of permutant has been recently extended to graphs17. This concept can be introduced when two data spaces Inline graphic, Inline graphic and two transformation groups G, K are given, respectively acting on the domain X of the functions in Inline graphic and the domain Y of the functions in Inline graphic, together with a group homomorphism Inline graphic. Under these assumptions, a permutant is defined as a finite set H of maps from Y to X such that Inline graphic for any Inline graphic. For each permutant H, it is possible to obtain a GENEO Inline graphic by defining Inline graphic17. When the cardinality of H is small, this construction method is particularly advantageous and fast since it does not require any expensive integration over the group G.

This paper explores the use of permutants to produce efficient GENEOs for distinguishing r-regular graphs (i.e., graphs where every node has a degree equal to r) up to isomorphisms. In doing so, we aim to test the capabilities and flexibility of GENEOs, checking to what extent these operators can be used for data comparison.

Our experiments show that GENEOs offer a good compromise between efficiency and computational cost in comparing r-regular graphs, while their actions on data are easily interpretable. In other words, using these operators could be a good general alternative to efficient but computationally expensive analysis methods. This further supports the idea that GENEOs could be a general-purpose approach to discriminative problems in Machine Learning when some structural information about data and observers is explicitly given.

Results

The methodology outlined in the Methods section enabled us to generate a model for assessing graph non-isomorphism. Following a pruning process of an extensive initial pool of operators (sampled to ensure adequate exploration of operators built using permutants), the resulting architecture, as illustrated in Fig. 1, is presented. The network was built adhering to established practices in machine learning, despite not possessing learnable parameters at this stage in a way such that simplicity and transparency are emphasized. Furthermore, the results shown in Fig. 4 and Table 1 prove that, with respect to performance, our model is not falling behind other methods with comparable technical complexities.

Fig.1.

Fig.1

Architecture of the SP GENEO-based model. A pair of graphs to be tested is represented by the functions Inline graphic which are initially processed by a set of operators, denoted Inline graphic, defined using Subgraph Permutants. The results of the two graphs are then considered by the difference operators Inline graphic, one for each Permutant. Finally, thanks to the veto action of the Inline graphic operator, the GENEO pool is aggregated into a single Inline graphic which yields a non-isomorphism score for the pair of graphs.

Fig. 4.

Fig. 4

The average execution time in function of the graph Size N for the considered values of degree r: The GENEO-t model (with t being 1, 2 or 3) represents the method that aggregates the first t operators identified through the forward selection process. The dotted and dashed lines represent respectively a linear and a quadratic growth as both axes are in logarithmic scale.

Table 1.

The average execution times and corresponding accuracies for Inline graphic are presented below.

Method N
100 500 1000 5000 10000
Time Accuracy Time Accuracy Time Accuracy Time Accuracy Time Accuracy
GENEO-1 0.014 0.990 0.066 0.986 0.138 0.986 0.694 0.986 1.338 0.984
GENEO-2 0.019 0.996 0.092 0.996 0.193 0.994 0.962 0.996 1.866 0.994
GENEO-3 0.051 1.000 0.265 1.000 0.539 1.000 2.648 1.000 5.202 1.000
NTX-FASTER 0.000 0.000 0.000 0.000 0.000 0.000 0.002 0.000 0.003 0.000
NTX-FAST 0.001 0.719 0.006 0.758 0.011 0.758 0.056 0.776 0.128 0.754
NTX-COULD 0.003 0.719 0.033 0.758 0.114 0.758 2.524 0.776 9.747 0.754
NTX-IS 4.719 0.691 9.951 0.006 10.000 0.000 10.000 0.000 10.000 0.000
1-WL 0.001 0.000 0.005 0.000 0.008 0.000 0.043 0.000 0.090 0.000
2-WL 7.134 0.000 10.000 0.000 10.000 0.000 10.000 0.000 10.000 0.000
3-WL 10.040 0.000 10.000 0.000 10.000 0.000 10.000 0.000 10.000 0.000

Bold values indicate the most accurate method(s) in terms of accuracy. The GENEO-t model (with t being 1, 2 or 3) represents the method that aggregates the first t operators identified through the forward selection process. For every value of r, a maximum execution time was predetermined to prevent overly lengthy computations from occurring. Specifically, the timeout was set at 10 seconds for Inline graphic, 30 s for Inline graphic, and 90 s for Inline graphic. It is important to note that the accuracy values are influenced by this time restriction. If a method fails to conclude within the designated timeframe, its result is automatically set to null, which counts as an incorrect classification of a non-isomorphic pair. As a result, methods like NTX-IS, which is an exact algorithm, may exhibit accuracy scores below 1, anyway such values are also marked bold to highlight its exactness.

Specifically, the contrast between k-WL tests brings into focus the indecisiveness of 1-WL and 2-WL, which are equivalent in terms of expressive power, when applied to r-regular graphs. On the other hand, 3-WL, albeit being more expressive than 1-WL, encounters significant computational challenges for large graphs. Due to the theoretical equivalence of expressivity between 1-WL and message passing GNNs, these observations can be extended to GNNs as well. In addition, GNNs, as the number of layers and parameters increase, quickly become opaque and lose explainability. Finally, considering the higher costs of k-WL, we expect a similar behavior for k-GNNs.

Regarding the other approaches, more based on graph theory, they are the most efficient in terms of computational costs but not as accurate, especially for r-regular graphs. This was foreseeable since they are fairly general methods without specificity for this class of graphs. Notably, NTX-COULD (which examines node degree distribution, triangle and maximal clique counts) may offer a reasonable balance between time efficiency and accuracy, as shown in Fig. 4. However, unlike other methods, including those based on GENEOs, NTX-COULD does not scale linearly with respect to the graph dimension. Lastly, it is important to note that NTX-IS, which is the only exact algorithm under consideration, suffers significantly in the comparison due to its substantially longer execution times, even for moderately sized graphs (as illustrated in Table 1).

Discussion

In this work, we proposed a methodology for testing the isomorphism of graphs through the application of Group Equivariant Non-Expansive Operators and permutants. Our approach is grounded in the framework of permutants, which enable the generation of efficient and effective GENEOs to map between the sets of functions representing unweighted and undirected graphs.

The Methods section provides a detailed exposition of the fundamental principles of permutants and their role in constructing GENEOs. Furthermore, we demonstrate how recently introduced permutants, namely Subgraph Permutants, can be employed to derive GENEOs for comparing pairs of graphs, thereby allowing for the construction of a network that considers various aspects relevant to the final decision.

In the Results section, we implement our proposed methodology for distinguishing between r-regular graphs and report numerical results that demonstrate its success in differentiating among various instances of these graphs. Notably, our method also exhibits competitive performance in terms of execution time, as evidenced by a time complexity that scales linearly with the dimensionality of the input. These findings on r-regular graphs are significant given their challenges to many existing state-of-the-art isomorphism tests, as illustrated in our comparative analysis.

Looking ahead, we plan to expand this analysis to accommodate weighted graphs and devise an isomorphism-based graph similarity computing network. This could potentially lead to more general graph comparison models that are less stringent in their requirement for isomorphism when assessing graph similarity. The extension requires careful consideration of appropriate permutant constructions for weighted graphs and corresponding GENEOs, which we intend to explore in future works.

Methods

GENEOs and permutants

We will now briefly revisit the formal framework of GENEOs (Group Equivariant Non-Expansive Operators) and discuss permutants as a practical means to construct them. For a comprehensive understanding of GENEOs, please refer to4, and for further information on permutants, see17–19. We shall simply call “permutant” what is defined as “generalized permutant” in17.

Let X, Y be non-empty sets; let Inline graphic, Inline graphic be subspaces, respectively, of

graphic file with name 41598_2025_90152_Article_Equ8.gif

both endowed with the Inline graphic norm. Let G (resp. K) be a group of Inline graphic-preserving (resp. Inline graphic-preserving) bijections of X (resp. Y) to itself. Finally, let Inline graphic be a group homomorphism.

Definition 1

(Group Equivariant Non-Expansive Operator). A GENEO from the pair Inline graphic to the pair Inline graphic w.r.t. the homomorphism T, is a map Inline graphic satisfying:

  1. (Equivariance) Inline graphic for every Inline graphic and Inline graphic.

  2. (Non-expansiveness) Inline graphic for every Inline graphic.

Given two pairs Inline graphic and Inline graphic and a homomorphism Inline graphic, a (generalized) permutant can be defined as follows:

Definition 2

A finite subset Inline graphic is a permutant for the homomorphism T if either Inline graphic or Inline graphic for every Inline graphic.

Permutants provide an easy way to construct GENEOs:

Proposition 1

If Inline graphic is a non-empty permutant for Inline graphic then the operator Inline graphic defined as

graphic file with name 41598_2025_90152_Article_Equ1.gif 1

is a GENEO from Inline graphic to Inline graphic, provided that Inline graphic and that Inline graphic.

Proposition 1 moreover shows that GENEOs obtained through permutants can also be efficiently computable: the smaller the permutant the faster the computation.

Graph setting and subgraph permutants

In this section, we explore the application of GENEOs to the field of graphs. From hereon, our focus is on the set of undirected and unweighted simple graphs with a set of nodes Inline graphic, denoted as Inline graphic. Otherwise said, we consider all graphs of Inline graphic as subgraphs of the complete graph Inline graphic on the vertex set Inline graphic.

To proceed, let us define the domain as the set of index pairs Inline graphic (corresponding with the edge set of Inline graphic), and the function space as Inline graphic. Each graph Inline graphic can be represented through a corresponding function Inline graphic that models its adjacency matrix; we will denote this correspondence as Inline graphic. It is important to note that graphs with fewer than N nodes can also be accommodated within our framework by adding as many 0-degree nodes as needed, without raising any problem for what is done in the following.

In the experimental section that follows, we will concentrate on addressing the Graph Isomorphism Problem. To this aim, we fix, as the equivariance group G, the group of all transformations Inline graphic of the form Inline graphic, for some permutation Inline graphic of the set Inline graphic. Given two graphs Inline graphic and Inline graphic in Inline graphic, represented by functions Inline graphic and Inline graphic respectively, we shall deem them isomorphic if there exists a Inline graphic such that Inline graphic. To devise a test for checking whether two given graphs are isomorphic or not, this binary relationship serves as our ground truth. Effectively, it can be modeled by a well-known concept from the theory of Topological Data Analysis: the natural pseudo-distance4.

Definition 3

The natural pseudo-distance associated to a group Inline graphic is

graphic file with name 41598_2025_90152_Article_Equ2.gif 2

From this definition, due to the binary nature of the functions in Inline graphic, it easily follows that in our setting:

graphic file with name 41598_2025_90152_Article_Equ3.gif 3

We are now prepared to introduce Subgraph Permutants (SP). Given an auxiliary graph Inline graphic, with Inline graphic, where Inline graphic (seen as a subgraph of the smaller complete graph Inline graphic), we can represent it similarly as before in the functional space Inline graphic, where Inline graphic Before proceeding with the definition, let us fix some notation that will be utilized subsequently. As previously stated, the group G denotes the set of all graph transformations induced by a permutation of the N nodes (i.e. self-isomorphisms of the complete graph Inline graphic); in contrast, Inline graphic and Inline graphic refer to the groups of self-isomorphisms of graphs Inline graphic and Inline graphic respectively, i.e. those transformations of Inline graphic (resp. Inline graphic) that map the subgraph Inline graphic (resp. Inline graphic) back into itself. Furthermore, we define the functional space Inline graphic which consists of functions defined on Y taking values within the closed interval [0, 1].

In this way, we can define:

Definition 4

(Subgraph Permutant). A Subgraph Permutant (SP) associated with the search of Inline graphic as a subgraph of Inline graphic is the set of functions from Y to X of the form:

graphic file with name 41598_2025_90152_Article_Equ4.gif 4

Proposition 2

Every SP is a permutant for the trivial homomorphism Inline graphic.

Proof

It must be shown that for every Inline graphic and every Inline graphic it holds that Inline graphic. But Inline graphic hence it is enough to show Inline graphic. Since g is a self-isomorphism of Inline graphic, the condition Inline graphic is equivalent to the condition Inline graphic. This proves that Inline graphic Inline graphic

We shall call ‘strict’ a map h respecting the condition of Definition 4. As a map from Inline graphic to Inline graphic, it maintains all values (0 and 1) from Inline graphic to Inline graphic. As an embedding of Inline graphic into Inline graphic, it is such that Inline graphic coincides with the subgraph of Inline graphic induced by its nodes. See Fig. 2 for an embedding that is strict (on the right) and one that is not (on the left).

Fig. 2.

Fig. 2

Considering Inline graphic as a 4-cycle graph, the set Inline graphic is the empty SP since there is no strict embedding of Inline graphic to Inline graphic. In fact, the red dashed edge joins a node pair whose Inline graphic-value is 1, while each pair of non-adjacent nodes in Inline graphic has vanishing Inline graphic-value. On the other hand, there are 8 strict embeddings of Inline graphic into Inline graphic (i.e. as many as the self-isomorphisms of Inline graphic), hence we obtain an SP of size Inline graphic.

Indeed the cardinality of Inline graphic is easily computable as Inline graphic where Inline graphic is the number of occurrences in Inline graphic of subgraphs that are images of strict embeddings of Inline graphic.

Once fixed Inline graphic, as well as Inline graphic, we can define the GENEO Inline graphic, which is represented as Inline graphic, thanks to Proposition 1. Unfortunately, this operator can only serve as a GENEO for the pairs Inline graphic with respect to the trivial homomorphism. The root cause of this limitation lies in the Inline graphic-dependent normalization, which is tied to the fact that permutant Inline graphic is specific for Inline graphic. Consequently, we cannot utilize this definition for comparing other graphs Inline graphic up to transformations in G. However, we can define another GENEO that is invariant under the action of G by maintaining a fixed Inline graphic, and for each possible input Inline graphic, use the corresponding SP Inline graphic. It’s important to note that if Proposition 1 fails to apply in this scenario, the subsequent new Proposition becomes applicable instead.

Proposition 3

The operator Inline graphic defined as

graphic file with name 41598_2025_90152_Article_Equ5.gif 5

with the usual convention that a sum with no terms evaluates to 0, is a linear GENEO between the pairs Inline graphic with respect to the trivial homomorphism Inline graphic, where Inline graphic, and Inline graphic is the number of occurrences of Inline graphic in a complete graph with N nodes.

Proof

We need to show equivariance and non-expansiveness of Inline graphic.

  • Equivariance: we note that, since Inline graphic is injective, for every isomorphism Inline graphic the map Inline graphic is a bijection between Inline graphic and Inline graphic, that is Inline graphic, hence:
    graphic file with name 41598_2025_90152_Article_Equ9.gif
  • Non-expansiveness: If Inline graphic (this implies that the two functions must differ at least on a pair of vertices) then, since Inline graphic take values in the set Inline graphic, Inline graphic. Hence given Inline graphic:
    graphic file with name 41598_2025_90152_Article_Equ10.gif

By taking the supremum on e in the left hand side we get the inequality Inline graphic Otherwise, if Inline graphic we get that Inline graphic, thus Inline graphic Inline graphic

The normalizing constant Inline graphic is not easily computable for a generic Inline graphic, anyway a simple upper bound can be found by considering the number of injective functions from k elements to N elements, literally Inline graphic. Thus, by using the upper bound instead of Inline graphic in Proposition 3, non-expansiveness is still guaranteed.

Finally, we introduce the last operator that will be used as the basic unit for comparing graphs:

Definition 5

Given Inline graphic as before we can define an operator on pairs of graphs Inline graphic in the following way:

graphic file with name 41598_2025_90152_Article_Equ6.gif 6

Proposition 4

The operator defined in Eq. 6is a GENEO from Inline graphic to Inline graphic with respect to the trivial homomorphism Inline graphic.

Proof

We need to show equivariance and non-expansiveness of Inline graphic:

  • Equivariance:
    graphic file with name 41598_2025_90152_Article_Equ11.gif

    as Inline graphic is invariant with respect to any Inline graphic

  • Non-expansiveness:

    Let us start by noting that for any Inline graphic, given the fact that the functions in Inline graphic have only 0 and 1 as possible values,
    graphic file with name 41598_2025_90152_Article_Equ12.gif

    It follows that the values taken by the function Inline graphic belong to the set Inline graphic.

    Therefore, for any Inline graphic
    graphic file with name 41598_2025_90152_Article_Equ13.gif
    where the last symbol Inline graphic denotes the max-norm in Inline graphic. Hence taking the supremum over Inline graphic:
    graphic file with name 41598_2025_90152_Article_Equ14.gif

The value Inline graphic taken by function Inline graphic at every edge of Inline graphic can be interpreted as a “non-isomorphism score” for the pair Inline graphic, with respect to subgraph Inline graphic. We will label this score as Inline graphic.

Subgraph GENEO network

To begin, let us consider a collection of Inline graphic distinct subgraphs, denoted as Inline graphic. By stacking the information provided by the GENEOs Inline graphic for each of these subgraphs, we can generate an isomorphism-invariant p-dimensional vector.

graphic file with name 41598_2025_90152_Article_Equ15.gif

Subsequently, we can find the maximum of our p GENEOs that, according to the rules for algebraic operations between GENEOs outlined in20, still results in a valid GENEO.

Proposition 5

The map Inline graphic taking each pair Inline graphic to the number Inline graphic is a GENEO from Inline graphic to Inline graphic with respect to the trivial homomorphism Inline graphic (where Inline graphic is identified with the set of real-valued functions defined on a fixed singleton S).

Proof

We consider the map R taking each function Inline graphic to the number Inline graphic. The inequality Inline graphic shows that R is non-expansive. R is trivially invariant under the action of Inline graphic, so it is a GENEO from Inline graphic to Inline graphic with respect to the trivial homomorphism Inline graphic. Each Inline graphic is then the composition of the GENEO Inline graphic from Inline graphic to Inline graphic with the GENEO R, so a GENEO itself from Inline graphic to Inline graphic. Finally, a simple extension of the proof of Proposition 2 in20 shows that the maximum of a set of GENEOs is a GENEO with the same domain and range. Inline graphic

This GENEO will combine the observations of the first level GENEOs Inline graphic with a vetoing perspective. The resulting aggregated operator Inline graphic (denoted Inline graphic for brevity when considering all indices up to p), provides a more refined non-isomorphism score according to the following theorem.

Theorem 1

Given two graphs Inline graphic and Inline graphic, for every choice of Inline graphic and Inline graphic the followings hold:

  1. If Inline graphic and Inline graphic are isomorphic then Inline graphic or equivalently Inline graphic.

  2. If Inline graphic or equivalently Inline graphic then Inline graphic and Inline graphic are not isomorphic.

Proof

Straightforward. Inline graphic

Given Theorem 1, we can summarize the descriptions thus far into a model, the architecture of which is illustrated in Fig. 1, possibly allowing the model to consist of more than three operators.

Experimental setup

To evaluate and assess the methodology discussed in the previous sections, we designed an experimental setup as outlined below. We chose to focus on the family of r-regular graphs (Inline graphic): a graph Inline graphic is defined as r-regular if every node has degree equal to r. It is well-known that r-regular graphs present challenges when testing for isomorphism, as the degree distribution often plays a crucial role in many algorithms. However, for r-regular graphs with identical degrees and equal numbers of nodes, the degree distribution does not provide any valuable discriminating information. It is equally well known that r-regular graphs are one of those classes of graphs for which polynomial algorithms exist. In the works of Luks et al.21,22, a general bound of kind Inline graphic was stated, bound that was specialized to Inline graphic for 3-regular graphs. However, implementing these algorithms efficiently remains an open research question, making them primarily of theoretical interest. As a result, there is ongoing research into developing algorithms23,24 that do not meet the polynomial time guarantee but could offer advantages even when dealing with graphs for which polynomial algorithms are known such as r-regular graphs.

Furthermore, it is well-known that r-regular graphs, lacking node weights or features to break symmetry, are indistinguishable when tested using the Weisfeiler-Leman coloring test (1-WL)25,26. This inability to distinguish between r-regular graphs has been proven27,28 to be inherited by message passing Graph Neural Networks (GNNs)29, which perform neighbor aggregation in a manner similar to 1-WL. To address such issues, more complex variants of 1-WL and GNNs, specifically k-WL30 and k-GNNs31, have been proposed. These advanced methods offer greater expressivity in terms of discrimination, but they also entail increased computational costs due to their consideration of all tuples of nodes instead of just neighbors.

Our first experiment focused on random samples of r-regular graphs with Inline graphic. We analyzed these graphs one r at a time and then in combination. To construct a subgraph GENEO network, we considered 56 distinct subgraphs Inline graphic, which are shown in Fig. 3. For each r and every value of N between 8 and 100 (with a step size of 2), a random sample of 10 r-regular graphs was generated. Consequently, for each N, we tested 45 pairs of graphs. In total, there were 2115 unique pairs for each r and 6345 pairs that combined data from different r. As a starting point, we evaluated the discriminating capacity of every GENEO linked to a single Inline graphic by calculating its classification accuracy according to:

graphic file with name 41598_2025_90152_Article_Equ7.gif 7

In Eq. 7 a dataset of m graph pairs and associated ground truths Inline graphic is used for the estimation, the formula simply computes the proportion of examples such that the sign of the non-isomorphism score given by operator Inline graphic coincides with the ground truth. Indeed the function Inline graphic evaluates to 1 when the sign of the score and the ground truth are equal and 0 otherwise.

Fig. 3.

Fig. 3

The representations of the Inline graphic initially considered for analysis can be categorized into a limited number of classes. There are cycles, represented as Inline graphic for j ranging from 1 to 8; stars, ranging from 9 to 12; complete graphs, ranging from 13 to 18; paths, ranging from 19 to 25; rigid graphs with no non-trivial self-isomorphism at 26 and 27 and cycles augmented with stars ranging from 29 to 56. Each Inline graphic also reports the accuracy of the operator Inline graphic using both colors and a numeric value.

Based on Fig. 3, which also displays accuracy values, it becomes apparent that path subgraphs generally excel when considered individually. Subsequently, our focus shifted to combining individual GENEOs within a model architecture such as the one depicted in Fig. 1. To narrow down our selection and maintain satisfactory performance on the given data, we employed the forward selection technique outlined in Algorithm 1.

Algorithm 1.

Algorithm 1

Forward selection

Upon executing the forward selection process, the algorithm halts at the third iteration, selecting operators Inline graphic, and Inline graphic. The resulting accuracy is 1.00, however, it is important to note that this high accuracy is clearly overestimated due to the limited sample size under examination. Nonetheless, these results prove functional for the subsequent analysis.

Comparison

In our second experiment, we contrasted the performance of the model derived by forward selection against a set of user-friendly state-of-the-art methods. These methods include 1-WL (NetworkX32 implementation), 2-WL and 3-WL (our custom implementation), NTX-FASTER, NTX-FAST, NTX-COULD, and NTX-IS (respectively faster_could_be_isomorphic, fast_could_be_isomorphic, could_be_isomorphic and is_isomorphic from NetworkX library, in particular NTX-IS uses the VF2++ exact algorithm24). The algorithms were assessed on a dataset of randomly generated non-isomorphic r-regular pairs, with r taking values in the set Inline graphic and N in Inline graphic. Specifically, for each combination of r and N, we generated 500 unique pairs (distinct from those utilized in prior sections) of non-isomorphic graphs. The results regarding execution times (these and previous computations were executed on a laptop equipped with an eight-core Intel Core i7-6700HQ CPU) are visualized in Fig. 4 using log-log plots, while detailed information on both execution times and accuracies for Inline graphic can be found in Table 1. For Inline graphic and Inline graphic, instead, see Supplementary Material.

Supplementary Information

Acknowledgements

P.F. conducted a portion of his research within the framework of the CNIT WiLab National Laboratory and the WiLab-Huawei Joint Innovation Center. His work received partial support from INdAM-GNSAGA, the COST Action CaLISTA, and the HORIZON Research and Innovation Action PANDORA. G.B. wants to acknowledge the support of the APC central fund of the University of Milan.

Author contributions

G.B., M.F., and P.F. developed the mathematical model and wrote the text of the paper. G.B. implemented the algorithms and ran the experiments. All authors reviewed the manuscript.

Data availability

All data and codes used in this research are openly accessible on GitHub at https://github.com/jb-sharp/spgeneos.

Declarations

Competing interests

The authors declare no competing interests.

Footnotes

Publisher’s note

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

Supplementary Information

The online version contains supplementary material available at 10.1038/s41598-025-90152-7.

References

  • 1.Rudin, C. Stop explaining black box machine learning models for high stakes decisions and use interpretable models instead. Nat. Mach. Intell.1, 206–215. 10.1038/s42256-019-0048-x (2019). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 2.Carrieri, A. P. et al. Explainable AI reveals changes in skin microbiome composition linked to phenotypic differences. Sci. Rep.11, 4565. 10.1038/s41598-021-83922-6 (2021). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 3.Hicks, S. A. et al. Explaining deep neural networks for knowledge discovery in electrocardiogram analysis. Sci. Rep.11, 10949. 10.1038/s41598-021-90285-5 (2021). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 4.Bergomi, M. G., Frosini, P., Giorgi, D. & Quercioli, N. Towards a topological-geometrical theory of group equivariant non-expansive operators for data analysis and machine learning. Nat. Mach. Intell.1, 423–433. 10.1038/s42256-019-0087-3 (2019). [Google Scholar]
  • 5.Micheletti, A. A new paradigm for artificial intelligence based on group equivariant non-expansive operators. Eur. Math. Soc. Mag.128, 4–12. 10.4171/MAG/133 (2023). [Google Scholar]
  • 6.Bocchi, G. et al. A geometric XAI approach to protein pocket detection. In xAI-2024 Late-Breaking Work, Demos and Doctoral Consortium Joint Proceedings—The 2nd World Conference on eXplainable Artificial Intelligence, Valletta, Malta, July 17-19, 2024, vol. 3793, 217-224 (2024).
  • 7.Frosini, P. Towards an observer-oriented theory of shape comparison: Position paper. In Proceedings of the Eurographics 2016 Workshop on 3D Object Retrieval, 3DOR ’16 5–8 (2016).
  • 8.Mallat, S. Group invariant scattering. Commun. Pure Appl. Math.65, 1331–1398. 10.1002/cpa.21413 (2012). [Google Scholar]
  • 9.Bengio, Y., Courville, A. & Vincent, P. Representation learning: A review and new perspectives. IEEE Trans. Pattern Anal. Mach. Intell.35, 1798–1828 (2013). [DOI] [PubMed] [Google Scholar]
  • 10.Zhang, C., Voinea, S., Evangelopoulos, G., Rosasco, L. & Poggio, T. Discriminative template learning in group-convolutional networks for invariant speech representations. In INTERSPEECH-2015 3229–3233 (2015).
  • 11.Mallat, S. Understanding deep convolutional networks. Philos. Trans. R. Soc. A Math. Phys. Eng. Sci.374, 20150203. 10.1098/rsta.2015.0203 (2016). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 12.Anselmi, F., Rosasco, L. & Poggio, T. On invariance and selectivity in representation learning. Inf. Inference A J. IMA5, 134–158. 10.1093/imaiai/iaw009 (2016). [Google Scholar]
  • 13.Cohen, T. & Welling, M. Group equivariant convolutional networks. In International Conference on Machine Learning 2990–2999 (2016).
  • 14.Worrall, D. E., Garbin, S. J., Turmukhambetov, D. & Brostow, G. J. Harmonic networks: Deep translation and rotation equivariance. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR) Vol. 2, 7168–7177 (2017).
  • 15.Anselmi, F., Evangelopoulos, G., Rosasco, L. & Poggio, T. Symmetry-adapted representation learning. Pattern Recogn.86, 201–208. 10.1016/j.patcog.2018.07.025 (2019). [Google Scholar]
  • 16.Gerken, J. et al. Geometric deep learning and equivariant neural networks. Artif. Intell. Rev.56, 1–58. 10.1007/s10462-023-10502-7 (2023). [Google Scholar]
  • 17.Ahmad, F., Ferri, M. & Frosini, P. Generalized permutants and graph GENEOs. Mach. Learn. Knowl. Extr.5, 1905–1920. 10.3390/make5040092 (2023). [Google Scholar]
  • 18.Camporesi, F., Frosini, P. & Quercioli, N. On a new method to build group equivariant operators by means of permutants. In Machine Learning and Knowledge Extraction, CD-MAKE 2018, volume 11015 of Lecture Notes in Computer Science 265–272. 10.1007/978-3-319-99740-7_18 (2018).
  • 19.Bocchi, G., Botteghi, S., Brasini, M., Frosini, P. & Quercioli, N. On the finite representation of linear group equivariant operators via permutant measures. Ann. Math. Artif. Intell.91, 465–487. 10.1007/s10472-022-09830-1 (2023). [Google Scholar]
  • 20.Frosini, P. & Quercioli, N. Some remarks on the algebraic properties of group invariant operators in persistent homology. In Machine Learning and Knowledge Extraction, CD-MAKE 2017, volume 10410 of Lecture Notes in Computer Science 14–24. 10.1007/978-3-319-66808-6_2 (2017).
  • 21.Luks, E. M. Isomorphism of graphs of bounded valence can be tested in polynomial time. J. Comput. Syst. Sci.25, 42–65. 10.1016/0022-0000(82)90009-5 (1982). [Google Scholar]
  • 22.Galil, Z., Hoffmann, C. M., Luks, E. M., Schnorr, C. P. & Weber, A. An O(n**3log n) deterministic and an o(n**3) Las Vegas isomorphism test for trivalent graphs. J. ACM34, 513-531 (1987).
  • 23.McKay, B. D. & Piperno, A. Practical graph isomorphism, II. J. Symb. Comput.60, 94–112. 10.1016/j.jsc.2013.09.003 (2014). [Google Scholar]
  • 24.Jüttner, A. & Madarasi, P. VF2++—An improved subgraph isomorphism algorithm. Discret. Appl. Math.242, 69–81. 10.1016/j.dam.2018.02.018 (2018). [Google Scholar]
  • 25.Weisfeiler, B. & Leman, A. Weisfeiler and Leman original paper in Russian (scan). https://www.iti.zcu.cz/wl2018/pdf/wl_paper_orig.pdf. Accessed 13-10-2025.
  • 26.Weisfeiler, B. & Leman, A. Weisfeiler and Leman original paper English translation. https://www.iti.zcu.cz/wl2018/pdf/wl_paper_translation.pdf. Accessed 13-10-2025.
  • 27.Chen, Z., Villar, S., Chen, L. & Bruna, J. On the equivalence between graph isomorphism testing and function approximation with GNNs. In Proceedings of the 33rd International Conference on Neural Information Processing Systems (2019).
  • 28.Xu, K., Hu, W., Leskovec, J. & Jegelka, S. How powerful are graph neural networks? In International Conference on Learning Representations (2019).
  • 29.Gori, M., Monfardini, G. & Scarselli, F. A new model for learning in graph domains. In Proceedings of the 2005 IEEE International Joint Conference on Neural Networks, 2005 Vol. 2, 729–734. 10.1109/IJCNN.2005.1555942 (2005).
  • 30.Sato, R. A survey on the expressive power of graph neural networks. arXiv:2003.04078 (2020).
  • 31.Morris, C. et al. Weisfeiler and leman go neural: Higher-order graph neural networks. Proc. AAAI Conf. Artif. Intell.33, 4602–4609. 10.1609/aaai.v33i01.33014602 (2019). [Google Scholar]
  • 32.Hagberg, A. A., Schult, D. A. & Swart, P. J. Exploring network structure, dynamics, and function using networkX. In Proceedings of the 7th Python in Science Conference 11–15 (2008).

Associated Data

This section collects any data citations, data availability statements, or supplementary materials included in this article.

Supplementary Materials

Data Availability Statement

All data and codes used in this research are openly accessible on GitHub at https://github.com/jb-sharp/spgeneos.


Articles from Scientific Reports are provided here courtesy of Nature Publishing Group

RESOURCES