mala-lab/AnomalyGFM

★ 55⑂ 4

Official PyTorch implementation of KDD2025 paper "AnomalyGFM: Graph Foundation Model for Zero/Few-shot Anomaly Detection"

About mala-lab/AnomalyGFM

mala-lab/AnomalyGFM is an open-source project on GitHub, mainly written in Python. Official PyTorch implementation of KDD2025 paper "AnomalyGFM: Graph Foundation Model for Zero/Few-shot Anomaly Detection" It currently holds 55 stars and 4 forks with 0 open issues, and was last pushed on an unknown date (repository created unknown).

Project Overview

AI Homed tracks it on the AI Prompt Engineering board.

GitHub Repository Details

Repository mala-lab/AnomalyGFM · default branch - · size 0 KB · watchers 0 · source: GitHub REST API and repository README

README

AnomalyGFM: Graph Foundation Model for Zero/Few-shot Anomaly Detection

📜 Datasets 📝 arxiv

Promotional Video

📢 We are excited to share that our paper presentation video is now available on YouTube!

🎬 Watch it here: [YouTube Link]

📌 Your feedback and support are greatly appreciated!

Main Contributions

1️⃣ AnomalyGFM is the first GAD-oriented GFM with strong zero-shot and few-shot generalization abilities.
2️⃣ AnomalyGFM is pre-trained to learn discriminative, graph-agnostic class prototypes with normal and abnormal residual features, and it supports few-shot graph prompt tuning for better adaptation.
3️⃣ A comprehensive benchmark on both zero-shot and few-shot settings using 11 real-world GAD datasets is established, on which i) AnomalyGFM performs significantly
better the state-of-the-art unsupervised, supervised, and generalist GAD methods, and ii) AnomalyGFM can scale up to very large graphs Framework of AnomalyGFM

The GAD datasets after feature alignment can be obtained from google drive link.

Requirements

To install requirements:

pip install -r requirements.txt

Training and Zero-shot Inference

To run the model(s), run this command:

python run_abnormal.py 

Training and Few-shot Inference

Run this command:

python run_finetune_normal.py 
For few-shot labeled normal nodes fine-tuning.

Run this command:

python run_finetune_abnormal.py 
for few-shot labeled abnormal nodes fine-tuning.

Large-scale Graph Generalization

Run this command:

python run_inference.py 

Citation

If you find this repo useful, please cite our paper.
@inproceedings{qiao2025anomalygfm,
  title={AnomalyGFM: Graph foundation model for zero/few-shot anomaly detection},
  author={Qiao, Hezhe and Niu, Chaoxi and Chen, Ling and Pang, Guansong},
  booktitle={Proceedings of the 31st ACM SIGKDD Conference on Knowledge Discovery and Data Mining V. 2},
  pages={2326--2337},
  year={2025}
}

GitHub Stars & Activity

55Stars
4Forks
0Open issues
PythonLanguage

GitHub Popularity

GitHub stars55
Forks4
Open issues0
Primary languagePython
License-
Stars gained today0
Created-
Last pushed-

Trending History

Trending statusnot on today's boards

Related AI Projects

1

microsoft / promptflow

Python★ 11,244⑂ 1,123
2

promptslab / Promptify

Python★ 4,635⑂ 364
3
4

hegelai / prompttools

Python★ 3,055⑂ 256
5

Eladlev / AutoPrompt

Python★ 3,019⑂ 264
6

microsoftarchive / promptbench

Python★ 2,821⑂ 222
7

yaojingang / yao-open-prompts

Python★ 2,817⑂ 461
8

YiVal / YiVal

Python★ 2,134⑂ 328

More AI Rankings