Retrofitting Temporal Graph Neural Networks with Transformer
Not on the map. Why?
Abstract (arXiv)
Temporal graph neural networks (TGNNs) outperform regular GNNs by incorporating time information into graph-based operations. However, TGNNs adopt specialized models (e.g., TGN, TGAT, and APAN ) and require tailored training frameworks (e.g., TGL and ETC). In this paper, we propose TF-TGN, which uses Transformer decoder as the backbone model for TGNN to enjoy Transformer's codebase for efficient training. In particular, Transformer achieves tremendous success for language modeling, and thus the community developed high-performance kernels (e.g., flash-attention and memory-efficient attention) and efficient distributed training schemes (e.g., PyTorch FSDP, DeepSpeed, and Megatron-LM). We observe that TGNN resembles language modeling, i.e., the message aggregation operation between chronologically occurring nodes and their temporal neighbors in TGNNs can be structured as sequence modeling. Beside this similarity, we also incorporate a series of algorithm designs including suffix infilling, temporal graph attention with self-loop, and causal masking self-attention to make TF-TGN work. During training, existing systems are slow in transforming the graph topology and conducting graph sampling. As such, we propose methods to parallelize the CSR format conversion and graph sampling. We also adapt Transformer codebase to train TF-TGN efficiently with multiple GPUs. We experiment with 9 graphs and compare with 2 state-of-the-art TGNN training frameworks. The results show that TF-TGN can accelerate training by over 2.20 while providing comparable or even superior accuracy to existing SOTA TGNNs. TF-TGN is available at https://github.com/qianghuangwhu/TF-TGN.
Key facts. Cited by 4 papers in the map (data through 7 Oct 2026). Builds on 17 of its 38 references that are in the map. First posted on arXiv 9 Sep 2024.
Builds on
17 of 38 references.
References · 17
- 2017Attention Is All You Needcited by 59,932
- 2022FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awarenesscited by 3,611
- 2023Code Llama: Open Foundation Models for Codecited by 2,105
- 2019Megatron-LM: Training Multi-Billion Parameter Language Models Using Model Parallelismcited by 1,829
- 2017Mixed Precision Trainingcited by 1,135
- 2013Generating Sequences With Recurrent Neural Networkscited by 549
- 2020Temporal Graph Networks for Deep Learning on Dynamic Graphscited by 521
- 2020Inductive Representation Learning on Temporal Graphscited by 454
- 2019Predicting Dynamic Embedding Trajectory in Temporal Interaction Networkscited by 443
- 2021OGB-LSC: A Large-Scale Challenge for Machine Learning on Graphscited by 328
- 2022Efficient Training of Language Models to Fill in the Middlecited by 248
- 2021Inductive Representation Learning in Temporal Networks via Causal Anonymous Walkscited by 188
5 more
- 2021Self-attention Does Not Need O(n2) Memorycited by 152
- 2022Towards Better Evaluation for Dynamic Link Predictioncited by 120
- 2016Motifs in Temporal Networkscited by 101
- 2020APAN: Asynchronous Propagation Attention Network for Real-time Temporal Graph Embeddingcited by 78
- 2019Evaluating Modern GPU Interconnect: PCIe, NVLink, NV-SLI, NVSwitch and GPUDirectcited by 41
Built on by
Citing papers per year: 2025: 2; 2026: 2.
4 papers.
- 2025Guiding LLM-based Smart Contract Generation with Finite State Machinecited by 5
- 2025When Speed meets Accuracy: an Efficient and Effective Graph Model for Temporal Link Predictioncited by 0
- 2026Text-attributed Graph Condensation via Text Selection and Attribute Matchingcited by 0
- 2026GTIN: A Unified Framework for Joint Event and Time Prediction in Temporal Graphscited by 0
- 2026GTIN: A Unified Framework for Joint Event and Time Prediction in Temporal Graphs26 Jul 2026
- 2026Text-attributed Graph Condensation via Text Selection and Attribute Matching2 Jun 2026
- 2025When Speed meets Accuracy: an Efficient and Effective Graph Model for Temporal Link Prediction18 Jul 2025
- 2025Guiding LLM-based Smart Contract Generation with Finite State Machine13 May 2025