Temporal Graph Pattern Machine
Yijun Ma, Zehong Wang, Weixiang Sun, Yanfang Ye
TL;DR
Temporal Graph Pattern Machine (TGPM) tackles learning generalizable temporal evolution mechanisms in dynamic graphs, moving beyond task-specific representations. It builds interaction patches from temporally biased random walks and encodes them with a Transformer backbone, augmented by target-relative time encodings. Two self-supervised objectives, Masked Token Modeling and Next Time Prediction, enforce learning of multi-scale temporal dependencies and future timing, enabling robust cross-domain transfer. Empirical results on Enron, ICEWS1819, and Googlemap CT show state-of-the-art performance for transductive and inductive link prediction and strong transferability, while revealing sensitivity to highly homogeneous temporal burstiness and suggesting meta-pattern aggregation as a potential fix.
Abstract
Temporal graph learning is pivotal for deciphering dynamic systems, where the core challenge lies in explicitly modeling the underlying evolving patterns that govern network transformation. However, prevailing methods are predominantly task-centric and rely on restrictive assumptions -- such as short-term dependency modeling, static neighborhood semantics, and retrospective time usage. These constraints hinder the discovery of transferable temporal evolution mechanisms. To address this, we propose the Temporal Graph Pattern Machine (TGPM), a foundation framework that shifts the focus toward directly learning generalized evolving patterns. TGPM conceptualizes each interaction as an interaction patch synthesized via temporally-biased random walks, thereby capturing multi-scale structural semantics and long-range dependencies that extend beyond immediate neighborhoods. These patches are processed by a Transformer-based backbone designed to capture global temporal regularities while adapting to context-specific interaction dynamics. To further empower the model, we introduce a suite of self-supervised pre-training tasks -- specifically masked token modeling and next-time prediction -- to explicitly encode the fundamental laws of network evolution. Extensive experiments show that TGPM consistently achieves state-of-the-art performance in both transductive and inductive link prediction, demonstrating exceptional cross-domain transferability.
