GOOD-D: On Unsupervised Graph Out-Of-Distribution Detection
About
Most existing deep learning models are trained based on the closed-world assumption, where the test data is assumed to be drawn i.i.d. from the same distribution as the training data, known as in-distribution (ID). However, when models are deployed in an open-world scenario, test samples can be out-of-distribution (OOD) and therefore should be handled with caution. To detect such OOD samples drawn from unknown distribution, OOD detection has received increasing attention lately. However, current endeavors mostly focus on grid-structured data and its application for graph-structured data remains under-explored. Considering the fact that data labeling on graphs is commonly time-expensive and labor-intensive, in this work we study the problem of unsupervised graph OOD detection, aiming at detecting OOD graphs solely based on unlabeled ID data. To achieve this goal, we develop a new graph contrastive learning framework GOOD-D for detecting OOD graphs without using any ground-truth labels. By performing hierarchical contrastive learning on the augmented graphs generated by our perturbation-free graph data augmentation method, GOOD-D is able to capture the latent ID patterns and accurately detect OOD graphs based on the semantic inconsistency in different granularities (i.e., node-level, graph-level, and group-level). As a pioneering work in unsupervised graph-level OOD detection, we build a comprehensive benchmark to compare our proposed approach with different state-of-the-art methods. The experiment results demonstrate the superiority of our approach over different methods on various datasets.
Related benchmarks
| Task | Dataset | Result | Rank | |
|---|---|---|---|---|
| Graph Out-of-Distribution Detection | BZR (ID) COX2 (OOD) | AUC0.9499 | 49 | |
| Graph OOD Detection | IMDB-M IMDB-B | AUC0.7994 | 36 | |
| Graph Out-of-Distribution Detection | AIDS DHFR ID OOD | AUC99.07 | 33 | |
| Graph Out-of-Distribution Detection | Tox21 SIDER ID OOD | AUC (%)66.3 | 29 | |
| Graph Out-of-Distribution Detection | FreeSolv ID ToxCast OOD | AUC0.648 | 29 | |
| Graph Out-of-Distribution Detection | ClinTox ID LIPO OOD | AUC0.557 | 29 | |
| Graph Out-of-Distribution Detection | ENZYMES ID PROTEIN OOD | AUC (%)57.2 | 29 | |
| Graph Anomaly Detection | MMP | AUC0.716 | 20 | |
| Graph Anomaly Detection | REDDIT-B | AUC88.5 | 20 | |
| Graph Out-of-Distribution Detection | BBBP BACE ID OOD (test) | AUC82.91 | 20 |