cs.LGMar 31, 2026

Disentangled Graph Prompting for Out-Of-Distribution Detection

Authors: Cheng Yang, Yu Hao, Qi Zhang, Chuan Shi

Organizations: the Beijing Key Lab of Intelligent Telecommunications Software and Multimedia, Beijing University of Posts and Telecommunications, China · China Mobile Group Shaanxi Co., Ltd.

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.

Figures & tables

Appendix figures & tables2 assets

Supplementary material from the paper’s appendix.

Appendix

Explore similar work

CardsList
  1. From Subtle to Significant: Prompt-Driven Self-Improving Optimization in Test-Time Graph OOD Detection

    Feb 19, 2026Luzhi Wang, Xuanshuo Fu, He Zhang +3OOD DetectionTest-Time Adaptation

  2. Learning to Explore: Policy-Guided Outlier Synthesis for Graph Out-of-Distribution Detection

    Feb 28, 2026Li Sun, Lanxu Yang, Jiayu Tian +6OOD DetectionSynthetic Anomaly Generation