TAWRMAC: A Novel Dynamic Graph Representation Learning Method

Soheila Farokhi, Xiaojun Qi, Hamid Karimi · DOI

Introduction

Dynamic graphs, where nodes and edges evolve over time, are essential for modeling real-world systems like social networks, transaction logs, and communication platforms. However, modeling these continuous-time dynamics presents significant challenges. Existing methods often suffer from embedding staleness, where node memories fail to reflect recent neighbor changes; contextual blindness, ignoring correlations between neighborhoods; and an inability to capture complex structural dynamics, such as the difference between repetitive and exploratory behaviors.

Overview of the TAWRMAC framework applied to dynamic user-page interaction graphs for node classification and link prediction tasks.

To address these issues, we present TAWRMAC, a framework that integrates node memory, neighbor correlations, and a novel "walk with restart" mechanism to learn robust representations in continuous-time dynamic graphs.

The TAWRMAC Framework

TAWRMAC consists of three primary components designed to capture distinct aspects of graph evolution:

  1. Memory-Augmented Embedding (MAE): This module maintains a per-node memory updated with each interaction. Unlike models with trainable time encodings that can suffer from instability, MAE utilizes a fixed sinusoidal time encoding to ensure training stability and prevent gradient issues.
  2. Neighbor Co-occurrence Embedding (NCE): Recognizing that shared neighbors are strong indicators of future interactions, NCE explicitly embeds the frequency of co-occurring neighbors for interacting node pairs.
  3. Temporal Anonymous Walks with Restart (TAWR): This novel component performs random walks through the graph's history. By incorporating a learnable restart probability, the model adaptively balances local exploitation (staying near the node) and global exploration (exploring broader structural patterns).
The TAWRMAC architecture, illustrating the integration of Memory-Augmented Embedding (MAE), Temporal Anonymous Walks with Restart (TAWR), and Neighbor Co-occurrence Embedding (NCE).

Experimental Setup and Datasets

The model was evaluated across 12 diverse datasets spanning multiple domains, including web/social (Wikipedia, Reddit, LastFM), commerce (UN Trade), and transportation (Flights). These datasets vary in scale and temporal span (from one month to over 70 years), providing a comprehensive benchmark for robustness and inductive learning capabilities.

Key Insights

A critical finding is that the learnable restart probability in the TAWR module acts as a "behavioral fingerprint." For instance, in social communication datasets (UCI), high-degree users exhibited higher restart probabilities, indicating exploratory behavior. In contrast, high-degree Wikipedia editors showed lower restart probabilities, suggesting a focus on specific, familiar pages.

Furthermore, ablation studies highlighted that while all components contribute to the model's success, the MAE serves as the primary workhorse, providing the foundational temporal context necessary for high performance.

Results

TAWRMAC consistently outperformed ten state-of-the-art baselines, including TGN and DyGFormer.

  • Link Prediction: The model achieved the best average rank (1.5 to 2.5) across various negative sampling strategies.
  • Node Classification: In "ban prediction" tasks on Wikipedia and Reddit, TAWRMAC secured the top position with an average rank of 1.5.
  • Efficiency: TAWRMAC is significantly more memory-efficient and faster to train than other walk-based methods like CAWN, requiring fewer sampled walks to achieve superior accuracy.

Conclusion and Future Work

TAWRMAC sets a new state-of-the-art for continuous-time dynamic graph representation learning by effectively balancing local and global structural information. While highly effective, the current implementation faces scalability challenges due to redundant walk sampling. Future research will focus on developing incremental walk updates to improve computational efficiency in large-scale, high-frequency streaming environments.

Summary updated

BibTeX
@inproceedings{farokhi2026tawrmac,
  author = {Soheila Farokhi and Xiaojun Qi and Hamid Karimi},
  title = {{TAWRMAC: A Novel Dynamic Graph Representation Learning Method}},
  booktitle = {The Web Conference},
  year = {2026},
  doi = {10.1145/3774904.3792163},
}
Figure