AAAI2026
Coarse-to-Fine Open-Set Graph Node Classification with Large Language Models
Xueqi Ma, Xingjun Ma, Sarah Monazam Erfani, Danilo P. Mandic, James Bailey
Abstract
Developing open-set classification methods capable of classifying in-distribution (ID) data while detecting out-ofdistribution (OOD) samples is essential for deploying graph neural networks (GNNs) in open-world scenarios. Existing methods typically treat all OOD samples as a single class, despite real-world applications-especially high-stake settings like fraud detection and medical diagnosis-demanding deeper insights into OOD samples, including their probable labels. This raises a critical question: Can OOD detection be extended to OOD classification without true label information? To answer this question, we introduce a Coarse-to-Fine open-set Classification (CFC) method that leverages large language models (LLMs) for graph datasets. CFC consists of three key components: 1) A coarse classifier that utilizes LLM prompts for OOD detection and outlier label generation; 2) A GNN-based fine classifier trained with OOD samples from coarse classifier for enhanced OOD detection and ID classification; and 3) Refined OOD classification achieved through LLM prompts and post-processed OOD labels. Unlike methods relying on synthetic or auxiliary OOD samples, CFC employs semantic OOD data-instances that are genuinely out-ofdistribution based on their inherent meaning, thus improving interpretability and practical utility. CFC enhances OOD detection by 10% compared to state-of-the-art approaches on graph and text domain, while achieving up to 70% accuracy in OOD classification on graph datasets. The code is available at https://github.com/sihuo-design/CFC .