Disentangled Graph Prompting for Out-Of-Distribution Detection
About
When testing data and training data come from different distributions, deep neural networks (DNNs) will face significant safety risks in practical applications. Therefore, out-of-distribution (OOD) detection techniques, which can identify OOD samples at test time and alert the system, are urgently needed. Existing graph OOD detection methods usually characterize fine-grained in-distribution (ID) patterns from multiple perspectives, and train end-to-end graph neural networks (GNNs) for prediction. However, due to the unavailability of OOD data during training, the absence of explicit supervision signals could lead to sub-optimal performance of end-to-end encoders. To address this issue, we follow the pre-training+prompting paradigm to utilize pre-trained GNN encoders, and propose Disentangled Graph Prompting (DGP), to capture fine-grained ID patterns with the help of ID graph labels. Specifically, we design two prompt generators that respectively generate class-specific and class-agnostic prompt graphs by modifying the edge weights of an input graph. We also design several effective losses to train the prompt generators and prevent trivial solutions. We conduct extensive experiments on ten datasets to demonstrate the superiority of our proposed DGP, which achieves a relative AUC improvement of 3.63% over the best graph OOD detection baseline. Ablation studies and hyper-parameter experiments further show the effectiveness of DGP. Code is available at https://github.com/BUPT-GAMMA/DGP.
Related benchmarks
| Task | Dataset | Result | Rank | |
|---|---|---|---|---|
| Graph Out-of-Distribution Detection | BZR (ID) COX2 (OOD) | AUC0.9912 | 49 | |
| Graph OOD Detection | IMDB-M IMDB-B | AUC0.856 | 36 | |
| Graph Out-of-Distribution Detection | AIDS DHFR ID OOD | AUC98.99 | 33 | |
| Graph Out-of-Distribution Detection | Esol MUV ID OOD | AUPR92.88 | 20 | |
| Graph Out-of-Distribution Detection | BZR (ID) COX2 (OOD) | AUPR99.26 | 20 | |
| Graph Out-of-Distribution Detection | PTC_MR ID MUTAG OOD | AUPR81.63 | 20 | |
| Graph Out-of-Distribution Detection | AIDS (ID) DHFR (OOD) | AUPR98.49 | 20 | |
| Graph Out-of-Distribution Detection | ENZYMES PROTEIN ID OOD | AUPR78.77 | 20 | |
| Graph Out-of-Distribution Detection | Tox21 ID SIDER OOD | AUPR82.97 | 20 | |
| Graph Out-of-Distribution Detection | BBBP ID BACE OOD | AUPR90.57 | 20 |