Temporal Graph Benchmark for Machine Learning on Temporal Graphs

Shenyang Huang, Farimah Poursafaei, Jacob Danovitch, Matthias Fey, Weihua Hu, Emanuele Rossi, Jure Leskovec, Michael M. Bronstein, Guillaume Rabusseau, Reihaneh Rabbany

TL;DR

The Temporal Graph Benchmark (TGB) provides a much-needed "reality check" for machine learning on evolving networks. By introducing large-scale datasets and more rigorous, ranking-based evaluation protocols, TGB reveals that many state-of-the-art models are currently outperformed by simple heuristics, opening a new frontier for robust temporal graph research.

What Problem Does This Paper Address?

Many real-world systems—from social networks and financial transactions to global flight paths—are best represented as Temporal Graphs (TGs), where nodes and edges change over time. While Graph Neural Networks (GNNs) have revolutionized static graph analysis, the temporal sub-field has struggled with a "performance mirage."

The authors identify three critical gaps:

  1. Scale and Diversity: Existing benchmarks are often orders of magnitude smaller than real-world networks and are limited to a few domains (mostly social media).
Comparison of TGB datasets versus existing datasets by scale
  1. Flawed Evaluation: Most studies treat link prediction as a binary classification task with "easy" random negatives. This leads to over-optimistic results that don't translate to real-world applications like recommendation systems.
  2. Reproducibility: A lack of standardized pipelines makes it difficult to compare new models against established baselines fairly.

Methods

TGB introduces a standardized, automated pipeline (inspired by the Open Graph Benchmark) that handles data loading, experimental setup, and evaluation.

Key methodological shifts include:

  • From Classification to Ranking: Instead of asking if an edge exists (binary), models must now rank a true destination node against a large set of "negative" (fake) candidates. This better mimics real-world retrieval tasks.
  • Negative Sampling: TGB uses a mix of random negatives and historical negatives (edges that existed in the past but aren't present now), which are significantly harder for models to distinguish.
  • Streaming Evaluation: Models are evaluated in a "streaming" setting where they can update their internal memory with new information at inference time, but cannot perform back-propagation or weight updates.
  • New Task (Node Affinity): Beyond link prediction, TGB introduces "Node Affinity Prediction," which tasks models with predicting how a node's preferences (e.g., a user's music genre interests) shift over time.

Datasets

TGB contributes nine datasets across five domains, categorized by scale (Small, Medium, Large):

  • Link Prediction (tgbl-): Includes wiki (co-editing), review (Amazon electronics), coin (crypto transactions), comment (Reddit replies), and flight (international air traffic).
  • Node Affinity (tgbn-): Includes trade (UN agriculture), genre (LastFM music), reddit (subreddit interactions), and token (crypto-token transactions).

These datasets are massive; for instance, tgbn-token contains over 72 million edges, and tgbl-comment spans over 30 million timestamps.

Key Insights and Results

  • The Heuristic Challenge: One of the most striking findings is that simple, non-learning heuristics often beat complex deep learning models. For example, a "moving average" or "persistence forecast" (predicting the future looks like the recent past) is currently SOTA on several node property tasks. In the node affinity tasks, simple heuristics like Moving Average outperformed the complex TGN model on three out of four datasets (e.g., achieving an NDCG@10 of 0.559 on tgbn-reddit vs. TGN's 0.315).
  • The "Surprise Index": The authors define a "surprise index"—the ratio of test edges never seen during training. Models that rely on memorization (like TGN) perform well when the index is low but crash when the network evolves in unexpected ways (high surprise). On the tgbl-wiki dataset, the NAT model achieves the best MRR (0.749). However, on the more challenging tgbl-review dataset (which has a high surprise index), GraphMixer and TGAT take the lead, while NAT's performance drops significantly.
  • Inference Bottlenecks: There is a massive disparity in computational efficiency. Some SOTA models take two orders of magnitude longer for inference than simple memory-based heuristics, making them impractical for truly large-scale, real-time applications.
Test time comparison showing inference bottlenecks in complex models

As shown above, heuristics like EdgeBank are at least one order of magnitude faster than neural methods, highlighting a major area for future optimization in TG models.

Limitations and Future Work

The authors acknowledge that TGB currently focuses on the "streaming" evaluation setting and lacks certain domains, such as biological networks. Future work includes expanding the benchmark to include node classification (e.g., fraud detection), adding more diverse domains, and developing new TG models that can actually beat simple heuristics across all dataset scales and "surprise" levels.

The benchmark, leaderboards, and code are publicly available at https://tgb.complexdatalab.com/.

Summary updated

BibTeX
@inproceedings{huang2023temporal,
  author = {Shenyang Huang and Farimah Poursafaei and Jacob Danovitch and Matthias Fey and Weihua Hu and Emanuele Rossi and Jure Leskovec and Michael M. Bronstein and Guillaume Rabusseau and Reihaneh Rabbany},
  title = {{Temporal Graph Benchmark for Machine Learning on Temporal Graphs}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2023},
  url = {https://openreview.net/forum?id=qG7IkQ7IBO},
}
Figure