Temporal Graph Network Embedding with Causal Anonymous Walks Representations

Ilya Makarov, Andrey V. Savchenko, Arseny Korovko, Leonid Sherstyuk, Nikita Severin, Aleksandr Mikheev, Dmitrii BabaevarXiv 2021

Introduction

Most real-world networks, such as financial transactions, social media interactions, or disease spread, are inherently dynamic. Unlike static graphs, these temporal networks evolve over time, with edges appearing as a continuous stream of events. Representing these networks effectively requires capturing both the temporal dynamics and the evolving structural patterns.

Current state-of-the-art models like Temporal Graph Networks (TGNs) are efficient at maintaining a "memory" of node states but often fail to capture fine-grained structural motifs. Furthermore, they struggle with the "inductive gap"—the ability to generalize to previously unseen nodes. This paper introduces a novel hybrid architecture that integrates Causal Anonymous Walks (CAW) into the TGN framework to address these challenges.

Methodology: The NEF Generator

The core contribution of this work is the Neighborhood Edge Feature (NEF) Generator. This module is designed to enrich the information passed between nodes by extracting structural motifs independent of specific node identities.

The proposed hybrid architecture integrating NEF features into the TGN framework for message and embedding generation.

The process involves several key steps:

  1. Time-Inverse Walks: For any interaction between nodes $i$ and $j$, the model samples random walks that traverse "backwards" in time, capturing the historical connectivity context.
  2. Anonymization: To ensure generalization, walks are anonymized using hitting counts. This transforms raw node IDs into structural patterns (e.g., identifying that a node interacted with a frequent contact of its neighbor).
  3. Feature Encoding: These anonymized walks are processed through a Bi-LSTM to generate a high-dimensional NEF vector describing the local temporal neighborhood.
  4. Integration: These features are integrated into the TGN's message generation (to update node memory) and embedding generation (to refine final predictions).

Experimental Evaluation

The model was evaluated across five public datasets (Reddit, Wikipedia, Enron, UCI, and Ethereum) and a large-scale industrial banking dataset for credit scoring. These datasets cover both bipartite and non-bipartite structures, as well as labeled and unlabeled interactions. To ensure rigorous benchmarking, the authors released a unified evaluation pipeline to standardize temporal graph model assessment.

Key Results and Insights

The proposed model consistently outperforms existing baselines, including DyRep, Jodie, and the standard TGN. The performance gains are particularly notable in inductive settings, where the model must predict interactions for nodes not seen during training.

Performance comparison (AUC-ROC) of the proposed model against state-of-the-art baselines across various datasets and masking scenarios.

On the UCI dataset in an inductive setting, the model achieved an AUC-ROC of 0.812, a significant improvement over TGN's 0.709. In real-world banking applications, the model demonstrated a 2.7% improvement in AUC-ROC for credit scoring tasks.

Ablation studies revealed that incorporating NEF features into the message function—how the model "remembers" past interactions—is often more critical than adding them solely to the embedding function. This suggests that structural context is vital for maintaining accurate long-term node representations.

Conclusion and Future Work

By prioritizing structural patterns over node identities, this hybrid approach effectively bridges the gap between memory-based TGNs and structure-aware CAW methods. While the model achieves state-of-the-art accuracy, it introduces computational overhead due to the random walk sampling process. Future research will focus on optimizing neighborhood sampling strategies to scale the architecture to massive industrial graphs containing billions of nodes.

Summary updated

BibTeX
@misc{makarov2021temporal,
  author = {Ilya Makarov and Andrey V. Savchenko and Arseny Korovko and Leonid Sherstyuk and Nikita Severin and Aleksandr Mikheev and Dmitrii Babaev},
  title = {{Temporal Graph Network Embedding with Causal Anonymous Walks Representations}},
  year = {2021},
  eprint = {2108.08754},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2108.08754},
}
Figure