Skip to main content
QUICK REVIEW

[Paper Review] Both Topology and Text Matter: Revisiting LLM-guided Out-of-Distribution Detection on Text-attributed Graphs

Zhu, Yinlin, Di Wu|arXiv (Cornell University)|Feb 12, 2026
Advanced Graph Neural NetworksComputer Science0 citations
TL;DR

LG-Plug is a plug-and-play framework that aligns topology and text in text-attributed graphs and uses consensus-driven LLM-derived OOD exposure as a regularization to enhance topology-driven OOD detectors, achieving state-of-the-art performance vs LLM-based baselines on six TAG benchmarks.

ABSTRACT

Text-attributed graphs (TAGs) associate nodes with textual attributes and graph structure, enabling GNNs to jointly model semantic and structural information. While effective on in-distribution (ID) data, GNNs often encounter out-of-distribution (OOD) nodes with unseen textual or structural patterns in real-world settings, leading to overconfident and erroneous predictions in the absence of reliable OOD detection. Early approaches address this issue from a topology-driven perspective, leveraging neighboring structures to mitigate node-level detection bias. However, these methods typically encode node texts as shallow vector features, failing to fully exploit rich semantic information. In contrast, recent LLM-based approaches generate pseudo OOD priors by leveraging textual knowledge, but they suffer from several limitations: (1) a reliability-informativeness imbalance in the synthesized OOD priors, as the generated OOD exposures either deviate from the true OOD semantics, or introduce non-negligible ID noise, all of which offers limited improvement to detection performance; (2) reliance on specialized architectures, which prevents incorporation of the extensive effective topology-level insights that have been empirically validated in prior work. To this end, we propose LG-Plug, an LLM-Guided Plug-and-play strategy for TAG OOD detection tasks. LG-Plug aligns topology and text representations to produce fine-grained node embeddings, then generates consensus-driven OOD exposure via clustered iterative LLM prompting. Moreover, it leverages lightweight in-cluster codebook and heuristic sampling reduce time cost of LLM querying. The resulting OOD exposure serves as a regularization term to separate ID and OOD nodes, enabling seamless integration with existing detectors.

Motivation & Objective

  • Identify limitations of existing LLM-based OOD priors in TAGs, namely reliability-informativeness imbalance and poor compatibility with topology-driven detectors.
  • Propose LG-Plug to align topology-text representations and generate consensus-driven LLM-based OOD exposure.
  • Enable seamless integration of LLM-derived priors as a regularization term for topology-driven graph OOD detectors.
  • Demonstrate effectiveness and efficiency across six TAG benchmarks.

Proposed method

  • Train a topology-text representation alignment module with a 2-layer GCN as the graph encoder and a Transformer-based text encoder to obtain aligned node embeddings.
  • Use node- and edge-level contrastive objectives to jointly optimize graph and text representations.
  • Cluster unlabeled node embeddings and perform consensus-driven LLM prompting on near-centroid representatives to generate reliable OOD exposure.
  • Maintain a lightweight in-cluster category codebook and perform iterative, batch-wise LLM prompting to minimize queries.
  • Select top-K OOD categories from the codebook per cluster and treat them as reliable OOD exposure that excludes ID categories.
  • Incorporate the exposure as a score-level regularization term that encourages separation between ID and OOD nodes without changing detector architectures.
Figure 1 . Illustration of the reliability-informativeness imbalance in LLM-based OOD prior generation: (a) Realistic ID and OOD categories on Cora (Yang et al. , 2016 ) . (b) Reliability-oriented methods avoid ID overlap but yield semantically unrealistic priors, limiting informativeness. (c) Infor
Figure 1 . Illustration of the reliability-informativeness imbalance in LLM-based OOD prior generation: (a) Realistic ID and OOD categories on Cora (Yang et al. , 2016 ) . (b) Reliability-oriented methods avoid ID overlap but yield semantically unrealistic priors, limiting informativeness. (c) Infor

Experimental results

Research questions

  • RQ1Q1: How can LLMs generate pseudo OOD priors that are both reliable and informative for TAG OOD detection?
  • RQ2Q2: How can LLM-derived OOD priors be used without sacrificing compatibility with existing topology-driven graph OOD detectors?

Key findings

  • LG-Plug consistently improves topology-driven OOD methods (≥7% FPR95 reduction) across six TAG benchmarks.
  • LG-Plug achieves state-of-the-art reductions compared with LLM-based graph OOD baselines (≥5% FPR95 reduction).
  • A topology-text alignment plus consensus-driven OOD exposure yields more reliable and informative OOD priors than prior LLM-only approaches.
  • OOD exposure acts as a lightweight score regularization enabling seamless integration with detectors like GNNSafe and GRASP.
  • Visualizations indicate LG-Plug reduces overlap between ID and OOD score distributions while preserving topology-driven detector shapes.
Figure 2 . Overview of the proposed LG-Plug plug-and-play framework. (a) Topology-Text Representation Alignment jointly trains a graph encoder and a text encoder to learn fine-grained and discriminative node embeddings for both ID and OOD nodes. (b) Consensus-driven OOD Exposure with LLM identifies
Figure 2 . Overview of the proposed LG-Plug plug-and-play framework. (a) Topology-Text Representation Alignment jointly trains a graph encoder and a text encoder to learn fine-grained and discriminative node embeddings for both ID and OOD nodes. (b) Consensus-driven OOD Exposure with LLM identifies

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.