Skip to content
/ GOODAT Public

GOODAT: Towards Test-time Graph Out-of-Distribution Detection

Notifications You must be signed in to change notification settings

Ee1s/GOODAT

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GOODAT: Towards Test-time Graph Out-of-Distribution Detection

This is the source code of AAAI'24 paper "GOODAT: Towards Test-time Graph Out-of-Distribution Detection". This code builds on WSDM'23 paper "GOOD-D: On Unsupervised Graph Out-Of-Distribution Detection".

Requirements

This code requires the following:

  • Python==3.9
  • Pytorch==1.11.0
  • Pytorch Geometric==2.0.4
  • Numpy==1.21.2
  • Scikit-learn==1.0.2
  • OGB==1.3.3
  • NetworkX==2.7.1
  • FAISS-GPU==1.7.2

Usage

Just put the code in ood/id folders into the root folder. For instance:

python AIDS.py

Statistic of Graph-level OOD Detection Benchmark

The statistic of each dataset pair in our benchmark is provided as follows. They are come from GOOD-D.

ID datasetOOD dataset
No.Name# Graph
(Train/Test)
# Node
(avg.)
# Edge
(avg.)
Name# Graph
(Test)
# Node
(avg.)
# Edge
(avg.)
1BZR364/4135.838.4 COX24141.243.5
2PTC-MR309/3514.314.7 MUTAG3517.919.8
3AIDS1,800/20015.716.2 DHFR20042.444.5
4ENZYMES540/6032.662.1 PROTEIN6039.172.8
5IMDB-B1,350/15019.896.5 IMDB-M15013.065.9
6Tox217,047/78418.619.3 SIDER78433.635.4
7FreeSolv577/658.78.4 ToxCast6518.819.3
8BBBP1,835/20424.126.0 BACE20434.136.9
9ClinTox1,329/14826.227.9 LIPO14827.029.5
10Esol1,015/11313.313.7 MUV11324.226.3

Statistic of Graph-level Anomaly Detection Datasets

The statistic of each dataset in the anomaly detection experiments is provided as follows.

Dataset# Graph
(Train/Test)
# Node
(avg.)
# Edge
(avg.)
PROTEINS-full360/22339.172.8
ENZYMES400/12032.662.1
AIDS1280/40015.716.2
DHFR368/15242.444.5
BZR69/8135.838.4
COX281/9441.243.5
DD390/236284.3715.7
NCI11646/82229.832.3
IMDB-B400/20019.896.5
REDDIT-B800/400429.6497.8
COLLAB1920/100074.52457.8
HSE423/26716.917.2
MMP6170/23817.618.0
p538088/26917.918.3
PPAR-gamma219/26717.417.7

About

GOODAT: Towards Test-time Graph Out-of-Distribution Detection

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages