Table of Contents
Fetching ...

Graph Synthetic Out-of-Distribution Exposure with Large Language Models

Haoyan Xu, Zhengtao Yao, Ziyi Wang, Zhan Cheng, Xiyang Hu, Mengyuan Li, Yue Zhao

TL;DR

GOE-LLM tackles graph out-of-distribution detection on text-attributed graphs by removing the reliance on real OOD data. It leverages Large Language Models to produce pseudo-OOD supervision through two pipelines: GOE-identifier (LLM-based detection of potential OOD nodes within the unlabeled set) and GOE-generator (LLM-based generation of synthetic OOD nodes and their integration into the graph). The framework regularizes the ID classifier with pseudo-OOD signals via a loss that encourages separation between ID and OOD, and it offers two synthetic-OOD modeling options (binary OOD detector or a $(K+1)$-class classifier). Experiments on Cora, Citeseer, PubMed, and Wiki-CS demonstrate that GOE-LLM substantially improves OOD detection without real OOD data and matches, or even surpasses, methods that rely on real OOD exposure, while preserving ID accuracy. The work highlights the practicality and scalability of LLM-driven pseudo-OOD supervision for open-world graph settings, with potential extensions to graph-level and dynamic TAG tasks.

Abstract

Out-of-distribution (OOD) detection in graphs is critical for ensuring model robustness in open-world and safety-sensitive applications. Existing graph OOD detection approaches typically train an in-distribution (ID) classifier on ID data alone, then apply post-hoc scoring to detect OOD instances. While OOD exposure - adding auxiliary OOD samples during training - can improve detection, current graph-based methods often assume access to real OOD nodes, which is often impractical or costly. In this paper, we present GOE-LLM, a framework that leverages Large Language Models (LLMs) to achieve OOD exposure on text-attributed graphs without using any real OOD nodes. GOE-LLM introduces two pipelines: (1) identifying pseudo-OOD nodes from the initially unlabeled graph using zero-shot LLM annotations, and (2) generating semantically informative synthetic OOD nodes via LLM-prompted text generation. These pseudo-OOD nodes are then used to regularize ID classifier training and enhance OOD detection awareness. Empirical results on multiple benchmarks show that GOE-LLM substantially outperforms state-of-the-art methods without OOD exposure, achieving up to a 23.5% improvement in AUROC for OOD detection, and attains performance on par with those relying on real OOD labels for exposure.

Graph Synthetic Out-of-Distribution Exposure with Large Language Models

TL;DR

GOE-LLM tackles graph out-of-distribution detection on text-attributed graphs by removing the reliance on real OOD data. It leverages Large Language Models to produce pseudo-OOD supervision through two pipelines: GOE-identifier (LLM-based detection of potential OOD nodes within the unlabeled set) and GOE-generator (LLM-based generation of synthetic OOD nodes and their integration into the graph). The framework regularizes the ID classifier with pseudo-OOD signals via a loss that encourages separation between ID and OOD, and it offers two synthetic-OOD modeling options (binary OOD detector or a -class classifier). Experiments on Cora, Citeseer, PubMed, and Wiki-CS demonstrate that GOE-LLM substantially improves OOD detection without real OOD data and matches, or even surpasses, methods that rely on real OOD exposure, while preserving ID accuracy. The work highlights the practicality and scalability of LLM-driven pseudo-OOD supervision for open-world graph settings, with potential extensions to graph-level and dynamic TAG tasks.

Abstract

Out-of-distribution (OOD) detection in graphs is critical for ensuring model robustness in open-world and safety-sensitive applications. Existing graph OOD detection approaches typically train an in-distribution (ID) classifier on ID data alone, then apply post-hoc scoring to detect OOD instances. While OOD exposure - adding auxiliary OOD samples during training - can improve detection, current graph-based methods often assume access to real OOD nodes, which is often impractical or costly. In this paper, we present GOE-LLM, a framework that leverages Large Language Models (LLMs) to achieve OOD exposure on text-attributed graphs without using any real OOD nodes. GOE-LLM introduces two pipelines: (1) identifying pseudo-OOD nodes from the initially unlabeled graph using zero-shot LLM annotations, and (2) generating semantically informative synthetic OOD nodes via LLM-prompted text generation. These pseudo-OOD nodes are then used to regularize ID classifier training and enhance OOD detection awareness. Empirical results on multiple benchmarks show that GOE-LLM substantially outperforms state-of-the-art methods without OOD exposure, achieving up to a 23.5% improvement in AUROC for OOD detection, and attains performance on par with those relying on real OOD labels for exposure.
Paper Structure (31 sections, 9 equations, 3 figures, 7 tables)

This paper contains 31 sections, 9 equations, 3 figures, 7 tables.

Figures (3)

  • Figure 1: Our graph OOD detection method does not rely on any real OOD nodes for training, yet achieves significantly better OOD detection performance than baseline methods and performs comparably to the approach that uses real OOD nodes (GNNSafe++) for exposure.
  • Figure 2: An overview of our framework GOE-LLM. We design two methods for graph OOD exposure without using real OOD nodes: LLM as OOD nodes' identifier and LLM as OOD nodes' generator. The first method employs an LLM to identify potential OOD nodes from the initially fully unlabeled graph. These nodes are then used as pseudo-OOD samples to regularize the training of the ID classifier. The second method prompts the LLM to generate textual descriptions of synthetic OOD nodes, which are subsequently embedded and inserted into the original graph to enrich OOD information during ID classifier training.
  • Figure 3: OOD score distributions of GNNSafe, GNNSafe++, and GOE-LLM on the Pubmed dataset. GOE-LLM, despite not using any real OOD nodes, achieves distributional separation comparable to the real OOD exposure method and significantly better separability than GNNSafe.