2607004631
  • Open Access
  • Article

From Unsupervised to Few-Shot Graph Anomaly Detection: A Multi-Scale Contrastive Learning Approach

  • Yu Zheng 1,   
  • Junjun Pan 1,   
  • Yue Tan 1,   
  • Ming Jin 1,   
  • Yixin Liu 1, *,   
  • Lianhua Chi 2, *,   
  • Khoa Phan 2,   
  • Yi-Ping Phoebe Chen 2

Received: 26 May 2026 | Revised: 30 Jun 2026 | Accepted: 14 Jul 2026 | Published: 30 Jul 2026

Abstract

Graph anomaly detection has rapidly advanced in safeguarding graph applications, such as social networks, finance, and e-commerce. However, existing efforts in graph anomaly detection typically only consider the information in a single scale (view), thus inevitably limiting their capability in capturing anomalous patterns in complex graph data. To address this limitation, in this paper, we propose a novel framework, graph ANomaly dEtection framework with Multi-scale cONtrastive lEarning (ANEMONE in short). By using a graph neural network as a backbone to encode the information from multiple graph scales (i.e., graph views), we learn a better representation for nodes in a graph. In maximizing the agreements between instances at both the patch and context levels concurrently, we estimate the anomaly score of each node with a statistical anomaly estimator according to the degree of agreement from multiple perspectives. To further exploit a handful of few-shot ground-truth anomalies that may be collected in real-world applications, we further propose an extended algorithm, ANEMONE-FS, to integrate valuable information in our method. Extensive experiments under purely unsupervised and few-shot settings demonstrate that our proposed method ANEMONE and its variant ANEMONE-FS consistently outperform state-of-the-art algorithms on six benchmark datasets.

References 

  • 1.

    Wu, Z.; Pan, S.; Chen, F.; et al. A Comprehensive Survey on Graph Neural Networks. IEEE Trans. Neural Netw. Learn. Syst. 2021, 32, 4–24.

  • 2.

    Yu, J.; Wang, H.; Wang, X.; et al. Group-based fraud detection network on e-commerce platforms. In Proceedings of the 29th ACM SIGKDD Conference on Knowledge Discovery and Data Mining, Long Beach, CA, USA, 6–10 August 2023.

  • 3.

    Wang, C.; Zhu, H. Wrongdoing monitor: A graph-based behavioral anomaly detection in cyber security. IEEE Trans. Inf. Forensics Secur. 2022, 17, 2703–2718.

  • 4.

    Pan, J.; Liu, Y.; Zheng, X.; et al. A label-free heterophily-guided approach for unsupervised graph fraud detection. In Proceedings of the AAAI Conference on Artificial Intelligence, Philadelphia, PA, USA, 25 February–4 March 2025; Vol. 39, pp. 12443–12451.

  • 5.

    Pourhabibi, T.; Ong, K.L.; Kam, B.H.; et al. Fraud detection: A systematic literature review of graph-based anomaly detection approaches. Decis. Support Syst. 2020, 133, 113303.

  • 6.

    Latah, M. Detection of malicious social bots: A survey and a refined taxonomy. Expert Syst. Appl. 2020, 151, 113383.

  • 7.

    Perozzi, B.; Akoglu, L. Scalable anomaly ranking of attributed neighborhoods. In Proceedings of the SIAM International Conference on Data Mining, Miami, FL, USA, 5–7 May 2016; pp. 207–215.

  • 8.

    Li, J.; Dani, H.; Hu, X.; et al. Radar: Residual Analysis for Anomaly Detection in Attributed Networks. In Proceedings of the 26th International Joint Conference on Artificial Intelligence, Melbourne, VIC, Australia, 19–25 August 2017; pp. 2152–2158.

  • 9.

    Peng, Z.; Luo, M.; Li, J.; et al. ANOMALOUS: A Joint Modeling Approach for Anomaly Detection on Attributed Networks. In Proceedings of the Twenty-Seventh International Joint Conference on Artificial Intelligence, Stockholm, Sweden, 13–19 July 2018; pp. 3513–3519.

  • 10.

    Ding, K.; Li, J.; Bhanushali, R.; et al. Deep anomaly detection on attributed networks. In Proceedings of the SIAM International Conference on Data Mining, Calgary, AB, Canada, 2–4 May 2019; pp. 594–602.

  • 11.

    Li, Y.; Huang, X.; Li, J.; et al. Specae: Spectral autoencoder for anomaly detection in attributed networks. In Proceedings of the ACM International Conference on Information and Knowledge Management, Beijing, China, 3–7 November 2019; pp. 2233–2236.

  • 12.

    Liu, Y.; Li, Z.; Pan, S.; et al. Anomaly Detection on Attributed Networks via Contrastive Self-Supervised Learning. IEEE Trans. Neural Netw. Learn. Syst. 2021, 33, 2378–2392.

  • 13.

    Pang, G.; Shen, C.; van den Hengel, A. Deep anomaly detection with deviation networks. In Proceedings of the 25th ACM SIGKDD Conference on Knowledge Discovery and Data Mining, Anchorage, AK, USA, 4–8 August 2019; pp. 353–362.

  • 14.

    Kipf, T.N.; Welling, M. Semi-Supervised Classification with Graph Convolutional Networks. In Proceedings of the International Conference on Learning Representations, Toulon, France, 24–26 April 2017.

  • 15.

    Velikovi, P.; Cucurull, G.; Casanova, A.; et al. Graph Attention Networks. In Proceedings of the International Conference on Learning Representations, Vancouver, BC, Canada, 30 April–3 May 2018.

  • 16.

    Wu, Z.; Pan, S.; Long, G.; et al. Beyond low-pass filtering: Graph convolutional networks with automatic filtering. IEEE Trans. Knowl. Data Eng. 2022, 35, 6687–6697.

  • 17.

    Bruna, J.; Zaremba, W.; Szlam, A.; et al. Spectral networks and locally connected networks on graphs. In Proceedings of the International Conference on Learning Representations, Banff, AB, Canada, 14–16 April 2014.

  • 18.

    Defferrard, M.; Bresson, X.; Vandergheynst, P. Convolutional neural networks on graphs with fast localized spectral filtering. In Proceedings of the Conference on Neural Information Processing Systems, Barcelona, Spain, 5–10 December 2016; Vol. 29, pp. 3844–3852.

  • 19.

    Hamilton, W.L.; Ying, R.; Leskovec, J. Inductive representation learning on large graphs. In Proceedings of the Advances in Neural Information Processing Systems 30 (NIPS 2017), Long Beach, CA, USA, 4–9 December 2017; pp. 1025–1035.

  • 20.

    Xu, K.; Hu, W.; Leskovec, J.; et al. How Powerful are Graph Neural Networks? In Proceedings of the International Conference on Learning Representations, New Orleans, LA, USA, 6–9 May 2019.

  • 21.

    Ma, X.; Wu, J.; Xue, S.; et al. A comprehensive survey on graph anomaly detection with deep learning. IEEE Trans. Knowl. Data Eng. 2021, 35, 12012–12038.

  • 22.

    Ruff, L.; Vandermeulen, R.A.; Grnitz, N.; et al. Deep Semi-Supervised Anomaly Detection. In Proceedings of the International Conference on Learning Representations, New Orleans, LA, USA, 6–9 May 2019.

  • 23.

    He, J.; Xu, Q.; Jiang, Y.; et al. Ada-gad: Anomaly-denoised autoencoders for graph anomaly detection. In Proceedings of the AAAI Conference on Artificial Intelligence, Vancouver, BC, Canada, 20–27 February 2024; Vol. 38, pp. 8481–8489.

  • 24.

    Pan, J.; Liu, Y.; Zheng, Y.; et al. Prem: A simple yet effective approach for node-level graph anomaly detection. In Proceedings of the IEEE International Conference on Data Mining, Shanghai, China, 1–4 December 2023; pp. 1253–1258.

  • 25.

    Qiao, H.; Pang, G. Truncated affinity maximization: One-class homophily modeling for graph anomaly detection. In Proceedings of the Conference on Neural Information Processing Systems, New Orleans, LA, USA, 10–16 December 2023; Vol. 36, pp. 49490–49512.

  • 26.

    Wang, D.; Lin, J.; Cui, P.; et al. A semi-supervised graph attentive network for financial fraud detection. In Proceedings of the IEEE International Conference on Data Mining, Beijing, China, 8–11 November 2019; pp. 598–607.

  • 27.

    Ding, K.; Zhou, Q.; Tong, H.; et al. Few-shot Network Anomaly Detection via Cross-network Meta-learning. In Proceedings of The Web Conference, Ljubljana, Slovenia, 19–23 April 2021; pp. 2448–2456.

  • 28.

    Pan, J.; Liu, Y.; Zhou, C.; et al. Correcting False Alarms from Unseen: Adapting Graph Anomaly Detectors at Test Time. In Proceedings of the AAAI Conference on Artificial Intelligence, Singapore, 20–27 January 2026.

  • 29.

    Wang, H.; Wu, J.; Hu, W.; et al. Detecting and assessing anomalous evolutionary behaviors of nodes in evolving social networks. ACM Trans. Knowl. Discov. Data 2019, 13, 12.

  • 30.

    Liu, Y.; Pan, S.; Wang, Y.G.; et al. Anomaly Detection in Dynamic Graphs via Transformer. IEEE Trans. Knowl. Data Eng. 2021, 35, 12081–12094.

  • 31.

    Ma, X.; Li, D.; Shao, M.; et al. LLM-enhanced energy contrastive learning for out-of-distribution detection in text-attributed graphs. In Proceedings of the AAAI Conference on Artificial Intelligence, Singapore, 20–27 January 2026; Vol. 40, pp. 24308–24316.

  • 32.

    Xu, Y.; Chen, J.; Peng, Z.; et al. Court of LLMs: Evidence-Augmented Generation via Multi-LLM Collaboration for Text-Attributed Graph Anomaly Detection. In Proceedings of the 33rd ACM International Conference on Multimedia, Dublin, Ireland, 27–31 October 2025; pp. 2437–2446.

  • 33.

    Pan, J.; Liu, Y.; Zheng, Y.; et al. CAMERA: Adapting to Semantic Camouflage in Unsupervised Text-Attributed Graph Fraud Detection. In Proceedings of the International Joint Conference on Artificial Intelligence, Bremen, Germany, 15–21 August 2026.

  • 34.

    Liu, Y.; Ding, K.; Lu, Q.; et al. Towards self-interpretable graph-level anomaly detection. In Proceedings of the Advances in Neural Information Processing Systems 36 (NeurIPS 2023), New Orleans, LA, USA, 10–16 December 2023.

  • 35.

    Shen, X.; Wang, Y.; Zhou, K.; et al. Optimizing ood detection in molecular graphs: A novel approach with diffusion models. In Proceedings of the 30th ACM SIGKDD Conference on Knowledge Discovery and Data Mining, Barcelona, Spain, 25–29 August 2024; pp. 2640–2650.

  • 36.

    Wang, Y.; Liu, Y.; Shen, X.; et al. Unifying unsupervised graph-level anomaly detection and out-of-distribution detection: A benchmark. In Proceedings of the International Conference on Learning Representations, Singapore, 24–28 April 2025.

  • 37.

    Pan, J.; Zheng, Y.; Tan, Y.; et al. A Survey of Generalization of Graph Anomaly Detection: From Transfer Learning to Foundation Models. In Proceedings of the IEEE International Conference on Knowledge Graph, Limassol, Cyprus, 13–14 November 2025; pp. 316–323.

  • 38.

    Liu, Y.; Li, S.; Zheng, Y.; et al. Arc: A generalist graph anomaly detector with in-context learning. In Proceedings of the Conference on Neural Information Processing Systems, Vancouver, BC, Canada, 10–15 December 2024; Vol. 37, pp. 50772–50804.

  • 39.

    Liu, Y.; Li, S.; Zheng, Y.; et al. From Few-Shot to Zero-Shot: Towards Generalist Graph Anomaly Detection. IEEE Trans. Knowl. Data Eng. 2026, 38, 4357–4372.

  • 40.

    He, K.; Fan, H.; Wu, Y.; et al. Momentum contrast for unsupervised visual representation learning. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, Seattle, WA, USA, 14–19 June 2020; pp. 9729–9738.

  • 41.

    Chen, T.; Kornblith, S.; Norouzi, M.; et al. A simple framework for contrastive learning of visual representations. In Proceedings of the 37th International Conference on Machine Learning, Virtual Event, 13–18 July 2020; pp. 1597–1607.

  • 42.

    Grill, J.B.; Strub, F.; Altch, F.; et al. Bootstrap Your Own Latent—A New Approach to Self-Supervised Learning. In Proceedings of the Advances in Neural Information Processing Systems 33 (NeurIPS 2020), Virtual Event, 6–12 December 2020; Vol. 33, pp. 21271–21284.

  • 43.

    Liu, Y.; Jin, M.; Pan, S.; et al. Graph self-supervised learning: A survey. IEEE Trans. Knowl. Data Eng. 2022, 35, 5879–5900.

  • 44.

    Zheng, Y.; Jin, M.; Pan, S.; et al. Toward graph self-supervised learning with contrastive adjusted zooming. IEEE Trans. Neural Netw. Learn. Syst. 2022, 35, 8882–8896.

  • 45.

    Velikovi, P.; Fedus, W.; Hamilton, W.L.; et al. Deep Graph Infomax. In Proceedings of the International Conference on Learning Representations, New Orleans, LA, USA, 6–9 May 2019.

  • 46.

    Peng, Z.; Huang, W.; Luo, M.; et al. Graph representation learning via graphical mutual information maximization. In Proceedings of The Web Conference, Taipei, Taiwan, 20–24 April 2020; pp. 259–270.

  • 47.

    Qiu, J.; Chen, Q.; Dong, Y.; et al. Gcc: Graph contrastive coding for graph neural network pre-training. In Proceedings of the 26th ACM SIGKDD Conference on Knowledge Discovery and Data Mining, Virtual Event, CA, USA, 23–27 August 2020; pp. 1150–1160.

  • 48.

    Zhu, Y.; Xu, Y.; Yu, F.; et al. Graph contrastive learning with adaptive augmentation. In Proceedings of The Web Conference, Ljubljana, Slovenia, 19–23 April 2021; pp. 2069–2080.

  • 49.

    Jin, M.; Zheng, Y.; Li, Y.F.; et al. Multi-Scale Contrastive Siamese Networks for Self-Supervised Graph Representation Learning. In Proceedings of the International Joint Conference on Artificial Intelligence, Montreal, QC, Canada, 19–26 August 2021.

  • 50.

    Wang, Y.; Min, Y.; Chen, X.; et al. Multi-view Graph Contrastive Representation Learning for Drug-Drug Interaction Prediction. In Proceedings of The Web Conference, Ljubljana, Slovenia, 19–23 April 2021; pp. 2921–2933.

  • 51.

    Yu, J.; Yin, H.; Li, J.; et al. Self-Supervised Multi-Channel Hypergraph Convolutional Network for Social Recommendation. In Proceedings of The Web Conference, Ljubljana, Slovenia, 19–23 April 2021; pp. 413–424.

  • 52.

    Jin, M.; Liu, Y.; Zheng, Y.; et al. ANEMONE: Graph Anomaly Detection with Multi-Scale Contrastive Learning. In Proceedings of the 30th ACM International Conference on Information and Knowledge Management, Gold Coast, QD, Australia, 1–5 November 2021; pp. 3122–3126.

  • 53.

    Zheng, Y.; Jin, M.; Liu, Y.; et al. Generative and Contrastive Self-Supervised Learning for Graph Anomaly Detection. IEEE Trans. Knowl. Data Eng. 2021, 35, 12220–12233.

  • 54.

    Tong, H.; Faloutsos, C.; Pan, J.Y. Fast random walk with restart and its applications. In Proceedings of the Sixth International Conference on Data Mining (ICDM’06), Hong Kong, China, 18–22 December 2006; pp. 613–622.

  • 55.

    Sen, P.; Namata, G.; Bilgic, M.; et al. Collective classification in network data. AI Mag. 2008, 29, 93–93.

  • 56.

    Tang, J.; Zhang, J.; Yao, L.; et al. Arnetminer: extraction and mining of academic social networks. In Proceedings of the 14th ACM SIGKDD Conference on Knowledge Discovery and Data Mining, Las Vegas, NV, USA, 24–27 August 2008; pp. 990–998.

  • 57.

    Tang, L.; Liu, H. Relational learning via latent social dimensions. In Proceedings of the 15th ACM SIGKDD Conference on Knowledge Discovery and Data Mining, Paris, France, 28 June–1 July, 2009; pp. 817–826.

  • 58.

    Ding, K.; Li, J.; Liu, H. Interactive anomaly detection on attributed networks. In Proceedings of the ACM International Conference on Web Search and Data Mining, Melbourne, VIC, Australia, 11–15 February 2019; pp. 357–365.

  • 59.

    Song, X.; Wu, M.; Jermaine, C.; et al. Conditional anomaly detection. IEEE Trans. Knowl. Data Eng. 2007, 19, 631–645.

  • 60.

    Pan, S.; Zheng, Y.; Liu, Y. Integrating graphs with large language models: Methods and prospects. IEEE Intell. Syst. 2024, 39, 64–68.

Share this article:
How to Cite
Zheng, Y.; Pan, J.; Tan, Y.; Jin, M.; Liu, Y.; Chi, L.; Phan, K.; Chen, Y.-P. P. From Unsupervised to Few-Shot Graph Anomaly Detection: A Multi-Scale Contrastive Learning Approach. Transactions on Graph Intelligence and Network Applications 2026.
RIS
BibTex
Copyright & License
article copyright Image
Copyright (c) 2026 by the authors.