TGB 2.0: A Benchmark for Learning on Temporal Knowledge Graphs and Heterogeneous Graphs

Julia Gastinger, Shenyang Huang, Mikhail Galkin, Erfan Loghmani, Ali Parviz, Farimah Poursafaei, Jacob Danovitch, Emanuele Rossi, Ioannis Koutis, Heiner Stuckenschmidt, Reihaneh Rabbany, Guillaume Rabusseau · DOI

Introduction

Real-world data is inherently dynamic and multi-relational. In social networks, e-commerce, and knowledge bases, entities do not merely connect; they interact through specific event types at precise moments in time. Predicting these future links is a cornerstone of modern recommendation systems and automated knowledge base completion. However, research in temporal graph learning has been constrained by a "scalability gap" and inconsistent evaluation protocols. Most existing benchmarks are limited to fewer than 2 million edges, failing to represent the complexity of production-scale networks. Furthermore, the lack of standardized metrics and negative sampling strategies has led to over-optimistic performance reports that do not translate to real-world utility.

The TGB 2.0 Framework

TGB 2.0 addresses these challenges by providing a unified, reproducible pipeline for the dynamic link property prediction task. The framework transitions from simple binary classification to a more rigorous ranking problem. For every ground-truth edge, models must rank it against a set of "negative" samples.

To ensure realistic difficulty, TGB 2.0 introduces Type-Aware Negative Sampling. Instead of random sampling, distractors are chosen to share the same edge or node types as the query. This prevents models from achieving high scores through trivial type-matching. Performance is measured using a time-aware filtered Mean Reciprocal Rank (MRR), which accounts for temporal conflicts to ensure fair evaluation.

Dataset Characteristics

The benchmark introduces eight novel datasets across five domains, significantly expanding the scale of available research data. These are categorized into Temporal Knowledge Graphs (TKGs) and Temporal Heterogeneous Graphs (THGs).

Scale comparison of TGB 2.0 datasets against existing benchmarks.

The TKG category includes tkgl-smallpedia and tkgl-wikidata (extracted from Wikidata), tkgl-polecat (socio-political interactions), and tkgl-icews (a 28-year archive of political events). The THG category features thgl-software and thgl-github (GitHub interactions), thgl-forum (Reddit data), and thgl-myket (an Android app market dataset with 53 million interactions).

Temporal edge distributions for tkgl-smallpedia and thgl-software.

Experimental Insights and Results

Evaluation on these large-scale datasets revealed several critical insights:

  1. The Scalability Wall: Many state-of-the-art deep learning models, such as RE-GCN and TGN, encountered Out-Of-Memory (OOM) or Out-Of-Time (OOT) errors on the largest datasets. For instance, on tkgl-wikidata, the simple heuristic EdgeBank was the only method capable of scaling, achieving an MRR of 0.535.
  2. Strength of Heuristics: Simple baselines like RecB, which relies on the recency and frequency of past interactions, often outperformed complex neural architectures. On tkgl-icews, RecB achieved a validation MRR of 0.211, closely trailing the top-performing symbolic logic model, TLogic (0.186 MRR on test).
  3. Importance of Edge Types: In THGs, ignoring edge-type information led to significant performance degradation. The nature of the relationship is as vital as its timing.
  4. Recurrency Correlation: There is a direct correlation between the frequency of a relation type and model performance. Current models still struggle with "low-recurrency" events that occur infrequently.

Conclusion

TGB 2.0 exposes the limitations of current temporal graph models when faced with real-world scale and complexity. The benchmark highlights a pressing need for more efficient architectures that can handle tens of millions of edges without prohibitive hardware requirements. By providing a standardized evaluation pipeline and diverse, large-scale datasets, TGB 2.0 sets a new foundation for developing robust and scalable temporal graph learning algorithms.

Summary updated

BibTeX
@inproceedings{gastinger2024tgb,
  author = {Julia Gastinger and Shenyang Huang and Mikhail Galkin and Erfan Loghmani and Ali Parviz and Farimah Poursafaei and Jacob Danovitch and Emanuele Rossi and Ioannis Koutis and Heiner Stuckenschmidt and Reihaneh Rabbany and Guillaume Rabusseau},
  title = {{TGB 2.0: A Benchmark for Learning on Temporal Knowledge Graphs and Heterogeneous Graphs}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2024},
  url = {https://openreview.net/forum?id=Oj6A3pSkyS},
}
Figure