Table of Contents
Fetching ...

DyGnROLE: Modeling Asymmetry in Dynamic Graphs with Node-Role-Oriented Latent Encoding

Tyler Bonnet, Marek Rei

TL;DR

DyGnROLE (Dynamic Graph Node-Role-Oriented Latent Encoding), a transformer-based architecture that explicitly disentangles source and destination representations, is proposed, establishing role-aware modeling as an effective strategy for dynamic graph learning.

Abstract

Real-world dynamic graphs are often directed, with source and destination nodes exhibiting asymmetrical behavioral patterns and temporal dynamics. However, existing dynamic graph architectures largely rely on shared parameters for processing source and destination nodes, with limited or no systematic role-aware modeling. We propose DyGnROLE (Dynamic Graph Node-Role-Oriented Latent Encoding), a transformer-based architecture that explicitly disentangles source and destination representations. By using separate embedding vocabularies and role-semantic positional encodings, the model captures the distinct structural and temporal contexts unique to each role. Critical to the effectiveness of these specialized embeddings in low-label regimes is a self-supervised pretraining objective we introduce: Temporal Contrastive Link Prediction (TCLP). The pretraining uses the full unlabeled interaction history to encode informative structural biases, enabling the model to learn role-specific representations without requiring annotated data. Evaluation on future edge classification demonstrates that DyGnROLE substantially outperforms a diverse set of state-of-the-art baselines, establishing role-aware modeling as an effective strategy for dynamic graph learning.

DyGnROLE: Modeling Asymmetry in Dynamic Graphs with Node-Role-Oriented Latent Encoding

TL;DR

DyGnROLE (Dynamic Graph Node-Role-Oriented Latent Encoding), a transformer-based architecture that explicitly disentangles source and destination representations, is proposed, establishing role-aware modeling as an effective strategy for dynamic graph learning.

Abstract

Real-world dynamic graphs are often directed, with source and destination nodes exhibiting asymmetrical behavioral patterns and temporal dynamics. However, existing dynamic graph architectures largely rely on shared parameters for processing source and destination nodes, with limited or no systematic role-aware modeling. We propose DyGnROLE (Dynamic Graph Node-Role-Oriented Latent Encoding), a transformer-based architecture that explicitly disentangles source and destination representations. By using separate embedding vocabularies and role-semantic positional encodings, the model captures the distinct structural and temporal contexts unique to each role. Critical to the effectiveness of these specialized embeddings in low-label regimes is a self-supervised pretraining objective we introduce: Temporal Contrastive Link Prediction (TCLP). The pretraining uses the full unlabeled interaction history to encode informative structural biases, enabling the model to learn role-specific representations without requiring annotated data. Evaluation on future edge classification demonstrates that DyGnROLE substantially outperforms a diverse set of state-of-the-art baselines, establishing role-aware modeling as an effective strategy for dynamic graph learning.
Paper Structure (26 sections, 13 equations, 4 figures, 3 tables)

This paper contains 26 sections, 13 equations, 4 figures, 3 tables.

Figures (4)

  • Figure 1: Overview of the DyGnROLE architecture. The model begins processing a query interaction between a source (SRC) and destination (DST) node by retrieving their k most recent historical one-hop neighbors and transforming them into multi-faceted feature sets including node text (N), edge text (E), timestamps (T), within-sequence frequency (W), and cross-sequence frequency (C). These features are then linearly projected to a shared dimension, concatenated, and augmented with role-semantic positional encodings (RSPE) and role-specific CLS tokens. Finally, a shared Transformer encoder processes the sequences (independently during pretraining, concatenated during finetuning) to produce global node representations $\mathbf{z}_u$ and $\mathbf{z}_v$ via the CLS tokens.
  • Figure 2: Ablation study results using the remove-one strategy across eight datasets. We compare the performance of the Complete DyGnROLE architecture against variants where a single key component is modified: w/o NFE replaces the proposed Within- and Cross-Sequence Neighbor Frequency Embeddings with the standard neighbor co-occurrence encoder from DyGFormer; w/o RSPE removes the Role-Semantic Positional Encodings; w/o CLS replaces the Dual-CLS pooling with standard mean pooling; and w/o Pretrain trains the model from scratch without the TCLP pretraining objective. The y-axis represents the test Macro F1 score (%). Error bars indicate the standard deviation across 5 random seeds.
  • Figure 3: Asymmetry Scores ($1 - \text{CosineSim}$) probing DyGFormer's neighbor co-occurrence encoder and DyGnROLE's neighbor frequency embeddings.
  • Figure 4: Label distributions of DTGB datasets.