Temporal and Dynamic Graph Networks
Most graph neural networks assume a fixed, unchanging graph, but supply chains, correlation networks, and ownership structures all evolve — temporal graph networks add a notion of time, so a node's representation reflects not just its current neighbors but the order and timing in which relationships formed and changed.
Prerequisites: Message Passing Neural Networks, Graph Convolutional Networks (GCN)
A standard graph neural network is built for a graph that sits still: one adjacency matrix, one set of node features, one forward pass. But a supply-chain graph gains and loses edges as contracts start and end, an ownership network changes every time a fund files a new 13F, and a correlation graph between stocks is really a rolling window that shifts every single day. Treating any of these as one frozen snapshot throws away exactly the information that often matters most: when did this edge appear, and in what order did things happen?
The analogy: a photo album versus a video
A static GNN looks at a graph the way you'd look at a single photograph — a frozen instant, however detailed. A temporal graph network looks at it the way you'd watch a video: not just what the scene looks like right now, but how it got there, which events happened first, and how quickly things are changing. Knowing that company started buying from only last week is a very different signal than knowing they've been trading steadily for a decade, even if both graphs, frozen at this instant, look identical. The "when" carries information a snapshot destroys.
Two ways to add time
Discrete-time approaches slice the evolving graph into a sequence of static snapshots — one graph per day, or per quarter — and run a GNN on each snapshot, then feed the sequence of resulting embeddings into a sequence model (like an RNN) that tracks how a node's representation moves over time:
In words: at each time step , run an ordinary GNN forward pass on that snapshot's graph to get node 's "graph-aware" representation, then update 's running memory by combining it with what came before, the same way an RNN carries state from one time step to the next.
Continuous-time approaches (like TGN, Temporal Graph Networks) skip the snapshot idea entirely and process a raw stream of timestamped events — "edge appeared at time " — updating a compact memory vector for each node the instant an event touching it occurs, rather than waiting for a snapshot boundary. This captures irregular timing (an edge that appeared 2 minutes ago behaves differently in the model than one that appeared 2 years ago) that a fixed daily or quarterly slicing would flatten away.
Worked example 1: discrete snapshots by hand
Take a 3-node correlation graph observed at two time steps. At : stocks and are connected (correlated), is isolated. Running a simple mean-aggregation GNN gives and each an embedding averaging their own and each other's features, say both settle at , while (no neighbors, unchanged). At : has become newly correlated with (edge appears), while has weakened and dropped. A fresh GNN pass on this new snapshot gives (averaged now with instead of ), , and (now isolated, roughly unchanged from its own prior value with no neighbor pull). Feeding into an RNN produces a running representation for that reflects both "was tied to " and "is now tied to " — information a single-snapshot model at alone would never see, since it has no memory of the link ever existing.
Worked example 2: why timing order changes the prediction
Suppose a link-prediction model is asked whether and are likely to become correlated next. Scenario 1: the graph history shows formed, then formed one day later — a fast, tight sequence suggesting some shared shock is propagating quickly through the group, raising the odds and link soon too. Scenario 2: the exact same two edges exist, but formed two years ago and formed last week — a static snapshot of "who is connected to whom" is identical between these two scenarios, yet a temporal model, seeing the timestamps, would assign a much higher link-forming probability to scenario 1 than scenario 2, because rapid, clustered edge formation is a different, stronger signal than two unrelated events separated by years. This is precisely the information a snapshot-only model discards.
The evolving paths above are a reminder of what a temporal graph model must track that a static one cannot: not just where things are, but the trajectory and speed of how they got there.
Temporal graph networks track when edges and node features change, not just their current state — either by running a GNN on a sequence of snapshots and feeding the results through a sequence model, or by updating a per-node memory continuously as timestamped events stream in. The order and speed of change is itself information a static graph snapshot destroys.
What this means in practice
Correlation graphs, ownership networks (updated at each 13F filing), and supply-chain graphs (updated as contracts start or lapse) are all naturally dynamic, and a static GNN retrained from scratch on each new snapshot both wastes the ordering information and is expensive to retrain constantly. Temporal graph networks are used for early-warning systems (a sudden burst of new correlated links can signal a common shock propagating through a sector), for forecasting which relationships are about to strengthen or dissolve, and for fraud detection where the sequence of transactions, not just their existence, is the tell. The practical cost is complexity: continuous-time models need careful handling of memory staleness (a node's memory not updated in months should be treated differently from one updated seconds ago) and are considerably harder to implement and debug than a static GNN.
Practice
- In worked example 1, compute what 's RNN-updated representation might reasonably reflect if a third snapshot at showed reappearing while persists.
- Explain in one sentence why a discrete-snapshot approach can miss information that a continuous-time approach captures.
- Give one financial example where the order two edges formed in matters more than which edges currently exist.
The common confusion is assuming that adding an RNN or timestamp feature on top of an existing static GNN pipeline is "basically the same model, slightly enhanced." Genuinely dynamic graph modeling changes what the training data even looks like — instead of one fixed graph and one set of labels, you need a stream or sequence of graph states with careful attention to not leaking future edges into a snapshot that is supposed to represent an earlier point in time, a mistake that silently inflates offline backtest performance.
Related concepts
Practice in interviews
Further reading
- Rossi et al., Temporal Graph Networks for Deep Learning on Dynamic Graphs (2020)
- Kazemi et al., Representation Learning for Dynamic Graphs: A Survey (2020)