Efficient Dynamic Graph Representation Learning at Scale

Xinshi Chen, Yan Zhu, Haowen Xu, Mengyang Liu, Liang Xiong, Muhan Zhang, Le SongarXiv 2021

Abstract

Dynamic graphs with ordered sequences of events between nodes are prevalent in real-world industrial applications such as e-commerce and social platforms. However, representation learning for dynamic graphs has posed great computational challenges due to the time and structure dependency and irregular nature of the data, preventing such models from being deployed to real-world applications. To tackle this challenge, we propose an efficient algorithm, Efficient Dynamic Graph lEarning (EDGE), which selectively expresses certain temporal dependency via training loss to improve the parallelism in computations. We show that EDGE can scale to dynamic graphs with millions of nodes and hundreds of millions of temporal events and achieve new state-of-the-art (SOTA) performance.

Introduction: The Challenge of Sequential Dependency

Dynamic graphs represent interactions (events) between nodes over time—think of users clicking on items in an e-commerce store or messages sent on a social network. To capture these patterns, models usually update a node's "state" (embedding) every time it's involved in an event.

The primary challenge is sequential dependency. If a user interacts with 100 items, the 100th update depends on the 99th, which depends on the 98th, and so on. This creates a very deep Directed Acyclic Graph (DAG) of computations. While GPUs are excellent at parallel processing, they are often underutilized when forced to process these long sequential chains one step at a time. Existing methods either parallelize independent users—which fails in "scale-free" networks where a few "hub" nodes participate in many events—or simply cannot scale beyond small datasets.

The EDGE Framework: Breaking the Chain

EDGE (Efficient Dynamic Graph lEarning) introduces two main strategies to break these long dependency chains and maximize parallelism:

  1. D-nodes (Decoupling Nodes): EDGE identifies the longest paths in the computational DAG and "cuts" them at specific points called d-nodes. For each d-node, an auxiliary learnable embedding is introduced. This allows the "future" part of the chain to begin training immediately using the auxiliary embedding, without waiting for the "past" part to finish. To maintain consistency, a soft constraint (quadratic penalty) is added to the training loss, forcing the auxiliary embedding to align with the actual computed embedding.
  2. Static Embeddings for Active Nodes: In many real-world networks, a small number of nodes are extremely active (e.g., popular items or "celebrity" users). EDGE observes that these nodes' embeddings eventually converge, where new interactions provide diminishing returns. By treating these high-degree nodes as static learnable vectors during training, EDGE removes a massive number of edges from the dependency graph, drastically increasing parallelism.
Figure 2: Comparison of parallelization between JODIE and EDGE. EDGE decouples temporal nodes to reduce the computational depth from 6 steps to 3.

Key Insights: Depth as the Bottleneck

Drawing from parallel algorithm theory, the authors argue that the "depth" (the longest sequential chain) of the computation determines execution time, rather than the total number of operations. Shortening this depth is the key to high GPU utilization.

Furthermore, while treating active nodes as static might seem like a loss of information, it actually simplifies the optimization landscape. This approach mitigates the "vanishing gradient" problem common in deep recurrent architectures, often leading to better final accuracy. By moving some dependencies into the loss function via the d-node penalty, EDGE trades a small amount of "exactness" during early training for massive gains in parallel speed.

Experimental Results: Accuracy and Scalability

EDGE was evaluated on four public datasets, including two massive industrial-scale ones: Taobao (~96.7M interactions) and MovieLens-25M (25M interactions).

  • State-of-the-Art Accuracy: On the Taobao dataset, EDGE achieved a Mean Reciprocal Rank (MRR) of 0.675, significantly outperforming strong baselines like MIMN (0.607) and JODIE (0.454).
  • Massive Speedups: EDGE is exceptionally efficient. On Taobao, it takes approximately 13 minutes per epoch. In contrast, many GNN-based dynamic models take hours or fail due to out-of-memory (OOM) errors.
  • Scalability: EDGE is the first dynamic graph model demonstrated to handle nearly 100 million events efficiently while maintaining high predictive performance.
Figure 6: Performance comparison on Taobao and ML-25M datasets. EDGE (red X) achieves the highest MRR with significantly lower per-epoch training time compared to other models.

Conclusion and Future Work

While EDGE provides a scalable solution for dynamic graphs, it introduces some memory overhead due to auxiliary and static embeddings. Future work could explore more sophisticated graph-partitioning algorithms for d-node selection and adapt the static treatment of active nodes for purely inductive settings where new, highly active nodes appear during testing.

Summary updated

BibTeX
@misc{chen2021efficient,
  author = {Xinshi Chen and Yan Zhu and Haowen Xu and Mengyang Liu and Liang Xiong and Muhan Zhang and Le Song},
  title = {{Efficient Dynamic Graph Representation Learning at Scale}},
  year = {2021},
  eprint = {2112.07768},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2112.07768},
}
Figure