Provably expressive temporal graph networks
Abstract
Temporal graph networks (TGNs) have gained prominence as models for embedding dynamic interactions, but little is known about their theoretical underpinnings.
We establish fundamental results about the representational power and limits of the two main categories of TGNs: those that aggregate temporal walks (WA-TGNs), and those that augment local message passing with recurrent memory modules (MP-TGNs).
Specifically, novel constructions reveal the inadequacy of MP-TGNs and WA-TGNs, proving that neither category subsumes the other.
We extend the 1-WL (Weisfeiler-Leman) test to temporal graphs, and show that the most powerful MP-TGNs should use injective updates, as in this case they become as expressive as the temporal WL.
Also, we show that sufficiently deep MP-TGNs cannot benefit from memory, and MP/WA-TGNs fail to compute graph properties such as girth.
These theoretical insights lead us to PINT — a novel architecture that leverages injective temporal message passing and relative positional features. Importantly, PINT is provably more expressive than both MP-TGNs and WA-TGNs.
PINT significantly outperforms existing TGNs on several real-world benchmarks.
Introduction
Graph neural networks (GNNs) [11, 30, 36, 39] have recently led to breakthroughs in many applications [7, 28, 31] by resorting to message passing between neighboring nodes in input graphs.
While message passing imposes an important inductive bias, it does not account for the dynamic nature of interactions in time-evolving graphs arising from many real-world domains such as social networks and bioinformatics [16, 40].
In several scenarios, these temporal graphs are only given as a sequence of timestamped events.
Recently, temporal graph nets (TGNs) [16, 27, 32, 38, 42] have emerged as a prominent learning framework for temporal graphs and have become particularly popular due to their outstanding predictive performance.
Aiming at capturing meaningful structural and temporal patterns, TGNs combine a variety of building blocks, such as self-attention [33, 34], time encoders [15, 41], recurrent models [5, 13], and message passing [10].
Unraveling the learning capabilities of (temporal) graph networks is imperative to understanding their strengths and pitfalls, and designing better, more nuanced models that are both theoretically well-grounded and practically efficacious.
For instance, the enhanced expressivity of higher-order
GNNs has roots in the inadequacy of standard message-passing GNNs to separate graphs that are indistinguishable by the Weisfeiler-Leman isomorphism test, known as 1-WL test or color refinement algorithm [21, 22, 29, 37, 43].
Similarly, many other notable advances on GNNs were made possible by untangling their ability to generalize [9, 17, 35], extrapolate [45], compute graph properties [4, 6, 9], and express Boolean classifiers [1]; by uncovering their connections to distributed algorithms [19, 29], graph kernels [8], dynamic programming [44], diffusion processes [3], graphical models [46], and combinatorial optimization [2]; and by analyzing their discriminative power [20, 23].
In stark contrast, the theoretical foundations of TGNs remain largely unexplored.
For instance, unresolved questions include: How does the expressive power of existing TGNs compare?
When do TGNs fail?
Can we improve the expressiveness of TGNs?
What are the limits on the power of TGNs?
PINT
CAW InjectiveMP-TGNs
S O T A M P - T G N s
Open problems
Relationship between CTDGs and DTDGs
Prop.
Injective MP-TGNs ⪰ MP-TGNs
Prop.
Sufficiently deep MP-TGNs do not need memory
Prop.
SOTA MP-TGNs ≺ Injective MP-TGNs
Prop.
MP-TGNs ̸≻ WA-TGNs and WA-TGNs ̸≻ MP-TGNs
Prop.
Injective MP-TGNs ∼ = temporal-WL test
Prop.
MP-TGNs/CAWs cannot recognize graph properties
Prop.
Constructing injective temporal MP
Prop.
PINT (ours) ≻ both MP-TGNs and WA-TGNs
Prop.
Limitations of PINT
Prop.
We establish a series of results to address these fundamental questions.
We begin by showing that discrete-time dynamic graphs (DTDGs) can always be converted to continuous-time analogues (CTDGs) without loss of information, so we can focus on analyzing the ability of TGNs to distinguish nodes/links of CTDGs.
We consider a general framework for message-passing TGNs (MP-TGNs) [27] that subsumes a wide variety of methods [e.g., 16, 32, 42].
We prove that equipping MP-TGNs with injective aggregation and update functions leads to the class of most expressive anonymous MP-TGNs (i.e., those that do not leverage node ids).
Extending the color-refinement algorithm to temporal settings, we show that these most powerful MP-TGNs are as expressive as the temporal WL method.
Notably, existing MP-TGNs do not enforce injectivity.
We also delineate the role of memory in MP-TGNs: nodes in a network with only a few layers of message passing fail to aggregate information from a sufficiently wide receptive field (i.e., from distant nodes), so memory serves to offset this highly local view with additional global information.
In contrast, sufficiently deep architectures obviate the need for memory modules.
Different from MP-TGNs, walk-aggregating TGNs (WA-TGNs) such as CAW [38] obtain representations from anonymized temporal walks.
We provide constructions that expose shortcomings of each framework, establishing that WA-TGNs can distinguish links in cases where MP-TGNs fail and vice-versa.
Consequently, neither class is more expressive than the other.
Additionally, we show that
MP-TGNs and CAWs cannot decide temporal graph properties such as diameter, girth, or number of cycles.
Strikingly, our analysis unravels the subtle relationship between the walk computations in CAWs and the MP steps in MP-TGNs.
Equipped with these theoretical insights, we propose PINT (short for position-encoding injective temporal graph net ), founded on a new temporal layer that leverages the strengths of both MP-TGNs and WA-TGNs.
Like the most expressive MP-TGNs, PINT defines injective message passing and update steps.
PINT also augments memory states with novel relative positional features, and these features can replicate all the discriminative benefits available to WA-TGNs.
Interestingly, the time complexity of computing our positional features is less severe than the sampling overhead in CAW, thus PINT can often be trained faster than CAW.
Importantly, we establish that PINT is provably more expressive than CAW as well as MP-TGNs.
Our contributions are three-fold:
• a rigorous theoretical foundation for TGNs is laid - elucidating the role of memory, benefits of injective message passing, limits of existing TGN models, temporal extension of the 1-WL test and its implications, impossibility results about temporal graph properties, and the relationship between main classes of TGNs — as summarized in Figure 1; • explicit injective temporal functions are introduced, and a novel method for temporal graphs is proposed that is provably more expressive than state-of-the-art TGNs; • extensive empirical investigations underscore practical benefits of this work.
The proposed method is either competitive or significantly better than existing models on several real benchmarks
for dynamic link prediction, in transductive as well as inductive settings.
Preliminaries
We denote a static graph G as a tuple ( V, E, X , E ) , where V = { 1 , 2 , . . .
, n } denotes the set of nodes and E ⊆
V × V the set of edges.
Each node u ∈ V has a feature vector x u ∈ X and each edge ( u, v ) ∈
E has a feature vector e uv ∈ E , where X and E are countable sets of features.
Dynamic graphs can be roughly split according to their discrete- or continuous-time nature [14].
A discrete-time dynamic graph (DTDG) is of a sequence of graph snapshots ( G 1 , G 2 , . . . )
usually sampled at regular intervals, each snapshot being a static graph G t
= ( V t , E t , X t , E t ) .
A continuous-time dynamic graph (CTDG) evolves with node- and edge-level events , such as addition and deletion.
We represent a CTDG as a sequence of time-stamped multi-graphs ( G ( t 0 ) , G ( t 1 ) , . . . )
such that t k < t k +1 , and G ( t k +1 ) results from updating G ( t k ) with all events at time t k +1 .
We assume no event occurs between t k and t k +1 .
We denote an interaction (i.e., edge addition event) between nodes u and v at time t as a tuple ( u, v, t ) associated with a feature vector e uv ( t ) .
Unless otherwise stated, interactions correspond to undirected edges, i.e., ( u, v, t ) is a shorthand for ( { u, v } , t ) .
Noting that CTDGs allow for finer (irregular) temporal resolution, we now formalize the intuition that
DTDGs can be reduced to and thus analyzed as CTDGs, but the converse may need extra assumptions.
Proposition 1 (Relationship between DTDG and CTDG) .
For any DTDG we can build a CTDG with the same sets of node and edge features that contains the same information, i.e., we can reconstruct the original DTDG from the converted CTDG.
The converse holds if the CTDG timestamps form a subset of a uniformly spaced countable set.
Following the usual practice [16, 38, 42], we focus on CTDGs with edge addition events (see
Appendix E for a discussion on deletion).
Thus, we can represent temporal graphs as sets G ( t ) =
{ ( u k , v k , t k )
| t k < t } .
We also assume each distinct node v in G ( t ) has an initial feature vector x v .
Message-passing temporal graph nets (MP-TGNs).
Rossi et al.
[27] introduced MP-TGN as a general representation learning framework for temporal graphs.
The goal is to encode the graph dynamics into node embeddings, capturing information that is relevant for the task at hand.
To achieve this, MP-TGNs rely on three main ingredients: memory, aggregation, and update.
Memory comprises a set of vectors that summarizes the history of each node, and is updated using a recurrent model whenever an event occurs.
The aggregation and update components resemble those in messagepassing GNNs, where the embedding of each node is refined using messages from its neighbors.
We define the temporal neighbohood of node v at time t as N ( v, t ) =
{ ( u, e uv ( t ′ ) , t ′ ) | ∃ ( u, v, t ′ ) ∈
G ( t ) } , i.e., the set of neighbor/feature/timestamp triplets from all interactions of node v prior to t .
MP-TGNs compute the temporal representation h ( ℓ ) v ( t ) of v at layer ℓ by recursively applying
[Equation]
where {{·}} denotes multisets, h (0) v ( t )
=
s v ( t ) is the state of v at time t , and A GG ( ℓ ) and U PDATE ( ℓ ) are arbitrary parameterized functions.
The memory block updates the states as events occur.
Let
J ( v, t ) be the set of events involving v at time t .
The state of v is updated due to J ( v, t ) as
[Equation]
where s v (0) =
x v (initial node features), s v ( t + ) denotes the updated state of v due to events at time t , and t v denotes the time of the last update to v .
M EM A GG combines information from simultaneous events involving node v and M EM U PDATE usually implements a gated recurrent unit (GRU) [5].
Notably, some MP-TGNs do not use memory, or equivalently, they employ identity memory , i.e., s v ( t )
=
x v for all t .
We refer to Appendix A for further details.
Causal Anonymous Walks (CAWs).
Wang et al.
[38] proposed CAW as an approach for link prediction on temporal graphs.
To predict if an event ( u, v, t ) occurs, CAW first obtains sets S u and S v of temporal walks starting at nodes u and v at time t .
An ( L − 1) -length temporal walk is represented as W = (( w 1 , t 1 ) , ( w 2 , t 2 ) , . . .
, ( w L , t L )) , with t 1 > t 2 > · · · > t L and ( w i − 1 , w i , t i ) ∈ G ( t ) ∀ i > 1 .
Note that when predicting ( u, v, t ) , we have walks starting at time t 1 = t .
Then, CAW anonymizes walks replacing each node w with a set I CAW ( w ; S u , S v )
= { g ( w ; S u ) , g ( w ; S v ) } of two feature vectors. The ℓ -th entry of g ( w ; S u ) stores how many times w appears at the ℓ -th position in a walk of S u , i.e. g ( w, S u ) [ ℓ ] = |{ W ∈ S u : ( w, t ℓ ) = W ℓ }| where W ℓ is ℓ -th pair of W .
To encode a walk W with respect to the sets S u and S v , CAW applies E NC ( W ; S u , S v ) =
RNN([ f 1 ( I CAW ( w i ; S u , S v ))
∥ f 2 ( t i − 1 − t i )]
Li =1 ) where f 1 is a permutation-invariant function, f 2 is a time encoder, and t {+
 = t 1+} = t .
Finally, CAW combines the embeddings of each walk in S u ∪ S v using mean-pooling or self-attention to obtain the representation for the event ( u, v, t ) .
In practice, TGNs often rely on sampling schemes for computational reasons.
However we are concerned with the expressiveness of TGNs, so our analysis assumes complete structural information, i.e., S u is the set of all temporal walks from u and MP-TGNs combine information from all neighbors.
The representational power and limits of TGNs
We now study the expressiveness of TGNs on node/edge-level prediction.
We also establish connections to a variant of the WL test and show limits of specific TGN models.
Proofs are in Appendix B.
3.1 Distinguishing nodes with MP-TGNs
We analyze MP-TGNs w.r.t.
their ability to map different nodes to different locations in the embedding space.
In particular, we say that an L -layer MP-TGN distinguishes two nodes u, v of a temporal graph at time t , if the last layer embeddings of u and v are different
, i.e., h ( L ) u ( t ) ̸
= h ( L ) v ( t ) .
We can describe the MP computations of a node v at time t via its temporal computation tree (TCT)
T v ( t ) .
T v ( t ) has v as its root and height equal to the number of MP-TGN layers L .
We will keep the dependence on depth L implicit for notational simplicity.
For each element ( u, e, t ′ )
∈ N ( v, t ) associated with v , we have a node, say i , in the next layer of the TCT linked to the root by an edge annotated with ( e, t ′ ) .
The remaining TCT layers are built recursively using the same mechanism.
We denote by ♯ tv the (possibly many-to-one) operator that maps nodes in T v ( t ) back to nodes in G ( t ) , e.g., ♯ tv i = u .
Each node i in T v ( t ) has a state vector s i = s
♯ tv i ( t ) .
To get the embedding of the root v , information is propagated bottom-up, i.e., starting from the leaves all the way up to the root — each node aggregates the message from the layer below and updates its representation along the way.
Whenever clear from context, we denote ♯ tv simply as ♯ for a cleaner notation.
We study the expressive power of MP-TGNs through the lens of functions on multisets adapted to temporal settings, i.e., comprising triplets of node states, edge features, and timestamps.
Intuitively, injective functions ‘preserve’ the information as it is propagated, so should be essential for maximally expressive MP-TGNs.
We formalize this idea in Lemma 1 and Proposition 2 via Definition 1.
Definition 1 (Isomorphic TCTs) .
Two TCTs T z ( t ) and T z ′ ( t ) at time t are isomorphic if there is a bijection f : V ( T z ( t ))
→ V ( T z ′ ( t )) between the nodes of the trees such that the following holds: ( u, v, t ′ )
∈ E ( T z ( t ))
⇐⇒ ( f ( u ) , f ( v ) , t ′ )
∈ E ( T z ′ ( t ))
∀ ( u, v, t ′ )
∈ E ( T z ( t )) :
e uv ( t ′ )
=
e f ( u ) f
( v ) ( t ′ ) and ∀ u ∈ V
( T z ( t )) : s u
= s f ( u ) and k u = k f ( u )
Here, k u denotes the level (depth) of node u in the tree.
The root node has level 0 , and for a node u with level k u , the children of u have level k u + 1 .
Lemma 1.
If an MP-TGN Q with L layers distinguishes two nodes u, v of a dynamic graph G ( t ) , then the L -depth TCTs T u ( t ) and T v ( t ) are not isomorphic.
For non-isomorphic TCTs, Proposition 2 shows that improving MP-TGNs with injective message passing layers suffices to achieve node distinguishability, extending results from static GNNs [43].
Proposition 2 (Most expressive MP-TGNs) .
If the L-depth TCTs of two nodes u, v of a temporal graph G ( t ) at time t are not isomorphic, then an MP-TGN Q with L layers and injective aggregation and update functions at each layer is able to distinguish nodes u and v .
So far, we have considered TCTs with general memory modules, i.e., nodes are annotated with memory states.
However, an important question remains: How does the expressive power of MPTGNs change as a function of the memory ?
Our next result - Proposition 3 - shows that adding
GRU-based memory does not increase the expressiveness of suitably deep MP-TGNs.
Proposition 3 (The role of memory) .
Let Q [ M ] L denote the class of MP-TGNs with recurrent memory and L layers.
Similarly, we denote by Q L the family of memoryless MP-TGNs with L layers.
Let ∆ be the temporal diameter of G ( t ) (see Definition B2).
Then, it holds that:
If L < ∆ : Q [ M ] L is strictly more powerful than Q L in distinguishing nodes of G ( t ) ; 2.
For any L : Q L +∆ is at least as powerful as Q [ M ] L in distinguishing nodes of G ( t ) .
The MP-TGN framework is rather general and subsumes many modern methods for temporal graphs [e.g., 16, 32, 42].
We now analyze the theoretical limitations of two concrete instances of MP-TGNs:
TGAT [42] and TGN-Att [27].
Remarkably, these models are among the best-performing MP-TGNs.
Nonetheless, we can show that there are nodes of very simple temporal graphs that TGAT
and
TGN-Att cannot distinguish (see Figure 2).
We formalize this in Proposition 4 by establishing that there are cases in which TGNs with injective layers can succeed, but TGAT and TGN-Att cannot.
Proposition 4 (Limitations of TGAT/TGN-Att) .
There exist temporal graphs containing nodes u, v that have non-isomorphic TCTs, yet no TGAT nor TGN-Att with mean memory aggregator (i.e., using
M EAN as M EM A GG ) can distinguish u and v .
This limitation stems from the fact that the attention mechanism employed by TGAT and TGN-Att is proportion invariant [26].
The memory module of TGN-Att cannot counteract this limitation due to its mean-based aggregation scheme.
We provide more details in Appendix B.6.
3.2 Predicting temporal links
Models for dynamic graphs are usually trained and evaluated on temporal link prediction [18], which consists in predicting whether an event would occur at a given time.
To predict an event between nodes u and v at t , MP-TGNs combine the node embeddings h ( L ) u ( t ) and h ( L ) v ( t ) , and push the resulting vector through an MLP.
On the other hand, CAW is originally designed for link prediction tasks and directly computes edge embeddings, bypasssing the computation of node representations.
We can extend the notion of node distinguishability to edges/events.
We say that a model distinguishes two synchronous events γ = ( u, v, t ) and γ ′ =
( u ′ , v ′ , t ) of a temporal graph if it assigns different edge embeddings h γ ̸ = h γ ′ for γ and γ ′ .
Proposition 5 asserts that CAWs are not strictly more expressive than MP-TGNs, and vice-versa.
Intuitively, CAW’s advantage over MP-TGNs lies in its ability to exploit node identities and capture correlation between walks.
However, CAW imposes temporal constraints on random walks, i.e., walks have timestamps in decreasing order, which can limit its ability to distinguish events.
Figure 2(Right) sketches constructions for Proposition 5.
Proposition 5 (Limitations of MP-TGNs and CAW) .
There exist distinct synchronous events of a temporal graph that CAW can distinguish but MP-TGNs with injective layers cannot, and vice-versa.
3.3 Connections with the WL test
The Weisfeiler-Leman test (1-WL) has been used as a key tool to analyze the expressive power of
GNNs.
We now study the power of MP-TGNs under a temporally-extended version of 1-WL, and prove negative results regarding whether TGNs can recognize properties of temporal graphs.
Temporal WL test.
We can extend the WL test for temporal settings in a straightforward manner by exploiting the equivalence between temporal graphs and multi-graphs with timestamped edges [24].
In particular, the temporal variant of 1-WL assigns colors for all nodes in an input dynamic graph G ( t ) by applying the following iterative procedure:
Initialization : The colors of all nodes in G ( t ) are initialized using the initial node features: ∀ v ∈ V ( G ( t )) , c 0 ( v ) = x v .
If node features are not available, all nodes receive identical colors;
Refinement :
At step ℓ , the colors of all nodes are refined using a hash (injective) function: for all v ∈ V ( G ( t )) , we apply c ℓ +1 ( v ) =
H ASH ( c ℓ ( v ) , {{ ( c ℓ ( u ) , e uv ( t ′ ) , t ′ ) : ( u, v, t ′ )
∈ G ( t ) }} ) ;
Termination :
The test is carried out for two temporal graphs at time t in parallel and stops when the multisets of corresponding colors diverge, returning non-isomorphic.
If the algorithm runs until the number of different colors stops increasing, the test is deemed inconclusive.
We note that the temporal WL test trivially reduces to the standard 1-WL test if all timestamps and edge features are identical.
The resemblance between MP-TGNs and GNNs and their corresponding
WL tests suggests that the power of MP-TGNs is bounded by the temporal WL test.
Propositionconveys that MP-TGNs with injective layers are as powerful as the temporal WL test.
Proposition 6.
Assume finite spaces of initial node features X , edge features E , and timestamps T .
Let the number of events of any temporal graph be bounded by a fixed constant.
Then, there is an
MP-TGN with suitable parameters using injective aggregation/update functions that outputs different representations for two temporal graphs if and only if the temporal-WL test outputs ‘non-isomorphic’.
A natural consequence of the limited power of MP-TGNs is that even the most powerful MP-TGNs fail to distinguish relevant graph properties, and the same applies to CAWs (see Proposition 7).
Proposition 7.
There exist non-isomorphic temporal graphs differing in properties such as diameter, girth, and total number of cycles, which cannot be differentiated by MP-TGNs and CAWs.
Figure 3 provides a construction for Proposition 7.
The temporal graphs G ( t ) and G ′ ( t ) differ in diameter ( ∞ vs. 3), girth (3 vs. 6), and number of cycles ( vs. 1).
By inspecting the TCTs, one can observe that, for any node in G ( t ) , there is a corresponding one in G ′ ( t ) whose TCTs are isomorphic, e.g., T u 1 ( t ) ∼ =
T u ′ 1 ( t ) for t > t 3 .
As a result, the multisets of node embeddings for these temporal graphs are identical.
We provide more details and a construction - where CAW fails to decide properties - in the Appendix.
Position-encoding injective temporal graph net
We now leverage insights from our analysis in Section 3 to build more powerful TGNs.
First, we discuss how to build injective aggregation and update functions in the temporal setting.
Second, we propose an efficient scheme to compute positional features based on counts from TCTs.
In addition, we show that the proposed method, called p osition-encoding in jective t emporal graph net (PINT), is more powerful than both WA-TGNs and MP-TGNs in distinguishing events in temporal graphs.
Injective temporal aggregation.
An important design principle in TGNs is to prioritize (give higher importance to) events based on recency [38, 42].
Proposition 8 introduces an injective aggregation scheme that captures this principle using linearly exponential time decay.
Proposition 8 (Injective function on temporal neighborhood) .
Let X and E be countable, and T countable and bounded.
There exists a function f and scalars α and β such that (cid:80) i f
( x i , e i ) α − βt i is unique on any multiset M = {{ ( x i , e i , t i ) }} ⊆
X × E × T with | M | < N , where N is a constant.
Leveraging Proposition 8 and the approximation capabilities of multi-layer perceptrons (MLPs), we propose position-encoding injective temporal graph net (PINT).
In particular, PINT computes the embedding of node v at time t and layer ℓ using the following message passing steps:
[Equation]
where ∥ denotes concatenation, h (0) v = s v ( t ) , α and β are scalar (hyper-)parameters, and MLP ( ℓ ) agg and MLP ( ℓ ) upd denote the nonlinear transformations of the aggregation and update steps, respectively.
We note that to guarantee that the MLPs in PINT implement injective aggregation/update, we must further assume that the edge and node features (states) take values in a finite support.
In addition, we highlight that there may exist many other ways to achieve injective temporal MP — we have presented a solution that captures the ‘recency’ inductive bias of real-world temporal networks.
[Figure]
y
T e m p o r a l G r a ph
[Figure]
Meanwhile, we use Eqs.
(7-11) to update positional features.
To extract the embedding for node v , we build its TCT, annotate nodes with memory + positional features, and run (injective) MP.
Relative positional features.
To boost the power of PINT, we propose augmenting memory states with relative positional features.
These features count how many temporal walks of a given length exist between two nodes, or equivalently, how many times nodes appear at different levels of TCTs.
Formally, let P be the d × d matrix obtained by padding a ( d − 1) -dimensional identity matrix with zeros on its top row and its rightmost column.
Also, let r ( t )
j → u ∈ N d denote the positional feature vector of node j relative to u ’s TCT at time t .
For each event ( u, v, t ) , with u and v not participating in other events at t , we recursively update the positional feature vectors as
[Equation]
where we use t + to denote values “right after” t .
The set V i keeps track of the nodes for which we need to update positional features when i participates in an interaction.
For simplicity, we have assumed that there are no other events involving u or v at time t .
Appendix B.10 provides equations for the general case where nodes can participate in multiple events at the same timestamp.
The value r ( t ) i → v [ k ] (the k -th component of r ( t ) i → v ) corresponds to how many different ways we can get from v to i in k steps through temporal walks.
Additionally, we provide in Lemmaan interpretation of relative positional features in terms of the socalled monotone
TCTs (Definition 2).
In this regard, Figureshows how the TCT of v evolves due to an event ( u, v, t ) and provides an intuition about the updates in Eqs.
The procedure amounts to appending the monotone TCT of u to the first level of the monotone TCT of v .
Definition 2.
The monotone TCT of a node u at time t , denoted by ˜ T u ( t ) , is the maximal subtree of the TCT of u s.t. for any path p
= ( u, t 1 , u 1 , t 2 , u 2 , . . . )
from the root u to leaf nodes of ˜ T u ( t ) time monotonically decreases, i.e., we have that t 1 > t 2 > . . . .
Lemma 2.
For any pair of nodes i, u of a temporal graph G ( t ) , the k -th component of the positional feature vector r ( t ) i → u stores the number of times i appears at the k -th layer of the monotone TCT of u .
Edge and node embeddings.
To obtain the embedding h γ for an event γ
= ( u, v, t ) , an L -layer
PINT computes embeddings for node u and v using L steps of temporal message passing.
However, when computing the embedding h Lu ( t ) of u , we concatenate node states s j ( t ) with the positional features r ( t ) j → u and r ( t ) j
→ v for all node j in the L -hop temporal neighborhood of u .
We apply the same procedure to obtain h Lv ( t ) , and then combine h Lv ( t ) and h Lu ( t ) using a readout function.
Similarly, to compute representations for node-level prediction, for each node j in the L -hop neighborhood of u , we concatenate node states s j ( t ) with features r ( t ) j → u .
Then, we use our injective MP to combine the information stored in u and its neighboring nodes.
Figure 5 illustrates the process.
Notably, Proposition 9 states that PINT is strictly more powerful than existing TGNs.
In fact, the relative positional features mimic the discriminative power of WA-TGNs, while eliminate their temporal monotonicity constraints.
Additionally, PINT can implement injective temporal message passing (either over states or states + positional features), akin to maximally-expressive MP-TGNs.
Proposition 9 (Expressiveness of PINT: link prediction) .
PINT (with relative positional features) is strictly more powerful than MP-TGNs and CAWs in distinguishing events in temporal graphs.
When does PINT fail?
Naturally, whenever the TCTs (annotated with positional features) for the endpoints of two edges ( u, v, t ) and ( u ′ , v , t ) are pairwise isomorphic, PINT returns the same edge embedding and is not able to differentiate the events.
Figure 6 shows an example in which this happens — we assume that all node/edge features are identical.
Due to graph symmetries, u and z occur the same number of times in each level of v ’s monotone TCT.
Also, the sets of temporal walks starting at u and z are identical if we swap the labels of these nodes.
Importantly, CAWs and
MP-TGNs also fail here, as stated in Proposition 9.
Proposition 10 (Limitations of PINT) .
There are synchronous events of temporal graphs that PINT cannot distinguish (as seen in Figure 6).
Implementation and computational cost.
The online updates for PINT’s positional features have complexity O (cid:16)
d |V ( t ) u | + d |V ( t ) v | (cid:17) .
Similarly to CAW’s sampling procedure, our online update is a sequential process better done in CPUs.
However, while CAW may require significant CPUGPU memory exchange — proportional to both the number of walks and their depth —, we only communicate the positional features.
We can also speed-up the training of PINT by pre-computing the positional features for each batch, avoiding redundant computations at each epoch.
Apart from positional features, the computational cost of PINT is similar to that of TGN-Att.
Following standard
MP-TGN procedure, we control the branching factor of TCTs using neighborhood sampling.
Note that the positional features monotonically increase with time, which is undesirable for practical generalization purposes.
Since our theoretical results hold for any fixed t , this issue can be solved by dividing the positional features by a time-dependent normalization factor.
Nonetheless, we have found that employing L 1 -normalization leads to good empirical results for all evaluated datasets.
Experiments
We now assess the performance of PINT on several popular and large-scale benchmarks for TGNs.
We run experiments using PyTorch [25] and code is available at www.github.com/AaltoPML/PINT .
Tasks and datasets.
We evaluate PINT on dynamic link prediction, closely following the evaluation setup employed by Rossi et al.
[27] and Xu et al.
We use six popular benchmark datasets:
Reddit, Wikipedia, Twitter, UCI, Enron, and LastFM [16, 27, 38, 42].
Notably, UCI, Enron, and
LastFM are non-attributed networks, i.e., they do not contain feature vectors associated with the events.
Node features are absent in all datasets, thus following previous works we set them to vectors of zeros [27, 42].
Since Twitter is not publicly available, we follow the guidelines by Rossi et al.
[27] to create our version.
We provide more details regarding datasets in the supplementary material.
Baselines.
We compare PINT against five prominent TGNs: Jodie [16], DyRep [32], TGAT [42],
TGN-Att [27], and CAW [38].
For completeness, we also report results using two static GNNs: GAT [34] and GraphSage [12].
Since we adopt the same setup as TGN-Att, we use their table numbers for all baselines but CAW on Wikipedia and Reddit.
The remaining results were obtained using the implementations and guidelines available from the official repositories.
As an ablation study, we also include a version of PINT without relative positional features in the comparison.
We provide detailed information about hyperparameters and the training of each model in the supplementary material.
Experimental setup.
We follow Xu et al.
[42] and use a 70%-15%-15% (train-val-test) temporal split for all datasets.
We adopt average precision (AP) as the performance metric.
We also analyze separately predictions involving only nodes seen during training (transductive), and those involving [Table] novel nodes (inductive).
We report mean and standard deviation of the AP over ten runs.
For further details, see Appendix D. We provide additional results in the supplementary material
[Table]
Results.
Table 1 shows that PINT is the best-performing method on five out of six datasets for the transductive setting.
Notably, the performance gap between PINT and TGN-Att amounts to over 15% AP on UCI.
The gap is also relatively high compared to CAW on LastFM, Enron, and UCI; with CAW being the best model only on Enron.
We also observe that many models achieve relatively high AP on the attributed networks (Reddit, Wikipedia, and Twitter).
This aligns well with findings from [38], where TGN-Att was shown to have competitive performance against CAW on Wikipedia and Reddit.
The performance of GAT and TGAT (static GNNs) on Reddit and Wikipedia reinforces the hypothesis that the edge features add significantly to the discriminative power.
On the other hand, PINT and CAW, which leverage relative identities, show superior performance relative to other methods when only time and degree information is available, i.e., on unattributed networks (UCI, Enron, and LastFM).
Table 1 also shows the effect of using relative positional features.
While including these features boosts PINT’s performance systematically, our ablation study shows that
PINT w/o positional features still outperforms other MP-TGNs on unattributed networks.
In the inductive case, we observe a similar behavior: PINT is consistently the best MP-TGN, and is better than CAW on 3/6 datasets.
Overall, PINT (w/ positional features) also yields the lowest standard deviations.
This suggests that positional encodings might be a useful inductive bias for TGNs.
[Figure]
The cost of pre-computing positional features is quickly diluted as the number of epochs increases.
Time comparison.
Figure 7 compares the training times of PINT against other TGNs.
For fairness, we use the same architecture (number of layers & neighbors) for all MPTGNs: i.e., the best-performing PINT.
For CAW, we use the one that yielded results in Table 1.
As expected, TGAT is the fastest model.
Note that the average time/epoch of PINT gets amortized since positional features are pre-computed.
Without these features, PINT’s runtime closely matches TGN-Att.
When trained for over 25 epochs, PINT runs considerably faster than CAW.
We provide additional details and results in the supplementary material. [Table]
Incorporating relative positional features into MP-TGNs.
We can use our relative positional features (RPF) to boost MP-TGNs.
Table 2 shows the performance of TGN-Att with relative positional features on UCI, Enron, and LastFM.
Notably, TGN-Att receives a significant boost from our RPF.
However, PINT still beats TGN-Att+RPF on 5 out of 6 cases. The values for TGN-Att+RPF reflect outcomes from 5 repetitions. We have used the same model selection procedure as TGN-Att in Table 1, and incorporated d = 4 -dimensional positional features [Figure]
Dimensionality of relative positional features.
We assess the performance of PINT as a function of the dimension d of the relative positional features.
Figure 8 shows the performance of
PINT for d ∈ { 4 , 10 , 15 , 20 } on UCI and Enron.
We report mean and standard deviation of AP on test set obtained from five independent runs.
In all experiments, we re-use the optimal hyperparameters found with d = 4 .
Increasing the dimensionality of the positional features leads to performance gains on both datasets.
Notably, we obtain a significant boost for Enron with d = 10 : 92 .
69 ± 0 .
09 AP in the transductive setting and 88 .
34 ± 0 .
29 in the inductive case.
Thus, PINT becomes the best-performing model on Enron (transductive).
On UCI, for d = 20 , we obtain 96 .
36 ± 0 .
07 and 94 .
77 ± 0 . 12 (inductive).  Conclusion We laid a rigorous theoretical foundation for TGNs, including the role of memory modules, relationship between classes of TGNs, and failure cases for MP-TGNs.
Together, our theoretical results shed light on the representational capabilities of TGNs, and connections with their static counterparts.
We also introduced a novel TGN method, provably more expressive than the existing TGNs.
Key practical takeaways from this work: (a) temporal models should be designed to have injective update rules and to exploit both neighborhood and walk aggregation, and (b) deep architectures can likely be made more compute-friendly as the role of memory gets diminished with depth, provably.
Acknowledgments and Disclosure of Funding
This work was supported by the Academy of Finland (Flagship programme: Finnish Center for Artificial Intelligence FCAI and 341763), ELISE Network of Excellence Centres (EU Horizon: grant agreement 951847) and UKRI Turing AI World-Leading Researcher Fellowship, EP/W002973/1. We also acknowledge the computational resources provided by the Aalto Science-IT Project from Computer Science IT.
AS and DM also would like to thank Jorge Perez, Jou-Hui Ho, and Hojin Kang for valuable discussions about TGNs, and the latter’s input on a preliminary version of this work. Societal and broader impact Temporal graph networks have shown remarkable performance in relevant domains such as social networks, e-commerce, and drug discovery. In this paper, we establish fundamental results that delineate the representational power of TGNs.
We expect that our findings will help declutter the literature and serve as a seed for future developments. Moreover, our analysis culminates with PINT, a method that is provably more powerful than the prior art and shows superior predictive performance on several benchmarks. We believe that PINT (and its underlying concepts) will help engineers and researchers build better recommendation engines, improving the quality of systems that permeate our lives. Also, we do not foresee any negative societal impact stemming directly from this work.
For all authors... (a) Do the main claims made in the abstract and introduction accurately reflect the paper’s contributions and scope?
[Yes] (b) Did you describe the limitations of your work?
[Yes] In Section 4, we describe theoretical limitations of our method – in the paragraph named "When does PINT fail?".
(c) Did you discuss any potential negative societal impacts of your work?
[Yes] (d) Have you read the ethics review guidelines and ensured that your paper conforms to them?
[Yes] 2.
If you are including theoretical results... (a) Did you state the full set of assumptions of all theoretical results?
[Yes] (b) Did you include complete proofs of all theoretical results?
[Yes] Proofs are given in Appendix B. 3.
If you ran experiments... (a) Did you include the code, data, and instructions needed to reproduce the main experimental results (either in the supplemental material or as a URL)?
[Yes] Our code is available in a github repository.
(b) Did you specify all the training details (e.g., data splits, hyperparameters, how they were chosen)?
[Yes] We provide detailed description of all experiments in the supplementary material, including model selection, and data splits.
Please, see Appendix D. (c) Did you report error bars (e.g., with respect to the random seed after running experiments multiple times)?
[Yes] We report mean and standard deviation for all experiments.
(d) Did you include the total amount of compute and the type of resources used (e.g., type of GPUs, internal cluster, or cloud provider)?
[Yes] We describe the computational resources in the supplementary material (Appendix D).
If you are using existing assets (e.g., code, data, models) or curating/releasing new assets... (a) If your work uses existing assets, did you cite the creators?
[Yes] We provide references for all codes/datasets we use in the paper.
(b) Did you mention the license of the assets?
[N/A] We use publicly available assets.
(c) Did you include any new assets either in the supplemental material or as a URL?
[Yes] We provide code in a github repository.
(d) Did you discuss whether and how consent was obtained from people whose data you’re using/curating?
[N/A] (e) Did you discuss whether the data you are using/curating contains personally identifiable information or offensive content?
[N/A] 5.
If you used crowdsourcing or conducted research with human subjects... (a) Did you include the full text of instructions given to participants and screenshots, if applicable?
[N/A]
(b) Did you describe any potential participant risks, with links to Institutional Review Board (IRB) approvals, if applicable?
[N/A] (c) Did you include the estimated hourly wage paid to participants and the total amount spent on participant compensation?
[N/A]
Provably
(Supplementary material)
A Further details on temporal graph networks
In this section we present more details about the models TGAT, TGN-Att, and CAW.
A.1 Temporal graph attention (TGAT)
Temporal graph attention networks [42] combine time encoders [15] and self-attention [33].
In particular, the time encoder ϕ is given by
[Equation]
where ω i ’s and b i ’s are learned scalar parameters.
The time embeddings are concatenated to the edge features before being fed into a typical self-attention layer, where the query q is a function of a reference node v , and both values V and keys K depend on v ’s temporal neighbors.
Formally, TGAT first computes a matrix C ( ℓ ) v ( t ) whose u -th row is c ( ℓ ) vu ( t ) =
[ h ( ℓ − 1) u ( t )
∥ ϕ ( t − t uv ) ∥ e uv ] for all ( u, e uv , t uv ) ∈ N ( v, t ) .
Then, the output ˜ h ( ℓ ) v ( t ) of the A GG ( ℓ ) function is given by q
[Equation]
(S2) [Equation] (S3) where W ( ℓ ) q , W ( ℓ ) K , and W ( ℓ ) V are model parameters.
Regarding the U PDATE function, TGAT applies a multilayer perceptron, i.e., h ( ℓ ) v ( t ) =
MLP ( ℓ ) ( h ( ℓ − 1) v ( t ) ∥ ˜ h ( ℓ ) v ( t )) .
A.2 Temporal graph networks with attention (TGN-Att)
We now discuss details regarding the MP-TGN framework omitted from the main paper for simplicity.
For the sake of generality, Rossi et al.
[27] present a formulation for MP-TGNs that can handle node-level events, e.g., node feature updates.
These events lead to i ) updating node memory states, and ii ) using the time-evolving node features as additional inputs for the message-passing functions.
Nonetheless, to the best of our knowledge, all relevant CTDG benchmarks comprise only edge events.
Therefore, for ease of presentation, we omit node events and temporal node features from our treatment.
In Appendix E, we discuss how to handle node-level events.
Note that MP-TGNs update memory states only after an event occurs, otherwise it would incur information leakage. Unless we use the updated states to predict another event later on in the batch, this means that there might be no signal to propagate through memory modules.
To get around this problem, Rossi et al.
[27] propose updating the memory with messages coming from previous batches, and then predicting the interactions.
To speed up computations, MP-TGNs employ a form of batch learning where events in a same batch are aggregated.
In our analysis, we assume that two events belong to the same batch only if they occur at the same timestamp.
Importantly, memory aggregators allow removing ambiguity in the way the memory of a node participating in multiple events (at the same timestamp) is updated — without memory aggregator, two events involving a given node i at the same time could lead to different ways of updating the state of i .
Suppose the event γ
= ( i, u, t ) occurs.
MP-TGNs proceed by computing a memory-message function M EM M SG e for each endpoint of γ , i.e.,
[Equation]
Following the original formulation, we assume an identity memory-message function — simply the concatenation of the inputs, i.e., M EM M SG e ( s i ( t ) , s u ( t ) , t − t i , e iu ( t ))
=
[ s i ( t ) , s u ( t ) , t − t i , e iu ( t )] .
Now, suppose two events ( i, u, t ) and ( i, v, t ) happen.
MP-TGNs aggregate the memory-messages from these events using a function M EM A GG to obtain a single memory message for i :
[Equation]
Rossi et al.
[27] propose non-learnable memory aggregators, such as the mean aggregator (average all memory messages for a given node), that we denote as M EAN A GG and adopt throughout our analysis.
As an example, under events ( i, u, t ) and ( i, v, t ) , the aggregated message for i is m i ( t ) = 0 .
5([ s i ( t ) , s u ( t ) , t − t i , e iu ( t )]
+ [ s i ( t ) , s v ( t ) , t − t i , e iv ( t )]) .
The memory update of our query node i is given by
[Equation]
Finally, we note that TGAT does not have a memory module.
TGN-Att consists of the model resulting from augmenting TGAT with a GRU-based memory.
A.3 Causal anonymous walks (CAW)
We now provide details regarding how CAW obtains edge embeddings for a query event γ
= ( u, v, t ) .
A temporal walk is represented as W =
(( w 1 , t 1 ) , ( w 2 , t 2 ) , . . .
, ( w L , t L )) , with t 1 > t 2 > · · · > t L and ( w i − 1 , w i , t i ) ∈ G ( t ) for all i > 1 .
We denote by S u ( t ) the set of maximal temporal walks starting at u of size at most L obtained from the temporal graph at time t .
Following the original paper, we drop the time dependence henceforth.
A given walk W gets anonymized through replacing each element w i belonging to W by a 2-element set of vectors I CAW ( w i ; S u , S v ) accounting for how many times w i appears at each position of walks in S u and S v .
These vectors are denoted by g ( w i , S u ) and g ( w i , S v ) .
The walk is encoded using a
RNN:
[Equation]
where {+t 1 = t 
 = t and+} f 1 is [Equation] S
[Equation]
We note that the MLPs share parameters.
The function f 2 is given by
[Equation]
)] where ω i ’s are learned parameters.
To compute the embedding h γ for ( u, v, t ) , CAW considers two readout functions: mean and selfattention.
Finally, the final link prediction is obtained from a 2-layer MLP over h γ .
B Proofs B.1 Further definitions and Lemmata
Definition B1 (Monotone walk.) .
An N -length monotone walk in a temporal graph G ( t ) is a sequence ( w 1 , t 1 , w 2 , t 2 , . .
. , w N +1 )
such that t i > t i +1 and ( w i , w i +1 , t i )
∈ G ( t ) for all i .
Definition B2 (Temporal diameter.) .
We say the temporal diameter of a graph G ( t ) is ∆ if the longest monotone walk in G ( t ) has length (i.e, number of edges) exactly ∆ .
Lemma B1.
If the TCTs of two nodes are isomorphic, then their monotone TCTs (Definition 2) are also isomorphic, i.e., T u ( t ) ∼ = T v ( t ) ⇒ ˜
T u ( t ) ∼ =
˜ T v ( t ) for two nodes u and v of a dynamic graph.
Proof.
Since T u ( t ) ∼ = T v ( t ) , we have that p = ( u 0 , t 1 , u 1 , t 2 , u 2 , . . . )
from T u ( t ) ⇐⇒ p ′
=
( f ( u 0 ) , t 1 , f ( u 1 ) , t 2 , f ( u 2 ) , . . . )
from T v ( t ) , with s u i
= s f ( u i ) and e u i u
i +
( t i +1 ) =
e f ( u i ) f
( u i +1 )
( t i +1 )
and k u i =
k f ( u i ) ∀ i where f : V ( T u ( t ))
→ V ( T v ( t )) is a bijection.
Assume that ˜ T u ( t ) ̸∼ =
˜ T v ( t ) .
Then, either there exists a path p s = ( u ′ 0 , t ′ 1 , u ′ 1 , t ′ 2 , . . . )
in ˜ T u ( t ) , such that t ′ k
+1 < t ′ k for all k
(i.e., a monotone walk), with no corresponding one in ˜ T v ( t ) or vice-versa.
Without loss of generality, let us consider the former case.
We can construct the path p
′ s in T
v ( t ) by applying f in all elements of p s , i.e., p ′ s = ( f ( u ′ 0 ) , t ′ 1 , f ( u ′ 1 ) , t ′ 2 , . . . ) .
Note that p ′ s is a monotone walk in T v ( t ) .
Since ˜ T v ( t ) is the maximal monotone subtree of T v ( t ) , it must contain p ′ s , leading to contradiction.
Lemma B2.
Let G ( t ) and G ′ ( t ) be any two non-isomorphic temporal graphs.
If an MP-TGN obtains different multisets of node embeddings for G ( t ) and G ′ ( t ) .
Then, the temporal WL test decides G ( t ) and G ′ ( t ) are not isomorphic.
Proof.
Recall Proposition 3 shows that if an MP-TGN with memory is able to distinguish two nodes, then there is a memoryless MP-TGN with ∆ (temporal diameter) additional layers that does the same.
Thus, it suffices to show that if the multisets of colors from temporal WL for G ( t ) and G ′ (t) after ℓ iterations are identical, then the multisets of embeddings from the memoryless MP-TGN are also identical, i.e., if {{ c ℓ ( u ) }} u ∈ V ( G ( t ))
= {{ c ℓ ( u ′ ) }}
u ′ ∈ V ( G ′ ( t ))
, then {{ h ( ℓ ) u ( t ) }} u ∈ V ( G ( t )) = {{ h ( ℓ ) u ′ ( t ) }}
u ′ ∈ V ( G ′ ( t )) .
To do so, we repurpose the proof of Lemma 2 in [43].
More broadly, we show that for any two nodes of a temporal graph G ( t ) , if the temporal WL returns c ℓ ( u ) =
c ℓ ( v ) , we have that corresponding embeddings from MP-TGN without memory are identical
h ℓu ( t ) =
h ℓv ( t ) .
We proceed with a proof by induction.
[ Base case ] For ℓ = 0 , the proposition trivially holds as the temporal WL has the initial node features as colors, and memoryless MP-TGNs have these features as embeddings.
[ Induction step ] Assume the proposition holds for iteration ℓ .
Thus, for any two nodes u, v , if c ℓ +1 ( u ) =
c ℓ +1 ( v ) , we have
[Equation]
[Equation]
iu
[Equation]
[Equation]
[Equation]
, t ′ ) ∈
[Equation]
t ) }} ) and, by the induction hypothesis, we know
[Equation]
We also note that this last identity also implies
[Equation]
h ( ℓ ) u ( t ) , {{ ( h ( ℓ ) i ( t ) , t − t ′ , e ) | ( i, e, t ′ )
[Equation] N ( u [Equation] t ) }} ) =
[Equation]
N
[Equation] v [Equation] t ) }} ) since there exists an event ( u, i, t ′ )
∈ G ( t ) with feature e ui ( t ′ )
=
e iff there is an element ( i, e, t ′ ) ∈
N ( u, t ) .
As a result, the inputs of the MP-TGN’s aggregation and update functions are identical, which leads to identical outputs h ( ℓ +1) u ( t )
=
h ( ℓ +1) v ( t ) .
Therefore, if the temporal WL test obtains identical multisets of colors for two temporal graphs after ℓ steps, the multisets of embeddings at layer ℓ for these graphs are also identical.
Lemma B3 (Lemma 5 in [43]) .
Assume X is countable.
There exists a function f : X → R n so that h ( X )
= (cid:80) x ∈ X f
( x ) is unique for each multiset X ⊂ X of bounded size.
Moreover, any multiset function g can be decomposed as g ( X ) =
φ (cid:0)(cid:80) x ∈ X f ( x ) (cid:1) for some function φ .
B.2 Proof of Proposition 1: Relationship between DTDGs and CTDGs
Proof.
We prove the two statements in Proposition 1 separately.
In the following, we treat CTDGs as sets of events up to a given timestamp.
Statement 1: For any DTDG we can build a CTDG that contains the same information.
A DTDG consists of a sequence of graphs with no temporal information.
We can model this using the
CTDG formalism by setting a fixed time difference δ between consecutive elements G ( t i ) , G ( t i +1 ) of the CTDG, i.e., t i +1 − t i = δ for all i ≥ 0 .
Consider a DTDG given by the sequence ( G 1 , G 2 , . . . ) .
To build the equivalent CTDG, we define
S ( G i ) as the set of edge events corresponding to G i , i.e., S ( G i ) = { ( u, v, iδ ) : ( u, v ) ∈ E ( G i ) } .
We also make the edge features of these events match those in the DTDG, i.e., e uv ( iδ ) =
e uv ∈ E i .
To account for node features, for all u ∈ V ( G i ) , we create an event ( u, ⋄ , iδ ) between u and a dummy node ⋄ , with feature e u ⋄ ( iδ ) = x u ∈ X i .
Let C ( G i ) denote the set comprising these node-level events.
Then, we can construct the CTDG G ( t i ) = ∪ ij =1 S ( G j ) ∪ C ( G j ) for i = 1 , . . . .
Reconstructing the DTDG ( G 1 , G 2 , . . . ) is trivial.
To build G i , it suffices to select all events at time iδ in the CTDG.
Events involving ⋄ determine node features and the remaining ones constitute edges in the DTDG.
Statement 2: The converse holds if the CTDG timestamps form a subset of some uniformly spaced countable set.
We say that a countable set A ⊂ R is uniformly spaced if there exists some δ ∈ R such that a i +1 − a i = δ for all i where ( a 1 , a 2 , . . . )
is the ordered sequence formed from elements a r of A , i.e., a 1 < a 2 < . . .
<
a i < a
i +1 , . . .
Note that DTDGs are naturally represented by a set of uniformly spaced timestamps.
This is because
DTDGs correspond to sequences that do not contain any time information.
Let us denote the set of
CTDG timestamps T ⊆ T such that T is countable and uniformly spaced.
Our idea is to construct a
DTDG sequence with timestamps that coincide with the elements in T .
Then, since T ⊆ T , we do not lose any information pertaining to events occurring at timestamps given by T .
Without loss of generality, in the following we assume that the elements of T and T are arranged in their increasing order respectively, i.e., t i <
t i +1 for all i , and τ k < τ k +1 for all k .
Consider a CTDG ( G ( t 1 ) , G ( t 2 ) , . . . )
such that G ( t i ) = { ( u, v, t ) : t ∈ T and t ≤ t i } for t i ∈ T .
Also, let us denote H ( t i ) =
{ ( u, v, t ) ∈ G ( t i ) :
t =
t i } the set of events at time t i ∈ T .
We can build a corresponding DTDG ( G 1 , G 2 , . . . )
such that for all τ k ∈ T the k -th snapshot G k is
V ( G k ) = (cid:26) { u : ( u, · , τ k ) ∈ H ( τ k ) } , if τ k ∈ T ; ∅ , otherwise . E ( G k ) =
(cid:26) { ( u, v ) : ( u, v, τ k ) ∈
H ( τ k ) } , if τ k ∈ T ; ∅ , otherwise .
To recover the original CTDG, we can adapt the reconstruction procedure we used in the previous part of the proof.
We define
[Equation]
Note that we can treat ˜ I as a map by defining ˜
I
( i ) =
k if and only if ( i, k ) ∈ ˜
I .
To recover the original CTDG, we first create the set of events S ( G k )
= { ( u, v, kδ ) :
( u, v ) ∈ E ( G k ) } .
Then, we build G ( t i ) =
∪ j : j ≤ ˜ I
( i ) S ( G j ) for t i ∈ T .
B.3 Proof of Lemma
Proof.
Here we show that if two nodes u and v have isomorphic ( L -depth) TCTs, then MP-TGNs (with L -layers) compute identical embeddings for u and v .
Formally, let T u,ℓ ( t ) denote the TCT of u with ℓ layers.
We want to show that T u,ℓ ( t ) ∼ = T v,ℓ ( t ) ⇒ h ( ℓ ) u ( t )
= h ( ℓ ) v ( t ) .
We employ a proof by induction on ℓ .
Since there is no ambiguity, we drop the dependence on time in the following.
[ Base case ] Consider ℓ = 1 .
By the isomorphism assumption T u, 1 ∼ = T v, 1 , h (0) u
= s u
= s v = h (0) v — roots of both trees have the same states.
Also, for any children i of u in T u, 1 there is a corresponding one f ( i ) in T v, 1 with s i =
s f ( i ) .
Recall that the ℓ -th layer aggregation function A GG ( ℓ ) ( · ) acts on multisets of triplets of previous-layer embeddings, edge features and timestamps of temporal neighbors (see Equation 1).
Since the temporal neighbors of u correspond to its children in T u, 1 , then the output of the aggregation function for u and v are identical: ˜ h (1) u
= ˜ h (1) v .
In addition, since the initial embeddings of u and v are also equal (i.e., h (0) u = h (0) v ), we can ensure that the update function returns h (1) u
= h (1) v .
[ Induction step ] Assuming that T u,ℓ − 1 ∼ =
T v,ℓ − 1 ⇒ h ( ℓ − 1) u
= h ( ℓ − 1) v for any pair of nodes u and v , we will show that T u,ℓ ∼ =
T v,ℓ ⇒ h ( ℓ ) u
= h ( ℓ ) v .
For any children i of u , let us define the subtree of T u,ℓ rooted at i by T i .
We know that T i has depth ℓ − 1 , and since T u,ℓ ∼ =
T v,ℓ , there exists a corresponding subtree of T v (of depth ℓ − 1 ) rooted at f ( i ) such that T i ∼ =
T f ( i ) .
Using the induction hypothesis, we obtain that the multisets of embeddings from the children i of u and children f ( i ) of v are identical.
Note that if two ℓ -depth TCTs are isomorphic, they are also isomorphic up to depth ℓ − 1 ,
i.e., T u,ℓ ∼ =
T v,ℓ implies T u,ℓ − 1 ∼ =
T v,ℓ − 1 and, consequently, h ( ℓ − 1) u
= h ( ℓ − 1) v (by induction hypothesis).
Thus, the input of the aggregation and update functions are identical and they compute the same embeddings for u and v .
B.4 Proof of Proposition 2: Most expressive MP-TGNs
Proof.
Consider MP-TGNs with parameter values that make A GG ( ℓ ) ( · ) and U PDATE ( ℓ ) ( · ) injective functions on multisets of triples of hidden representations, edge features and timestamps.
The existence of these parameters is guaranteed by the fact that, at any given time t , the space of node states (and hidden embeddings from temporal neighbors), edge features and timestamps is finite (see Lemma B3).
Again, let T u,ℓ ( t ) denote the TCT of u with ℓ layers.
We want to prove that, under the injectivity assumption, if T u,ℓ ( t ) ̸∼ =
T v,ℓ ( t ) , then h ( ℓ ) u ( t ) ̸ = h ( ℓ ) u ( t ) for any two nodes u and v .
In the following, we simplify notation by removing the dependence on time.
We proceed with proof by induction on the TCT’s depth ℓ .
Also, keep in mind that φ ℓ = U PDATE ( ℓ ) ◦ A GG ( ℓ ) is injective for any ℓ .
[ Base case ] For ℓ = 1 , if T u, 1 ̸∼ =
T v, 1 then the root node states are different (i.e., s u ̸
= s v ) or the multiset of states/edge features/ timestamps triples from u and v ’s children are different.
In both cases, the inputs of φ ℓ are different and it therefore outputs different embeddings for u and v .
[ Induction step ] The inductive hypothesis is T u,ℓ − 1 ̸∼ =
T v,ℓ − 1 ⇒ h ( ℓ − 1)
u ̸ = h ( ℓ − 1) v for any pair of nodes u and v .
If T u,ℓ ̸∼ =
T v,ℓ , at least one of the following holds: i) the states of u and v are different, ii) the multisets of edges (edge features/ timestamps) with endpoints in u and v are different, or iii) there is no pair-wise isomorphism between the TCTs rooted at u and v ’s children.
In the first two cases, φ ℓ trivially outputs different embeddings for u and v .
We are left with the case in which only the latter occurs.
Using our inductive hypothesis, the lack of a (isomorphism ensuring) bijection between the TCTs rooted at u and v ’s children implies there is also no bijection between their multiset of embeddings.
In turn, this guarantees that φ will output different embeddings for u and v .
B.5 Proof of Proposition 3: The role of memory
Proof.
We prove the two parts of the proposition separately.
In the following proofs, we rely on the concept of monotone TCTs (see Definition 2).
Statement 1: If L < ∆ : Q [ M ] L is strictly stronger than Q L .
We know that the family of L -layer MP-TGNs with memory comprises the family of L -layer MPTGNs without memory (we can assume identity memory).
Therefore, Q [ M ] L is at least as powerful as Q L .
To show that Q [ M ] L is strictly stronger (more powerful) than Q L , when L < ∆ , it suffices to create an example for which memory can help distinguish a pair of nodes.
We provide a trivial example in Figure S1 for L = 1 .
Note that the 1 -depth TCTs of u and v are isomorphic when no memory is used.
However, when equipped with memory, the interaction ( b, c, t 1 ) affects the states of v and c , making the 1-depth TCTs of u and v (at time t > t 2 ) no longer isomorphic.
Statement 2:
For any L : Q L +∆ is at least as powerful as Q [ M ] L .
It suffices to show that if Q L +∆ cannot distinguish a pair of nodes u and v , Q [ M ] L cannot distinguish them too.
Let T Mu,L ( t ) and T u,L ( t ) denote the L -depth TCTs of u with and without memory respectively.
Using Lemma 1, this is equivalent to showing that T u,L +∆ ( t ) ∼ = T v,L +∆ ( t )
⇒ T Mu,L ( t ) ∼ =
T Mv,L ( t ) , since no MP-TGN can separate nodes associated with isomorphic TCTs.
In the following, when we omit the number of layers from TCTs, we assume TCTs of arbitrary depth.
Step 1:
Characterizing the dependence of memory on initial states and events in the dynamic graph.
We now show that the memory for a node u , after processing all events with timestamp ≤ t n , depends on the initial states of a set of nodes V nu , and a set of events annotated with their respective timestamps and features B nu .
If at time t n no event involves a node z , we set B nz
=
B n − 1 z
and V nz =
V n − 1 z .
We also initialize B 0 u = ∅ and V 0 u
= { u } for all nodes u .
We proceed with a proof by induction on the number of observed timestamps n .
[ Base case ] Let I 1 ( u )
=
{ v : ( u, v, t 1 ) ∈ G
t +1 ) } be the set of nodes interacting with u at time t 1 , where G ( t +1 ) is the temporal graph right after t 1 .
Similarly, let J 1 ( u ) = { ( u, · , t 1 )
∈ G ( t +1 ) } be the set of events involving u at time t 1 .
Recall that up until t 1 , all memory states equal initial node features (i.e., s u ( t 1 ) =
s u (0) ).
Then, the updated memory (see Equation 3 and Equation 4) for u depends on V 1 u = V 0 u ∪ v ∈I ( u ) V 0 v , B 1 u = B[-
-]
u ∪ J 1 ( u ) .
[ Induction step ] Assume that for timestamp t n − 1 the proposition holds.
We now show that it holds for t n .
Since the proposition holds for n − 1 timestamps, we know that the memory of any w that interacts with u in t n , i.e. w ∈ I n ( u ) , depends on V n − 1 w and B n − 1 w , and the memory of u so far depends on
V n − 1 u and B n − 1 u .
Then, the updated memory for u depends on V nu = V n − 1 u ∪ w ∈I ( u ) { w, u } ∪ V n − 1 w and B nu = B n − 1 u ∪ J n ( u ) ∪ w ∈I ( u ) B n − 1 w .
Step 2: ( z, w, t zw ) ∈ B nu if and only if there is a path ( u k , t k
= t zw , u k +1 ) in ˜ T u ( t + n ) — the monotone TCT of u (see Definition 2) after processing events with timestamp ≤ t n — with either ♯u k = z, ♯u k +1 = w or ♯u k = w, ♯u k
+
=
z .
[ Forward direction ]
An event ( z, w, t zw ) with t zw ≤ t n will be in B nu only if z = u or w = u , or if there is a subset of events { ( u, ♯u 1 , t 1 ) , ( ♯u 1 , ♯u 2 , t 2 ) , . . .
, ( ♯u k , ♯u k +1 , t zw ) } with ♯u k = z and ♯u k [-+
-]+1 =
w such that t n ≥ t 1 > · · · > t zw .
In either case, this will lead to root-to-leaf path in ˜ T u ( t + n ) passing through ( u k , t zw , u k +1 ) .
This subset of events can be easily obtained by backtracking edges that caused unions/updates in the procedure from Step 1.
[ Backward direction ] Assume there is a subpath p
=
( u k , t k = t
zw , u k +1 ) ∈
˜ T u ( t + n ) with ♯u k = z and ♯u k +1 =
w such that ( z, w, t zw ) / ∈ B nu .
Since we can obtain p from ˜ T u ( t + n ) , we know that the sequence of events r =
(( u, ♯u 1 , t 1 ) , . . .
, ( ♯u k − 2 , ♯u k − 1 =
z, t k − 1 ) , ( z, w, t k
= t zw )) happened and that t i > t i + ∀ i .
However, since ( z, w, t zw ) / ∈ B nu , there must be no monotone walk starting from u going through the edge ( z, w, t zw ) to arrive at w , which is exactly what r characterizes.
Thus, we reach contradiction.
Note that the nodes in V nu are simply the nodes that have an endpoint in the events B nu , and therefore are also nodes in ˜ T u ( t + n ) and vice-versa.
Step 3:
For any node u , there is a bijection that maps ( V nu , B nu ) to ˜ T u ( t + n ) .
First, we note that ( V nu , B nu ) depends on a subset of all events, which we represent as G ′ ⊆
G ( t + n ) .
Since B nu contains all events in G ′ and ( V nu , B nu ) can be uniquely constructed from G ′ , then there is a bijection g that maps from G ′ to ( V nu , B nu ) .
Similarly, ˜ T u ( t + n ) also depends on a subset of events which we denote by G ′′ ⊆
G ( t + n ) .
We note that the unique events in ˜ T u ( t + n ) correspond to G ′′ , and we can uniquely build the tree ˜
T u ( t + n ) from G ′′ .
This implies that there is a bijection h that maps from G ′′ to ˜ T u ( t + n ) .
Previously, we have shown that all events in B nu are also in ˜ T u ( t + n ) and vice-versa.
This implies that both sets depend on the same events, and thus on the same subset of all events, i.e., G ′ =
G ′′ =
G S .
Since there is a bijection g between G S and ( V nu , B nu ) , and a bijection h between G S and ˜ T u ( t + n ) , there exists a bijection f between ( V nu , B nu ) and ˜ T u ( t + n ) .
Step 4: If T u,L +∆ ( t + ) ∼ = T v,L +∆ ( t + ) , then T Mu,L ( t + ) ∼ = T Mv,L ( t + ) .
To simplify notation, we omit here the dependence on time.
Any node w ∈ T Mu,L also appears in T u,L +∆ at the same level.
The subtree of T u,L +∆ rooted at w , denoted here by T ′ w , has depth at least k ≥ ∆ .
Note that T ′ w corresponds to the k -depth TCT of ♯w .
Since the depth of T ′ w is at least ∆ , we know that the ˜ T ′ w ∼ =
˜ T ♯w — i.e., imposing time-constraints to
T ′ w results in the monotone TCT of node ♯w .
Also, because the memory of ♯w depends on ˜ T ♯w , T ′ w comprises the information used to compute the memory state of ♯w .
Note that this applies to any w in
T Mu,L ; thus, T u,L +∆ contains all we need to compute the states of any node of the dynamic graph that appears in T Mu,L .
The same argument applies to T v,L +∆ and T Mv,L .
Finally, since T Mu,L can be uniquely computed from T u,L +∆ , and T Mv,L from T v,L +∆ , if T u,L +∆ ∼ = T v,L +∆ , then T Mu,L ∼ =
T Mv,L .
B.6 Proof of Proposition 4: Limitations of TGAT and TGN-Att
Proof.
In this proof, we first provide an example of a dynamic graph where the TCTs of two nodes u and v are not isomorphic.
Then, we show that we can not find a TGAT model such that h ( L ) u ( t ) ̸
= h ( L ) v ( t ) , i.e., TGAT does not distinguish u and v .
Next, we show that even if we consider
TGATs with memory (TGN-Att), it is still not possible to distinguish nodes u and v in our example.
The TCTs of u and v are non-isomorphic whereas the TCTs of z and w are isomorphic.
Figure S2(leftmost) provides a temporal graph where all edge events have the same edge features.
Colors denote node features.
As we can observe, the TCTs of nodes u and v are not isomorphic.
In the following, we consider node distinguishability at time t > t 2 .
Statement 1: TGAT cannot distinguish the nodes u and v in our example.
Step 1: For any TGAT with ℓ layers, we have that h ( ℓ ) w ( t )
= h ( ℓ ) z ( t ) .
We note that the ℓ -layer TCTs of nodes w and z are isomorphic, for any ℓ .
To see this, one can consider the symmetry around node u that allows us to define a node permutation function (bijection) f given by f ( z ) = w, f ( w )
=
z, f ( a ) = v, f ( u ) =
u, f ( b ) =
c, f ( c ) =
b, f ( v ) = a .
Figure S2(right) provides an illustration of the 2 -depth TCTs of z and w at time t > t 2 .
By Lemma 1, if the ℓ -layer TCTs of two nodes z and w are isomorphic, then no ℓ -layer MP-TGN can distinguish them.
Thus, we conclude that h ( ℓ ) w ( t ) =
h ( ℓ ) z ( t ) for any TGAT with arbitrary number of layers ℓ .
Step 2: There is no TGAT
such that h ( ℓ ) v ( t ) ̸ = h ( ℓ ) u ( t ) .
To compute h ( ℓ ) v ( t ) , TGAT aggregates the messages of v ’s temporal neighbors at layer ℓ − 1 , and then combines h ( ℓ − 1) v ( t ) with the aggregated message ˜ h ( ℓ − 1) v ( t ) to obtain h ( ℓ ) v ( t ) .
Note that N ( u, t ) =
{ ( z, e, t 1 ) , ( w, e, t 1 ) } and N ( v, t ) = { ( w, e, t 1 ) } , where e denotes an edge feature vector.
Also, we have previously shown that h ( ℓ − 1) w ( t ) =
h ( ℓ − 1) z
( t ) .
Using the TGAT aggregation layer (Equation S2), the query vectors of u and v are q u = [ h ( ℓ − 1) u
( t ) || ϕ
W ( ℓ ) q and q v =
[ h ( ℓ − 1) v ( t )
|| ϕ
W ( ℓ ) q , respectively.
Since all events have the common edge features e , the matrices C ( ℓ ) u and C ( ℓ ) v share the same vector in their rows.
The single-row matrix C ( ℓ ) v is given by C ( ℓ ) v =
[ h ( ℓ − 1) w ( t ) ||
ϕ
( t − t 1 ) ||
e ] , while the two-row matrix C ( ℓ ) u
= (cid:104)
[ h ( ℓ − 1) w ( t ) ||
ϕ
( t − t 1 ) ||
e ]; [ h ( ℓ − 1)
z ( t )
∥
ϕ ( t − t 1 ) ||
e ] (cid:105) , with h ( ℓ − 1) w ( t ) =
h ( ℓ − 1) z
( t ) .
We can express C ( ℓ ) u
= [1 , 1] ⊤ r and C ( ℓ ) v = r , where r denotes the row vector r =
[ h ( ℓ − 1)
z
( t ) || ϕ
( t − t 1 ) ||
e ] .
Using the key and value matrices of node v , i.e., K v = C ( ℓ ) v W ( ℓ ) K and V v = C ( ℓ ) v W ( ℓ ) V , we have that ˜ h ( ℓ ) v ( t ) = softmax
[Equation]
q [Equation]
⊤
[Equation]
v
[Equation]
[softmax of a single element is 1]
[Equation]
[softmax outputs a [Equation]
We have shown that the aggregated messages of nodes u and v are the same at any layer ℓ .
We note that the initial embeddings are also identical h (0) v ( t )
= h (0) u ( t ) as u and v have the same color.
Recall that the update step is h ( ℓ ) v ( t ) =
MLP( h ( ℓ − 1) v ( t ) , ˜ h ( ℓ ) v ( t )) .
Therefore, if the initial embeddings are identical, and the aggregated messages at each layer are also identical, we have that h ( ℓ ) u ( t ) =
h ( ℓ ) v ( t ) for any ℓ .
Statement 2: TGN-Att cannot distinguish the nodes u and v in our example.
We now show that adding a memory module to TGAT produces node states such that s u ( t ) =
s v ( t ) =
s a ( t ) , s z ( t ) =
s w ( t ) , and s b ( t )
=
s c ( t ) .
If that is the case, then these node states could be treated as node features in a equivalent TGAT model of our example in Figure S2, proving that there is no
TGN-Att
such that h ( ℓ ) v ( t ) ̸ = h ( ℓ ) u ( t ) .
In the following, we consider TGN-Att with average memory aggregators (see Appendix A).
We begin by showing that s a ( t ) =
s u ( t ) =
s v ( t ) after memory updates.
We note that the memory message node a receives is [ e ∥ t 1 ∥ s z ( t 1 )] .
The memory message node u receives is
M EAN A GG ([ e ∥ t 1 ∥ s w ( t 1 )] , [ e ∥ t 1 ∥ s z ( t 1 )]) , but since s w ( t 1 ) =
s z ( t 1 ) , both messages are the same, and the average aggregator outputs [ e ∥ t 1 ∥ s z ( t 1 )] .
Finally, the message that node v receives is [ e ∥ t 1 ∥ s w ( t 1 )] =
[ e ∥ t 1 ∥ s z ( t 1 )] .
Since all three nodes receive the same memory message and have the same initial features, their updated memory states are identical.
Now we show that s z ( t ) =
s w ( t ) , for t 1 < t ≤ t 2 .
Note that the message that node z receives is M EAN A GG ([ e ∥ t 1 ∥ s a ( t 1 )] , [ e ∥ t
∥ s u ( t 1 )]) =
[ e ∥ t 1 ∥ s u ( t 1 )] , with s u ( t 1 ) =
s a ( t 1 ) .
The message that node w receives is M EAN A GG ([ e ∥ t 1 ∥
s u ( t 1 )] , [ e ∥ t 1 ∥ s v ( t 1 )])
=
[ e ∥ t 1 ∥ s u ( t 1 )] .
Again, since the initial features and the messages received by each node are equal, s z ( t ) =
s w ( t ) for t 1 < t ≤ t 2 .
We can then use this to show that s z ( t ) =
s w ( t ) for t > t 2 .
Note that at time t 2 , the message that nodes z and w receive are [ e ∥ t t
∥ s b ( t 2 )] and [ e ∥ t 2 − t 1 ∥
s c ( t 2 )] , respectively.
Also, note that s b ( t 2 ) =
s c ( t 2 ) =
s b (0)
=
s c (0) as the states of b and c are only updated right after t 2 .
Because the received messages and the previous states (up until t 2 ) of z and w are identical, we have that s z ( t ) =
s w ( t ) for t > t 2 .
Finally, we show that s b ( t ) =
s c ( t ) .
Using that s z ( t 2 ) =
s w ( t 2 ) in conjunction with the fact that node b receives message [[ e ∥ t 2 − t {+
+} ∥ s z ( t 2 )]] , and node c receives [ e ∥ t 2 − t {+
+} ∥ s w ( t 2 )] , we obtain s b ( t ) =
s c ( t ) since initial memory states and messages that the nodes received are the same.
B.7 Proof of Proposition 5: Limitations of MP-TGN and CAWs
Proof.
Using the example in Figure S3(Left), we adapt a construction by Wang et al.
[38] to show that CAW can separate events that MP-TGNs adopting node embedding concatenation cannot.
We first note that the TCTs of u and z are isomorphic.
Thus, since v is a common endpoint in ( u, v, t 3 ) and ( z, v, t 3 ) , no MP-TGN can distinguish these two events.
Nonetheless, CAW obtains the following anonymized walks for the event ( u, v, t 3 ) : [Equation] [Equation]
[Equation]
−→ { [0 , 1 , 0] , [2 , 0 , 0] } (cid:124) (cid:123)(cid:122) (cid:125)
I CAW ( v ; S u ,S v ) { [0 , 1 , 0] , [2 , 0 , 0] } (cid:124) (cid:123)(cid:122) (cid:125)
I CAW ( v ; S u ,S v ) t 1 −→ { [1 , 0 , 0] , [0 , 1 , 0] } (cid:124) (cid:123)(cid:122) (cid:125)
I CAW ( u ; S u ,S v ) { [0 , 1 , 0] , [2 , 0 , 0] } (cid:124) (cid:123)(cid:122) (cid:125)
I CAW ( v ; S u ,S v ) t 2 −→ { [0 , 0 , 0] , [0 , 1 , 0] } (cid:124) (cid:123)(cid:122) (cid:125)
I CAW ( w ; S u ,S v ) t 1 −→ { [0 , 0 , 0] , [0 , 0 , 1] } (cid:124)
(cid:123)(cid:122) (cid:125)
I CAW ( z ; S u ,S v ) and the walks associated with ( z, v, t 3 ) are (here we omit underbraces for readability): { [1 , 0 , 0] , [0 , 0 , 1] } t 1 −→ { [0 , 1 , 0] , [0 , 1 , 0] } { [0 , 0 , 0] , [2 , 0 , 0] } t 1 −→ { [0 , 0 , 0] , [0 , 1 , 0] } { [0 , 0 , 0] , [2 , 0 , 0] } t 2 −→ { [0 , 1 , 0] , [0 , 1 , 0] } t 1 −→ { [1 , 0 , 0] , [0 , 0 , 1] }
In this example, assume that MLPs used to encode each walk correspond to identity mappings.
Then, the sum of the elements in each set is injective since each element of the sets in the anonymized walks are one-hot vectors.
We note that, in this example, we can simply choose a RNN that sums the vectors in each sequence (walks), and then apply a mean readout layer (or pooling aggregator) to obtain distinct representations for ( u, v, t 3 ) and ( z, v, t 3 ) .
We now use the example in Figure S3(Right) to show that MP-TGNs can separate events that CAW cannot.
To see why MP-TGNs can separate the events ( u, z, t 4 ) and ( u ′ , z, t 4 ) , it suffices to observe that the 4-depth TCTs of u and u ′ are non-isomorphic.
Thus, a MP-TGN with injective layers could distinguish such events.
Now, let us take a look at the anonymized walks for ( u, z, t 4 ) : { [1 , 0] , [0 , 0] } (cid:124)
[Equation]
[Equation] [Equation]
z )
[Equation] [Equation] [Equation]
[Equation]
and for ( u ′ , z, t 4 ) : { [1 , 0] , [0 , 0] } (cid:124) (cid:123)(cid:122) (cid:125)
I CAW ( u ′ ; S u ′ ,S z ) t 1 −→ { [0 , 1] , [0 , 0] } (cid:124) (cid:123)(cid:122) (cid:125)
I CAW ( v ′ ; S u ′ ,S z ) { [0 , 0] , [1 , 0] } (cid:124) (cid:123)(cid:122) (cid:125)
I CAW ( z ; S u ′ ,S z ) t 1 −→ { [0 , 0] , [0 , 1] } (cid:124) (cid:123)(cid:122) (cid:125)
I CAW ( w ; S u ′ ,S z )
Since the sets of walks are identical, they must have the same embedding.
Therefore, there is no
CAW model that can separate these two events.
B.8 Proof of Proposition 6: Injective MP-TGNs and the temporal WL test
We want to prove that injective MP-TGNs can separate two temporal graphs if and only if the temporal WL does the same.
Our proof comprises two parts.
We first show that if an MP-TGN produces different multisets of embeddings for two non-isomorphic temporal graphs G ( t ) and G ′ ( t ) , then the temporal WL decides these graphs are not isomorphic.
Then, we prove that, if the temporal
WL decides G ( t ) and G ′ ( t ) are non-isomorphic, there is an injective MP-TGN (i.e., with injective message-passing layers) that outputs distinct multisets of embeddings.
Statement 1: Temporal WL is at least as powerful as MP-TGNs.
See Lemma B2 for proof.
Statement 2: Injective MP-TGN is at least as powerful as temporal WL.
Proof.
To prove this, we can repurpose the proof of Theorem 3 in [43].
In particular, we assume MPTGNs that meet the injective requirements of Proposition 2, i.e., MP-TGNs that implement injective aggregate and update functions on multisets of hidden representations from temporal neighbors.
Following their footprints, we prove that there is a injection φ to the set of embeddings of all nodes in a temporal graph from their respective colors in the temporal WL test.
We do so via induction on the number of layers ℓ .
To achieve our purpose, we can assume identity memory without loss of generality.
The base case ( ℓ = 0 ) is straightforward since the temporal WL test initializes colors with node features.
We now focus on the inductive step.
Suppose the proposition holds for ℓ − 1 .
Note that our update function:
[Equation]
can be rewritten using φ as a function of node colors:
[Equation]
Note that the composition of injective functions is also injective.
In addition, time-shifting operations are also injective.
Thus we can construct an injection ψ such that:
[Equation]
since there exists an element ( u, e, t ′ )
∈ N ( v, t )
if and only if there is an event ( u, v, t ′ )
∈ G ( t ) with feature e uv ( t ′ )
=
e .
Then, we can write:
[Equation]
Note φ = ψ ◦ H ASH − 1 is injective since it is a composition of two injective functions.
We then conclude that if the temporal WL test outputs different multisets of colors, then a suitable MP-TGN outputs different multisets of embeddings.
B.9 Proof of Proposition 7: MP-TGNs and CAWs fail to decide some graph properties
Statement 1: MP-TGNs fail to decide some graph properties.
Proof.
Adapting a construction by Garg et al.
[9], we provide in Figure S4 an example that demonstrates Proposition 7.
Colors denote node features, and all edge features are identical.
The temporal graphs G ( t ) and G ′ ( t ) are non-isomorphic and differ in properties such as diameter ( ∞ for G ( t ) and 3 for G ′ ( t ) ), girth ( 3 for G ( t ) and 6 for G ( t ) ), and number of cycles ( 2 for G ( t ) and 1 for G ′ ( t ) ).
In spite of that, for t > t 3 , the set of embeddings of nodes in G ( t ) is the same as that of nodes in G ′ ( t ) and, therefore, MP-TGNs cannot decide these properties.
In particular, by constructing the TCTs of all nodes at time t > t 3 , we observe that the TCTs of the pairs ( u 1 , u ′ 1 ) , ( u 2 , u ′ 2 ) , ( v 1 , v ′ 1 ) , ( v 2 , v ′ 2 ) , ( w 1 , w ′ 1 ) , ( w 2 , w ′ 2 ) are isomorphic and, therefore, they can not be distinguished (Lemma 1).
Statement 2: CAWs fail to decide some graph properties.
Since CAW does not provide a recipe to obtain graph-level embeddings, we first define such a procedure.
Let G ( t ) be a temporal graph given as a set of events.
We sequentially compute event embeddings h γ for each event γ
= ( u, v, t ′ ) ∈ G ( t ) respecting the temporal order (two or more events at the same timestamp are computed in parallel).
We then apply a readout layer to the set of event embeddings to obtain a graph-level representation.
We provide a proof assuming this procedure.
Proof.
We can adapt our construction in Figure 2 [rightmost] to extend Proposition 7 to CAW.
The idea consists of creating two temporal graphs with different diameters, girths, and numbers of cycles that comprise events that CAW cannot separate — Figure S5 provides one such construction.
In particular, CAW obtains identical embeddings for ( u, z, t 3 ) and ( a ′ , z ′ , t 3 ) (as shown in Proposition 5).
The remaining events are the same up to node re-labelling and thus also lead to identical embeddings.
Therefore, CAW cannot distinguish G 1 ( t ) and G 2 ( t ) although they clearly differ in diameter, girth, and number of cycles.
B.10 Proof of Lemma
We now show that the k -th component of the relative positional features r ( t ) u
→ v corresponds to the number of occurrences of u at the k -th layer of the monotone TCT of v , and this is valid for all pairs of nodes u and v of the dynamic graph.
We proceed with a proof by induction.
[ Base case ] Let us consider t = 0 , i.e., no events have occurred.
By definition, r (0) u
→ v is the zero vector if u ̸ = v , indicating that node u does not belong to the TCT of v .
If u = v , then r (0) u
→ u = [1 , 0 , . . .
, 0] corresponds to count 1 for the root of the TCT of u .
Thus, for t = 0 , the proposition holds.
[ Induction step ] Assume that the proposition holds for all nodes and any time instant up to t .
We will show that after the event γ = ( u, v, t ) at time t , the proposition remains true.
Note that the event γ only impacts the monotone TCTs of u and v .
The reason is that the monotone TCTs of all other nodes have timestamps lower than t , which prevents the event γ from belonging to any path (with decreasing timestamps) from the root.
Without loss of generality, let us now consider the impact of γ on the monotone TCT of v .
Figure S shows how the TCT of v changes after γ , i.e., how it goes from ˜ T v ( t ) to ˜ T v ( t + ) .
In particular, the process attaches the TCT of u to the root node v .
Under this change, we need to update the counts of all nodes i in ˜ T u ( t ) regarding how many times it appears in ˜ T v ( t + ) .
We do so by adding the counts in ˜ T u ( t ) (i.e., r ( t ) i → u ) to ˜ T v ( t ) (i.e., r ( t ) i → v ), accounting for the 1 -layer mismatch, since ˜ T u ( t ) is attached to the first layer.
This can be easily achieved with the shift matrix
P = (cid:20)
[Equation]
[Equation] (cid:21) applied to the counts of any node i in ˜ T u ( t ) , i.e.,
[Equation]
where V ( t ) u comprises the nodes of the original graph that belong to ˜ T ( t ) u .
Similarly, the event γ also affects the counts of nodes in the monotone TCT of v w.r.t.
the monotone
TCT of u .
To account for that change, we follow the same procedure and update r ( t + ) j → u = P r ( t ) j → v + r ( t ) j → u , ∀ j ∈ V ( t ) v .
Handling multiple events at the same time.
We now consider the setting where a given node v interacts with multiple nodes u 1 , u 2 , . . .
, u J at time t .
We can extend the computation of positional features to this setting in a straightforward manner by noting that each event leads to an independent branch in the TCT of v .
Therefore, the update of the positional features with respect to v is given by
[Equation]
We note that the updates of the positional features of u 1 , . . .
, u J remain untouched if they do not interact with other nodes at time t .
B.11 Proof of Proposition 8: Injective function on temporal neighborhood
Proof.
To capture the intuition behind the proof, first consider a multiset M such that | M | < 4 .
We can assign a unique number ψ ( m ) ∈ { 1 , 2 , 3 , 4 } to any distinct element m ∈ M .
Also, the function h ( m ) = 10 − ψ ( m ) denotes the decimal expansion of ψ ( m ) and corresponds to reserving one decimal place for each unique element m ∈ M .
Since there are less than 10 elements in the multiset, note that (cid:80) m h ( m ) is unique for any multiset M .
To prove the proposition, we also leverage the well-known fact that the Cartesian product of two countable sets is countable — the Cantor’s (bijective) pairing function z : N × N → N , with z ( n 1 , n 2 ) =
( n 1 + n 2 )( n 1 + n 2 +1)+ n 2 , provides a proof for that.
Here, we consider multisets M = {{ ( x i , e i , t i ) }} whose tuples take values on the Cartesian product of the countable sets X , E , and T — the latter is also assumed to be bounded.
In addition, we assume the lengths of all multisets are bounded by N , i.e., | M | < N for all M .
Since X and E are countable, there exists an enumeration function ψ : X × E → N for all M .
Without loss of generality, we assume T = { 1 , 2 , t max } .
We want to show that exists a function of the form (cid:80) i 10 − kψ
( x i ,e i ) α − βt i that is unique on any multiset M .
Our idea is to separate a range of k decimal slots for each unique element ( x i , e i , · ) in the multiset.
Each such a range has to accommodate at least t max decimal slots (one for each value of t i ).
Finally, we need to make sure we can add up to N values at each decimal slot.
Formally, we map each tuple ( x i , e i , · ) to one of k decimal slots starting from 10 − kψ
( x i ,e i ) .
In particular, for each element ( x i , e i , t i = j ) we add one unit at the j -th decimal slot after 10 − kψ ( x i ,e i ) .
Also, to ensure the counts for ( x i , e i , j ) and ( x i , e i , l ̸ = j ) do not overlap, we set β
= ⌈ log 10 N ⌉ since no tuple can repeat more than N times.
We use α = 10 as we shift decimals.
Finally, to guarantee that each range encompasses t max slots of β decimals, we set k = β ( t max + 1) .
Therefore, the function (cid:88)
[Equation]
is unique on any multiset M .
We note that, without loss of generality, one could choose a different basis (other than 10).
B.12 Proof of Proposition 9: Expressiveness of PINT: link prediction
Proof.
We now show that PINT (with relative positional features) is strictly more powerful than
MP-TGN and CAW in distinguishing edges of temporal graphs.
Leveraging Proposition 5, it suffices to show that PINT is at least as powerful as both CAW and MP-TGN.
Statement 1: PINT is at least as powerful as MP-TGNs.
Since PINT is a generalization of MP-TGNs with injective aggregation/update layers, it derives that it is at least as powerful as MP-TGNs.
We can set the model’s parameters associated with positional features to zero and obtain an equivalent MP-TGN.
Statement 2: PINT is at least as powerful as CAW.
We wish to show that for any pair of events that PINT cannot distinguish, CAW also cannot distinguish it.
Let us consider the events ( u, v, t ) and ( u ′ , v ′ , t ) of a temporal graph.
Formally, we want to prove that if {{ T u ( t ) , T v ( t ) }} = {{ T u ′ ( t ) , T v ′ ( t ) }} (i.e., the multisets contain TCTs that are pairwise isomorphic), then {{ E NC ( W ; S u , S v ) }} W ∈{ S u ∪ S v } = {{ E NC ( W ′ ; S u ′ , S v ′ ) }} W ′ ∈{ S u ′ ∪ S v ′ } , where
E NC denotes the walk-encoding function of CAW.
Importantly, for the sake of this proof, we assume that all TCTs here are augmented with positional features, characterizing edge embeddings obtained from PINT.
Without loss of generality, we can assume that T u ( t ) ∼ = T u ′ ( t ) and T v ( t ) ∼ = T v ′ ( t ) .
By Lemma B1, we know that the corresponding monotone TCTs are also isomorphic: ˜ T u ( t ) ∼ = ˜ T u ′ ( t ) , and ˜ T v ( t ) ∼ = ˜
T v ′ ( t ) with associated bijections f 1 : V ( ˜ T u ( t ))
→ V ( ˜ T u ′ ( t )) and f 2 : V ( ˜ T v ( t ))
→ V ( ˜ T v ′ ( t )) .
We can construct a tree T uv by attaching ˜ T u ( t ) and ˜ T v ( t ) to a (virtual) root node uv — without loss of generality, u and v are the left-hand and right-hand child of uv , respectively.
We can follow the same procedure and create the tree T u ′ v ′ by attaching the TCTs ˜ T u ′ ( t ) and ˜ T v ′ ( t ) to a root node u ′ v ′ .
Since the left-hand and right-hand subtrees of T uv and T u ′ v ′ are isomorphic, then T uv and
T u ′ v ′ are also isomorphic.
Let f : V ( T uv ) → V ( T u ′ v ′ ) denote the bijection associated with the augmented trees.
We also assume f is constructed by preserving the bijections f 1 and f 2 defined between the original monotone TCTs: this ensures that f does not map any node in V ( ˜ T u ( t )) to a node in V ( ˜ T v ′ ( t )) , for instance.
We have that
[Equation]
Note that we use the function ♯ (that maps nodes in the TCT to nodes in the dynamic graph) here because the positional feature vectors are defined for nodes in the dynamic graph.
To guarantee that two encoded walks are identical E NC ( W ; S u , S v )
=
E NC ( W ′ ; S u ′ , S v ′ ) , it suffices to show that the anonymized walks are equal.
Thus, we turn our problem into showing that for any walk W = ( w 0 , t 0 , w 1 , t 1 , . . . ) in S u ∪ S v , there exists a corresponding one
W ′ =
( w ′ 0 , t 0 , w ′ 1 , t 1 , . . . )
in S u ′ ∪ S v ′ such that I CAW ( w i ; S u , S v )
=
I CAW ( w ′ i ; S u ′ , S v ′ ) for all i .
Recall that I CAW ( w i ; S u , S v ) =
{ g ( w i ; S u ) , g ( w i ; S v ) } , where g ( w i ; S u ) is a vector whose kcomponent stores how many times w i appears in a walk from S u at position k .
A key observation is that there is an equivalence between deanonymized root-leaf paths in T uv and walks in S u ∪ S v (disregarding the virtual root node).
By deanonymized, we mean paths where node identities (in the temporal graph) are revealed by applying the function ♯ .
Using this equivalence, it suffices to show that
[Equation]
Suppose there is an i ∈ V ( T uv ) \{ uv } such that g ( ♯i ; S u )
̸
= g ( ♯f ( i ); S u ′ ) .
Without loss of generality, suppose this holds for the ℓ -th entry of the vectors.
We know there are exactly r ( t ) a → u [ ℓ ] nodes at the ℓ -th level of ˜ T u ( t ) that are associated with a = ♯i ∈
V ( G ( t )) .
We denote by Ψ the set comprising such nodes.
It also follows that computing g ( ♯i ; S u )
[ ℓ ] is the same as summing up the amount of leaves of each subtree of ˜ T u ( t ) rooted at ψ ∈ Ψ , which we denote as l ( ψ ; ˜ T u ( t )) , i.e., g (
[Equation]
S [Equation] [Equation] ] =
[Equation]
Since we assume g ( ♯i ; S u )[ ℓ ] ̸ = g ( ♯f ( i ); S u ′ )
[ ℓ ] , then it holds that
[Equation]
Note that the subtree of ˜ T u rooted at ψ should be isomorphic to the subtree of ˜ T u ′ rooted at f ( ψ ) , and therefore have the same number of leaves.
However, the RHS of Equation S5 above implies there is a ψ ∈ Ψ for which l ( ψ ; ˜ T u )
̸
= l ( f ( ψ ); ˜ T u ′ ) , reaching a contradiction.
The same argument can be applied to v and v ′ to prove that g ( ♯i ; S v ) =
g ( ♯f ( i ); S v ′ ) .
C Additional related works
Structural features for static GNNs.
Using structural features to enhance the power of GNNs is an active research topic.
Bouritsas et al.
[48] improved GNN expressivity by incorporating counts of local structures in the message-passing procedure, e.g, the number triangles a node appears on.
These counts depend on identifying subgraph isomorphisms and, naturally, can become intractable depending on the chosen substructure.
Li et al.
[52] proposed increasing the power of GNNs using distance encodings, i.e., augmenting original node features with distance-based ones.
In particular, they compute the distance between a node set whose representation is to be learned and each node in the graph.
To alleviate the cost of distance encoding, an alternative is to learn absolute position encoding schemes [51, 61, 62], that try to summarize the role each node plays in the overall graph topology.
We note that another class of methods uses random features to boost the power of GNNs [47, 58].
However, these models are referred to be hard to converge and obtain noisy predictions [62].
The most trivial difference between these approaches and PINT is that our relative positional features account for temporal information.
On a deeper level, our features summarize the role each node plays in each other’s monotone
TCT instead of measuring, e.g., pair-wise distances in the original graph or counting substructures.
Also, our scheme leverages the temporal aspect to achieve computational tractability, updating features incrementally as events unroll.
Finally, while some works proposing structural features for static GNNs present marginal gains [62], PINT exhibits significant performance gains in real-world temporal link prediction tasks.
Other models for temporal graphs.
Representation learning for dynamic graphs is a broad and diverse field.
In fact, strategies to cope with the challenge of modeling dynamic graphs can come in many flavors, including simple aggregation schemes [18], walk-aggregating methods [53], and combinations of sequence models with GNNs [56, 59].
For instance, Seo et al.
[59] used a spectral graph convolutional network [49] to encode graph snapshots followed by a graph-level LSTM [13].
Manessi et al.
[55] followed a similar approach but employed a node-level LSTM, with parameters shared across the nodes.
Sankar et al.
[57] proposed a fully attentive model based on graph attention networks [34].
Pareja et al.
[56] applied a recurrent neural net to dynamically update the parameters of a GCN.
Gao and Ribeiro [50] compared the expressive power of two classes of models for discrete dynamic graphs: time-and-graph and time-then-graph.
The former represents the standard approach of interleaving GNNs and sequence (e.g., RNN) models.
In the latter class, the models first capture node and edge dynamics using RNNs, and are then feed into graph neural networks.
The authors showed that time-then-graph has expressive advantage over time-and-graph approaches under mild assumptions.
For an in-depth review of representation learning for dynamic graphs, we refer to the survey works by Kazemi et al.
[14] and Skarding et al.
While most of the early works focused on discrete-time dynamic graphs, we have recently witnessed a rise in interest in models for event-based temporal graphs (i.e., CTDGs).
The reason is that models for DTDGs may fail to leverage fine-grained temporal and structural information that can be crucial in many applications.
In addition, it is hard to specify meaningful time intervals for different tasks.
Thus, modern methods for temporal graphs explicitly incorporate timestamp information into sequence/graph models, achieving significant performance gains over approaches for DTDGs [38].
Appendix A provides a more detailed presentation of CAW, TGN-Att, and TGAT, which are among the best performing models for link prediction on temporal graphs.
Besides these methods,
JODIE [16] applies two RNNs (for the source and target nodes of an event) with a time-dependent embedding projection to learn node representations of item-user interaction networks.
Trivedi et al. [32] employed RNNs with a temporally attentive module to update node representations.
APAN [63] consists of a memory-based TGN that uses attention mechanism to update memory states using multi-hop temporal neighborhood information.
Makarov et al.
[54] proposed incorporating edge embeddings obtained from CAW into MP-TGNs’ memory and message-passing computations.
D Datasets and implementation details D.1 Datasets
In our empirical evaluation, we have considered six datasets for dynamic link prediction: Reddit 1 ,
Wikipedia 2 , UCI 3 , LastFM 4 , Enron 5 , and Twitter.
Reddit is a network of posts made by users on subreddits, considering the 1,000 most active subreddits and the 10,000 most active users.
Wikipedia comprises edits made on the 1,000 most edited Wikipedia pages by editors with at least 5 edits.
Both
Reddit and Wikipedia networks include links collected over one month, and text is used as edge features, providing informative context.
The LastFM dataset is a network of interactions between user and the songs they listened to.
UCI comprises students’ posts to a forum at the University of California Irvine.
Enron contains a collection of email events between employees of the Enron
Corporation, before its bankruptcy.
The Twitter dataset is a non-bipartite net where nodes are users and interactions are retweets.
Since Twitter is not publicly available, we build our own version by following the guidelines by Rossi et al.
We use the data available from the 2021 Twitter RecSys
Challenge and select 10,000 nodes and their associated interactions based on node participation: number of interactions the node participates in.
We also apply multilingual BERT to obtain text representations of retweets (edge features).
Table S1 reports statistics of the datasets such as number of temporal nodes and links, and the dimensionality of the edge features.
We note that UCI, Enron, and LastFM represent non-attributed networks and therefore do not contain feature vectors associated with the events.
Also, the node features for all datasets are vectors of zeros [42]. [Table] [Table] No
LastFM
[Table]
[Table]
Yes
D.2 Implementation details
We train all models in link prediction tasks in a self-supervised approach.
During training, we generate negative samples: for each actual event ( z, w, t ) (class 1), we create a fake one ( z, w ′ , t ) (class 0) where w ′ is uniformly sampled from the set of nodes, and both events have the same edge feature vector.
To ensure a fair comparison, we mainly rely on the original repositories and guidelines.
For instance, regarding the training of MP-TGNs (including PINT), we mostly follow the setup and choices in the implementation available in [27].
In particular, we apply the Adam optimizer with learning rate 10 −during 50 epochs with early stopping if there is no improvement in validation AP for 5 epochs.
In addition, we use batch size 200 for all methods.
We report statistics (mean and standard deviation) of the performance metric (AP) over ten runs.
MP-TGNs.
For TGN-Att, we follow Rossi et al.
[27] and sample either ten or twenty temporal neighbors with memory dimensionality equal to 32 (Enron), 100 (UCI, Twitter), or 172 (Reddit, Wikipedia, LastFM), node embedding dimension equal to 100, and two attention heads.
We use a memory unit implemented as a GRU, and update the state of each node based on only its most recent message.
For TGAT, we use twenty temporal neighbors and two layers.
CAW.
We conduct model selection using grid search over: i) time decay α ∈ { 0 . 01 , 0 . 1 , 0 .
5 , 1 . 0 , 2 . 0 , 4 . 0 , 10 . 0 , 100 . 0 } × 10 − 6 , ii) number of walks M ∈ { 1 , 2 , 3 , 4 , 5 } ; 1 http://snap.stanford.edu/jodie/reddit.csvhttp:// snap .stanford.edu/jodie/wikipedia.csvhttp://konect.cc/networks/opsahl-ucforum and iii) walk length L ∈ { 32 , 64 , 128 } .
The best combination of hyperparameters is shown in
Table S2.
The remaining training choices follows the default values from the original implementation.
Importantly, we note that TGN-Att’s original evaluation setup is different from CAW’s.
Thus, we adapted CAW’s original repo to reflect these differences and ensure a valid comparison.
[Table]
PINT.
We use α = 2 (in the exponential aggregation function), and experiment with learned and fixed β .
We apply a relu function to avoid negative values of β , which could lead to unstable training.
We do grid search as the follow: when learning beta, we consider initial values for β ∈ { 0 . 1 , 0 . 5 } ; for the fixed case ( requires_grad=False ), we evaluate β ∈ { 10 − 3 × |N| , 10 − 4 × |N| , 10 − 5 × |N|} — |N| denotes the number of temporal neighbors — and always apply memory as in the original implementation of TGN-Att.
We consider number message passing layers ℓ in { 1 , 2 } .
Also, we apply neighborhood sampling with the number of neighbors in { 10 , 20 } , and update the state of a node based on its most recent message.
We then carry out model selection based on AP values obtained during validation.
Overall, the models with fixed β led to better results.
Table S3 reports the optimal hyperparameters for PINT found via automatic model selection.
In all experiments, we use relative positional features with d = 4 dimensions.
For computational efficiency, we update the relative positional features only after processing a batch, factoring in all events from that batch.
Note that this prevents information linkage as these positional features take effect after prediction.
In addition, since temporal events repeat (in the same order) at each epoch, we also speed up PINT’s training procedure by precomputing and saving the positional features for each batch.
To save up space, we store the positional features as sparse matrices.
[Table]
Hardware.
For all experiments, we use Tesla V100 GPU cards and consider a memory budget of 32GB of RAM.
E Deletion and node-level events
Rossi et al.
[27] propose handling edge deletions by simply updating memory states of the edge’s endpoints, as if we were dealing with a usual edge addition.
However, it is not discussed whether the edge in question should be excluded from the event list or if we should just add a novel event with edge features that characterize deletion.
If we choose the former, we may be unable to recover the memory state of a node from its monotone TCT and the original node features.
Removing an edge from the event list also affects the computation of node embeddings.
Therefore, we advise practitioners to do the latter when using PINT.
It is worth mentioning that the vast majority of models for temporal interaction prediction do not consider the possibility of deletion events.
Regarding node-level events, PINT can accommodate node addition by simply creating novel memory states.
To deal with node feature updates, we can create an edge event with both endpoints on that node, inducing a self-loop in the dynamic graph.
Also, we can combine (e.g., concatenate) the temporal features in message-passage operations, similarly to the general formulation of the MP-TGN framework [27].
Finally, we can deal with the removal of a node v by following our previous (edge deletion) procedure to delete all edges with endpoints in v .
F Additional experiments
Time comparison.
Figure S7 compares the time per epoch for PINT and for the prior art (CAW,
TGN-Att, and TGAT) in the Enron and LastFM datasets.
Following the trend in Figure 7, Figure S further supports that PINT is generally slower than other MP-TGNs but, after a few training epochs, is orders of magnitude faster than CAW.
In the case of Enron, the time CAW takes to complete an epoch is much higher than the time we need to preprocess PINT’s positional features.
[Figure]
Experiments on node classification.
For completeness, we also evaluate PINT on node-level tasks (Wikipedia and Reddit).
We follow closely the experimental setup in Rossi et al.
[27] and compare against the baselines therein.
Table S4 shows that PINT ranks first on Reddit and second on
Wikipedia.
The values for PINT reflect the outcome of 5 repetitions.
[Table]