Both Topology and Text Matter: Revisiting LLM-guided Out-of-Distribution Detection on Text-attributed Graphs
Yinlin Zhu, Di Wu, Xu Wang, Guocong Quan, Miao Hu
Abstract
Text-attributed graphs (TAGs) associate nodes with textual attributes and graph structure, enabling GNNs to jointly model semantic and structural information. Although effective on in-distribution (ID) data, GNNs often fail on out-of-distribution (OOD) nodes with unseen textual or structural patterns, producing overconfident predictions without reliable OOD detection. Existing topology-driven methods mitigate node-level bias through neighboring structures, but typically encode texts as shallow features, underutilizing semantic information. Recent LLM-based approaches instead synthesize pseudo OOD priors from textual knowledge, yet suffer from two key limitations: (1) a trade-off between reliability and informativeness, where generated OOD exposures either deviate from true OOD semantics or introduce substantial ID noise; and (2) dependence on specialized architectures, limiting compatibility with topology-level advances validated in prior work. To address these issues, we propose LG-Plug, an LLM-Guided Plug-and-play framework for TAG OOD detection. LG-Plug aligns topology and text representations to obtain fine-grained node embeddings, then constructs consensus-driven OOD exposure through clustered iterative LLM prompting. To reduce LLM query cost, it further adopts lightweight in-cluster codebooks and heuristic sampling. The generated OOD exposure acts as a regularizer that separates ID and OOD nodes, enabling seamless integration with existing detectors. Experiments on six TAG benchmarks demonstrate that LG-Plug consistently improves topology-driven OOD detectors (⩾7% FPR95 reduction) and surpasses prior LLM-based methods (⩾5% FPR95 reduction).
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext 8756c53f-fa66-4b26-b425-31bce2219f44Builds on17
- Energy-based Out-of-distribution DetectionWeitang Liu, Xiaoyun Wang, John D. Owens, Yixuan LiNeurIPS 2020 · 2,213 citations
- Can Language Models Solve Graph Problems in Natural Language?Heng Wang, Shangbin Feng, Tianxing He, Zhaoxuan Tan et al.NeurIPS 2023 · 420 citations
- One For All: Towards Training One Graph Model For All Classification TasksHao Liu, Jiarui Feng, Lecheng Kong, Ningyue Liang et al.ICLR 2024 · 253 citations
- GraphGPT: Graph Instruction Tuning for Large Language ModelsJiabin Tang, Yuhao Yang, Wei Wei, Lei Shi et al.SIGIR 2024 · 182 citations
- Uncertainty Aware Semi-Supervised Learning on Graph DataXujiang Zhao, Feng Chen, Shu Hu, Jin-Hee ChoNeurIPS 2020 · 178 citations
Related papers
- Compressing LLM Knowledge into Graph Representations for Text-attributed Graphs LearningRunhuai Chen, Dian Shen, Dandan Zhang, Kaihong Huang et al.ACL 2026
- LLM-Enhanced Energy Contrastive Learning for Out-of-Distribution Detection in Text-Attributed GraphsXiaoxu Ma, Dong Li, Minglai Shao, Xintao Wu et al.AAAI 2026
- GraphTextack: A Realistic Black-Box Node Injection Attack on LLM-Enhanced GNNsJiaji Ma, Puja Trivedi, Danai KoutraAAAI 2026
- Generalization Principles for Inference over Text-Attributed Graphs with Large Language ModelsHaoyu Peter Wang, Shikun Liu, Rongzhe Wei, Pan LiICML 2025
- Court of LLMs: Evidence-Augmented Generation via Multi-LLM Collaboration for Text-Attributed Graph Anomaly DetectionYiming Xu, Jiarun Chen, Zhen Peng, Zihan Chen et al.ACM MM 2025 · 3 citations
