Proceedings

Temporal Motif-aware Graph Test-time Adaptation for OOD Blockchain Anomaly Detection

Download BibTeX Cite

Proceedings of the Thirty-Fifth International Joint Conference on Artificial Intelligence. AI and Social Good. Pages 7210-7218.

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

Abstract

Ever-evolving transaction patterns have significantly hindered anomaly detection on emerging cryptocurrency blockchains due to the vast number of addresses and diverse anomalous behaviors. Recently, advanced Graph Anomaly Detection (GAD) approaches applied to blockchains have faced two critical challenges: adversarial pattern evolution by malicious actors and the out-of-distribution (OOD) problem caused by varied transaction semantics on blockchains. To address these challenges, we propose a novel framework termed TEmporal Motif-aware Graph Test-Time Adaptation (TEMG-TTA). First, we comprehensively capture the 3-node temporal motif distribution of each active address using an efficient computational mechanism, enabling downstream temporal motif-aware graph learning. Second, we design a simple yet effective test-time adaptation strategy to facilitate the sharing of common patterns between training and testing graphs. Extensive experiments on 5 real-world datasets demonstrate that our proposed TEMG-TTA outperforms state-of-the-art GAD approaches by an average of 54.88%. A further case study on interpretable motif patterns reveals that TEMG-TTA explicitly characterizes the complex transaction patterns of anomalous addresses, thereby verifying the effectiveness of our technical designs. Our code is publicly available at https://github.com/LuoXishuang0712/TEMG-TTA/.

  1. [Chen et al., 2018] Weili Chen, Zibin Zheng, Jiahui Cui, Edith Ngai, Peilin Zheng, and Yuren Zhou. Detecting ponzi schemes on ethereum: Towards healthier blockchain technology. In Proceedings of the 2018 world wide web conference, pages 1409-1418, 2018.
  2. [Chen et al., 2020] Weili Chen, Tuo Zhang, Zhiguang Chen, Zibin Zheng, and Yutong Lu. Traveling the token world: A graph analysis of ethereum erc20 token ecosystem. In Proceedings of The Web Conference 2020, pages 1411- 1421, 2020.
  3. [Chen et al., 2022] Guanzi Chen, Jiying Zhang, Xi Xiao, and Yang Li. Graphtta: Test time adaptation on graph neural networks. arXiv preprint arXiv:2208.09126, 2022.
  4. [Chen et al., 2024] Nan Chen, Zemin Liu, Bryan Hooi, Bingsheng He, Rizal Fathony, Jun Hu, and Jia Chen. Consistency training with learnable data augmentation for graph anomaly detection with limited supervision. In The twelfth international conference on learning representa- tions, 2024.
  5. [Dong et al., 2025] Xiangyu Dong, Xingyi Zhang, Lei Chen, Mingxuan Yuan, and Sibo Wang. Spacegnn: Multi-space graph neural network for node anomaly detection with ex- tremely limited labels. arXiv preprint arXiv:2502.03201, 2025.
  6. [Duan et al., 2024] Mingjiang Duan, Tongya Zheng, Yang Gao, Gang Wang, Zunlei Feng, and Xinyu Wang. Dga- gnn: Dynamic grouping aggregation gnn for fraud detec- tion. In Proceedings of the AAAI conference on artificial intelligence, volume 38, pages 11820-11828, 2024.
  7. [Hamilton et al., 2017] Will Hamilton, Zhitao Ying, and Jure Leskovec. Inductive representation learning on large graphs. Advances in neural information processing sys- tems, 30, 2017.
  8. [Huang et al., 2021] Ling Huang, Ye Zhu, Yuefang Gao, Tuo Liu, Chao Chang, Caixing Liu, Yong Tang, and Chang- Dong Wang. Hybrid-order anomaly detection on attributed networks. IEEE Transactions on Knowledge and Data En- gineering, 35(12):12249-12263, 2021.
  9. [Jin et al., 2022] Wei Jin, Tong Zhao, Jiayuan Ding, Yozen Liu, Jiliang Tang, and Neil Shah. Empowering graph rep- resentation learning with test-time graph transformation. arXiv preprint arXiv:2210.03561, 2022.
  10. [Kipf, 2016] TN Kipf. Semi-supervised classification with graph convolutional networks. arXiv preprint arXiv:1609.02907, 2016.
  11. [Lee et al., 2019] John Boaz Lee, Ryan A Rossi, Xiangnan Kong, Sungchul Kim, Eunyee Koh, and Anup Rao. Graph convolutional networks with motif-based attention. In Pro- ceedings of the 28th ACM international conference on in- formation and knowledge management, pages 499-508, 2019.
  12. [Lin et al., 2024] Dan Lin, Jiajing Wu, Yunmei Yu, Qishuang Fu, Zibin Zheng, and Changlin Yang. Dense- flow: Spotting cryptocurrency money laundering in ethereum transaction graphs. In Proceedings of the ACM Web Conference 2024, pages 4429-4438, 2024.
  13. [Liu et al., 2024] Yixin Liu, Shiyuan Li, Yu Zheng, Qingfeng Chen, Chengqi Zhang, and Shirui Pan. Arc: A generalist graph anomaly detector with in-context learning. Advances in Neural Information Processing Systems, 37:50772-50804, 2024.
  14. [Liu et al., 2026] Hanwen Liu, Longjiao Zhang, Rui Wang, Tongya Zheng, Sai Wu, Chang Yao, and Mingli Song. Sa- lom: Structure aware temporal graph networks with long- short memory updater. Advances in Neural Information Processing Systems, 38:22843-22871, 2026.
  15. [Luo, 2024] Bingqiao Luo. When crypto economics meet graph analytics and learning. In Companion Proceed- ings of the ACM Web Conference 2024, pages 1186-1189, 2024.
  16. [Monti et al., 2018] Federico Monti, Karl Otness, and Michael M Bronstein. Motifnet: a motif-based graph con- volutional network for directed graphs. In 2018 IEEE data science workshop (DSW), pages 225-228. IEEE, 2018.
  17. [Niu et al., 2024] Chaoxi Niu, Hezhe Qiao, Changlu Chen, Ling Chen, and Guansong Pang. Zero-shot general- ist graph anomaly detection with unified neighborhood prompts. arXiv preprint arXiv:2410.14886, 2024. IJCAI
  18. [Oord et al., 2018] Aaron van den Oord, Yazhe Li, and Oriol Vinyals. Representation learning with contrastive predic- tive coding. arXiv preprint arXiv:1807.03748, 2018.
  19. [Paranjape et al., 2017] Ashwin Paranjape, Austin R Ben- son, and Jure Leskovec. Motifs in temporal networks. In Proceedings of the tenth ACM international conference on web search and data mining, pages 601-610, 2017.
  20. [Phillips and Wilder, 2020] Ross Phillips and Heidi Wilder. Tracing cryptocurrency scams: Clustering replicated advance-fee and phishing websites. In 2020 IEEE in- ternational conference on blockchain and cryptocurrency (ICBC), pages 1-8. IEEE, 2020.
  21. [Qi et al., 2023] Yuxin Qi, Jun Wu, Hansong Xu, and Mohsen Guizani. Blockchain data mining with graph learning: A survey. IEEE Transactions on Pattern Analysis and Machine Intelligence, 46(2):729-748, 2023.
  22. [Qiao et al., 2025a] Hezhe Qiao, Chaoxi Niu, Ling Chen, and Guansong Pang. Anomalygfm: Graph foundation model for zero/few-shot anomaly detection. In Proceed- ings of the 31st ACM SIGKDD Conference on Knowledge Discovery and Data Mining V. 2, pages 2326-2337, 2025.
  23. [Qiao et al., 2025b] Hezhe Qiao, Hanghang Tong, Bo An, Ir- win King, Charu Aggarwal, and Guansong Pang. Deep graph anomaly detection: A survey and new perspectives. IEEE Transactions on Knowledge and Data Engineering, 2025.
  24. [Tang et al., 2023] Jianheng Tang, Fengrui Hua, Ziqi Gao, Peilin Zhao, and Jia Li. Gadbench: Revisiting and bench- marking supervised graph anomaly detection. Advances in Neural Information Processing Systems, 36:29628-29653, 2023.
  25. [Wang et al., 2024a] Yu Wang, Tongya Zheng, Yuxuan Liang, Shunyu Liu, and Mingli Song. Cola: Cross-city mobility transformer for human trajectory simulation. In Proceedings of the ACM on Web Conference 2024, pages 3509-3520, 2024.
  26. [Wang et al., 2024b] Yu Wang, Tongya Zheng, Shunyu Liu, Zunlei Feng, Kaixuan Chen, Yunzhi Hao, and Mingli Song. Spatiotemporal-augmented graph neural networks for human mobility simulation. IEEE Transactions on Knowledge and Data Engineering, 36(11):7074-7086, 2024.
  27. [Weber et al., 2019] Mark Weber, Giacomo Domeniconi, Jie Chen, Daniel Karl I Weidele, Claudio Bellei, Tom Robin- son, and Charles E Leiserson. Anti-money laundering in bitcoin: Experimenting with graph convolutional networks for financial forensics. arXiv preprint arXiv:1908.02591, 2019.
  28. [Wu et al., 2020] Mike Wu, Milan Mosse, Chengxu Zhuang, Daniel Yamins, and Noah Goodman. Conditional negative sampling for contrastive learning of visual representations. arXiv preprint arXiv:2010.02037, 2020.
  29. [Yao et al., 2024] Mingxuan Yao, Runze Zhang, Haichuan Xu, Shih-Huan Chou, Varun Chowdhary Paturi, Amit Ku- mar Sikder, and Brendan Saltaformaggio. Pulling off the mask: Forensic analysis of the deceptive creator wallets behind smart contract fraud. In 2024 IEEE Symposium on Security and Privacy (SP), pages 2236-2254. IEEE, 2024.
  30. [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:67686-67700, 2023.
  31. [Yuan et al., 2020] Zihao Yuan, Qi Yuan, and Jiajing Wu. Phishing detection on ethereum via learning representa- tion of transaction subgraphs. In International conference on blockchain and trustworthy systems, pages 178-191. Springer, 2020.
  32. [Zhang et al., 2024] Jiaxin Zhang, Yiqi Wang, Xihong Yang, and En Zhu. A fully test-time training framework for semi-supervised node classification on out-of-distribution graphs. ACM Transactions on Knowledge Discovery from Data, 18(7):1-19, 2024.
  33. [Zhao et al., 2025] Yusheng Zhao, Qixin Zhang, Xiao Luo, Junyu Luo, Wei Ju, Zhiping Xiao, and Ming Zhang. Test- time adaptation on graphs via adaptive subgraph-based se- lection and regularized prototypes. In Forty-second Inter- national Conference on Machine Learning, 2025.
  34. [Zheng et al., 2019] Tongya Zheng, Gang Chen, Xinyu Wang, Chun Chen, Xingen Wang, and Sihui Luo. Real- time intelligent big data processing: technology, platform, and applications. Science China Information Sciences, 62(8):82101, 2019.
  35. [Zheng et al., 2023] Tongya Zheng, Xinchao Wang, Zunlei Feng, Jie Song, Yunzhi Hao, Mingli Song, Xingen Wang, Xinyu Wang, and Chun Chen. Temporal aggregation and propagation graph neural networks for dynamic represen- tation. IEEE Transactions on Knowledge and Data Engi- neering, 35(10):10151-10165, 2023.
  36. [Zheng et al., 2025] Xin Zheng, Wei Huang, Chuan Zhou, Ming Li, and Shirui Pan. Test-time graph neural dataset search with generative projection. In Forty-second Inter- national Conference on Machine Learning, 2025.
  37. [Zhou et al., 2022] Jiajun Zhou, Chenkai Hu, Jianlei Chi, Ji- ajing Wu, Meng Shen, and Qi Xuan. Behavior-aware account de-anonymization on ethereum interaction graph. IEEE Transactions on Information Forensics and Security, 17:3433-3448, 2022.
  38. [Zhu et al., 2020] Jiong Zhu, Yujun Yan, Lingxiao Zhao, Mark Heimann, Leman Akoglu, and Danai Koutra. Be- yond homophily in graph neural networks: Current limita- tions and effective designs. Advances in neural informa- tion processing systems, 33:7793-7804, 2020.
  39. [Zhuo et al., 2024] Wei Zhuo, Zemin Liu, Bryan Hooi, Bing- sheng He, Guang Tan, Rizal Fathony, and Jia Chen. Parti- tioning message passing for graph fraud detection. arXiv preprint arXiv:2412.00020, 2024.

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

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