AnomalyGFM: Graph Foundation Model for Zero/Few-shot Anomaly Detection
Hezhe Qiao, Chaoxi Niu, Ling Chen, Guansong Pang
Abstract
Graph anomaly detection (GAD) aims to identify abnormal nodes that differ from the majority of the nodes in a graph, which has been attracting significant attention in recent years. Existing generalist graph models have achieved remarkable success in different graph tasks but struggle to generalize to the GAD task. This limitation arises from their difficulty in learning generalized knowledge for capturing the inherently infrequent, irregular and heterogeneous abnormality patterns in graphs from different domains. To address this challenge, we propose AnomalyGFM, a GAD-oriented graph foundation model that supports zero-shot inference and few-shot prompt tuning for GAD in diverse graph datasets. One key insight is that graph-agnostic representations for normal and abnormal classes are required to support effective zero/few-shot GAD across different graphs. Motivated by this, AnomalyGFM is pre-trained to align data-independent, learnable normal and abnormal class prototypes with node representation residuals (i.e., representation deviation of a node from its neighbors). The residual features essentially project the node information into a unified feature space where we can effectively measure the abnormality of nodes from different graphs in a consistent way. This provides a driving force for the learning of graph-agnostic, discriminative prototypes for the normal and abnormal classes, which can be used to enable zero-shot GAD on new graphs, including very large-scale graphs. If there are few-shot labeled normal nodes available in the new graphs, AnomalyGFM can further support prompt tuning to leverage these nodes for better adaptation. Comprehensive experiments on 11 widely-used GAD datasets with real anomalies, covering social networks, finance networks, and co-review networks, demonstrate that AnomalyGFM significantly outperforms state-of-the-art competing methods under both zero-and few-shot GAD settings. Code is available at https://github.com/mala-lab/AnomalyGFM.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Cited by top-tier papers6
- DP-DGAD: A Generalist Dynamic Graph Anomaly Detector with Dynamic PrototypesJialun Zheng, Jie Liu, Jiannong Cao, Xiao Wang et al.WWW 2026 · 5 citations
- IA-GGAD: Zero-shot Generalist Graph Anomaly Detection via Invariant and Affinity LearningXiong Zhang, Zhenli He, Changlong Fu, Cheng XieNeurIPS 2025 · 3 citations
- OwlEye: Zero-Shot Learner for Cross-Domain Graph Data Anomaly DetectionLecheng Zheng, Dongqi Fu, Zihao Li, Jingrui HeICLR 2026 · 2 citations
- DR-GGAD: Dual Residual Centering for Mitigating Anomaly Non‑Discriminativity in Generalist Graph Anomaly DetectionChanglong Fu, Zhenli He, Xiong Zhang, Cheng Xie et al.ICLR 2026
- Towards Anomaly-Aware Pre-Training and Fine-Tuning for Graph Anomaly DetectionYunhui Liu, Jiashun Cheng, Yiqing Lin, Qizhuo Xie et al.ICLR 2026
Builds on19
- Pick and Choose: A GNN-based Imbalanced Learning Approach for Fraud DetectionYang Liu, Xiang Ao, Zidi Qin, Jianfeng Chi et al.WWW 2021 · 527 citations
- AnomalyCLIP: Object-agnostic Prompt Learning for Zero-shot Anomaly DetectionQihang Zhou, Guansong Pang, Yu Tian, Shibo He et al.ICLR 2024 · 380 citations
- Rethinking Graph Neural Networks for Anomaly DetectionJianheng Tang, Jiajin Li, Ziqi Gao, Jia LiICML 2022 · 365 citations
- GraphPrompt: Unifying Pre-Training and Downstream Tasks for Graph Neural NetworksZemin Liu, Xingtong Yu, Yuan Fang, Xinming ZhangWWW 2023 · 263 citations
- Addressing Heterophily in Graph Anomaly Detection: A Perspective of Graph SpectrumYuan Gao, Xiang Wang, Xiangnan He, Zhenguang Liu et al.WWW 2023 · 189 citations
Related papers
- A Graph Foundation Model for Unified Anomaly DetectionRenda Han, Xiaobao Wang, Luzhi Wang, Wenxin Zhang et al.WWW 2026 · 1 citation
- AffinityTune: A Prompt-Tuning Framework for Few-Shot Anomaly Detection on GraphsJingyan Chen, Guanghui Zhu, Guansong Pang, Chunfeng Yuan et al.KDD 2025 · 1 citation
- ARC: A Generalist Graph Anomaly Detector with In-Context LearningYixin Liu, Shiyuan Li, Yu Zheng, Qingfeng Chen et al.NeurIPS 2024 · 73 citations
- Breaking Semantic Barriers: A Zero-Shot Generalized Framework for Graph Anomaly DetectionXiangping Zheng, Xuan Feng, Bo Wu, Bin Ren et al.ACM MM 2025 · 1 citation
- Generalist Graph Anomaly Detection via Prototype-Based DistillationYiming Xu, Zihan Chen, Zhen Peng, Song Wang et al.ICML 2026
