Disentangled Graph Prompting for Out-Of-Distribution Detection

Cheng Yang, Yu Hao, Qi Zhang, Chuan Shi
3/31/2026
cs.LG

Official code: BUPT-GAMMA/DGP (3 stars, last commit 2026-04-02).

Abstract

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.

View on arXivView PDF

Code Implementations(1)

BUPT-GAMMA/DGPOfficial100%
31Shell, PythonJun 19, 20256 months ago

Similar Papers

Cite this paper

@article{yang2026disentangled,
  title  = {Disentangled Graph Prompting for Out-Of-Distribution Detection},
  author = {Cheng Yang and Yu Hao and Qi Zhang and Chuan Shi},
  year   = {2026},
  eprint = {2603.29644},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2603.29644v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2603.29644.svg)](https://codeofpaper.com/paper/2603.29644)

Discussion