UTG: Towards a Unified View of Snapshot and Event Based Models for Temporal Graphs

Shenyang Huang, Farimah Poursafaei, Reihaneh Rabbany, Guillaume Rabusseau, Emanuele Rossi

Introduction

In the landscape of graph machine learning, representing the temporal evolution of networks is a critical challenge. Real-world systems—ranging from financial transaction logs to social media interactions—are inherently dynamic. Historically, the research community has diverged into two distinct paradigms for modeling these changes: Discrete-Time Dynamic Graphs (DTDGs), which treat time as a sequence of snapshots, and Continuous-Time Dynamic Graphs (CTDGs), which treat time as a continuous stream of timestamped events.

This paper introduces the Unified Temporal Graph (UTG) framework, a novel approach designed to bridge the gap between these two methodologies. By providing a unified view, the authors enable the first rigorous head-to-head comparison between snapshot-based and event-based models, revealing that the perceived performance gap is often a matter of training logic and structural features rather than the data format itself.

The Problem: Format Silos

Temporal Graph (TG) research has long been hindered by a "format silo" problem. Models designed for DTDGs (e.g., EvolveGCN, GCLSTM) and those designed for CTDGs (e.g., TGN, NAT) operate in different evaluation environments. CTDG models typically use a streaming setting, while DTDG models often operate on pre-defined batches. Because of these disparate input formats and evaluation protocols, it has been nearly impossible to determine which architectural choices truly drive performance. The UTG framework acts as a "Rosetta Stone," allowing any model to be evaluated on any data format.

The UTG Framework

The UTG framework consists of three core components that facilitate this cross-format compatibility:

  1. Input Mapper: This component handles bidirectional data conversion. It can discretize a continuous event stream into snapshots or "unroll" snapshots into batches of events. Crucially, it maintains temporal integrity by ensuring no "data leakage" occurs—preventing models from accessing future information during the prediction of the current state.
  2. Output Mapper: To apply snapshot-based models to continuous-time tasks, the framework employs a Zero-order Hold. This mechanism broadcasts the prediction from the most recent snapshot as a constant value until the next snapshot becomes available, allowing for continuous-time inference.
  3. UTG Training Procedure: Perhaps the most significant technical contribution is the shift in training logic. While standard snapshot models are often trained on entire sequences, UTG training enforces a "streaming" mode. Models predict the next snapshot using only past information and backpropagate the loss at every discrete step. This approach is mathematically grounded in Truncated Backpropagation Through Time (TBTT), which enhances the model's ability to learn long-term temporal dependencies while avoiding vanishing gradients.

Key Insights and Results

The authors evaluated the UTG framework across eight diverse datasets, including both DTDG benchmarks (UCI, Enron, Contact, Social Evo, MOOC) and CTDG benchmarks (tgbl-wiki, tgbl-review, and Reddit). Their findings challenge several common assumptions in the field:

1. The Speed Advantage

Snapshot-based models process edges in bulk, which grants them a massive efficiency advantage. The researchers found that snapshot models were consistently 10x to 100x faster during inference than high-performing event-based models like NAT. This makes them significantly more viable for large-scale, real-time industrial applications.

2. Training Logic vs. Architecture

The study revealed that the training procedure is often more influential than the model architecture itself. By simply applying the UTG per-step loss training to traditional snapshot models like HTGN and GCLSTM, these models achieved performance levels competitive with—and sometimes superior to—the widely used Temporal Graph Network (TGN).

3. The Role of Structural Features

While snapshot models are efficient, top-tier event models like NAT and DyGFormer still maintain an edge in accuracy on certain datasets. The authors attribute this not to the event-based format, but to the use of joint neighborhood structural features. These models explicitly analyze common neighbors between nodes, a context that most current snapshot models ignore.

4. Surprising Simplicity

In a notable finding, a basic 2-layer GCN (a static graph model) combined with the UTG training logic achieved the second-best performance on the Social Evo dataset. This underscores the power of the temporal training pipeline over complex architectural bells and whistles.

Limitations and Future Directions

Despite the success of the UTG framework, snapshot models still face challenges when dealing with "unseen" edges—scenarios where the test data exhibits a high "surprise index" compared to training data.

The authors conclude that the future of temporal graph learning lies in Hybrid Models. By integrating the structural context (joint neighborhoods) found in event-based models with the computational efficiency of snapshot-based processing, researchers can develop a new generation of learners that are both state-of-the-art in accuracy and highly scalable.

Summary updated

BibTeX
@inproceedings{huang2024utg,
  author = {Shenyang Huang and Farimah Poursafaei and Reihaneh Rabbany and Guillaume Rabusseau and Emanuele Rossi},
  title = {{UTG: Towards a Unified View of Snapshot and Event Based Models for Temporal Graphs}},
  booktitle = {LoG},
  year = {2024},
  url = {https://openreview.net/forum?id=ZKHV6Cpsxg},
}
Figure