Reconstruction for Powerful Graph Representations
Leonardo Cotta, Christopher Morris, Bruno Ribeiro
Introduction
Supervised machine learning for graph-structured data, i.e., graph classification and regression, is ubiquitous across application domains ranging from chemistry and bioinformatics to image , and social network analysis . Consequently, machine learning on graphs is an active research area with numerous proposed approaches—notably GNNs being the most representative case of GRL methods.
Arguably, GRL’s most interesting results arise from a cross-over between graph theory and representation learning. For instance, the representational limits of GNNs are upper-bounded by a simple heuristic for the graph isomorphism problem , the -dimensional Weisfeiler-Leman algorithm (-WL) , which might miss crucial structural information in the data . Further works show how GNNs cannot approximate graph properties such as diameter, radius, girth, and subgraph counts , inspiring architectures based on the more powerful -dimensional Weisfeiler-Leman algorithm (-WL) .We opt for using instead of , i.e., -WL instead of -WL, to not confuse the reader with the hyperparameter of our models. On the other hand, despite the limited expressiveness of GNNs, they still can overfit the training data, offering limited generalization performance . Hence, devising GRL architectures that are simultaneously sufficiently expressive and avoid overfitting remains an open problem.
An under-explored connection between graph theory and GRL is graph reconstruction, which studies graphs and graph properties uniquely determined by their subgraphs. In this direction, both the pioneering work of Shawe-Taylor, and the more recent work of Bouritsas et al., , show that assuming the reconstruction conjecture (see Conjecture 1) holds, their models are most-expressive representations (universal approximators) of graphs. Unfortunately, Shawe-Taylor, ’s computational graph grows exponentially with the number of vertices, and Bouritsas et al., ’s full representation power requires performing multiple graph isomorphism tests on potentially large graphs (with vertices). Moreover, these methods were not inspired by the more general subject of graph reconstruction; instead, they rely on the reconstruction conjecture to prove their architecture’s expressive powers.
Contributions. In this work, we directly connect graph reconstruction to GRL. We first show how the -reconstruction of graphs—reconstruction from induced -vertex subgraphs—induces a natural class of expressive GRL architectures for supervised learning with graphs, denoted -Reconstruction Neural Networks. We then show how several existing works have their expressive power limited by -reconstruction. Further, we show how the reconstruction conjecture’s insights lead to a provably most expressive representation of graphs. Unlike Shawe-Taylor, and Bouritsas et al., , which, for graph tasks, require fixed-size unattributed graphs and multiple (large) graph isomorphism tests, respectively, our method represents bounded-size graphs with vertex attributes and does not rely on isomorphism tests.
To make our models scalable, we propose -Reconstruction GNNs, a general tool for boosting the expressive power and performance of GNNs with graph reconstruction. Theoretically, we characterize their expressive power showing that -Reconstruction GNNs can distinguish graph classes that the -WL and -WL cannot, such as cycle graphs and strongly regular graphs, respectively. Further, to explain gains in real-world tasks, we show how reconstruction can act as a lower-variance risk estimator when the graph-generating distribution is invariant to vertex removals. Empirically, we show that reconstruction enhances GNNs’ expressive power, making them solve multiple synthetic graph property tasks in the literature not solvable by the original GNN. On real-world datasets, we show that the increase in expressive power coupled with the lower-variance risk estimator boosts GNNs’ performance up to 25%. Our combined theoretical and empirical results make another important connection between graph theory and GRL.
We review related work from GNNs, their limitations, data augmentation, and the reconstruction conjecture in the following. See Appendix A for a more detailed discussion.
GNNs. Notable instances of this architecture include, e.g., , and the spectral approaches proposed in, e.g., —all of which descend from early work in . Aligned with the field’s recent rise in popularity, there exists a plethora of surveys on recent advances in GNN methods. Some of the most recent ones include .
Limits of GNNs. Recently, connections to Weisfeiler-Leman type algorithms have been shown . Specifically, the authors of show how the 1-WL limits the expressive power of any possible GNN architecture. Morris et al., introduce -dimensional GNNs which rely on a more expressive message-passing scheme between subgraphs of cardinality . Later, this was refined in and in by deriving models equivalent to the more powerful -dimensional Weisfeiler-Leman algorithm. Chen et al., 2019c connect the theory of universal approximation of permutation-invariant functions and graph isomorphism testing, further introducing a variation of the -WL. Recently, a large body of work propose enhancements to GNNs, e.g., see , making them more powerful than the -WL; see Appendix A for a in-depth discussion. For clarity, throughout this work, we will use the term GNNs to denote the class of message-passing architectures limited by the -WL algorithm, where the class of distinguishable graphs is well understood .
Data augmentation, generalization and subgraph-based inductive biases. There exist few works proposing data augmentation for GNNs for graph classification. Kong et al., introduces a simple feature perturbation framework to achieve this, while Rong et al., , Feng et al., focus on vertex-level tasks. Garg et al., study the generalization abilities of GNNs showing bounds on the Rademacher complexity, while Liao et al., offer a refined analysis within the PAC-Bayes framework. Recently, Bouritsas et al., proposed to use subgraph counts as vertex and edge features in GNNs. Although the authors show an increase in expressiveness, the extent, e.g., which graph classes their model can distinguish, is still mostly unclear. Moreover, Yehudai et al., investigate GNNs’ ability to generalize to larger graphs. Concurrently, Bevilacqua et al., show how subgraph densities can be used to build size-invariant graph representations. However, the performance of such models in in-distribution tasks, their expressiveness, and scalability remain unclear. Finally, Yuan et al., show how GNNs’ decisions can be explained by (often large) subgraphs, further motivating our use of graph reconstruction as a powerful inductive bias for GRL.
Reconstruction conjecture. The reconstruction conjecture is a longstanding open problem in graph theory, which has been solved in many particular settings. Such results come in two flavors. Either proving that graphs from a specific class are reconstructible or determining which graph functions are reconstructible. Known results of the former are, for instance, that regular graphs, disconnected graphs, and trees are reconstructible . In particular, we highlight that outerplanar graphs, which account for most molecule graphs, are known to be reconstructible . For a comprehensive review of graph reconstruction results, see Bondy, .
Preliminaries
Here, we introduce notation and give an overview of the main results in graph reconstruction theory , including the reconstruction conjecture , which forms the basis of the models in this work.
Notation and definitions. As usual, let for , and let denote a multiset. In an abuse of notation, for a set with in , we denote by the set . We also assume elementary definitions from graph theory, such as graphs, directed graphs, vertices, edges, neighbors, trees, isomorphism, et cetera; see Appendix B. The vertex and the edge set of a graph are denoted by and , respectively. The size of a graph is equal to its number of vertices. Unless indicated otherwise, we use . If not otherwise stated, we assume that vertices and edges are annoted with attributes, i.e., real-valued vectors.
We denote the set of all finite and simple graphs by . The subset of without edge attributes (or edge directions) is denoted . We write if the graphs and are isomorphic. Further, we denote the isomorphism type, i.e., the equivalence class of the isomorphism relation, of a graph as . Let , then is the induced subgraph with edge set . We will refer to induced subgraphs simply as subgraphs in this work.
Graph reconstruction. Intuitively, the reconstruction conjecture states that an undirected edge-unattributed graph can be fully recovered up to its isomorphism type given the multiset of its vertex-deleted subgraphs’ isomorphism types. This multiset of subgraphs is usually referred to as the deck of the graph, see Figure 1 for an illustration. Formally, for a graph , we define its deck as . We often call an element in a card. We define the graph reconstruction problem as follows.
Let and be graphs, then is a reconstruction of if and have the same deck, denoted . A graph is reconstructible if every reconstruction of is isomorphic to , i.e., implies .
Similarly, we define function reconstruction, which relates functions that map two graphs to the same value if they have the same deck.
Let be a function, then is reconstructible if for all graphs in , i.e., implies .
We can now state the reconstruction conjecture, which in short says that every in with is reconstructible.
Let and in be two finite, undirected, simple graphs with at least three vertices. If is a reconstruction of , then and are isomorphic.
We note here that the reconstruction conjecture does not hold for directed graphs, hypergraphs, and infinite graphs . In particular, edge directions can be seen as edge attributes. Thus, the reconstruction conjecture does not hold for the class . In contrast, the conjecture has been proved for practical-relevant graph classes, such as disconnected graphs, regular graphs, trees, and outerplanar graphs . Further, computational searches show that graphs with up to 11 vertices are reconstructible . Finally, many graph properties are known to be reconstructible, such as every size subgraph count, degree sequence, number of edges, and the characteristic polynomial .
Graph -reconstruction. Kelly et al., generalized graph reconstruction, considering the multiset of subgraphs of size instead of , which we denote , where is the set of all -size subsets of . We often call an element in a -card. From the -deck definition, it is easy to extend the concept of graph and function reconstruction, cf. Definitions 1 and 2, to graph and function -reconstruction.
Let and be graphs, then is a -reconstruction of if and have the same -deck, denoted . A graph is -reconstructible if every -reconstruction of is isomorphic to , i.e., implies .
Accordingly, we define -function reconstruction as follows.
Let be a function, then is -reconstructible if for all graphs in , i.e., implies .
Results for -reconstruction usually state the least as a function of such that all graphs in (or some subset) are -reconstructible . There exist extensive partial results in this direction, mostly describing -reconstructibility (as a function of ) for a particular family of graphs, such as trees, disconnected graphs, complete multipartite graphs, and paths, see . More concretely, Nỳdl, , Spinoza and West, showed graphs with vertices that are not -reconstructible. In practice, these results imply that for some fixed there will be graphs with not many more vertices than that are not -reconstructible. Further, -reconstructible graph functions such as degree sequence and connectedness have been studied in depending on the size of . In Appendix C, we discuss further such results.
Reconstruction Neural Networks
Building on the previous section, we propose two neural architectures based on graph -reconstruction and graph reconstruction. First, we look at -Reconstruction Neural Networks, the most natural way to use graph -reconstruction. Secondly, we look at Full Reconstruction Neural Networks, where we leverage the Reconstruction Conjecture to build a most-expressive representation for the class of graphs of bounded size and unattributed edges.
-Reconstruction Neural Networks. Intuitively, the key idea of -Reconstruction Neural Networks is that of learning a joint representation based on subgraphs induced by vertices. Formally, let be a (row-wise) permutation-invariant function and be the set of graphs with exactly vertices. Further, let be a graph representation function such that two graphs and on vertices are mapped to the same vectorial representation if and only if they are isomorphic, i.e., for all and in . We define -Reconstruction Neural Networks over as a function with parameters in the form
where is the set of all -size subsets of for some , and Concat denotes row-wise concatenation of a multi-set of vectors in some arbitrary order. Note that might also be a function with learnable parameters. In that case, we require it to be most-expressive for . The following results characterize the expressive power of the above architecture.
Let be a universal approximator of multisets . Then, can approximate a function if and only if the function is -reconstructible.
For any graph in , its -deck determines its -deck .
From Observation 1, we can derive a hierarchy in the expressive power of -Reconstruction Neural Networks with respect to the subgraph size . That is,
In Appendix D, we show how many existing architectures have their expressive power limited by -reconstruction. We also refer to Appendix D for the proofs, a discussion on the model’s computational complexity, approximation methods, and relation to existing work.
Full Reconstruction Neural Networks. Here, we propose a recursive scheme based on the reconstruction conjecture to build a most-expressive representation for graphs. Intuitively, Full Reconstruction Neural Networks recursively compute subgraph representations based on smaller subgraph representations. Formally, let be the class of undirected graphs with unattributed edges and maximum size . Further, let be a (row-wise) permutation invariant function and let be a most-expressive representation of the two-vertex subgraph induced by vertices and . We can now define the representation of a graph in in a recursive fashion as
Again, Concat() is row-wise concatenation in some arbitrary order. Note that in practice, it is easier to build the subgraph representations in a bottom-up fashion. First, use two-vertex subgraph representations to compute all three-vertex subgraph representations. Then, perform this inductively until we arrive at a single whole-graph representation. In Appendix E, we prove the expressive power of Full Reconstruction Neural Networks, i.e., we show how if the reconstruction conjecture holds, it is a most-expressive representation of undirected edge-unattributed graphs. Finally, we show its quadratic number of parameters, exponential computational complexity, and relation to existing work.
Reconstruction Graph Neural Networks
Although Full Reconstruction Neural Networks provide a most-expressive representation for undirected, unattributed-edge graphs, they are impractical due to their computational cost. Similarly, -Reconstruction Neural Networks are not scalable since increasing their expressive power requires computing most-expressive representations of larger -size subgraphs. Hence, to circumvent the computational cost, we replace the most-expressive representations of subgraphs from -Reconstruction Neural Networks with GNN representations, resulting in what we name -Reconstruction GNNs. This change allows for scaling the model to larger subgraph sizes, such as , , …, et cetera.
Since, in the general case, graph reconstruction assumes most-expressive representations of subgraphs, it cannot capture -Reconstruction GNNs’ expressive power directly. Hence, we provide a theoretical characterization of the expressive power of -Reconstruction GNNs by coupling graph reconstruction and the GNN expressive power characterization based on the -WL algorithm. Nevertheless, in Section F.2, we devise conditions under which -Reconstruction GNNs have the same power as -Reconstruction Neural Networks. Finally, we show how graph reconstruction can act as a (provably) powerful inductive bias for invariances to vertex removals, which boosts the performance of GNNs even in tasks where all graphs are already distinguishable by them (see Appendix G). We refer to Appendix F for a discussion on the model’s relation to existing work.
Formally, let be a (row-wise) permutation invariant function and a GNN representation. Then, for , a -Reconstruction GNN takes the form
with parameters , where is the set of all -size subsets of , and Concat is row-wise concatenation in some arbitrary order.
Approximating . By design, -Reconstruction GNNs require computing GNN representations for all -vertex subgraphs, which might not be feasible for large graphs or datasets. To address this, we discuss a direction to circumvent computing all subgraphs, i.e., approximating by sampling.
One possible choice for is Deep Sets , which we use for the experiments in Section 5, where the representation is a sum decomposition taking the form r_{{\bf W}}^{(k,\text{GNN})}(G)=\rho_{{\bf W}_{1}}\bigg{(}\sum_{S\in{\mathcal{S}}^{(k)}}\phi_{{\bf W}_{2}}\Big{(}h_{{\bf W}_{3}}^{\text{GNN}}(G[S])\Big{)}\bigg{)}, where and are permutation sensitive functions, such as feed-forward networks. We can learn the -Reconstruction GNN model over a training dataset w and a loss function by minimizing the empirical risk
Equation 1 is impractical for all but the smallest graphs, since is a sum over all -vertex induced subgraphs of . Hence, we approximate using a sample drawn uniformly at random at every gradient step, i.e., \widehat{r}_{{\bf W}}^{(k,\text{GNN})}(G)=\rho_{{\bf W}_{1}}\Big{(}|{\mathcal{S}}^{(k)}|/|{\mathcal{S}}_{B}^{(k)}|\sum_{S\in{\mathcal{S}}_{B}^{(k)}}\phi_{{\bf W}_{2}}\big{(}h_{{\bf W}_{3}}^{(\text{GNN})}(G[S])\big{)}\Big{)}. Due to non-linearities in and , plugging into Equation 1 does not provide us with an unbiased estimate of . However, if is convex in , in expectation we will be minimizing a proper upper bound of our loss, i.e., 1/N^{\text{tr}}\sum_{i=1}^{N^{\text{tr}}}l\big{(}r_{{\bf W}}^{(k,\text{GNN})}(G_{i}),y_{i}\big{)}\leq 1/N^{\text{tr}}\sum_{i=1}^{N^{\text{tr}}}l\big{(}\widehat{r}_{{\bf W}}^{(k,\text{GNN})}(G_{i}),y_{i}\big{)}. In practice, many models rely on this approximation and provide scalable and reliable training procedures, cf. .
Now, we analyze the expressive power of -Reconstruction GNNs. It is clear that -Reconstruction GNNs -Reconstruction Neural Networks, however the relationship between -Reconstruction GNNs and GNNs is not that straightforward. At first, one expects that there exists a well-defined hierarchy—such as the one in -Reconstruction Neural Networks (see Observation 1)—between GNNs, -Reconstruction GNNs, -Reconstruction GNNs, and so on. However, there is no such hierarchy, as we see next.
Are GNNs more expressive than -Reconstruction GNNs? It is well-known that GNNs cannot distinguish regular graphs . By leveraging the fact that regular graphs are reconstructible , we show that cycles and circular skip link (CSL) graphs—two classes of regular graphs—can indeed be distinguished by -Reconstruction GNNs, implying that -Reconstruction GNNs are not less expressive than GNNs. We start by showing that -Reconstruction GNNs can distinguish the class of cycle graphs.
The following results shows that -Reconstruction GNNs can distinguish the class of CSL graphs.
Let be two non-isomorphic circular skip link (CSL) graphs (a class of 4-regular graphs, cf. ). Then, -Reconstruction GNNs can distinguish and .
Are GNNs less expressive than -Reconstruction GNNs? We now show that GNNs can distinguish graphs that -Reconstruction GNNs with small cannot. We start with Proposition 2 stating that there exist some graphs that GNNs can distinguish which -Reconstruction GNNs with small cannot.
GNNs -Reconstruction GNNs for .
On the other hand, the analysis is more interesting for larger subgraph sizes, e.g., , where there are no known examples of (undirected, edge-unattributed) non-reconstructible graphs. There are graphs distinguishable by GNNs with at least one subgraph not distinguishable by them; see Appendix F. However, the analysis is whether the multiset of all subgraphs’ representations can distinguish the original graph. Since we could not find any counter-examples, we conjecture that every graph distinguishable by a GNN is also distinguishable by a -Reconstruction GNN with or possibly more generally with any close enough to . In Appendix F, we state and discuss the conjecture, which we name WL reconstruction conjecture. If true, the conjecture implies GNNs -Reconstruction GNNs. Moreover, if we use the original GNN representation together with -Reconstruction GNNs, Theorems 1 and 2 imply that the resulting model is strictly more powerful than the original GNN.
Are -Reconstruction GNNs less expressive than higher-order (-WL) GNNs?
Recently a line of work, e.g., , explored higher-order GNNs aligning with the -WL hierarchy. Such architectures have, in principle, the same power as the -WL algorithm in distinguishing non-isomorphic graphs. Hence, one might wonder how -Reconstruction GNNs stack up to -WL-based algorithms. The following result shows that pairs of non-isomorphic graphs exist that a -Reconstruction GNN can distinguish but the -WL cannot.
Let -GNNs be neural architectures with the same expressiveness as the -WL algorithm. Then, .
As a result of Proposition 3, using a -Reconstruction GNN representation together with a 2-GNN increases the original 2-GNN’s expressive power.
2 Reconstruction as a powerful extra invariance for general graphs
An essential feature of modern machine learning models is capturing invariances of the problem of interest . It reduces degrees of freedom while allowing for better generalization . GRL is predicated on invariance to vertex permutations, i.e., assigning the same representation to isomorphic graphs. But are there other invariances that could improve generalization error?
-reconstruction is an extra invariance. Let be the joint probability of observing a graph with label . Any -reconstruction-based model, such as -Reconstruction Neural Networks and -Reconstruction GNNs, by definition assumes to be invariant to the -deck, i.e., if . Hence, our neural architectures for -Reconstruction Neural Networks and -Reconstruction GNNs directly define this extra invariance beyond permutation invariance. How we do know it is an extra invariance and not a consequence of permutation invariance? It does not hold on directed graphs , where permutation invariance still holds.
Hereditary property variance reduction. We now show that the invariance imposed by -reconstruction helps in tasks based on hereditary properties . A graph property is called hereditary if it is invariant to vertex removals, i.e. for every and . By induction the property is invariant to every size subgraph, i.e., for every where is the set of all -size subsets of . Here, the property is invariant to any given subgraph. For example, every subgraph of a planar graph is also planar, every subgraph of an acyclic graph is also acyclic, any subgraph of a -colorable graph is also -colorable. A more practically interesting (weaker) invariance would be invariance to a few vertex removals. Next we define -hereditary properties (a special case of a -hereditary property). In short, a property is -hereditary if it is a hereditary property for graphs with more than vertices.
A graph property is said to be -hereditary if . That is, is uniform in and all subgraphs of with more than vertices.
Consider the task of predicting . Theorem 3 shows that -Reconstruction GNNs is an invariance that reduces the variance of the empirical risk associated with -hereditary property tasks. See Appendix F for the proof.
Experimental Evaluation
In this section, we investigate the benefits of -Reconstruction GNNs against GNN baselines on both synthetic and real-world tasks. Concretely, we address the following questions: Q1. Does the increase in expressive power from reconstruction (cf. Section 4.1) make -Reconstruction GNNs solve graph property tasks not originally solvable by GNNs? Q2. Can reconstruction boost the original GNNs performance on real-world tasks? If so, why? Q3. What is the influence of the subgraph size in both graph property and real-world tasks?
Synthetic graph property datasets. For Q1 and Q3, we chose the synthetic graph property tasks in Table 1, for which GNNs are provably incapable to solve due to their limited expressive power . The tasks are csl , where we classify CSL graphs, the cycle detection tasks 4 cycles, 6 cycles and 8 cycles and the multi-task regression from Corso et al., , where we want to determine whether a graph is connected, its diameter and its spectral radius. See Appendix H for datasets statistics. Real-world datasets. To address Q2 and Q3, we evaluated -Reconstruction GNNs on a diverse set of large-scale, standard benchmark instances . Specifically, we used the zinc (10K) , alchemy (10K) , ogbg-molfreesolv, ogbg-molesol, and ogbg-mollipo regression datasets. For the case of graph classification, we used ogbg-molhiv, ogbg-molpcba, ogbg-tox21, and ogbg-toxcast . See Appendix H for datasets statistics. Neural architectures. We used the GIN , GCN , and the PNA architectures as GNN baselines. We always replicated the exact architectures from the original paper, building on the respective PyTorch Geometric implementation . For the ogbg regression datasets, we noticed how using a jumping knowledge layer yields better validation and test results for GIN and GCN. Thus we made this small change. For each of these three architectures, we implemented -Reconstruction GNNs for in using a Deep Sets function over the exact same original GNN architecture. For more details, see Appendix G. Experimental setup. To establish fair comparisons, we retain all hyperparameters and training procedures from the original GNNs to train the corresponding -Reconstruction GNNs. Tables 1 and 2 and Table 6 in Appendix I present results with the same number of runs as previous work , i.e., five for all datasets execpt the ogbg datasets, where we use ten runs. For more details, such as the number of subgraphs sampled for each -Reconstruction GNN and each dataset, see Appendix G. Non-GNN baselines. For the graph property tasks, original work used vertex identifiers or laplacian embeddings to make GNNs solve them. This trick is effective for the tasks but violates an important premise of graph representations, invariance to vertex permutations. To illustrate this line of work, we compare against Positional GIN, which uses Laplacian embeddings for the csl task and vertex identifiers for the others . To compare against other methods that like -Reconstruction GNNs are invariant to vertex permutations and increase the expressive power of GNNs, we compare against Ring-GNNs and (3-WL) PPGNs . For real-world tasks, Table 6 in Appendix I shows the results from GRL alternatives that incorporate higher-order representations in different ways, LRP , GSN , -2-LGNN , and SMP .
All results are fully reproducible from the source and are available at https://github.com/PurdueMINDS/reconstruction-gnns.
A1 (Graph property tasks). Table 1 confirms Theorem 2, where the increase in expressive power from reconstruction allows -Reconstruction GNNs to distinguish CSL graphs, a task that GNNs cannot solve. Here, -Reconstruction GNNs boost the accuracy of standard GNNs between 10 and 20. Theorem 2 only guarantees GNN expressiveness boosting for -Reconstruction, but our empirical results also show benefits for -Reconstruction with . Table 1 also confirms Theorem 1, where -Reconstruction GNNs provide significant accuracy boosts on all cycle detection tasks (4 cycles, 6 cycles and 8 cycles). See Section J.1, for a detailed discussion on results for connectivity, diameter, and spectral radius, which also show boostings.
A2 (Real-world tasks). Table 2 and Table 6 in Appendix I show that applying -reconstruction to GNNs significantly boosts their performance across all eight real-world tasks. In particular, in Table 2 we see a boost of up to 5% while achieving the best results in five out of six datasets. The -reconstruction applied to GIN gives the best results in the ogbg tasks, with the exception of ogbg-mollipo and ogbg-molpcba where -reconstruction performs better. The only settings where we did not get any boost were PNA for ogbg-molesol and ogbg-molpcba. Table 6 in Appendix I also shows consistent boost in GNNs’ performance of up to 25% in other datasets. On zinc, -Reconstruction yields better results than the higher-order alternatives LRP and -2-LGNN. While GSN gives the best zinc results, we note that GSN requires application-specific features. In ogbg-molhiv, -reconstruction is able to boost both GIN and GCN. The results in Appendix G show that nearly of the graphs in our real-world datasets are distinguishable by the -WL algorithm, thus we can conclude that traditional GNNs are expressive enough for all our real-world tasks. Hence, real-world boosts of reconstruction over GNNs can be attributed to the gains from invariances to vertex removals (cf. Section 4.2) rather than the boost in expressive power (cf. Section 4.1).
A3 (Subgraph sizes). Overall we observe that removing one vertex () is enough to improve the performance of GNNs in most experiments. At the other extreme end of vertex removals, , there is a significant loss in expressiveness compared to the original GNN. In most real-world tasks Table 2 and Table 6 in Appendix I show a variety of performance boosts also with . For GCN and PNA in ogbg-molesol, specifically, we only see -Reconstruction boosts over smaller subgraphs such as , which might be due to the task’s need of more invariance to vertex removals (cf. Section 4.2). In the graph property tasks (Table 1), we see significant boosts also for in all models across most tasks, except PNA. However, as in real-world tasks the extreme case of small subgraphs significantly harms the ability to solve tasks with -Reconstruction GNNs.
Conclusions
Our work connected graph (-)reconstruction and modern GRL. We first showed how such connection results in two natural expressive graph representation classes. To make our models practical, we combined insights from graph reconstruction and GNNs, resulting in -Reconstruction GNNs. Our theory shows that reconstruction boosts the expressiveness of GNNs and has a lower-variance risk estimator in distributions invariant to vertex removals. Empirically, we showed how the theoretical gains of -Reconstruction GNNs translate into practice, solving graph property tasks not originally solvable by GNNs and boosting their performance on real-world tasks.
Acknowledgements
This work was funded in part by the National Science Foundation (NSF) awards CAREER IIS-1943364 and CCF-1918483. Any opinions, findings and conclusions or recommendations expressed in this material are those of the authors and do not necessarily reflect the views of the sponsors. Christopher Morris is funded by the German Academic Exchange Service (DAAD) through a DAAD IFI postdoctoral scholarship (57515245). We want to thank our reviewers, who gave excellent suggestions to improve the paper.
References
Appendix A Related work (expanded)
GNNs. Recently, graph neural networks emerged as the most prominent (supervised) GRL architectures. Notable instances of this architecture include, e.g., , and the spectral approaches proposed in, e.g., —all of which descend from early work in . Recent extensions and improvements to the GNN framework include approaches to incorporate different local structures (around subgraphs), e.g., , novel techniques for pooling vertex representations in order perform graph classification, e.g., , incorporating distance information , and non-euclidian geometry approaches . Moreover, recently empirical studies on neighborhood aggregation functions for continuous vertex features , edge-based GNNs leveraging physical knowledge , and sparsification methods emerged. A survey of recent advancements in GNN techniques can be found, e.g., in .
Limits of GNNs. Chen et al., study the substructure counting abilities of GNNs. Dasoulas et al., , Abboud et al., investigate the connection between random coloring and universality. Recent works have extended GNNs’ expressive power by encoding vertex identifiers , adding random features , using higher-order topology as features , considering simplicial complexes , encoding ego-networks , and encoding distance information . Although these works increase the expressiveness of GNNs, their generalization abilities are understood to a lesser extent. Further, works such as Vignac et al., [96, Lemma 6] and the most recent Beaini et al., and Bodnar et al., prove the boost in expressiveness with a single pair of graphs, giving no insights into the extent of their expressive power or their generalization abilities. For clarity, throughout this work, we use the term GNNs to denote the class of message-passing architectures limited by the -WL algorithm, where the class of distinguishable graphs is well understood .
Appendix B Notation (expanded)
As usual, let for , and let denote a multiset. In an abuse of notation, for a set with in , we denote by the set .
We say that two graphs and are isomorphic, , if there exists an adjacency preserving bijection , i.e., is in if and only if is in , and call an isomorphism from to . If the graphs have vertex or edge attributes, the isomorphism is additionally required to match these attributes accordingly.
We denote the set of all finite and simple graphs by . The subset of without edge attributes is denoted . Further, we denote the isomorphism type, i.e., the equivalence class of the isomorphism relation, of a graph as . Let , then is the induced subgraph with edge set . We will refer to induced subgraphs simply as subgraphs in this work.
Appendix C More on reconstruction
After formulating the Reconstruction Conjecture, it is natural to wonder whether it stands for other relational structures, such as directed graphs. Interestingly, directed graphs, hypergraphs, and infinite graphs are not reconstructible . Thus, in particular the Reconstruction Conjecture does not hold for the class .
Another question is how many cards from the deck are sufficient to reconstruct a graph. Bollobás, show that almost every graph, in a probabilistic sense, can be reconstructed with only three subgraphs from the deck. For example, the graph shown in Figure 1 (Section 2) is reconstructible from the three leftmost cards.
For an extensive survey on reconstruction, we refer the reader to Bondy, , Godsil, . From there, we highlight a significant result, Kelly’s Lemma (cf. Lemma 1). In short, the lemma states that the deck of a graph completely defines its subgraph count of every size.
Let be the number of copies of in . For any pair of graphs with , is reconstructible.
In fact, its proof is very simple once we realize every subgraph appears in exactly cards from the deck, i.e.,
Here, in Lemma 2, we highlight a generalization of Kelly’s Lemma (Lemma 1) established in Nỳdl, , where the count of any subgraph of size at most is -reconstructible.
For any pair of graphs with , is -reconstructible.
Appendix D More on k𝑘k-Reconstruction Neural Networks
Here, we give more background on -Reconstruction Neural Networks.
We start by showing how the -ary Relational Pooling framework is a specific case of -Reconstruction Neural Networks and thus limited by -reconstruction. Then, we show how -Reconstruction Neural Networks are limited by -GNNs at initialization, which implies that -GNNs at initialization can approximate any -reconstructible function.
The -ary pooling approach in the Relational Pooling (RP) framework defines a graph representation of the form
where is the set of all -size subsets of and is a most-expressive graph representation given by the average of a permutation-sensitive universal approximator, e.g., a feed-forward neural network, applied over the permutations of the subgraph, accordingly. Thus, -ary RP can be casted as a -Reconstruction Neural Network with as mean pooling and as . Note that for -ary RP to be as expressive as -Reconstruction Neural Networks, i.e., -ary RP -Reconstruction Neural Networks, we would need to replace the average pooling by a universal multiset approximator or simply add a feed-forward neural network after it.
The -WL test, which limits architectures such as Morris et al., 2020b , Morris et al., , Maron et al., 2019a , at initialization, with zero iteration, considers one-hot encodings of -tuples of vertices. Note that each -size subgraph is completely defined by its corresponding vertex tuples. Thus, it follows that -WL with zero iterations is at least as expressive as -Reconstruction Neural Networks. Further, by combining Proposition 1 and the result from Lemma 2 , it follows that -WL at initialization can count subgraphs of size , which is a simple proof for the recent result [23, Theorem 3.7].
Now, we discuss the computational complexity of -Reconstruction Neural Networks and how to circumvent it through subgraph sampling.
Computational complexity. As outlined in Section 2, we would need subgraphs of size almost to have a most-expressive representation of graphs with -Reconstruction Neural Networks. This would imply performing isomorphism testing for arbitrarily large graphs, as in Bouritsas et al., , making the model computationally infeasible.
A graph with vertices has induced subgraphs of size . Let be an upper-bound on computing . Thus, computing would take time. Although Babai, has shown how to do isomorphism testing in quasi-polynomial time, an efficient (polynomial) time algorithm remains unknown. More generally, expressive representations of graphs and isomorphism class hashing algorithms still require exponential time regarding the graph size. Thus, if we choose a small value for , i.e., , the factor dominates, while if we choose the factor dominates. In both cases, the time complexity is exponential in , i.e., .
D.2 Relation to previous work
Recently, Bouritsas et al., propose using subgraph isomorphism type counts as features of vertices and edges used in a GNN architecture. The authors comment that if the reconstruction conjecture holds, their architecture is most expressive for . Here, we point out two things. First, their architecture is at least as powerful as -reconstruction. Secondly, the reconstruction conjecture does not hold for directed graphs. Since edge directions can be seen as edge attributes, their architecture is not the most expressive for graphs with attributed edges. Finally, to make their architecture scalable, in practice, the authors choose only specific hand-engineered subgraph types, which makes the model incomparable to -reconstruction.
D.3 Proof of Proposition 1
We start by giving a more formal statement of Proposition 1.
Let be a continuous function over a compact set of and the uniform (sup) norm. Proposition 1 states that for every there exists some such that if and only if is -reconstructible.
Since is required to be most expressive, we can see the input of -Reconstruction Neural Networks as a multiset of unique identifiers of isomorphism types. Thus, it follows from Definition 4, that -reconstrucible functions can be approximated by . The other direction, i.e., a function can be approximated by if it is -reconstructible, follows from the Stone–Weierstrass theorem, see Zaheer et al., .∎
Appendix E More on Full Reconstruction Neural Networks
The following result captures the expressive power of Full Reconstruction Neural Networks.
If the functions are universal approximators of multisets and the Reconstruction Conjecture holds, Full Reconstruction Neural Networks can approximate a function if the function is reconstructible.
We use induction on to show that every subgraph representation in Full Reconstruction Neural Networks is a most expressive representation if the Reconstruction Conjecture holds.
Base case: . It follows from the model definition that is a most expressive representation if .
Inductive step: . If all subgraph representations in are most expressive, it follows from Proposition 1 that if is a universal approximator of multisets can approximate any reconstructible function. Thus, if the Reconstruction Conjecture holds, can assign a most expressive representation to .
It follows then that will be a multiset function of . From Proposition 1, if is a universal approximator of multisets can approximate any reconstructible function.∎
It follows from Proposition 4 that if the Reconstruction Conjecture holds, Full Reconstruction Neural Networks are a most-expressive representation of .
Number of parameters. Wagstaff et al., shows how a multiset model needs at least neurons to learn over multisets of size at most . Since our graphs have at most vertices, we can bound the multiset input size of each . Thus, our total number of parameters is .
Computational complexity. For a graph with vertices, we need to compute representations of all subgraphs of sizes , i.e., . Thus, computing a Full Reconstruction Neural Network representation takes time.
Relation to previous work. Unlike Shawe-Taylor, , the first work proposing reconstruction to build symmetric neural networks for unattributed graphs with a fixed size, we can handle graphs with vertex attributes and of varying sizes of size up to . Future work can explore approximate computing methods a Full Reconstruction Neural Network representation, as recently done for the Relational Pooling (RP) framework. Further, in contrast to the most expressive representation in the RP framework, which uses a permutation-sensitive function, Full Reconstruction Neural Networks incorporate graph invariances in the model.
Appendix F More on k𝑘k-Reconstruction GNNs
In the following, we give more details on -Reconstruction GNNs.
Recently, Garg et al., showed how many graph properties are not recognizable by GNNs using specific cycle graph examples. Further, most existing work extending GNN architectures to make them more expressive, such as Vignac et al., , Li et al., , and Murphy et al., 2019b focus on distinguishing regular graph examples. Finally, Beaini et al., used a single pair of planar, non-regular graphs, also used in Garg et al., , to prove their method is more expressive than GNNs. Here, we show how the simple idea of graph reconstruction—without changing the original GNN architecture—can extend the GNN’s expressivity, distinguishing some classes of regular graphs.
F.2 Relating k𝑘k-Reconstruction GNNs and k𝑘k-Reconstruction Neural Networks
Here, we devise conditions under which -Reconstruction GNNs and -Reconstruction Neural Networks have the same power, using the following definition.
Let be a distribution on graphs. A graph representation is -universal with in for if it assigns, with probability , a unique representation, up to isomorphism, to a graph sampled from . If a graph representation is -universal for all induced -vertex subgraphs of graphs sampled from , then the representation is -universal for .
Based on the above definition, we get the following result, relating -Reconstruction GNNs and -Reconstruction Neural Networks.
Let be a distribution on graphs with at most vertices, let be a -Reconstruction Neural Network, let be a -Reconstruction GNN, and let be the underlying GNN graph representation used within the -Reconstruction GNN . Assume that the GNN is -universal, then with probability it holds that
By the union bound, we can upper bound the probability that at least one -vertex subgraph is not uniquely represented by the GNN by
Hence, we can lower bound the probability that this never happens by . ∎
F.3 Proof of Theorem 1
In the following, we proof Theorem 1. The following result, showing that the -WL assigns unique representation to forest graphs, follows directly from .
1-WL distinguishes any pair of non-isomorphic forests.
The following results shows that the degree list of a graph is reconstructable.
The following results shows that connectedness of a graph is reconstructable.
Moreover, we will need the following observation.
Every subgraph of a cycle graph is either a path graph or a collection of path graphs.
We start with a simple observation in Observation 4. With that, we know from Lemma 3 that GNNs can assign unique representations to every cycle subgraph. Thus, it follows from Proposition 1 that -Reconstruction GNNs can learn -reconstructible functions of cycle graphs. With that, if conditions i) and ii) hold, it follows from Lemmas 4 and 5 that we can reconstruct the degree list and the connectedness of a cycle graph. Note that a cycle graph is a -regular connected graph. That is, it is uniquely identified by its degree list and its connectedness. Thus, -Reconstruction GNNs can assign an unique representation to it if conditions i) and ii) hold.
F.4 Proof of Theorem 2
The following definition defines CSL graphs.
Let and be co-prime natural numbers such that . We denote by the undirected -regular graph with vertices labeled as whose edges form a cycle and have skip links. More specifically, the edge set is defined by a cycle formed by in for and together with skip links defined recursively by the sequence of edges with
Consider two non-isomorphic CSL graphs with the same number of vertices, which we can denote by and with according to Definition 7. First, note that every -size subgraph (card) of a CSL graph is isomorphic to each other. Thus, for -Reconstruction GNNs—due to the equivalence in expressiveness between GNNs and 1-WL—it suffices to prove that 1-WL can distinguish between a card from and a card from .
Now, let and be the two subgraphs we get by removing the vertex from and respectively. In each subgraph, vertices remain with degree 4. However, we can differentiate the two subgraphs by looking at the vertices which now have degree 3. In both subgraphs and will have degree 3. Moreover, in the vertex will have degree 3, while in will have degree 3. Since , the distance from to and to is different in the two graphs. Thus, the -WL will assign different colors to the vertices between and in a subgraph and between and in the other. The same argument applies to the distance from , where to . Hence, the -WL will assign different color histograms to the subgraphs and thus -Reconstruction GNNs can distinguish them.∎
F.5 Proof of Proposition 2
We start by stating the following result.
Spider graphs are not -reconstructible.
First, it is clear that -Reconstruction GNNs -Reconstruction Neural Networks, thus it suffices to show GNNs -Reconstruction Neural Networks for . It follows from Lemma 6 and Proposition 1 that -Reconstruction Neural Networks cannot assign unique representations to spider graphs if . However, spider graphs are a family of trees, which are known to be assigned unique representations in 1-WL, see Lemma 3. Thus, due to the equivalence in expressiveness between GNNs and 1-WL, we know GNNs can assign unique representations to spider graphs. Thus, GNNs -Reconstruction Neural Networks for . In fact, from Observation 1, we know GNNs -Reconstruction Neural Networks for . ∎
F.6 Proof of Proposition 3
In the following, we provide a pair of non-isomorphic graphs that the -WL cannot distinguish, while a -Reconstruction GNN with can.
The -WL cannot distinguish any pair of non-isomorphic, strongly-regular graphs with the same parameters . For example, following [A1], the -WL cannot distinguish the line graph of (graph ) and Shrikande Graph (graph ), both strongly-regular graphs with parameters , which are non-isomorphic. https://www.win.tue.nl/~aeb/graphs/srg/srgtab.html Hence, any -GNN architecture can also not distinguish them. The graph and are non-isomorphic since the neighborhood around each node in the graph either induces a cycle or a disjoint union of triangles, respectively. By a similar argument as in the proof of Theorem 2, the -WL can distinguish the graphs induced by the decks and , which we verified by a computer experiment. Hence, there exists a -Reconstruction -GNN architecture that can distinguish the two graphs. 3 ∎
F.7 WL reconstruction conjecture
There exists a wide variety of graphs identifiable by 1-WL—and thus by GNNs—with one or a few -size subgraphs not identifiable by 1-WL. A simple example would be adding a special vertex to a cycle with 5 vertices. In this new 6-vertex graph we connect the special vertex to every other vertex in the 5-cycle. Further, we add another 5-cycle as a different component. This new 11-vertex graph is identifiable by 1-WL from Kiefer et al., [54, Theorem 17].The flip of this graph is a bouquet forest with two 5-cycles (of distinct colors) and an isolated extra vertex However, the 10-vertex subgraph we get by removing the special vertex is a regular graph, notably not identifiable by 1-WL.
As we saw, getting one or even a few subgraphs that GNNs cannot distinguish from a distinguishable original graph is not a complex task. However, in order to understand whether GNNs are not less powerful than -Reconstruction GNNs we need to find a counter example where 1-WL cannot distinguish the entire multiset of -vertex subgraphs. In this work, we were not able to find such example for large enough , i.e. . Thus, we next state what we name the WL reconstruction conjecture.
For as the set of all -size subsets of , let be the disjoint union of all -vertex subgraphs of . Then, there exists some such that if is uniquely identifiable by 1-WL, is.
If Conjecture 2 holds, GNNs -Reconstruction GNNs.
F.8 Proof of Theorem 3
We start by extending the Invariance Lemma [24, Lemma 4.1] to our context in Lemma 7.
Let be an arbitrary -hereditary property and as in Theorem 3. now, let . Then:
By the law of total expectation, .
Note that the covariance matrices of and any of its subgraphs are equal, i.e., . Thus, by the law of total covariance,
Let us first define three risk estimators:
Now, we leverage Lemma 7. By mapping \phi_{{\bf W}_{2}}\Big{(}h_{{\bf W}_{3}}^{\text{GNN}}(G[S])\Big{)} to and 1/|{\mathcal{S}}^{(k)}|\sum_{S\in{\mathcal{S}}^{(k)}}l\big{(}\phi_{{\bf W}_{2}}\Big{(}h_{{\bf W}_{3}}^{\text{GNN}}(G[S])\Big{)},y_{i}\big{)} to , from iii) we get that
Since is convex in the first argument, we apply Jensen’s inequality and arrive at
Appendix G Details on Experiments and Architectures
In the following, we give details on the experiments.
To show how the expressiveness of GNNs is not an obstacle in real-world tasks, we tested if the -WL can distinguish each pair of non-isomorphic graphs in every dataset used in Section 5. We go further and ignore vertex and edge features in the test, showing how only the graphs’ topology is enough for GNNs to distinguish of the graphs in each dataset. Results are shown in Table 3.
G.2 Architectures.
In the following, we outline details on the used GNN architectures.
GIN. Below we specify the architecture together with its -Reconstruction GNN version for each dataset.
zinc: We used the exact same architecture as used in Morris et al., 2020b . Its reconstruction versions used a Deep Sets function with mean pooling with three hidden layers before the pooling and two after it. All hidden layers are of the same size as the GNN layers.
alchemy: We used the exact same architecture as used in Morris et al., 2020b . Its reconstruction versions used a Deep Sets function with mean pooling with one hidden layer before the pooling and three after it. All hidden layers are of the same size as the GNN layers.
ogbg-molhiv: We used the exact same architecture as used in Hu et al., . Its reconstruction versions used a Deep Sets function with mean pooling with no hidden layer before the pooling and two after it. Additionally, a dropout layer before the output layer. All hidden layers are of the same size as the GNN layers.
ogbg-moltoxcast: We used the exact same architecture as used in Hu et al., . Its reconstruction versions used a Deep Sets function with mean pooling with no hidden layer before or after it.
ogbg-molfreesolv: We used the exact same architecture as used in Hu et al., , with the exception of using their jumping knowledge layer, which yielded better validation and test results. Its reconstruction versions used a Deep Sets function with mean pooling with no hidden layer before or after it.
ogbg-mollipo: We used the exact same architecture as used in Hu et al., , with the exception of using their jumping knowledge layer, which yielded better validation and test results. Its reconstruction versions used a Deep Sets function with mean pooling with no hidden layer before and three after it. All hidden layers are of the same size as the GNN layers.
ogbg-molpcba: We used the exact same architecture as used in Hu et al., . Its reconstruction versions used a Deep Sets function with mean pooling with one hidden layer before the pooling and no after it. All hidden layers are of the same size as the GNN layers.
csl: We used the exact same architecture as used in Dwivedi et al., . Its reconstruction versions used a Deep Sets function with mean pooling with no hidden layer before the pooling and one after it. All hidden layers are of the same size as the GNN layers (110 neurons).
multitask: Same as csl, but with hidden layers of size 300.
4,6,8 cycles: We used the same GIN architecture from csl, with the difference of using one hidden layer and two after the aggregation in the Deep Sets architecture. Additionally, a dropout layer before the output layer. All hidden layers are of the same size as the GNN layers, i.e. 300.
GCN. We used the exact same architectures from GIN for each dataset with the only change being the convolution (aggregation) layer, here we used the GCN layer from Kipf and Welling, instead of GIN.
PNA. Below we specify the architecture together with its -Reconstruction GNN version for each dataset.
zinc: We used the exact same architecture from Corso et al., . Its reconstruction versions used a Deep Sets function with mean pooling with one hidden layer before the pooling and three after it. All hidden layers have 25 hidden units.
alchemy: We used the exact same architecture used for zinc in Corso et al., . Its reconstruction versions used a Deep Sets function with mean pooling with one hidden layer before the pooling and three after it. All hidden layers have 25 hidden units.
ogbg-molhiv: We used the exact same architecture as used in Corso et al., . Its reconstruction versions used a Deep Sets function with mean pooling with one hidden layer before the pooling and three after it. In the original PNA model the hidden layers after vertex pooling are of sizes 70, 35 and 17. We replaced them so all have 70 hidden units and put the layers after the subgraph pooling with sizes 70, 35 and 17.
ogbg-molfreesolv: We used the exact same architecture used for ogbg-molhiv in Corso et al., . Its reconstruction versions used a Deep Sets function with mean pooling with no hidden layer before or after the pooling.
ogbg-molpcba: We used the exact same architecture used for ogbg-molhiv in Corso et al., . Its reconstruction versions used a Deep Sets function with mean pooling with no hidden layer before and two after the pooling. Additionally, a dropout layer before the output layer. All hidden units are of size 510, with exception of the two hidden layers in Deep Sets that had 255 and 127 neurons.
multitask: We used the exact same architecture from in Corso et al., . Its reconstruction versions used a Deep Sets function with mean pooling with no hidden layer before and two after the pooling. All hidden units are of size 16.
4,6,8 cycles: We used the exact same architecture from in Corso et al., , with the difference of a sum pooling instead of a Set2Set pooling for the readout function in PNA. Its reconstruction versions used a Deep Sets function with mean pooling with no hidden layer before and two after the pooling. Additionally, a dropout layer before the output layer. All hidden units are of size 16.
G.3 Experimental setup.
As mentioned in Section 5, we retain training procedures and evaluation metrics from the original GNN works . We highlight how csl is the only dataset with a -fold cross validation (with ) as originally proposed in . In Table 4, we highlight the number of subgraph samples used for training and testing each -Reconstruction GNN archictecture for every dataset, our only new hyperparameter introduced. Note that for test, for what is not specified in Table 4 we use 200 samples or compute exactly (if number of subgraphs 200) for all architectures in all datasets..
Implementation. All models were implemented in PyTorch Geometric using NVidia GeForce 1080 Ti GPUs.
Appendix H Datasets
In Table 5, we show some basic statistics from the datasets used in Section 5.
Appendix I Additional results
The attentive reader might wonder how sampling subgraphs impacts the training of the models. More precisely, how does sampling subgraphs affect the convergence and the accuracy of models? To provide insights in this matter, we show results for -Reconstruction GIN in the alchemy dataset. Figure 3 shows the average number of epochs taken to converge and the training loss at convergence. We note that the training converges faster to a larger loss for a very small sample size, e.g., 1 and 3. Sample sizes of 8 and 15 are already sufficient to converge to approximately the training loss with the exact model. Note that 15 is already the average graph size in the dataset. Thus it has a very similar behavior as the exact model. For a sample size of 8, the model takes 21% more epochs to converge to the same training loss as the exact. Note, however, that using subgraph samples uses a fixed amount of GPU memory independently of the maximum graph size in the dataset.
Appendix J Result Analysis
Such results are a consequence of the benefits of -Reconstruction GNNs highlighted in Theorem 1. That is, when we remove vertices we transform cycles into paths and trees, graphs easily recognizable by GNNs. By reconstructing the original cycle from its subgraphs, we are able to solve the tasks. Moreover, reconstruction is also able to make GNNs solve the multitask of determining a graph’s connectivity, diameter and spectral radius. When we remove a vertex (or a connected subgraph) from a graph, we expect to change only the representation of vertices in its connected component, thus, by inspecting unchanged representations we can determine connectivity and solve the task. The help of reconstruction in solving graph diameter and spectral radius is a bit less direct. The first is related to shortest path lengths and the latter to the number of walks of size on the graph. When we remove vertices, we alter vertex representations. The way these representations are changed are affected by both shortest path lengths and number of walks. Thus, by measuring the change in representations, reconstruction can better capture these metrics. Finally, we observe that opposed to Ring-GNN, PPGN and Positional GIN, -Reconstruction GNNs is the only method consistently solving the tasks while maintaining the most important feature of graph representations, i.e., invariance to vertex permutations.