TG-GAN: Deep Generative Models for Continuously-time Temporal Graph Generation

Liming Zhang, Liang Zhao, Shan Qin, Dieter PfoserarXiv 2020 · DOI

Abstract

The recent deep generative models for static graphs that are now being actively developed have achieved significant success in areas such as molecule design. However, many real-world problems involve temporal graphs whose topology and attribute values evolve dynamically over time, including important applications such as protein folding, human mobility networks, and social network growth. As yet, deep generative models for temporal graphs are not yet well understood and existing techniques for static graphs are not adequate for temporal graphs since they cannot 1) encode and decode continuously-varying graph topology chronologically, 2) enforce validity via temporal constraints, or 3) ensure efficiency for information-lossless temporal resolution. To address these challenges, we propose a new model, called "Temporal Graph Generative Adversarial Network" (TG-GAN) for continuous-time temporal graph generation, by modeling the deep generative process for truncated temporal random walks and their compositions. Specifically, we first propose a novel temporal graph generator that jointly model truncated edge sequences, time budgets, and node attributes, with novel activation functions that enforce temporal validity constraints under recurrent architecture. In addition, a new temporal graph discriminator is proposed, which combines time and node encoding operations over a recurrent architecture to distinguish the generated sequences from the real ones sampled by a newly-developed truncated temporal random walk sampler. Extensive experiments on both synthetic and real-world datasets demonstrate TG-GAN significantly outperforms the comparison methods in efficiency and effectiveness.

Introduction

Most research in graph generation focuses on static graphs, such as molecules or social network snapshots. However, many real-world systems are inherently temporal: human mobility, cyber-security logs, and protein folding all involve connections that appear and disappear at specific moments. These systems are characterized by continuously-varying topologies and precise timing patterns that are difficult for traditional models to capture.

Examples of temporal graphs: (a) Human Mobility Network and (b) User Authentication Graph.

Existing methods struggle with temporal graphs for three main reasons:

  1. Temporal Validity: In a real sequence, time must move forward. Static models lack chronological constraints, potentially allowing "teleportation" to a destination before arrival at the starting point.
  2. Efficiency: Representing a temporal graph as a series of snapshots is memory-intensive and often loses fine-grained timing information.
  3. Joint Modeling: Simultaneously learning discrete structures ("who connects to whom") and continuous variables ("exactly when") is mathematically challenging.

Methods

The authors introduce TG-GAN (Temporal Graph Generative Adversarial Network). Instead of generating a whole graph at once, TG-GAN generates Truncated Temporal Random Walks (TTRWs). This approach reduces complexity from $O(V^2)$ to $O(L_s)$, where $L_s$ is the walk length, allowing the model to scale to much larger graphs.

The TG-GAN generator architecture, modeling truncated temporal random walks with time budgets and node attributes.

Key Technical Innovations

  • Time Budgeting: The model treats time as a "budget" ($t_{end} - t_{current}$), helping the recurrent neural network (RNN) track remaining time in a sequence and ensuring walks do not exceed the observation period.
  • Deep Temporal Random Sampler: TG-GAN uses a non-parametric approach with deconvolutional layers to learn arbitrary, complex timing patterns directly from data, rather than assuming simple distributions like Gaussians.
  • Temporal Validity Activations: Specific mathematical bounds (Clipping, Nested Relu, and Minimax Bounding) are integrated into the generator's architecture to enforce chronological validity.
  • Joint Encoding: By feeding both the previous node (discrete) and the remaining time budget (continuous) back into the LSTM at each step, the model learns the deep dependency between location and timing.
  • Handling Sparsity: To solve the "SpaderTrap" problem where walkers get stuck in sparse sub-graphs, the authors introduce "temporal jumps" based on a Bayesian prior, ensuring global structure is learned.

Experiments and Results

The model was evaluated on synthetic scale-free graphs (up to 2,500 nodes) and real-world datasets including user authentication logs and Washington D.C. metro trip records.

Key Findings

  • Superior Accuracy: TG-GAN outperformed baselines like GraphRNN and GraphVAE by up to two orders of magnitude in metrics like Average Degree and Coordination Number.
  • Handling Sparsity: On the sparse Metro dataset, traditional models often failed (returning "NaN"), while TG-GAN successfully captured the bursty, periodic nature of transit.
  • Scalability: TG-GAN was the only deep model to complete the 2,500-node synthetic dataset within a reasonable timeframe, while competitors either crashed or timed out.
  • Visual Fidelity: Qualitative visualizations show that TG-GAN's generated graphs almost perfectly mimic the density blocks and temporal flow of ground truth data.

Conclusion

TG-GAN addresses the limitations of static graph generative models by focusing on continuous-time temporal random walks. It provides a scalable and accurate framework for generating realistic temporal graphs. Future work could explore high-dimensional node features and further improve permutation invariance.

Summary updated

BibTeX
@misc{zhang2020tg,
  author = {Liming Zhang and Liang Zhao and Shan Qin and Dieter Pfoser},
  title = {{TG-GAN: Deep Generative Models for Continuously-time Temporal Graph Generation}},
  year = {2020},
  eprint = {2005.08323},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2005.08323},
}
Figure