Learning Dynamic Graph Embeddings Using Random Walk With Temporal Backtracking

Chenghan Huang, Lili Wang, Xinyuan Cao, Weicheng Ma, Soroush VosoughiTGL @ NeurIPS 2022

TL;DR

This paper introduces a novel method for learning embeddings of entire dynamic graphs, capturing both their structure and temporal evolution. By using a "temporal backtracking random walk" on a multilayer graph and then applying a doc2vec language model, they achieve state-of-the-art performance on graph similarity ranking and anomaly detection tasks.

What Problem Does This Paper Address?

Graph representation learning, or network embedding, is a powerful technique for converting complex graph data into low-dimensional vectors. While much research has focused on embedding individual nodes, there's a growing need to embed entire graphs. This is particularly challenging for dynamic graphs, whose structure changes over time. Existing methods for dynamic graph embedding primarily focus on nodes, and static graph embedding methods are ill-suited for capturing the evolving nature of temporal networks. The authors aim to fill this gap by developing a method for learning low-dimensional, graph-level representations of dynamic graphs, which are crucial for tasks like retrieving similar graphs or detecting anomalies within them.

Methods

The core of the proposed method lies in two main components:

  1. Multilayer Graph Construction and Temporal Backtracking Random Walk: The authors first construct a multilayer graph where each layer represents a snapshot of the dynamic graph at a specific time. Crucially, they introduce a "temporal backtracking random walk." This walk can move within a layer (capturing local structure) or step back to the previous layer (incorporating historical information). A parameter a controls the probability of staying in the current layer versus moving to the previous one, allowing for a smooth decay of older information. This walk generates sequences of nodes, which are treated as "sentences."
  2. Doc2Vec Language Model: These generated "sentences" (walks) from all snapshots are then combined into "documents" representing each graph snapshot. A modified doc2vec language model is employed to learn a single vector representation for each document (snapshot). This model is trained to capture the relationships between these "sentences" and their associated timestamps, effectively producing a graph-level embedding.

Datasets

The paper evaluates their method on five publicly available social graph datasets:

  • Reddit (Game of Thrones)
  • Reddit (Formula1)
  • Facebook wall posts
  • Enron
  • Slashdot

These datasets were previously used by Beladev et al. [5] for temporal similarity ranking and anomaly detection tasks. The authors note that they used the same datasets and preprocessing steps (removing nodes with degree less than five) for fair comparison.

Key Insights and Ideas

  • Bridging the Gap in Dynamic Graph Embedding: The paper directly addresses a significant limitation in the field by proposing a method for dynamic graph-level embedding, which was largely unexplored.
  • Temporal Context is Key: The "temporal backtracking" mechanism is a clever way to inject historical information into the random walk, allowing the embeddings to capture how the graph evolves.
  • Leveraging Language Models for Graphs: Applying a doc2vec-like approach to graph walks is an innovative way to generate holistic graph representations, treating graph structures as akin to textual documents.
  • Smooth Decay of Temporal Influence: The parameter a in the random walk provides a tunable mechanism to control how much influence older graph states have on the current embedding.

Key Results

The proposed method demonstrates strong performance across the evaluated tasks:

  • Temporal Similarity Ranking: The method achieves state-of-the-art performance on four out of five datasets, outperforming all baselines, including the only other existing dynamic graph-level embedding method, tdGraphEmbed. There were only three exceptions where tdGraphEmbed performed slightly better.
  • Anomaly Detection: The model achieves performance comparable to the state-of-the-art method tdGraphEmbed, and in some cases, matches it. The authors suggest this task's focus on consecutive timestamps might explain why several methods perform well.
  • Scalability: The model exhibits linear scalability with respect to the number of edges, and even sub-linear performance due to parallel processing, making it suitable for large real-world networks.

Limitations and Future Work

  • Limitations: The paper notes that for the anomaly detection task, their method (and others) might not show as significant an advantage because the task primarily considers consecutive timestamps, and the datasets used had a limited number of anomalies.
  • Future Work: The authors suggest extending their model to handle heterogeneous dynamic networks, which are dynamic networks with multiple types of edges or nodes. This would allow for richer representations of more complex real-world systems.

Summary updated

BibTeX
@inproceedings{huang2022learning,
  author = {Chenghan Huang and Lili Wang and Xinyuan Cao and Weicheng Ma and Soroush Vosoughi},
  title = {{Learning Dynamic Graph Embeddings Using Random Walk With Temporal Backtracking}},
  booktitle = {TGL @ NeurIPS},
  year = {2022},
  url = {https://openreview.net/forum?id=Hze8Pa3BGV},
}
Figure