Towards Better Dynamic Graph Learning: New Architecture and Unified Library

Le Yu, Leilei Sun, Bowen Du, Weifeng Lv

TL;DR

Researchers have introduced DyGFormer, a Transformer-based architecture that masters dynamic graph learning by using a "patching" technique to handle long node histories and a neighbor co-occurrence scheme to capture node correlations. Alongside the model, they released DyGLib, a unified library designed to end the "Wild West" of inconsistent evaluation and reproducibility issues in the field.

The Challenge of Dynamic Graphs

Dynamic graphs—networks where nodes and links evolve over time, such as social networks or transaction logs—are notoriously difficult to model. Current methods face two major hurdles:

  1. Architecture Limitations: Most models treat the two nodes in an interaction independently, failing to exploit the "correlation" between them (e.g., do they share many common friends?). Furthermore, as node histories grow, traditional models like RNNs suffer from vanishing gradients, while Graph Convolutional Networks (GCNs) become computationally explosive. This forces researchers to truncate histories, losing valuable long-term dependencies.
  2. The Reproducibility Crisis: The field lacks a "gold standard" for evaluation. Different papers use different frameworks, training pipelines, and negative sampling strategies. This has led to inconsistent results where it is nearly impossible to tell if a new model is actually better or just benefited from a more "generous" implementation.

Methods: A Two-Part Solution

To address these issues, the authors propose a new model architecture and a standardized ecosystem.

DyGFormer Architecture

DyGFormer is designed to efficiently process long histories and capture the intricate relationships between interacting nodes.

Architecture of DyGFormer
  • Neighbor Co-occurrence Encoding (NCoE): Instead of looking at a source node $u$ and destination node $v$ in isolation, DyGFormer calculates how often their neighbors overlap in their historical sequences. This explicitly models the correlation between the two nodes.
  • Patching Technique: Inspired by Vision Transformers (ViT), DyGFormer divides a node’s long history into multiple "patches" of temporally adjacent interactions. This allows the model to process much longer histories (up to 4096 interactions) efficiently, as the number of tokens fed into the Transformer remains manageable.
  • Transformer Backbone: A standard Transformer encoder is used to learn temporal dependencies both within a single node's history and across the histories of the two interacting nodes.

DyGLib Library

To fix the evaluation mess, the authors built DyGLib, an open-source PyTorch library. It provides standardized training pipelines to eliminate "implementation bias" and comprehensive evaluation protocols. This includes three different negative sampling strategies (random, historical, and inductive) to ensure models aren't just "gaming" easy tasks.

Key Insights and Results

The study exhaustively evaluated models on 13 diverse datasets, covering social interactions, communications, and trade logistics for tasks like dynamic link prediction and dynamic node classification.

  • The "More is Better" Breakthrough: Most existing models actually perform worse when given longer histories because they cannot filter noise or handle the computational load. DyGFormer is one of the few models that shows consistent performance gains as the input sequence length increases.
Performance vs. History Length
  • SOTA Performance: DyGFormer achieved the best or second-best results on almost all 13 datasets, maintaining a top average rank across both transductive (seen nodes) and inductive (unseen nodes) settings. It proved particularly strong on datasets with long-term dependencies (like LastFM), where other models failed to capture the distant past.
  • NCoE is a "Plug-and-Play" Win: The researchers found that their Neighbor Co-occurrence Encoding is versatile. When plugged into other existing models (like TCL), those models saw significant performance boosts (averaging over 5% improvement).
  • Rigorous Testing Reveals Flaws: By re-testing popular baselines in the unified DyGLib environment, the authors found that many previously reported results were inconsistent. This highlights that "state-of-the-art" claims in this field are often more about the training pipeline than the model architecture itself.

Limitations and Future Work

While DyGFormer is powerful, its NCoE scheme is a double-edged sword. It relies on the assumption that common neighbors are a strong signal for future interaction. In datasets where this isn't true (like the UN Vote dataset), DyGFormer can actually underperform simpler memory-based models.

Future work involves expanding DyGLib to include even more recent datasets and exploring how to make the co-occurrence encoding more adaptive to different types of network behaviors.

Summary updated

BibTeX
@inproceedings{yu2023towards,
  author = {Le Yu and Leilei Sun and Bowen Du and Weifeng Lv},
  title = {{Towards Better Dynamic Graph Learning: New Architecture and Unified Library}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2023},
  url = {https://openreview.net/forum?id=xHNzWHbklj},
}
Figure