Proceedings

History Doesn’t Repeat, but Its Patterns Echo: A Parallel Pairwise Negative-Sampling Framework for Temporal Link Prediction

Download BibTeX Cite

Proceedings of the Thirty-Fifth International Joint Conference on Artificial Intelligence. Main Track. Pages 2717-2725.

https://doi.org/10.24963/ijcai.2026/302

Abstract

Temporal link prediction with temporal graph neural networks (TGNNs) is increasingly used to model spatio-temporal dependencies in temporal graphs and to forecast future interactions among entities. Existing sampling-based training methods typically rely on random negative sampling and pointwise loss formulations, which often lead to suboptimal convergence and limited generalization due to low-quality negative samples. We propose ATNSF, a temporal graph learning framework with a hybrid negative sampling strategy that uses a portion of historical edges as hard negatives. For efficiency, we design an asynchronous parallel training pipeline for scalable optimization and introduce a pairwise sampled softmax loss that contrasts each positive instance with a batch of negatives to learn more discriminative representations. Finally, we theoretically show that jointly designing the loss function and negative sampling strategy is crucial for improving performance and generalization. Extensive experiments across six temporal graph datasets demonstrate that ATNSF improves the average AP from 0.724 to 0.827 (+0.103). Remarkably, it also accelerates training by 1.37× to 6.85×, achieving a 2.57× geometric mean speedup. The source code of this paper can be found at https://github.com/yongqiu-star/ATNSF.

  1. [Alvarez-Rodriguez et al., 2021] Unai Alvarez-Rodriguez, Federico Battiston, Guilherme Ferraz de Arruda, Yamir Moreno, Matjaž Perc, and Vito Latora. Evolutionary dynamics of higher-order interactions in social networks. Nature Human Behaviour, 5(5):586-595, 2021.
  2. [Bengio and Senecal, 2008] Yoshua Bengio and Jean- S Ébastien Senecal. Adaptive importance sampling to accelerate training of a neural probabilistic language model. IEEE Transactions on Neural Networks, 19(4):713-722, 2008.
  3. [Chang et al., 2020] Xiaofu Chang, Xuqin Liu, Jianfeng Wen, Shuang Li, Yanming Fang, Le Song, and Yuan Qi. Continuous-time dynamic graph learning via neural inter- action processes. In Proceedings of the 29th ACM Interna- tional Conference on Information & Knowledge Manage- ment, pages 145-154, 2020.
  4. [Chen et al., 2023] Changlu Chen, Yanbin Liu, Ling Chen, and Chengqi Zhang. Bidirectional spatial-temporal adap- tive transformer for urban traffic flow forecasting. IEEE Transactions on Neural Networks and Learning Systems, 34(10):6913-6925, 2023.
  5. [Chen et al., 2025] Ziyue Chen, Tongya Zheng, and Mingli Song. Curriculum negative mining for temporal networks. Neural Netw., 191(C), December 2025.
  6. [Cong et al., 2023] Weilin Cong, Si Zhang, Jian Kang, Baichuan Yuan, Hao Wu, Xin Zhou, Hanghang Tong, and Mehrdad Mahdavi. Do we really need complicated model architectures for temporal networks? In The Eleventh Inter- national Conference on Learning Representations, 2023.
  7. [Diaz-Aviles et al., 2012] Ernesto Diaz-Aviles, Lucas Dru- mond, Lars Schmidt-Thieme, and Wolfgang Nejdl. Real- time top-n recommendation in social streams. In Proceed- ings of the Sixth ACM Conference on Recommender Sys- tems, RecSys '12, page 59-66, New York, NY, USA, 2012. Association for Computing Machinery.
  8. [Gao et al., 2024] Kuang Gao, Chuang Liu, Jia Wu, Bo Du, and Wenbin Hu. Towards a better negative sampling strat- egy for dynamic graphs. Neural Netw., 173(C), May 2024.
  9. [Guo et al., 2019] Shengnan Guo, Youfang Lin, Ning Feng, Chao Song, and Huaiyu Wan. Attention based spatial- temporal graph convolutional networks for traffic flow fore- casting. In Proceedings of the AAAI conference on artificial intelligence, volume 33, pages 922-929, 2019.
  10. [He et al., 2024] Dongxiao He, Lianze Shan, Jitao Zhao, Hen- grui Zhang, Zhen Wang, and Weixiong Zhang. Exploitation of a latent mechanism in graph contrastive learning: Rep- resentation scattering. Advances in Neural Information Processing Systems, 37:115351-115376, 2024.
  11. [Huo et al., 2018] Zepeng Huo, Xiao Huang, and Xia Hu. Link prediction with personalized social influence. In Pro- ceedings of the AAAI conference on artificial intelligence, volume 32, 2018.
  12. [Jin et al., 2021] Di Jin, Zhizhi Yu, Pengfei Jiao, Shirui Pan, Dongxiao He, Jia Wu, Philip S Yu, and Weixiong Zhang. A survey of community detection approaches: From sta- tistical modeling to deep learning. IEEE Transactions on Knowledge and Data Engineering, 35(2):1149-1170, 2021.
  13. [Jin et al., 2024] Ming Jin, Huan Yee Koh, Qingsong Wen, Daniele Zambon, Cesare Alippi, Geoffrey I Webb, Irwin King, and Shirui Pan. A survey on graph neural networks for time series: Forecasting, classification, imputation, and anomaly detection. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2024.
  14. [Kumar et al., 2019] Srijan Kumar, Xikun Zhang, and Jure Leskovec. Predicting dynamic embedding trajectory in tem- poral interaction networks. In Proceedings of the 25th ACM SIGKDD international conference on knowledge discovery & data mining, pages 1269-1278, 2019.
  15. [Li et al., 2013] Xirong Li, CeesG. M. Snoek, Marcel Wor- ring, Dennis Koelma, and Arnold W. M. Smeulders. Boot- strapping visual categorization with relevant negatives. IEEE Transactions on Multimedia, 15(4):933-945, 2013.
  16. [Li et al., 2025] Yingxuan Li, Yuanyuan Xu, Xuemin Lin, Wenjie Zhang, and Ying Zhang. Ranking on dynamic graphs: An effective and robust band-pass disentangled approach. In Proceedings of the ACM Web Conference, 2025.
  17. [Lu et al., 2024] Xiaodong Lu, Leilei Sun, Tongyu Zhu, and Weifeng Lv. Improving temporal link prediction via tem- poral walk matrix projection. In The Thirty-eighth Annual Conference on Neural Information Processing Systems, 2024.
  18. [Luo and Li, 2022] Yuhong Luo and Pan Li. Neighborhood- aware scalable temporal network representation learning. In Bastian Rieck and Razvan Pascanu, editors, Proceedings of the First Learning on Graphs Conference, volume 198 of Proceedings of Machine Learning Research, pages 1:1- 1:18. PMLR, 09-12 Dec 2022.
  19. [Mao et al., 2021] Xin Mao, Wenting Wang, Yuanbin Wu, and Man Lan. Boosting the speed of entity alignment 10 ×: Dual attention matching network with normalized hard sample mining. In Proceedings of the Web Conference 2021, WWW '21, page 821-832, New York, NY, USA, 2021. Association for Computing Machinery.
  20. [Noh et al., 2018] Junhyug Noh, Soochan Lee, Beomsu Kim, and Gunhee Kim. Improving occlusion and hard nega- tive handling for single-stage pedestrian detectors. In Pro- ceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2018.
  21. [Pareja et al., 2020] Aldo Pareja, Giacomo Domeniconi, Jie Chen, Tengfei Ma, Toyotaro Suzumura, Hiroki Kanezashi, Tim Kaler, Tao Schardl, and Charles Leiserson. Evolvegcn: Evolving graph convolutional networks for dynamic graphs. In Proceedings of the AAAI conference on artificial intelli- gence, volume 34, pages 5363-5370, 2020.
  22. [Poursafaei et al., 2022] Farimah Poursafaei, Shenyang Huang, Kellin Pelrine, and Reihaneh Rabbany. Towards better evaluation for dynamic link prediction. Advances in Neural Information Processing Systems, 35:32928-32941, 2022.
  23. [Qin et al., 2021] Xiao Qin, Nasrullah Sheikh, Berthold Rein- wald, and Lingfei Wu. Relation-aware graph attention model with adaptive self-adversarial training. Proceed- ings of the AAAI Conference on Artificial Intelligence, 35(11):9368-9376, May 2021.
  24. [Rao et al., 2016] Jinfeng Rao, Hua He, and Jimmy Lin. Noise-contrastive estimation for answer selection with deep neural networks. In Proceedings of the 25th ACM Inter- national on Conference on Information and Knowledge Management, CIKM '16, page 1913-1916, New York, NY, USA, 2016. Association for Computing Machinery.
  25. [Rendle and Freudenthaler, 2014] Steffen Rendle and Christoph Freudenthaler. Improving pairwise learning for item recommendation from implicit feedback. In Proceedings of the 7th ACM International Conference on Web Search and Data Mining, WSDM '14, page 273-282, New York, NY, USA, 2014. Association for Computing Machinery.
  26. [Rendle et al., 2009] Steffen Rendle, Christoph Freuden- thaler, Zeno Gantner, and Lars Schmidt-Thieme. Bpr: Bayesian personalized ranking from implicit feedback. In Proceedings of the Twenty-Fifth Conference on Uncertainty in Artificial Intelligence, UAI '09, page 452-461, Arlington, Virginia, USA, 2009. AUAI Press.
  27. [Rossi et al., 2020] Emanuele Rossi, Ben Chamberlain, Fab- rizio Frasca, Davide Eynard, Federico Monti, and Michael Bronstein. Temporal graph networks for deep learning on dynamic graphs. In ICML 2020 Workshop on Graph Representation Learning, 2020.
  28. [Song et al., 2019] Weiping Song, Zhiping Xiao, Yifan Wang, Laurent Charlin, Ming Zhang, and Jian Tang. Session- based social recommendation via dynamic graph attention networks. In Proceedings of the Twelfth ACM international conference on web search and data mining, pages 555-563, 2019.
  29. [Sun et al., 2019] Qianru Sun, Yaoyao Liu, Tat-Seng Chua, and Bernt Schiele. Meta-transfer learning for few-shot learning. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), June 2019.
  30. [Wang et al., 2020] Yanbang Wang, Yen-Yu Chang, Yunyu Liu, Jure Leskovec, and Pan Li. Inductive representation learning in temporal networks via causal anonymous walks. In International Conference on Learning Representations, 2020.
  31. [Wang et al., 2021a] Lu Wang, Xiaofu Chang, Shuang Li, Yunfei Chu, Hui Li, Wei Zhang, Xiaofeng He, Le Song, Jingren Zhou, and Hongxia Yang. TCL: transformer-based dynamic graph modelling via contrastive learning. CoRR, abs/2105.07944, 2021.
  32. [Wang et al., 2021b] Xuhong Wang, Ding Lyu, Mengjian Li, Yang Xia, Qi Yang, Xinwen Wang, Xinguang Wang, Ping Cui, Yupu Yang, Bowen Sun, et al. Apan: Asynchronous propagation attention network for real-time temporal graph embedding. In Proceedings of the 2021 international con- ference on management of data, pages 2628-2638, 2021.
  33. [Wang et al., 2023] Wen Wang, Wei Zhang, Shukai Liu, Qi Liu, Bo Zhang, Leyu Lin, and Hongyuan Zha. Incor- porating link prediction into multi-relational item graph modeling for session-based recommendation. IEEE Trans- actions on Knowledge and Data Engineering, 35(3):2683- 2696, 2023.
  34. [Wang et al., 2024] Luzhi Wang, Dongxiao He, He Zhang, Yixin Liu, Wenjie Wang, Shirui Pan, Di Jin, and Tat-Seng Chua. Goodat: Towards test-time graph out-of-distribution detection. In Proceedings of the AAAI Conference on Arti- ficial Intelligence, volume 38, pages 15537-15545, 2024.
  35. [Wu et al., 2019] Zonghan Wu, Shirui Pan, Guodong Long, Jing Jiang, and Chengqi Zhang. Graph wavenet for deep spatial-temporal graph modeling. In Proceedings of the Twenty-Eighth International Joint Conference on Artificial Intelligence, IJCAI 2019, Macao, China, August 10-16, 2019, pages 1907-1913. ijcai.org, 2019. IJCAI
  36. [Wu et al., 2020] Zonghan Wu, Shirui Pan, Guodong Long, Jing Jiang, Xiaojun Chang, and Chengqi Zhang. Connect- ing the dots: Multivariate time series forecasting with graph neural networks. In Proceedings of the 26th ACM SIGKDD international conference on knowledge discovery & data mining, pages 753-763, 2020.
  37. [Wu et al., 2021] Zonghan Wu, Shirui Pan, Fengwen Chen, Guodong Long, Chengqi Zhang, and Philip S Yu. A com- prehensive survey on graph neural networks. IEEE transac- tions on neural networks and learning systems, 32(1):4-24, 2021.
  38. [Wu et al., 2024] Jiancan Wu, Xiang Wang, Xingyu Gao, Ji- awei Chen, Hongcheng Fu, and Tianyu Qiu. On the effec- tiveness of sampled softmax loss for item recommendation. ACM Transactions on Information Systems, 42(4):1-26, 2024.
  39. [Xu et al., 2020] Da Xu, Chuanwei Ruan, Evren Korpeoglu, Sushant Kumar, and Kannan Achan. Inductive representa- tion learning on temporal graphs. In International Confer- ence on Learning Representations, 2020.
  40. [Xu et al., 2024] Yuanyuan Xu, Wenjie Zhang, Ying Zhang, Maria E. Orlowska, and Xuemin Lin. Timesgn: Scalable and effective temporal graph neural network. In Proceed- ings of the IEEE International Conference on Data Engi- neering, pages 3297-3310, 2024.
  41. [Yu et al., 2021] Le Yu, Bowen Du, Xiao Hu, Leilei Sun, Liangzhe Han, and Weifeng Lv. Deep spatio-temporal graph convolutional network for traffic accident prediction. Neurocomputing, 423:135-147, 2021.
  42. [Yu et al., 2023] Le Yu, Leilei Sun, Bowen Du, and Weifeng Lv. Towards better dynamic graph learning: New architec- ture and unified library. Advances in Neural Information Processing Systems, 36, 2023.
  43. [Zhang et al., 2013] Weinan Zhang, Tianqi Chen, Jun Wang, and Yong Yu. Optimizing top-n collaborative filtering via dynamic negative item sampling. In Proceedings of the 36th International ACM SIGIR Conference on Research and Development in Information Retrieval, SIGIR '13, page 785-788, 2013.

References were extracted automatically from the PDF and may contain errors.

Welcome Future Conferences AI Journal Division IJCAI Proceedings About IJCAI IJCAI Awards