[Paper Review] Language is All a Graph Needs
This paper proposes InstructGLM, a graph learning framework that uses natural language instructions to describe multi-scale graph structures and fine-tunes large language models (LLMs) for graph tasks. It achieves state-of-the-art performance on ogbn-arxiv, Cora, and PubMed, outperforming all GNN and Graph Transformer baselines, demonstrating LLMs as a viable foundation model for graph machine learning.
The emergence of large-scale pre-trained language models has revolutionized various AI research domains. Transformers-based Large Language Models (LLMs) have gradually replaced CNNs and RNNs to unify fields of computer vision and natural language processing. Compared with independent data samples such as images, videos or texts, graphs usually contain rich structural and relational information. Meanwhile, language, especially natural language, being one of the most expressive mediums, excels in describing complex structures. However, existing work on incorporating graph problems into the generative language modeling framework remains very limited. Considering the rising prominence of LLMs, it becomes essential to explore whether LLMs can also replace GNNs as the foundation model for graphs. In this paper, we propose InstructGLM (Instruction-finetuned Graph Language Model) with highly scalable prompts based on natural language instructions. We use natural language to describe multi-scale geometric structure of the graph and then instruction finetune an LLM to perform graph tasks, which enables Generative Graph Learning. Our method surpasses all GNN baselines on ogbn-arxiv, Cora and PubMed datasets, underscoring its effectiveness and sheds light on generative LLMs as new foundation model for graph machine learning. Our code is open-sourced at https://github.com/agiresearch/InstructGLM.
Motivation & Objective
- To explore whether large language models (LLMs) can replace graph neural networks (GNNs) as the foundation model for graph machine learning.
- To address the limited integration of LLMs in graph learning by representing graph structures through natural language descriptions.
- To develop a scalable, unified, and data-efficient framework for graph tasks using instruction-fine-tuned LLMs.
- To enable generative graph learning by training LLMs on natural language instructions describing graph topology and node features.
- To demonstrate that LLMs can surpass GNNs and Graph Transformers in low-data regimes, especially with minimal labeled nodes.
Proposed method
- Construct highly scalable, multi-hop graph structure prompts using natural language to describe node neighborhoods at various distances.
- Fine-tune a pre-trained LLM (e.g., Flan-T5, Llama) via instruction tuning on a multi-task, multi-prompt framework to perform graph classification and node classification.
- Represent graph structure as descriptive natural language sentences, such as 'Node A is connected to B, C, and D; B is connected to E and F.'
- Use a sampling strategy to fit multi-hop neighbor descriptions within the LLM’s input token limit, especially for large graphs.
- Apply a unified generative pipeline where all graph tasks are treated as text generation problems, enabling zero-shot and few-shot generalization.
- Leverage the in-context learning and few-shot capabilities of LLMs to improve performance with minimal labeled data.
Experimental results
Research questions
- RQ1Can large language models (LLMs) effectively learn and generalize from natural language descriptions of graph structures?
- RQ2Can instruction-fine-tuned LLMs outperform traditional GNNs and Graph Transformers on standard graph benchmark datasets?
- RQ3How does the performance of LLM-based graph learning scale with limited labeled data, especially in low-data regimes?
- RQ4Can a unified, prompt-based framework using natural language descriptions handle diverse graph learning tasks without architectural modifications?
- RQ5What are the limitations of LLMs in processing large-scale graphs due to input token constraints, and how can they be mitigated?
Key findings
- InstructGLM achieves a test accuracy of 89.6% on PubMed with only 60 training nodes (0.3% label ratio), surpassing the best GNN baseline (SAIL) by 5.8%.
- On the PubMed dataset with 60 training nodes, InstructGLM with Flan-T5-large outperforms the best Graph Transformer (SGFormer) by 9.3%.
- InstructGLM achieves state-of-the-art performance on ogbn-arxiv, Cora, and PubMed, outperforming all single-model GNN and Graph Transformer baselines.
- The method demonstrates strong data efficiency, achieving high performance even with extremely low label ratios, such as 0.3% on PubMed.
- Instruction-fine-tuned LLMs like Flan-T5-large and Llama-7b show superior generalization and few-shot learning capabilities compared to GNNs in low-data settings.
- The framework’s scalability is validated through multi-prompt, multi-task instruction tuning, enabling consistent performance across diverse graph tasks.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.