Fetan: Enhancing Few-Shot Classification on Text-Attributed Graphs with In-Context Learning of LLMs
摘要
Classification on text-attributed graphs (TAGs) is crucial in data mining but challenging due to limited labeled data. Few-shot graph learning helps by utilizing sparse annotations to extract meta-knowledge, but still struggles with insufficient reference information for query nodes. Large Language Models (LLMs) offer a potential solution with their strong generalization and textual understanding. However, integrating LLMs into TAGs classification introduces challenges such as using information from well-labeled graph parts, capturing node structure, comparing query nodes with classes from a small labeled support set, and designing effective prompts. To address these, we propose Fetan, a method that enhances FEw-shot classification on Text-Attributed graphs with iN-context learning of LLMs. Fetan constructs rich prompts by first generating a prototype-free label representation via an encoder-based LLM, producing representative keywords for each label as semantic anchors. It then selects diverse contextual examples—including neighbours and structurally similar nodes identified via motif-based matching—to embed relational and structural cues. Additionally, Fetan incorporates local label distributions for statistical context augmentation. Finally, Fetan compresses verbose node attributes into salient keyword sequences via an encoder-based LLM to construct concise and informative prompts. Experimental results demonstrate Fetan’s effectiveness, outperforming existing methods under label-scarce conditions.