Self-Supervised Dynamic Graph Representation Learning via Temporal Subgraph Contrast

Ke-Jia Chen, Linsong Liu, Linpu Jiang, Jingqiang ChenACM TKDD 2021 · DOI

TL;DR

This paper introduces DySubC, a novel self-supervised framework for learning representations of dynamic graphs that explicitly incorporates temporal information. By proposing a temporal subgraph sampling strategy and a contrastive learning objective, DySubC effectively captures the evolving relationships within graphs, outperforming existing methods on link prediction tasks.

What Problem Does This Paper Address?

Graphs are powerful tools for representing relationships in various domains, from social networks to biological systems. However, many real-world graphs are dynamic, meaning relationships (edges) appear and disappear over time. Traditional graph representation learning methods often treat graphs as static snapshots, failing to capture this temporal evolution. This limitation can lead to inaccurate predictions, especially when node behavior changes over time. For instance, a social network user might shift their professional connections, a fact missed by static models. This paper addresses this gap by developing a method that learns node representations that reflect these dynamic changes.

Methods

DySubC employs a self-supervised approach, meaning it learns without explicit labels. The core of the method lies in three key components:

  • Temporal Subgraph Sampling: This novel strategy samples subgraphs for each node by considering both the structural neighborhood and the timestamps of interactions. It prioritizes nodes that have interacted more recently or have stronger structural connections, creating a "time-weighted" subgraph. An unweighted counterpart is also sampled for contrast.
  • Node and Subgraph Representation: Graph Neural Networks (GNNs) are used to encode the sampled subgraphs. A specialized "time-aware readout function" is introduced to generate a representation for the time-weighted subgraph, capturing the influence of neighbors over time. A simpler readout function is used for the unweighted subgraph.
  • Temporal Contrastive Learning: The framework uses a contrastive learning objective to train the model. For each central node, a positive sample (its time-weighted subgraph representation) and two negative samples (a shuffled subgraph representation and its unweighted subgraph representation) are constructed. The goal is to maximize the mutual information between the node's representation and its positive subgraph representation, while pushing away from negative samples. This encourages the model to learn representations that are sensitive to temporal changes.

Datasets

The paper evaluates DySubC on five real-world dynamic graph datasets:

  • fb-forum: A forum network representing user interactions.
  • soc-sign-bitcoinalpha: A trust network from Bitcoin Alpha users.
  • soc-wiki-elec: A Wikipedia administrator election and voting network.
  • ia-movielens-user2tags-10m: A bipartite network of user-tag interactions on MovieLens.
  • sx-mathoverflow-c2q: A temporal interaction network from Math Overflow on Stack Exchange.

These datasets vary in size, density, and structure, allowing for a comprehensive evaluation.

Key Insights and Ideas

  • Temporal information is crucial for dynamic graphs: The paper strongly demonstrates that explicitly incorporating edge timestamps significantly improves graph representation learning, especially for tasks like link prediction where future interactions depend on evolving relationships.
  • Subgraph sampling matters: The proposed temporal subgraph sampling strategy, which balances structural and temporal information, is more effective than purely structural sampling for capturing dynamic node behavior.
  • Contrastive learning benefits from temporal context: Using temporal information in both subgraph sampling and the contrastive objective allows the model to learn richer representations that reflect the evolution of node relationships.
  • Ablation studies confirm module effectiveness: Removing any of the time-enhanced modules (temporal sampling, time-weighted representation, or temporal contrast) leads to a performance drop, highlighting the synergistic contribution of each component.

Key Results

DySubC consistently outperforms baseline methods, including state-of-the-art dynamic graph representation learning models (TGN, DyRep) and static self-supervised graph learning models (DGI, Sub-Con), on link prediction tasks across most datasets. For instance, on the soc-sign-bitcoinalpha dataset, DySubC achieves an AUC score of 0.9221, significantly higher than DGI (0.7948) and Sub-Con (0.8735). The visualization analysis also shows that DySubC can better embed the evolutional features of nodes, placing recently interacted nodes closer in the embedding space.

Limitations and Future Work

  • Hyperparameter Sensitivity: The paper notes that DySubC is sensitive to hyperparameters like a (balancing structural and temporal importance in sampling) and ß (balancing latest interaction and distance in representation). While the optimal values are identified, further research into more robust hyperparameter tuning or adaptive methods could be beneficial.
  • Computational Cost: While the temporal subgraph sampling can be done offline, the overall computational cost for training can still be significant, especially for very large graphs.
  • Future Work: The authors suggest exploring more sophisticated GNN architectures and readout functions, as well as investigating the application of DySubC to other downstream tasks beyond link prediction. The insights gained from this work could also inform the development of models for other dynamic relational data.

Summary updated

BibTeX
@article{chen2021self,
  author = {Ke-Jia Chen and Linsong Liu and Linpu Jiang and Jingqiang Chen},
  title = {{Self-Supervised Dynamic Graph Representation Learning via Temporal Subgraph Contrast}},
  journal = {ACM Trans. Knowl. Discov. Data},
  year = {2021},
  doi = {10.1145/3612931},
}
Figure