Weisfeiler and Leman Follow the Arrow of Time: Expressive Power of Message Passing in Temporal Event Graphs
Authors: Franziska Heeg, Jonas Sauer, Petra Mutzel, Ingo Scholtes
Organizations: Chair of Machine Learning for Complex Networks, Center for AI and Data Science (CAIDAS), University of Würzburg, Würzburg, Germany · Karlsruhe Institute of Technology, University of Karlsruhe, Karlsruhe, Germany · Chair of Computational Analytics, Institute for Computer Science 1, University of Bonn, Bonn, Germany
An important characteristic of temporal graphs is how the directed arrow of time influences their causal topology, i.e., which nodes can possibly influence each other causally via time-respecting paths. The resulting patterns are often neglected by temporal graph neural networks (TGNNs). To formally analyze the expressive power of TGNNs, we lack a generalization of graph isomorphism to temporal graphs that fully captures their causal topology. Addressing this gap, we introduce the notion of consistent event graph isomorphism, which utilizes a time-unfolded representation of time-respecting paths in temporal graphs. We compare this definition with existing notions of temporal graph isomorphisms. We illustrate and highlight the advantages of our approach and develop a temporal generalization of the Weisfeiler-Leman algorithm to heuristically distinguish non-isomorphic temporal graphs. Building on this theoretical foundation, we derive a novel message passing scheme for temporal graph neural networks that operates on the event graph representation of temporal graphs. An experimental evaluation shows that our approach performs well in a temporal graph classification experiment.
Figures & tables
Figure 1: A temporal graph Gτ (left) and the corresponding augmented event graph Gaug (right). In Gaug , gray nodes have label 0 and white nodes have label 1 . Timestamped edges (u,v;t) are represented as nodes uvt .
Figure 2: Example illustrating different temporal graph isomorphism definitions for maximum waiting time δ=2 . Edges are labeled with timestamps. G1 is time-concatenated isomorphic to G2 , consistent event graph isomorphic to G2 and G3 , and time-aggregated isomorphic to G2 , G3 and G4 .
Data
Our Model
GAT
TGAT
TGN
CAW
PINT
ants-1-1
[ 3 ]
1.00 ± 0.00
0.52±0.04
0.54±0.05
0.86±0.03
0.94±0.01
0.86±0.03
ants-1-2
[ 3 ]
1.00 ± 0.00
0.54±0.02
0.54±0.04
0.85±0.03
0.91±0.02
0.83±0.04
sp-workplace
[ 7 ]
1.00 ± 0.00
0.53±0.03
0.55±0.04
0.75±0.04
0.92±0.02
0.83±0.04
sp-hospital
[ 30 ]
1.00 ± 0.00
0.53±0.04
0.55±0.03
0.75±0.04
0.98±0.01
0.95±0.01
eu-email-dept2
[ 20 ]
1.00 ± 0.00
0.54±0.07
0.52±0.03
0.74±0.04
0.76±0.03
0.91±0.02
Table 1: Mean accuracy for binary classification in real-world temporal graphs. For each dataset, we split the timeline into windows of 500 timestamps, generate 400 graphs per window via the shuffling procedures ( Appendix E ), performed 10 runs per window, and report the average over all runs.
Figure 3: Mean classification accuracy for temporal graphs generated with σ1 vs. σ2 (25 runs each).
Appendix figures & tables12 assets
Supplementary material from the paper’s appendix.
Appendix
Figure 4: The temporal graph Gτ (left) and corresponding augmented event graph Gaug (center) from Figure 1 , as well as the compressed augmented event graph Gcomp (right). In Gaug and Gcomp , gray nodes have label 0 and white nodes have label 1 . Timestamped edges (u,v;t) are represented as nodes uvt . In Gcomp , edge weights represent the number of connected components of Gaug in which the edge appears.
Figure 5: An example of two temporal graphs G1τ and G2τ which are consistent event graph isomorphic, but there is no node-consistent isomorphism between the compressed event graphs.
Dataset
∣V∣
∣E∣
∣Eτ∣
δ in sec.
ants-1-1
[ 3 ]
89
947
1,911
30
ants-1-2
[ 3 ]
72
862
1,820
30
sp-workplace
[ 7 ]
92
755
9,827
3,600
sp-hospital
[ 30 ]
75
1,139
32,424
3,600
eu-email-dept2
[ 20 ]
162
1,772
46,772
3,600
Appendix
Table 2: Statistics of empirical temporal graphs used in our evaluation. ∣V∣ is the number of nodes, ∣Eτ∣ the number of timestamped edges, and δ the maximum waiting time used to construct the augmented event graph.
Our model
GAT
batch size
200
50
weight_decay
0.0001
0
learning rate
0.001
0.001
DirGNN layers
32 → 16 → 8
–
GatConv layers
–
8 → 64 → 64
dense layers
8 → 4 → 1
64 → 1
Appendix
Table 3: Optimal hyperparameter values and number of tunable model parameters (i.e., model size) for our model and GAT.
ants-1-1
ants-1-2
workplace
hospital
eu-email-dept2
batch size
1
1
1
1
1
weight decay
0
0
0
0
0
learning rate
0.001
0.001
0.01
0.001
0.001
layers
64 → 128 → 1
64 → 128 → 64 → 1
64 → 128 → 1
64 → 128 → 1
64 → 128 → 64 → 1
aggr. node embeddings
mean
-
-
mean
-
pooling
-
-
-
-
max
Appendix
Table 4: Optimal hyperparameter values and number of tunable model parameters for CAW.
ants-1-1
ants-1-2
workplace
hospital
eu-email-dept2
batch size
1
1
1
1
1
weight decay
0
0
0
0
0
learning rate
0.001
0.001
0.01
0.001
0.001
layers
64 → 128 → 1
64 → 128 → 64 → 1
64 → 128 → 1
64 → 128 → 1
64 → 128 → 64 → 1
aggr. node embeddings
mean
-
mean
-
-
pooling
-
-
max
-
-
Appendix
Table 5: Optimal hyperparameter values and number of tunable model parameters for PINT.
ants-1-1
ants-1-2
workplace
hospital
eu-email-dept2
batch size
1
1
1
1
1
weight decay
0
0
0
0
0
learning rate
0.01
0.001
0.001
0.01
0.001
layers
64 → 128 → 1
64 → 128 → 1
64 → 128 → 1
64 → 128 → 1
64 → 128 → 1
aggregation node embeddings
mean
mean
last
mean
mean
pooling
-
max
max
max
max
Appendix
Table 6: Optimal hyperparameter values and number of tunable model parameters for TGAT.
ants-1-1
ants-1-2
workplace
hospital
eu-email-dept2
batch size
1
1
1
1
1
weight decay
0
0
0
0
0
learning rate
0.001
0.001
0.001
0.001
0.001
layers
64 → 128 → 1
64 → 128 → 1
64 → 128 → 1
64 → 128 → 1
64 → 128 → 1
aggregation node embeddings
-
-
-
mean
-
pooling
max
mean
mean
-
max
Appendix
Table 7: Optimal hyperparameter values and number of tunable model parameters for TGN.
Library/Software
Version
CUDA
cu121
torch
2.4.1+cu121
torch_cluster
1.6.3+pt24cu121
torch_scatter
2.1.2+pt24cu121
torch_sparse
0.6.18+pt24cu121
torch_geometric
2.5.1
Appendix
Table 8: Version of key dependencies used in the implementation of our experimental evaluation
Figure 6: Standard deviation of accuracies of our TGNN model for classification of temporal graphs with σ1 vs. σ2 for all pairs of σ1,σ2 (associated with Figure 3 ).
Figure 7: Mean accuracies of a GAT model on the time-concatenated static graph for classification of temporal graphs with σ1 vs. σ2 for all pairs of σ1,σ2 . The mean standard deviation across all runs is 0.048 .
Experiment
Accuracy
Compressed augmented event graph
0.95 ± 0.03
No node labels
0.66 ± 0.20
Message passing only in one direction
0.63 ± 0.18
No edge weights
0.81 ± 0.22
Appendix
Table 9: Results of ablation study for the classification task in the synthetic cluster model, using σ1=0 and σ2=0.9 .
Temporal graph neural networks model how node relationships, graph structure, and features change over time to support prediction on evolving networks.
Oct 17, 2026·Yue Dai, Sarah Zhou, Youtao ZhangTemporal GNNs
Department of Computer Science, Illinois Institute of Technology, Chicago, USA · BASIS Independent Silicon Valley, San Jose, CA, USA · Department of Computer Science, University of Pittsburgh, Pittsburgh, USA