Skip to content

The code for the paper "AnomalyLLM: Few-shot Anomaly Edge Detection for Dynamic Graphs using Large Language Models"

Notifications You must be signed in to change notification settings

AnomalyLLM/AnomalyLLM

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Introduction

AnomalyLLM is a is a LLM enhanced few-shot anomaly detection framework.

  • It consists of three key modules: (1)dynamic-aware encoder, (2)modality alignment and (3)in-context learning for detection.

Requirements

  • networkx==3.2.1
  • numpy==1.26.3
  • PyYAML==6.0.1
  • scikit-learn==1.4.0
  • scipy==1.12.0
  • torch==2.0.1
  • torch_geometric==2.4.0
  • torchaudio==2.0.2
  • torchdata==0.7.1
  • torchtext==0.17.0
  • torchvision==0.15.2
  • tqdm==4.66.1
  • transformers==4.37.2
  • urllib3==1.26.13

To install all dependencies:

pip install -r requirements.txt

Download Backbone

Please download backbone model and place them under ./backbone

Download Data

Due to the file size limit, we put the data on other sites. Please first download the data and put it in data folder. The data can be download at: here

Training & Evaluating

To train AnomalyLLM, run the following command:

python pre_training.py -dataset uci
python alignment.py -dataset uci

You can evaluate on UCI Message datasets by:

python evaluate.py -dataset uci

About

The code for the paper "AnomalyLLM: Few-shot Anomaly Edge Detection for Dynamic Graphs using Large Language Models"

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages