Language is All a Graph Needs
Abstract
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 available at https://github.com/agiresearch/InstructGLM.
Benchmark Results
Tested on 2 datasets 7 baseline values reported too low
Tables show presented results in global context (best 3 papers + GCN + MLP).
Classic
| # | Model | Accuracy ↑ | Paper |
|---|---|---|---|
| 1 | GraphSAGE+CNA | 0.9418
±0.0033 | |
| 2 | GCN+CNA | 0.9366
±0.0048 | |
| 3 | TransformerConv | 0.9350
±0.0058 | |
| 16 | Flan-T5-base | 0.9077
±0.0052 | This paper |
| 21 | GCN | 0.8778
±0.0096 | prev best: SplineCNN: Fast Geometric Deep Learning with Continuous B-Spline Kernels (2017) best today: Understanding Heterophily for Graph Neural Networks (ICML 2024) Improvement within reported uncertainty; not highlighted. |
| 25 | ACM-GCN | 0.8975
±0.0116 | prev best: From Node Interaction to Hop Interaction: New Effective and Scalable Graph Learning Paradigm (2022) Improvement within reported uncertainty; not highlighted. |
| 28 | Snowball-V3 | 0.8959
±0.0158 | This paper |
| 40 | RevGAT | 0.8911 | This paper |
| 39 | SAGE | 0.8911
±0.0012 | |
| 44 | GAT | 0.8897
±0.0014 best reported | best at pub: Learned Low Precision Graph Neural Networks (2020) |
| 45 | GCNII | 0.8893
±0.0137 | prev best: Orthogonal Graph Neural Networks (AAAI 2021) Improvement within reported uncertainty; not highlighted. |
| 46 | Flan-T5-large | 0.8893
±0.0106 | This paper |
| 50 | FAGCN | 0.8885
±0.0136 | |
| 57 | CoarFormer | 0.8869
±0.0082 | This paper |
| 65 | BernNet | 0.8852
±0.0095 | This paper |
| 113 | MixHop | 0.8761
±0.0203 best reported | |
| 141 | GraphSAGE | 0.8708
±0.0085 best reported | best at pub: From Node Interaction to Hop Interaction: New Effective and Scalable Graph Learning Paradigm (2022) best today: Large Language Model Meets Graph Neural Network in Knowledge Distillation (AAAI 2024) Difference within reported uncertainty; not counted as underperformance. |
| 142 | Llama-7b | 0.8708
±0.0032 | This paper |
| 171 | GT | 0.8642
±0.0082 | This paper |
| 205 | SGC-v2 | 0.8548
±0.0148 | This paper |
| 207 | Geom-GCN | 0.8540
±0.0040 best reported | best at pub: Non-Local Graph Neural Networks (2020) best today: The Expressive Power of Graph Neural Networks: A Survey (2023) Difference within reported uncertainty; not counted as underperformance. |
| 456 | Graphormer | 0.8041
±0.0030 | prev best: Hierarchical Transformer for Scalable Graph Learning (IJCAI 2023) best today: Toward a Unified Geometry Understanding: Riemannian Diffusion Framework for Graph Generation and Prediction (NeurIPS 2025) |
| 724 | MLP | 0.7768 |
| # | Model | Accuracy ↑ | Paper |
|---|---|---|---|
| 1 | LGTL | 0.9518
±0.0011 | |
| 2 | MixHop (LO) | 0.9513
±0.0038 | |
| 3 | GraphSAGE (LO) | 0.9511
±0.0036 | |
| 9 | Flan-T5-large | 0.9462
±0.0013 | This paper |
| 11 | Flan-T5-base | 0.9445
±0.0012 | This paper |
| 14 | Llama-7b | 0.9384
±0.0025 | This paper |
| 18 | GCN | 0.9296
±0.0015 best reported | best at pub: Tackling Over-Smoothing for General Graph Convolutional Networks (2020) |
| 20 | GAT | 0.9233
±0.0018 best reported | best at pub: Tackling Over-Smoothing for General Graph Convolutional Networks (2020) |
| 28 | Snowball-V3 | 0.9144
±0.0059 | This paper |
| 41 | ACM-GCN | 0.9096
±0.0062 | prev best: Uplifting Message Passing Neural Network with Graph Original Information (2022) |
| 58 | GCNII | 0.9030
±0.0043 best reported | best at pub: Feature Transportation Improves Graph Neural Networks (AAAI 2023) |
| 69 | Geom-GCN | 0.9005
±0.0014 | This paper |
| 70 | MixHop | 0.9004
±0.0141 | prev best: Feature Transportation Improves Graph Neural Networks (AAAI 2023) |
| 73 | FAGCN | 0.8998
±0.0054 | This paper |
| 80 | CoarFormer | 0.8975
±0.0031 | This paper |
| 93 | BernNet | 0.8933
±0.0007 best reported | best at pub: Feature Expansion for Graph Neural Networks (ICML 2023) |
| 116 | SAGE | 0.8881
±0.0015 | |
| 118 | GT | 0.8875
±0.0016 | This paper |
| 125 | GraphSAGE | 0.8864
±0.0030 best reported | best at pub: Feature Expansion for Graph Neural Networks (ICML 2023) best today: Non-backtracking Graph Neural Networks (TMLR 2023) |
| 131 | RevGAT | 0.8850
±0.0005 | This paper |
| 151 | Graphormer | 0.8824
±0.0150 | This paper |
| 210 | MLP | 0.8690
±0.0074 | |
| 247 | SGC-v2 | 0.8536
±0.0052 | This paper |
