Prompt Learning on Temporal Interaction Graphs

Xi Chen, Siwei Zhang, Yun Xiong, Xixi Wu, Jiawei Zhang, Xiangguo Sun, Yao Zhang, Feng Zhao, Yulin KangarXiv 2024 · DOI

Abstract

Temporal Interaction Graphs (TIGs) are fundamental for representing dynamic interactions in digital systems, such as e-commerce transactions or social network communications. However, existing TIG models often struggle with the "temporal gap" caused by graph evolution and the "semantic gap" between pre-training objectives and downstream tasks. This paper presents TIGPrompt, the first framework to apply prompt learning to TIGs. By introducing a lightweight Temporal Prompt Generator (TProG), TIGPrompt effectively bridges these gaps, achieving state-of-the-art performance with significantly reduced data and computational requirements.

Introduction

Temporal Interaction Graphs (TIGs) model time-stamped interactions, providing a rich representation of system dynamics. While models like TGN and JODIE have advanced the field, their traditional "pre-train, predict" workflow is limited by two primary misalignments:

  1. The Temporal Gap: TIGs evolve over time. Models pre-trained on historical data often fail to generalize to emerging behavioral patterns in the future without expensive retraining.
  2. The Semantic Gap: Pre-training tasks, typically link prediction, often differ significantly from downstream objectives like node classification. This misalignment hinders the effective transfer of learned knowledge.

TIGPrompt addresses these challenges by adapting prompt learning—a technique that has revolutionized NLP—to the dynamic, time-sensitive nature of TIGs. It provides a lightweight mechanism to adapt pre-trained models to new time steps and tasks without modifying the underlying backbone.

Methods: The TIGPrompt Framework

The core innovation of TIGPrompt is the Temporal Prompt Generator (TProG). This component produces personalized, time-aware prompts for each node, which are fused with frozen embeddings to "re-contextualize" the model's knowledge for specific time steps or tasks.

Architecture of the TIGPrompt framework, detailing the Temporal Prompt Generator (TProG) and training paradigms.

The framework explores three distinct TProG architectures:

  • Vanilla: Assigns a simple learnable vector to each node, providing basic personalization.
  • Transformer: The most expressive variant; it encodes a node's most recent neighbors and their interaction timestamps to capture local structural evolution.
  • Projection: A balanced approach that fuses a personalized learnable vector with a dedicated time-encoding function.

TIGPrompt supports two training modes: "Pre-train, Prompt", where the TIG model is frozen and only the TProG is trained (ideal for low-resource settings), and "Pre-train, Prompt-based Fine-tune", where both are optimized for maximum performance.

Experimental Setup and Datasets

The researchers evaluated TIGPrompt on four widely used public TIG benchmarks: Wikipedia, Reddit, MOOC (student dropout prediction), and LastFM (large-scale interaction data).

Notably, the framework demonstrated exceptional data efficiency. The authors achieved superior results using only 50% of the data for pre-training and 20% for prompt tuning, outperforming traditional baselines that required 70% of the data for standard training.

Key Results and Discussion

TIGPrompt consistently achieved state-of-the-art (SOTA) performance across all datasets. For instance, on the LastFM dataset, it improved performance by up to 29% over standard pre-trained models.

Performance comparison (Trans. AP %) on the MOOC dataset across various TIG backbones.

Key findings from the empirical evaluation include:

  • Efficiency: The Vanilla and Projection versions of TProG reduced training time by over 90% compared to standard backbone training.
  • Parameter Efficiency: TIGPrompt requires 25% to 40% fewer learnable parameters than full baseline models while delivering higher accuracy.
  • Semantic Bridging: By tuning the prompt generator on specific downstream tasks, the model effectively translates general pre-trained knowledge into task-specific semantics.

Conclusion

TIGPrompt demonstrates that lightweight, node-specific prompts can effectively bridge the temporal and semantic gaps in evolving graphs. While the Transformer-based TProG offers high expressivity, it introduces more computational overhead than the Vanilla or Projection variants. Future work will explore cross-domain prompt learning and more sophisticated fusion functions to further enhance the adaptability of pre-trained TIG models across diverse graph domains.

Summary updated

BibTeX
@misc{chen2024prompt,
  author = {Xi Chen and Siwei Zhang and Yun Xiong and Xixi Wu and Jiawei Zhang and Xiangguo Sun and Yao Zhang and Feng Zhao and Yulin Kang},
  title = {{Prompt Learning on Temporal Interaction Graphs}},
  year = {2024},
  eprint = {2402.06326},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2402.06326},
}
Figure