Abstract
Contrastive Learning on Dynamic Graphs (CLDG) introduces a lightweight, unsupervised framework designed to overcome the limitations of traditional graph contrastive learning. By leveraging "temporal translation invariance," CLDG treats a node’s evolution across different time intervals as natural views for contrastive learning, avoiding noisy data augmentations. The resulting model is significantly more efficient than existing dynamic graph methods, achieving state-of-the-art performance with a footprint up to 2,000x smaller and processing speeds up to 130x faster.
Introduction
Dynamic graphs, where nodes and edges evolve over time, are ubiquitous in real-world applications such as fraud detection, transaction monitoring, and recommendation systems. However, labeling these graphs is prohibitively expensive and requires deep domain expertise. While Graph Contrastive Learning (GCL) offers an unsupervised alternative, it typically relies on data augmentation techniques like randomly removing edges or shuffling features to create different "views" of the data.
The authors of CLDG identify two major flaws in current approaches:
- Semantic Drift: Randomly deleting edges can destroy critical structural information, fundamentally changing a node's "meaning" and degrading downstream performance.
- Temporal Neglect: Existing static GCL methods ignore the rich information hidden in the time dimension, while existing dynamic methods often rely on heavy, slow sequential models (like RNNs or LSTMs) that are difficult to scale to massive datasets.
Methodology
The core of CLDG is the concept of Temporal Translation Invariance. The authors observed that even as a graph evolves, the underlying semantics and labels of a node tend to remain stable over short-to-medium timespans. This stability allows the model to use different temporal windows as naturally occurring augmentations.
The framework consists of five lightweight components:
- Timespan View Sampling Layer: Instead of perturbing the graph structure, this layer samples different temporal "windows" (views).
- Base Encoder: A "hot-swappable" layer (e.g., GCN, GAT, or GraphSAGE) that extracts structural features from the sampled views.
- Readout Function: Aggregates neighbor information to create a "global" context for a node, facilitating multi-scale learning.
- Projection Head: A simple Multi-Layer Perceptron (MLP) that maps embeddings into a latent space optimized for contrastive loss.
- Contrastive Loss (InfoNCE): CLDG minimizes both local-level loss (ensuring the same node looks similar across different timespans) and global-level loss (ensuring a node’s representation is consistent with its neighborhood’s representation).
Temporal Sampling Strategies
To implement temporal translation invariance, the authors propose four sampling strategies to create views within a given timespan $\Delta t$: Sequential (no overlap), High Overlap (75%), Low Overlap (25%), and Random.
Experimental Results
The model was evaluated on seven diverse real-world dynamic graph datasets, including academic citations (DBLP), transaction networks (TAX), Bitcoin credit ratings, and social media sentiment (Reddit). These datasets range from 3,000 nodes to nearly 900,000 nodes.
Performance and Efficiency
- State-of-the-Art Accuracy: CLDG outperformed eight unsupervised baselines across almost all datasets. Remarkably, it surpassed supervised methods—which have access to labels during training—on four out of seven datasets.
- Extreme Efficiency: Compared to CAW, a popular dynamic graph method, CLDG reduced the number of model parameters by an average of 2,001.86 times and slashed training time by 130.31 times.
- Sampling Insights: The "Sequential" and "Random" sampling strategies generally performed best. "High Overlap" sampling often yielded lower performance, likely because the views were too similar, making the contrastive task too trivial for the model to learn robust features.
Conclusion
CLDG demonstrates that time itself can serve as a powerful and "free" augmentation for contrastive learning on dynamic graphs. By avoiding complex sequential architectures and treating temporal dynamics as a representation consistency problem, CLDG achieves unprecedented scalability. While the model assumes relatively smooth semantic changes over time, its efficiency and performance make it a highly practical solution for large-scale dynamic graph analysis. Future work may involve adaptive sampling windows that adjust based on the "velocity" of change within the graph.
Summary updated