TL;DR
Temporal Graph Networks (TGNs) struggle with predicting the intensity of future node interactions, often losing to simple heuristics like moving averages. This paper proves that TGNs are theoretically incapable of tracking past message histories due to their permutation-invariant design. By introducing TGNv2, which adds source-target node identification to interaction messages, the authors break this limitation and achieve state-of-the-art performance across all major benchmarks.
What Problem Does This Paper Address?
In temporal graph learning, dynamic node affinity prediction asks: how much will node $x$ interact with node $y$ over a future time interval? This is crucial for real-world applications like forecasting trade volumes between nations or predicting a user's future listening habits in recommender systems.
Surprisingly, advanced Temporal Graph (TG) models consistently perform poorly on this task. They are routinely outperformed by dead-simple baselines like persistent forecasting (predicting that the future will look exactly like the most recent interaction) or moving averages over past data. This paper investigates the fundamental architectural flaw causing deep learning models to fail at a task that simple heuristics easily solve.
Methods
The authors provide a mathematical proof showing that standard TGNs cannot represent a moving average or an autoregressive model of any order. This failure stems from TGN's permutation invariance: the model cannot distinguish between the senders and receivers of messages when updating node memories.
To fix this, the authors propose TGNv2. The core modification is straightforward but mathematically powerful: they inject explicit source and target node identifications ($\phi_n(i)$ and $\phi_n(j)$) directly into the message construction function:
$$\mathbf{m}_i(t) = \text{msg}_s(\mathbf{s}_i(t^-), \mathbf{s}_j(t^-), \phi_t(\Delta t), e_{ij}(t), \phi_n(i), \phi_n(j))$$
This simple addition breaks the permutation invariance trap. It allows the network's memory updater to "index" specific pairwise interaction histories, enabling the model to theoretically and practically simulate autoregressive and moving average functions.
Datasets
The models were evaluated using the Temporal Graph Benchmark (TGB), specifically focusing on four dynamic node affinity prediction datasets:
tgbn-trade: Tracks the global exchange of goods between nations.tgbn-genre: Models music users and their listening history across genres.tgbn-reddit: Details user interactions and postings within various subreddits.tgbn-token: Observes crypto token transactions.
Key Insights and Ideas
- The Permutation Invariance Blindspot: While permutation invariance is highly desirable for static Graph Neural Networks (GNNs) to generalize across structures, it acts as a straightjacket for temporal networks trying to track specific historical trends between pairs of nodes.
- Heuristics as a Design Guide: Instead of trying to invent a completely detached deep learning architecture, the authors used the success of simple heuristics (like moving averages) to pinpoint exactly what mathematical operations the neural network was failing to compute.
Key Results
TGNv2 completely revitalizes TGN performance, outperforming all existing temporal graph models (including JODIE, TGAT, CAWN, GraphMixer, and DyGFormer) by a wide margin.
As shown in the results table below, on the tgbn-trade dataset, TGNv2 nearly doubles the performance of standard TGN, jumping from a test NDCG@10 of 0.374 to 0.735. It also performs comparably to or better than the competitive "Moving Average over Messages" heuristic across all benchmarks.
Limitations and Future Work
While TGNv2 dramatically closes the gap and beats all deep learning baselines, it still slightly lags behind the absolute best heuristic ("Moving Average over ground-truth Labels") on certain datasets like tgbn-trade.
The authors note this is likely because their current message aggregator is restricted to outputting only the last message in a batch to maintain a fair, controlled comparison with original TGN setups. Future work will focus on exploring more expressive message aggregation functions and evaluating TGNv2 on other temporal graph tasks, such as dynamic link prediction.
Summary updated