Table of Contents
Fetching ...

Weisfeiler-Lehman goes Dynamic: An Analysis of the Expressive Power of Graph Neural Networks for Attributed and Dynamic Graphs

Silvia Beddar-Wiesing, Giuseppe Alessio D'Inverno, Caterina Graziani, Veronica Lachi, Alice Moallemy-Oureh, Franco Scarselli, Josephine Maria Thomas

TL;DR

The paper extends the expressivity analysis of Graph Neural Networks beyond Static Attributed Undirected Homogeneous Graphs (SAUHGs) to dynamic graphs and SAUHGs with edge attributes, using Weisfeiler–Lehman (1-WL) and unfolding-tree frameworks. It introduces attributed dynamic and static unfoldings, proves equivalences between unfolding-tree and WL notions in both static and dynamic domains, and establishes universal approximation theorems for SGNNs and DGNNs modulo those equivalences (with a depth bound of $2N-1$ iterations). The authors provide a constructive space-partitioning approach and define universal components, showing DGNNs can approximate any dynamic unfolding-equivalence-preserving function via SGNNs plus a recurrent module. Experimental validation on synthetic dynamic graphs confirms the theory, showing high training accuracy across DGNN variants and highlighting the importance of expressive modules for capturing unfolding/WL distinctions. These results offer a principled foundation for designing GNNs that operate on complex graph types in practice, including dynamic and edge-attributed structures.

Abstract

Graph Neural Networks (GNNs) are a large class of relational models for graph processing. Recent theoretical studies on the expressive power of GNNs have focused on two issues. On the one hand, it has been proven that GNNs are as powerful as the Weisfeiler-Lehman test (1-WL) in their ability to distinguish graphs. Moreover, it has been shown that the equivalence enforced by 1-WL equals unfolding equivalence. On the other hand, GNNs turned out to be universal approximators on graphs modulo the constraints enforced by 1-WL/unfolding equivalence. However, these results only apply to Static Attributed Undirected Homogeneous Graphs (SAUHG) with node attributes. In contrast, real-life applications often involve a much larger variety of graph types. In this paper, we conduct a theoretical analysis of the expressive power of GNNs for two other graph domains that are particularly interesting in practical applications, namely dynamic graphs and SAUGHs with edge attributes. Dynamic graphs are widely used in modern applications; hence, the study of the expressive capability of GNNs in this domain is essential for practical reasons and, in addition, it requires a new analyzing approach due to the difference in the architecture of dynamic GNNs compared to static ones. On the other hand, the examination of SAUHGs is of particular relevance since they act as a standard form for all graph types: it has been shown that all graph types can be transformed without loss of information to SAUHGs with both attributes on nodes and edges. This paper considers generic GNN models and appropriate 1-WL tests for those domains. Then, the known results on the expressive power of GNNs are extended to the mentioned domains: it is proven that GNNs have the same capability as the 1-WL test, the 1-WL equivalence equals unfolding equivalence and that GNNs are universal approximators modulo 1-WL/unfolding equivalence.

Weisfeiler-Lehman goes Dynamic: An Analysis of the Expressive Power of Graph Neural Networks for Attributed and Dynamic Graphs

TL;DR

The paper extends the expressivity analysis of Graph Neural Networks beyond Static Attributed Undirected Homogeneous Graphs (SAUHGs) to dynamic graphs and SAUHGs with edge attributes, using Weisfeiler–Lehman (1-WL) and unfolding-tree frameworks. It introduces attributed dynamic and static unfoldings, proves equivalences between unfolding-tree and WL notions in both static and dynamic domains, and establishes universal approximation theorems for SGNNs and DGNNs modulo those equivalences (with a depth bound of iterations). The authors provide a constructive space-partitioning approach and define universal components, showing DGNNs can approximate any dynamic unfolding-equivalence-preserving function via SGNNs plus a recurrent module. Experimental validation on synthetic dynamic graphs confirms the theory, showing high training accuracy across DGNN variants and highlighting the importance of expressive modules for capturing unfolding/WL distinctions. These results offer a principled foundation for designing GNNs that operate on complex graph types in practice, including dynamic and edge-attributed structures.

Abstract

Graph Neural Networks (GNNs) are a large class of relational models for graph processing. Recent theoretical studies on the expressive power of GNNs have focused on two issues. On the one hand, it has been proven that GNNs are as powerful as the Weisfeiler-Lehman test (1-WL) in their ability to distinguish graphs. Moreover, it has been shown that the equivalence enforced by 1-WL equals unfolding equivalence. On the other hand, GNNs turned out to be universal approximators on graphs modulo the constraints enforced by 1-WL/unfolding equivalence. However, these results only apply to Static Attributed Undirected Homogeneous Graphs (SAUHG) with node attributes. In contrast, real-life applications often involve a much larger variety of graph types. In this paper, we conduct a theoretical analysis of the expressive power of GNNs for two other graph domains that are particularly interesting in practical applications, namely dynamic graphs and SAUGHs with edge attributes. Dynamic graphs are widely used in modern applications; hence, the study of the expressive capability of GNNs in this domain is essential for practical reasons and, in addition, it requires a new analyzing approach due to the difference in the architecture of dynamic GNNs compared to static ones. On the other hand, the examination of SAUHGs is of particular relevance since they act as a standard form for all graph types: it has been shown that all graph types can be transformed without loss of information to SAUHGs with both attributes on nodes and edges. This paper considers generic GNN models and appropriate 1-WL tests for those domains. Then, the known results on the expressive power of GNNs are extended to the mentioned domains: it is proven that GNNs have the same capability as the 1-WL test, the 1-WL equivalence equals unfolding equivalence and that GNNs are universal approximators modulo 1-WL/unfolding equivalence.
Paper Structure (22 sections, 15 theorems, 73 equations, 5 figures)

This paper contains 22 sections, 15 theorems, 73 equations, 5 figures.

Key Result

Lemma 4.1.5

Consider $G' = (\mathcal{V}', \mathcal{E}' , \alpha', \omega')$ as the SAUHG resulting from a transformation of an arbitrary static graph $G = (\mathcal{V}, \mathcal{E} , \alpha, \omega)$ with nodes $u, v \in \mathcal{V}$ and corresponding attributes $\alpha_u, \alpha_v$. Then it holds

Figures (5)

  • Figure 1: a) In Thm. \ref{['ue=wl']}, we prove the equivalence of the attributed unfolding tree equivalence (AUT) and the attributed 1--WL equivalence (1--AWL) for SAUHGs. Afterward in Thm. \ref{['theorem_universal_approx_sauhg']}, we show a result on the approximation capability of static GNNs for SAUHGs (SGNN) using the AUT equivalence. b) Analogously to the attributed case, we show similar results for Dynamic GNNs (DGNN) which can be used on temporal graphs.
  • Figure 2: Illustration of the statification of a dynamic graph. On the left, the temporal evolution of a graph, including non-existent nodes and edges (gray), is given, and on the right, the corresponding statified graph with the total amount of nodes and edges together with the concatenated attributes is shown.
  • Figure 3: Unfolding tree recursive construction
  • Figure 4: The four static graphs are used as components to generate the synthetic dataset. Graphs a) and b) are equivalent under the static 1--WL test; the same holds for c) and d).
  • Figure 7: The ATTACH operator on trees.

Theorems & Definitions (49)

  • Definition 3.1: Static Attributed Undirected Homogeneous Graphs
  • Remark 3.2
  • Definition 3.3: Dynamic Graph
  • Definition 3.4: SGNN
  • Definition 3.5: Discrete DGNN
  • Remark 3.6
  • Definition 3.7: Graph Isomorphism
  • Definition 4.1.1: Attributed Unfolding Tree
  • Definition 4.1.2: Attributed Unfolding Equivalence
  • Definition 4.1.3: Attributed 1-WL test
  • ...and 39 more