
Weisfeiler–Lehmann goes Dynamic
applications and models have been proposed, including Neu-
ral Networks for graphs [
5
], Gated Sequence Graph Neural
Networks [
6
], Spectral Networks [
7
], Graph Convolutional
Neural Networks [
8
], GraphSAGE [
9
], Graph Attention
Networks [
10
], and Graph Networks [
11
]. Another extension
of GNNs consisted of the proposal of several new models
capable of dealing with dynamic graphs [
2
], which can be
used, e.g., to classify sequences of graphs, sequences of nodes
in a dynamic graph or to predict the appearance of an edge
in a dynamic graph.
Recently, a great effort has been dedicated to studying the
theoretical properties of GNNs [
12
]. Such a trend is motivated
by the attempt to derive the foundational knowledge required
to design reasonable solutions efficiently for many possible
applications of GNNs [
13
]. A particular interest lies in the
study of the expressive power of GNN models since, in many
application domains, the performance of a GNN depends on
its capability to distinguish different graphs. For example, in
Bioinformatics, the properties of a chemical molecule may
depend on the presence or absence of small substructures;
in social network analysis, the count of triangles allows us
to evaluate the presence and the maturity of communities.
Similar examples exist in dynamic domains: the distinction
of substructures contributes significantly to the successful
analysis of molecular conformations [
14
]; in studies of the
evolution of social networks [
15
], substructures in the form
of contextual knowledge can help to improve performance.
Formally, a central result on the expressive power of
GNNs has shown that GNNs are at most as powerful as the
Weisfeiler–Lehman graph isomorphism test (1–WL) [
16
,
17
,
18
]. The 1–WL test iteratively divides graphs into groups
of possibly isomorphic
2
graphs using a local aggregation
schema. Therefore, the 1–WL test exactly defines the classes
of graphs that GNNs can recognize as non-isomorphic.
Furthermore, it has been proven that the equivalence
classes induced by the 1–WL test are equivalent to the ones
obtained from the unfolding trees of nodes on two graphs [
19
]
[
20
], and hence, 1–WL and the unfolding equivalences can
be used interchangeably. An unfolding tree rooted at a node
is constructed by starting at the root node and unrolling the
graph along the neighboring nodes until it reaches a certain
depth. If the unfolding trees of two nodes are equal in the
limit, the nodes are called unfolding tree equivalent
3
. Fig. 1
visualizes the relations between the 1–WL, the unfolding tree
equivalences, and the GNN expressiveness.
Another research goal of the expressive power of GNNs
is to study the GNN approximation capability. Formally, it
has been proven in [
22
] that OGNNs can approximate in
probability, up to any degree of precision, any measurable
function
𝜏(𝐆, 𝑣)→ℝ𝑚
that respects the unfolding equiva-
lence. Such a result has been recently extended to a large
2
It is worth noting that the 1–WL test is inconclusive since there exist
pairs of graphs that the test recognizes as isomorphic even if they are not.
3
Currently, the concept underlying unfolding trees is widely used to
study the GNN expressiveness, even if they are mostly called
computation
graphs [21].
AUT
1-AWL
SGNN
Thm. 4.1.6
Thm. 5.1.3
Ring
Closure
a)
DUT
1-DWL
DGNN
Thm. 4.2.5
Thm. 5.2.4
Ring
Closure
b)
Figure 1: a) In Thm. 4.1.6, we prove the equivalence of
the attributed unfolding tree equivalence (AUT) and the
attributed 1–WL equivalence (1–AWL) for SAUHGs. Afterward
in Thm. 5.1.3, 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.
class of GNNs [
20
] called message-passing GNNs, including
most contemporary architectures.
Despite the availability of the mentioned results on the
expressive power of GNNs, their application is still limited
to undirected static graphs with attributes on nodes. This
limitation is particularly restrictive since modern applica-
tions usually involve more complex data structures, such as
heterogeneous, directed, dynamic graphs and multigraphs.
In particular, the ability to process dynamic graphs is pro-
gressively gaining significance in many fields such as social
network analysis [
15
], recommender systems [
23
,
24
], traffic
forecasting [
25
] and knowledge graph completion [
26
,
27
].
Several surveys discuss the usage of dynamic graphs in other
application domains [1,28,29,30,31].
Although GNNs are considered universal approximators
on the extended domains, it is uncertain which GNN archi-
tectures contribute to such universality. Moreover, an open
question is how the definition of the 1–WL test has to be
modified to cope with novel data structures and whether the
universal results fail for particular graph types.
In this paper, we propose a study on the expressive power
of GNNs for two domains of particular interest, namely
dynamic graphs and static attributed undirected homogeneous
graphs (SAUHGs) with node and edge attributes. On the
one hand, dynamic graphs are interesting from a practical
and a theoretical point of view and are used in several
application domains [
2
]. Moreover, dynamic GNN models
are structurally different from GNNs for static graphs, and the
results and methodology required to analyze their expressive
power cannot directly be deduced from existing literature.
On the other hand, SAUHGs with node and edge attributes
are interesting because, as mentioned above, they act as a
standard form for several other types of graphs that can all
be transformed to SAUGHs [3].
First, we introduce appropriate versions of the 1–WL test
and the unfolding equivalence to construct the fundamental
theory for the domains of SAUHGs and dynamic graphs
and discuss their relation afterward. Then, we consider
generic GNN models that can operate on both domains
and prove their universal approximation capability modulo
Beddar-Wiesing et al.: Preprint submitted to Elsevier Page 2 of 22