Table of Contents
Fetching ...

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

Luzhi Wang, Xuanshuo Fu, He Zhang, Chuang Liu, Xiaobao Wang, Hongbo Liu

TL;DR

SIGOOD is proposed, which is an unsupervised framework that integrates continuous self-learning with test-time training for effective graph OOD detection and introduces an Energy Preference Optimization (EPO) loss, which leverages energy variations between the original test graph and the prompt-enhanced graph.

Abstract

Graph Out-of-Distribution (OOD) detection aims to identify whether a test graph deviates from the distribution of graphs observed during training, which is critical for ensuring the reliability of Graph Neural Networks (GNNs) when deployed in open-world scenarios. Recent advances in graph OOD detection have focused on test-time training techniques that facilitate OOD detection without accessing potential supervisory information (e.g., training data). However, most of these methods employ a one-pass inference paradigm, which prevents them from progressively correcting erroneous predictions to amplify OOD signals. To this end, we propose a \textbf{S}elf-\textbf{I}mproving \textbf{G}raph \textbf{O}ut-\textbf{o}f-\textbf{D}istribution detector (SIGOOD), which is an unsupervised framework that integrates continuous self-learning with test-time training for effective graph OOD detection. Specifically, SIGOOD generates a prompt to construct a prompt-enhanced graph that amplifies potential OOD signals. To optimize prompts, SIGOOD introduces an Energy Preference Optimization (EPO) loss, which leverages energy variations between the original test graph and the prompt-enhanced graph. By iteratively optimizing the prompt by involving it into the detection model in a self-improving loop, the resulting optimal prompt-enhanced graph is ultimately used for OOD detection. Comprehensive evaluations on 21 real-world datasets confirm the effectiveness and outperformance of our SIGOOD method. The code is at https://github.com/Ee1s/SIGOOD.

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

TL;DR

SIGOOD is proposed, which is an unsupervised framework that integrates continuous self-learning with test-time training for effective graph OOD detection and introduces an Energy Preference Optimization (EPO) loss, which leverages energy variations between the original test graph and the prompt-enhanced graph.

Abstract

Graph Out-of-Distribution (OOD) detection aims to identify whether a test graph deviates from the distribution of graphs observed during training, which is critical for ensuring the reliability of Graph Neural Networks (GNNs) when deployed in open-world scenarios. Recent advances in graph OOD detection have focused on test-time training techniques that facilitate OOD detection without accessing potential supervisory information (e.g., training data). However, most of these methods employ a one-pass inference paradigm, which prevents them from progressively correcting erroneous predictions to amplify OOD signals. To this end, we propose a \textbf{S}elf-\textbf{I}mproving \textbf{G}raph \textbf{O}ut-\textbf{o}f-\textbf{D}istribution detector (SIGOOD), which is an unsupervised framework that integrates continuous self-learning with test-time training for effective graph OOD detection. Specifically, SIGOOD generates a prompt to construct a prompt-enhanced graph that amplifies potential OOD signals. To optimize prompts, SIGOOD introduces an Energy Preference Optimization (EPO) loss, which leverages energy variations between the original test graph and the prompt-enhanced graph. By iteratively optimizing the prompt by involving it into the detection model in a self-improving loop, the resulting optimal prompt-enhanced graph is ultimately used for OOD detection. Comprehensive evaluations on 21 real-world datasets confirm the effectiveness and outperformance of our SIGOOD method. The code is at https://github.com/Ee1s/SIGOOD.
Paper Structure (31 sections, 13 equations, 5 figures, 2 tables)

This paper contains 31 sections, 13 equations, 5 figures, 2 tables.

Figures (5)

  • Figure 1: Comparisons between existing methods and SIGOOD. (a) Existing methods perform a one-pass pattern extraction, aiming to amplify the difference between ID and OOD graphs wang2024goodat. (b) SIGOOD adopts an unsupervised self-improvement strategy, progressively refining OOD signals through iterative optimization.
  • Figure 2: Overview of SIGOOD. Step 1: Given a test graph $G_t$ as an input, SIGOOD first encodes it using the well-trained GNN. The obtained embedding is then passed to the prompt generator (PG), which produces a prompt $P_m$ to enhance OOD signals of the graph. Step 2: The prompt $P_m$ is applied to $G_t$, yielding a prompt-enhanced (PE) graph $G_p$ with amplified OOD tendency. Step 3: Calculate node-wise energy variations between $G_p$ and $G_t$ to locate sensitive nodes of OOD signals. Step 4: Calculate the global energy variations between $G_p$ and $G_t$ to evaluate the overall OOD tendency of $G_p$. These energy variations are used as OOD signals to guide the optimization of the prompt generator. The updated $G_p$ replaces $G_t$ as the input for the next iteration. After convergence, the final $G_p$ is used to calculate the OOD score for detection.
  • Figure 3: Ablation Study and PG Depth Analysis.
  • Figure 4: Parameter Sensitivity Analysis.
  • Figure 5: Visualization of Graph Distribution.