Papers
Topics
Authors
Recent
Search
2000 character limit reached

Learning Dynamic Graph Representations through Timespan View Contrasts

Published 26 May 2026 in cs.LG | (2605.27063v1)

Abstract: The rich information underlying graphs has inspired further investigation of unsupervised graph representation. Existing studies mainly depend on node features and topological properties within static graphs to create self-supervised signals, neglecting the temporal components carried by real-world graph data, such as timestamps of edges. To overcome this limitation, this paper explores how to model temporal evolution on dynamic graphs elegantly. Specifically, we introduce a new inductive bias, namely temporal translation invariance, which illustrates the tendency of the identical node to keep similar labels across different timespans. Based on this assumption, we develop a dynamic graph representation framework CLDG that encourages the node to maintain locally consistent temporal translation invariance through contrastive learning on different timespans. Except for standard CLDG which only considers explicit topological links, our further proposed CLDG++ additionally employs graph diffusion to uncover global contextual correlations between nodes, and designs a multi-scale contrastive learning objective composed of local-local, local-global, and global-global contrasts to enhance representation capabilities. Interestingly, by measuring the consistency between different timespans to shape anomaly indicators, CLDG and CLDG++ are seamlessly integrated with the task of spotting anomalies on dynamic graphs, which has broad applications in many high-impact domains, such as finance, cybersecurity, and healthcare. Experiments demonstrate that CLDG and CLDG++ both exhibit desirable performance in downstream tasks including node classification and dynamic graph anomaly detection. Moreover, CLDG significantly reduces time and space complexity by implicitly exploiting temporal cues instead of complicated sequence models.

Authors (5)

Summary

  • The paper introduces temporal translation invariance as a key inductive bias, enabling robust contrastive learning for dynamic graph representations.
  • It details the CLDG and CLDG++ models that integrate timespan view sampling, graph diffusion, and multi-scale GNN encoders to enhance performance.
  • Empirical results show CLDG++ outperforms both unsupervised and supervised methods in node classification and anomaly detection tasks.

Learning Dynamic Graph Representations through Timespan View Contrasts

Introduction and Motivation

Dynamic graphs encapsulate evolving relational structures pervasive in real-world systems (social communication, financial networks, etc.). Traditional GNN-based representation learning techniques address only static or temporally-aggregated data, severely limiting their ability to leverage temporal signal critical in dynamic graphs. The paper "Learning Dynamic Graph Representations through Timespan View Contrasts" (2605.27063) introduces a principled framework that addresses these limitations by proposing a new inductive bias, temporal translation invariance, and builds on it to design effective contrastive learning objectives for unsupervised representation learning and anomaly detection in dynamic graphs.

Temporal Translation Invariance: Principles and Empirical Evidence

The core hypothesis of the work is that for most real-world dynamic graphs, the semantics (and thus learned representations or predicted labels) associated with a given node remain stable across reasonable timespans—even as the overall graph structure changes. Consequently, node representations should be invariant (or at least stable) when viewed through different temporal windows. This temporal translation invariance enables a robust contrastive learning signal without reliance on high-quality labels and without resorting to arbitrary or destructive augmentations. Figure 1

Figure 1: Illustration of temporal translation invariance — the same node's semantics remain similar across differing temporal views in dynamic graphs, guiding contrastive learning.

Empirical studies across diverse datasets confirm that predicted node labels are indeed stable for most nodes, regardless of the GNN encoder, supporting the validity of the proposed inductive bias.

Framework Overview: CLDG and CLDG++

The proposed framework consists of two progressively stronger models: CLDG and its extension, CLDG++. The pipeline’s architecture, depicted in the following figure, combines key components: timespan view sampling, graph diffusion, flexible encoders, projection heads, and a multiscale contrastive loss. Figure 2

Figure 2: The CLDG++ architecture: timespan view sampling yields local (adjacency) and global (diffusion) perspectives, processed by separate encoders and mapped to a contrastive loss space for multiscale contrast.

Timespan View Sampling

Multiple temporal "views" are sampled from the underlying dynamic graph via various strategies (sequential, low/high overlap, random). These views capture the dynamic's variability while retaining sufficient semantic context. The four types of sampling strategies and their induced temporal overlaps are systematically compared and shown to impact representation quality. Figure 3

Figure 4: Schematic of four candidate timespan view sampling strategies—impacting the semantic diversity and difficulty of the contrastive learning task.

Graph Diffusion Layer

To overcome the locality inherent in an adjacency-based perspective, CLDG++ augments local views with global diffusion matrices (e.g., Personalized PageRank, heat kernel) for each view. This step explicitly models broader contextual and topological relationships and supports the design of rich contrastive pairs: local-local, local-global, and global-global.

Encoding and Multi-Scale Contrastive Learning

Distinct GNN encoders (e.g., GCN, GAT, GraphSAGE) are leveraged for local and global views. After encoding, projection heads map embeddings to a space suitable for contrastive learning. The InfoNCE-based contrastive objective jointly optimizes for temporal translation invariance across all view combinations relevant to CLDG++.

Empirical Results and Analysis

Node Classification

CLDG and CLDG++ are evaluated against supervised/semi-supervised (e.g., GCN, GAT, GraphSAGE, LP), unsupervised dynamic graph models (CAW, TGAT, DySAT, MNCI), and unsupervised static graph contrastive baselines (DGI, GRACE, MVGRL, CCA-SSG) on seven real-world datasets.

CLDG++ achieves the best performance among all unsupervised methods, and in 10 out of 14 classification metrics, it surpasses even supervised GNN variants, establishing a new unsupervised SOTA for dynamic graph node classification.

Dynamic Graph Anomaly Detection

The paper seamlessly extends these representations to anomaly detection by quantifying the violation of temporal translation invariance (i.e., unstable representations across timespan views). When compared to a range of node- and structure-level anomaly detection baselines (both static and dynamic), CLDG and CLDG++ yield the highest AUC scores across all datasets tested, demonstrating effectiveness and generality.

Scalability and Efficiency

CLDG and CLDG++ exhibit significantly lower time and space complexity compared to temporal deep learning baselines, owing to the avoidance of cumbersome sequential modeling layers and efficient parameterization. Both are shown to scale to large datasets (e.g., Reddit), achieving over 100x fewer parameters than some competitors and with superior or comparable accuracy.

Ablation and Sensitivity Studies

Ablation on the three contrastive objectives of CLDG++ shows that removal of the local-local contrast causes the largest drop in performance (up to 3.88% in accuracy), but all contrast types contribute positively and are necessary for optimal results.

Hyperparameter sensitivity analysis for epoch count, batch size, hidden dimension, and contrastive temperature validates the stability of the proposed model and provides actionable insights for practical deployments. Figure 5

Figure 5

Figure 5

Figure 5

Figure 3: Sensitivity analysis of CLDG++ with respect to epoch count, batch size, hidden layer size, and temperature parameter—confirming model robustness.

Theoretical and Practical Implications

This work provides a clear demonstration of how a simple, well-motivated inductive bias can unlock high-quality, unsupervised representations for dynamic graphs without the need for handcrafted temporal augmentations or heavy sequential structures. The use of timespan-based contrast instead of synthetic perturbation eliminates the risk of semantic drift associated with poorly-chosen augmentations.

By systematically integrating local and global perspectives with flexible encoders, the approach covers a broad spectrum of temporal graph modeling scenarios—handling both discrete and continuous-time graphs with minimal architectural overhead. The anomaly detection instantiation is both theoretically justified and practically effective, as temporal anomalies often manifest as violations of representation consistency.

Future Outlook

Potential future directions include the design of even more lightweight or scalable encoder backbones, integration with explicit temporal sequence models only where strictly necessary, and extension to domains such as time-aware subgraph mining and event-based reasoning. Exploration of supervised or weakly-supervised signals on top of the CLDG++ representations could further improve adaptability to complex domain-specific tasks in large-scale temporal networks.

Conclusion

The introduction of temporal translation invariance, operationalized via multiscale timespan view contrasts, constitutes a decisive advance in unsupervised dynamic graph representation learning. CLDG and CLDG++ realize superior classification and anomaly detection performance on large, real-world datasets, underpinned by rigorous empirical analysis and careful architectural design. These results underscore the importance of principled temporal modeling and open robust avenues for nonparametric, unsupervised learning in evolving graph-structured systems.

Paper to Video (Beta)

No one has generated a video about this paper yet.

Whiteboard

No one has generated a whiteboard explanation for this paper yet.

Open Problems

We haven't generated a list of open problems mentioned in this paper yet.

Collections

Sign up for free to add this paper to one or more collections.

Tweets

Sign up for free to view the 1 tweet with 2 likes about this paper.