Abstract
Temporal Graph Neural Networks (TGNNs) are essential for modeling dynamic systems, yet memory-based variants (M-TGNNs) face significant scalability hurdles due to the sequential nature of node memory updates. This paper presents DistTGL, a distributed framework designed to scale M-TGNN training across GPU clusters. By introducing a hybrid static-dynamic memory model, novel parallelism strategies—including epoch and memory parallelism—and an asynchronous memory daemon, DistTGL overcomes the communication bottlenecks and accuracy degradation typical of large-batch distributed training. Our evaluation demonstrates that DistTGL achieves up to a 10.17x throughput speedup and a 14.5% improvement in accuracy on large-scale datasets like GDELT.
1. Introduction
Dynamic graphs, where nodes and edges evolve over time, are ubiquitous in real-world applications such as fraud detection, recommendation engines, and traffic flow analysis. Memory-based Temporal Graph Neural Networks (M-TGNNs) have emerged as the state-of-the-art for these tasks, utilizing a "node memory" vector to summarize a node's historical interactions.
However, the stateful nature of this memory creates a fundamental conflict with modern parallel computing. Because memory updates must follow a strict chronological order to maintain temporal consistency, training is inherently sequential. Attempts to scale M-TGNNs via distributed GPU clusters often face two primary hurdles: the "Accuracy Gap," where large batch sizes lead to stale memory updates, and the "System Gap," where the overhead of synchronizing node memory across a network negates the benefits of additional hardware.
2. Challenges in Scaling M-TGNNs
The core difficulty lies in the sequential dependency of node memory. In a dynamic system, an event at time $t$ depends on the state resulting from all events prior to $t$.
- The Accuracy Gap: To utilize GPUs efficiently, high throughput is required, often achieved through large mini-batches. However, in M-TGNNs, large batches mean many events occur "simultaneously" from the model's perspective. This prevents the memory from updating between related events within the same batch, leading to "information loss" and stale states.
- The System Gap: Existing frameworks like TGL are optimized for single-machine environments. In a distributed setup, synchronizing hundreds of megabytes of node memory across multiple nodes for every mini-batch creates a massive network bottleneck, often making distributed training slower than single-GPU execution.
3. The DistTGL Framework
DistTGL addresses these challenges through a multi-layered approach involving model architecture, algorithmic parallelism, and system-level optimization.
3.1 Static Node Memory
To mitigate the impact of stale dynamic memory, DistTGL introduces a static node memory component. By augmenting the dynamic GRU-based memory with pre-trained embeddings that represent stable node characteristics, the model retains core identity information even when the dynamic component suffers from batch-induced staleness. This hybrid approach makes the model significantly more resilient during parallel training.
3.2 Parallelism Strategies
DistTGL moves beyond simple mini-batch parallelism by introducing two sophisticated strategies:
- Epoch Parallelism: Multiple trainers process different epochs simultaneously. This maintains temporal consistency within each trainer's view while increasing overall throughput.
- Memory Parallelism: The training timeline is partitioned into segments. Each trainer group is responsible for a specific time segment and maintains its own local copy of the node memory. This "trades space for time," effectively localizing memory management and eliminating the need for frequent cross-machine synchronization.
3.3 Asynchronous Memory Daemon
To optimize system performance, DistTGL employs a Memory Daemon Process. This process runs independently of the main training loop, handling all memory read and write operations asynchronously. While the GPU computes gradients for the current batch, the daemon prefetches and slices the required memory for the subsequent batch, effectively hiding I/O and communication latency.
4. Experimental Evaluation
DistTGL was evaluated on five benchmark datasets: Wikipedia, Reddit, MOOC, Flights, and GDELT. The GDELT dataset, containing over 191 million edges, served as the primary stress test for large-scale scalability.
4.1 Performance and Accuracy
The results demonstrate that DistTGL successfully bridges the gap between scalability and precision:
- Throughput: DistTGL achieved a 10.17x speedup in training throughput compared to the previous state-of-the-art (TGL) on a single machine.
- Accuracy: On the massive GDELT dataset, DistTGL improved accuracy by 14.5% over existing methods, proving that its architectural enhancements effectively combat the staleness problem.
- Scalability: The system demonstrated near-linear convergence speedup. Training on GDELT, which previously took hours or was computationally prohibitive, was completed in less than 30 minutes using a cluster of 32 GPUs.
5. Conclusion and Future Work
DistTGL represents a significant advancement in making large-scale temporal graph training practical. By decoupling static and dynamic features and utilizing localized memory parallelism, it overcomes the traditional bottlenecks of M-TGNNs.
However, limitations remain. Memory parallelism increases system RAM requirements, as multiple copies of node memory must be stored. Furthermore, choosing the optimal balance of parallelism parameters currently relies on heuristic tuning. Future research will focus on automating these configurations and exploring disk-based caching to support graphs with billions of nodes.
Summary updated