Skip to main content
QUICK REVIEW

[Paper Review] Leveraging Large Language Models for Node Generation in Few-Shot Learning on Text-Attributed Graphs

Jianxiang Yu, Yuxiang Ren|arXiv (Cornell University)|Oct 15, 2023
Topic ModelingComputer Science3 citations
TL;DR

This paper proposes ENG, a lightweight, plug-and-play paradigm that leverages Large Language Models (LLMs) to generate synthetic node features and edges for text-attributed graphs in few-shot learning. By prompting LLMs to generate semantically rich, label-aware exemplars and using an edge predictor to integrate them into the graph, ENG achieves a 76% accuracy improvement over baseline models in the 1-shot ogbn-arxiv setting.

ABSTRACT

Text-attributed graphs have recently garnered significant attention due to their wide range of applications in web domains. Existing methodologies employ word embedding models for acquiring text representations as node features, which are subsequently fed into Graph Neural Networks (GNNs) for training. Recently, the advent of Large Language Models (LLMs) has introduced their powerful capabilities in information retrieval and text generation, which can greatly enhance the text attributes of graph data. Furthermore, the acquisition and labeling of extensive datasets are both costly and time-consuming endeavors. Consequently, few-shot learning has emerged as a crucial problem in the context of graph learning tasks. In order to tackle this challenge, we propose a lightweight paradigm called LLM4NG, which adopts a plug-and-play approach to empower text-attributed graphs through node generation using LLMs. Specifically, we utilize LLMs to extract semantic information from the labels and generate samples that belong to these categories as exemplars. Subsequently, we employ an edge predictor to capture the structural information inherent in the raw dataset and integrate the newly generated samples into the original graph. This approach harnesses LLMs for enhancing class-level information and seamlessly introduces labeled nodes and edges without modifying the raw dataset, thereby facilitating the node classification task in few-shot scenarios. Extensive experiments demonstrate the outstanding performance of our proposed paradigm, particularly in low-shot scenarios. For instance, in the 1-shot setting of the ogbn-arxiv dataset, LLM4NG achieves a 76% improvement over the baseline model.

Motivation & Objective

  • To address the challenge of low performance in node classification under few-shot learning settings on text-attributed graphs.
  • To reduce dependency on large-scale labeled data by generating high-quality, semantically relevant training samples using LLMs.
  • To preserve graph structure while enhancing class-level supervision through LLM-generated nodes without modifying the original dataset.
  • To explore prompt engineering strategies that balance sample diversity and relevance to the raw data for optimal model generalization.

Proposed method

  • Utilize LLMs to generate node feature embeddings by prompting on class labels, extracting semantic information to create exemplar samples.
  • Train a differentiable edge predictor to infer structural relationships between generated nodes and existing nodes in the raw graph.
  • Integrate the generated nodes and edges into the original graph to form an augmented graph for downstream GNN training.
  • Employ a plug-and-play design that does not require retraining the GNN or modifying the original graph structure.
  • Design multiple prompt templates (e.g., ENG-P1 to ENG-P6) to explore the impact of label information and sample diversity on generation quality.
  • Use stochastic sampling with LLMs to assess robustness and generalization of generated samples across multiple runs.

Experimental results

Research questions

  • RQ1How can LLMs be effectively leveraged to generate high-quality, class-aware node features in low-resource, few-shot graph learning scenarios?
  • RQ2What prompt engineering strategies maximize the relevance and diversity of LLM-generated samples while maintaining alignment with the original graph data?
  • RQ3How does the quantity of generated samples affect model performance, and is there an optimal balance between quantity and performance gain?
  • RQ4To what extent does the stochasticity of LLMs affect the reliability and consistency of generated samples in graph learning tasks?

Key findings

  • In the 1-shot setting on the ogbn-arxiv dataset, ENG achieves a 76% improvement in accuracy over the baseline GNN model.
  • Performance initially increases with the number of generated samples but eventually plateaus due to diminishing returns from redundant or low-quality samples.
  • LLM-generated samples exhibit strong generalization, with consistent performance across multiple stochastic runs despite variation in generated content.
  • Prompt design significantly influences performance: prompts that highlight label differences (e.g., ENG-P4) yield better results than generic or overly diverse prompts (e.g., ENG-P5, ENG-P6).
  • The integration of LLM-generated nodes and edges via an edge predictor enhances model supervision without altering the original graph, leading to improved node classification.
  • The method is effective even in extreme low-shot regimes, demonstrating that LLMs can serve as a scalable source of synthetic supervision for graph learning.

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.