Trajectory Encoding Temporal Graph Networks

Jiafeng Xiong, Rizos Sakellariou
4/15/2025
cs.LGcs.AI

No official code found. Best implementation: xjiaf/TETGN (0 stars, MIT, last commit 2025-09-24).

Abstract

Temporal Graph Networks (TGNs) have demonstrated significant success in dynamic graph tasks such as link prediction and node classification. Both tasks comprise transductive settings, where the model predicts links among known nodes, and in inductive settings, where it generalises learned patterns to previously unseen nodes. Existing TGN designs face a dilemma under these dual scenarios. Anonymous TGNs, which rely solely on temporal and structural information, offer strong inductive generalisation but struggle to distinguish known nodes. In contrast, non-anonymous TGNs leverage node features to excel in transductive tasks yet fail to adapt to new nodes. To address this challenge, we propose Trajectory Encoding TGN (TETGN). Our approach introduces automatically expandable node identifiers (IDs) as learnable temporal positional features and performs message passing over these IDs to capture each node's historical context. By integrating this trajectory-aware module with a standard TGN using multi-head attention, TETGN effectively balances transductive accuracy with inductive generalisation. Experimental results on three real-world datasets show that TETGN significantly outperforms strong baselines on both link prediction and node classification tasks, demonstrating its ability to unify the advantages of anonymous and non-anonymous models for dynamic graph learning.

View on arXivView PDF

Code Implementations(1)

xjiaf/TETGNCommunity100%
MIT
00PythonApr 10, 20251 years agoMIT

Similar Papers

Cite this paper

@article{xiong2025trajectory,
  title  = {Trajectory Encoding Temporal Graph Networks},
  author = {Jiafeng Xiong and Rizos Sakellariou},
  year   = {2025},
  eprint = {2504.11386},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2504.11386v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2504.11386.svg)](https://codeofpaper.com/paper/2504.11386)

Discussion