Papers
Topics
Authors
Recent
Gemini 2.5 Flash
Gemini 2.5 Flash
41 tokens/sec
GPT-4o
60 tokens/sec
Gemini 2.5 Pro Pro
44 tokens/sec
o3 Pro
8 tokens/sec
GPT-4.1 Pro
50 tokens/sec
DeepSeek R1 via Azure Pro
28 tokens/sec
2000 character limit reached

A Survey of Large Language Models for Graphs (2405.08011v3)

Published 10 May 2024 in cs.LG and cs.AI
A Survey of Large Language Models for Graphs

Abstract: Graphs are an essential data structure utilized to represent relationships in real-world scenarios. Prior research has established that Graph Neural Networks (GNNs) deliver impressive outcomes in graph-centric tasks, such as link prediction and node classification. Despite these advancements, challenges like data sparsity and limited generalization capabilities continue to persist. Recently, LLMs have gained attention in natural language processing. They excel in language comprehension and summarization. Integrating LLMs with graph learning techniques has attracted interest as a way to enhance performance in graph learning tasks. In this survey, we conduct an in-depth review of the latest state-of-the-art LLMs applied in graph learning and introduce a novel taxonomy to categorize existing methods based on their framework design. We detail four unique designs: i) GNNs as Prefix, ii) LLMs as Prefix, iii) LLMs-Graphs Integration, and iv) LLMs-Only, highlighting key methodologies within each category. We explore the strengths and limitations of each framework, and emphasize potential avenues for future research, including overcoming current integration challenges between LLMs and graph learning techniques, and venturing into new application areas. This survey aims to serve as a valuable resource for researchers and practitioners eager to leverage LLMs in graph learning, and to inspire continued progress in this dynamic field. We consistently maintain the related open-source materials at \url{https://github.com/HKUDS/Awesome-LLM4Graph-Papers}.

Understanding LLMs for Graphs

Introduction

Graphs are absolutely everywhere. Think about social networks, molecular structures, or even recommendation systems—all of these structures can be effectively represented as graphs. With their nodes and connecting edges, graphs give us a flexible way to capture relationships and interdependencies in real-world data.

Now, if you've been following the AI scene, you've probably heard of Graph Neural Networks (GNNs) and LLMs. Each has its own strengths: GNNs excel in node classification and link prediction, while LLMs shine in natural language processing tasks. But what happens when we combine these two? In the paper titled "A Survey of LLMs for Graphs," the authors explore exactly this: integrating LLMs with graph learning to push the boundaries of what we can achieve in graph-centric tasks.

Taxonomy of Models

The paper introduces a novel taxonomy for categorizing existing methods into four distinct designs:

  1. GNNs as Prefix
  2. LLMs as Prefix
  3. LLMs-Graphs Integration
  4. LLMs-Only

Let's break these down one by one.

GNNs as Prefix

In this approach, GNNs serve as a preliminary step, converting graph nodes or the entire graph into tokens for the LLMs. The idea is that GNNs capture structural information, which LLMs can then process for higher-level tasks. This method is split into two categories:

  • Node-level Tokenization: Here, each node is encoded as unique structural tokens.
  • Graph-level Tokenization: This involves pooling methods to capture the graph's global semantic.

Representative Works:

  • GraphGPT: Aligns graph encoders with natural language semantics.
  • HiGPT: Combines language-enhanced in-context heterogeneous graph tokenization.
  • GIMLET: Uses instructions to address challenges in molecule-related tasks.

Pros:

  • Strong zero-shot transferability.
  • Effective in downstream graph tasks.

Cons:

  • Limited effectiveness for non-text-attributed graphs.
  • Challenges in optimizing coordination between GNNs and LLMs.

LLMs as Prefix

Here, LLMs first process the graph data, generating embeddings or labels used to improve GNN performance. This category is split into:

  • Embeddings from LLMs for GNNs: LLM-generated embeddings are used for GNN training.
  • Labels from LLMs for GNNs: LLMs generate supervision labels to guide GNNs.

Representative Works:

  • G-Prompt: Uses GNNs to generate task-specific node embeddings.
  • OpenGraph: Employs LLMs to generate nodes and edges for training graph foundational models.

Pros:

  • Utilizes rich textual profiles to improve models.
  • Enhances generalization capabilities.

Cons:

  • Decoupled nature between LLM and GNN requires a two-stage learning process.
  • Performance heavily depends on pre-generated embeddings/labels.

LLMs-Graphs Integration

For deeper integration, some approaches co-train GNNs and LLMs or align their feature spaces:

  • Alignment between GNNs and LLMs: Uses contrastive learning or EM iterative training.
  • Fusion Training of GNNs and LLMs: Combines modules, allowing bidirectional information flow.
  • LLMs Agent for Graphs: Builds autonomous agents based on LLMs to interact with graph data.

Representative Works:

  • MoMu: Employs contrastive learning for molecule synthesis from text.
  • GreaseLM: Integrates transformer layers and GNN layers.
  • Graph Agent: Converts graphs into textual descriptions for LLMs to understand.

Pros:

  • Minimizes the modality gap between structured data and text.
  • Co-optimization of GNNs and LLMs.

Cons:

  • Scalability issues with larger models and datasets.
  • Single-run operations in agents limit their adaptability.

LLMs-Only

This method relies purely on LLMs for interpreting and inferring graph data:

  • Tuning-free: Constructs graphs in natural language for LLMs to understand.
  • Tuning-required: Aligns graph token sequences with natural language, followed by fine-tuning.

Representative Works:

  • GraphText: Translates graphs into natural language.
  • InstructGraph: Uses structured format verbalization for graph reasoning.

Pros:

  • Leverages the pre-existing capabilities of LLMs for new tasks.
  • Potential for multi-modal integration.

Cons:

  • Difficulty in expressing large-scale graphs purely in text format.
  • Challenges in preserving structural integrity without a graph encoder.

Future Directions

The paper also speculates on several future directions, such as:

  • Developing multi-modal LLMs to handle diverse graph data.
  • Improving efficiency to bring down computational costs.
  • Exploring new graph tasks like graph generation and question answering.
  • Building user-centric agents capable of handling open-ended questions from users.

Conclusion

In summary, integrating LLMs with GNNs offers exciting possibilities in graph-based tasks, from node classification to graph-based question answering. While each approach has its strengths and weaknesses, the paper provides a comprehensive overview that serves as a valuable resource for researchers in this dynamic field. Future research should aim to address existing challenges and explore new opportunities to further unlock the potential of LLMs in graph learning.

Definition Search Book Streamline Icon: https://streamlinehq.com
References (70)
  1. When Graph Data Meets Multimodal: A New Paradigm for Graph Understanding and Reasoning. arXiv preprint arXiv:2312.10372 (2023).
  2. William Brannon et al. 2023. Congrat: Self-supervised contrastive pretraining for joint graph and text embeddings. arXiv preprint arXiv:2305.14321 (2023).
  3. Instructmol: Multi-modal integration for building a versatile and reliable molecular assistant in drug discovery. arXiv preprint arXiv:2311.16208 (2023).
  4. Graphllm: Boosting graph reasoning ability of large language model. arXiv preprint arXiv:2310.05845 (2023).
  5. GraphWiz: An Instruction-Following Language Model for Graph Problems. arXiv (2024).
  6. LLaGA: Large Language and Graph Assistant. arXiv (2024).
  7. Zhikai Chen et al. 2024a. Exploring the potential of large language models (llms) in learning on graphs. ACM SIGKDD Explorations Newsletter (2024).
  8. Label-free node classification on graphs with large language models (llms). arXiv preprint arXiv:2310.04668 (2023).
  9. Call Me When Necessary: LLMs can Efficiently and Faithfully Reason over Structured Environments. arXiv preprint arXiv:2403.08593 (2024).
  10. Which Modality should I use–Text, Motif, or Image?: Understanding Graphs with Large Language Models. arXiv (2023).
  11. Bert: Pre-training of deep bidirectional transformers for language understanding. arXiv preprint arXiv:1810.04805 (2018).
  12. Simteg: A frustratingly simple approach improves textual graph learning. arXiv preprint arXiv:2308.02565 (2023).
  13. Talk like a graph: Encoding graphs for large language models. arXiv (2023).
  14. Generalization and representational limits of graph neural networks. In ICML. PMLR, 3419–3430.
  15. Gpt4graph: Can large language models understand graph structured data? an empirical evaluation and benchmarking. arXiv preprint arXiv:2305.15066 (2023).
  16. GraphEdit: Large Language Models for Graph Structure Learning. arXiv preprint arXiv:2402.15183 (2024).
  17. Harnessing explanations: Llm-to-lm interpreter for enhanced text-attributed graph representation learning. In ICLR.
  18. Lightgcn: Simplifying and powering graph convolution network for recommendation. In SIGIR. 639–648.
  19. G-Retriever: Retrieval-Augmented Generation for Textual Graph Understanding and Question Answering. arXiv preprint arXiv:2402.07630 (2024).
  20. Yufei He and Bryan Hooi. 2024. UniGraph: Learning a Cross-Domain Graph Foundation Model From Natural Language. arXiv (2024).
  21. Open graph benchmark: Datasets for machine learning on graphs. NeurIPS 33 (2020), 22118–22133.
  22. Beyond Text: A Deep Dive into Large Language Models’ Ability on Understanding Graph Data. arXiv preprint arXiv:2310.04944 (2023).
  23. Prompt-based node feature extractor for few-shot learning on text-attributed graphs. arXiv preprint arXiv:2309.02848 (2023).
  24. Can GNN be Good Adapter for LLMs? arXiv preprint arXiv:2402.12984 (2024).
  25. Large language models on graphs: A comprehensive survey. arXiv preprint arXiv:2312.02783 (2023).
  26. Thomas N Kipf and Max Welling. 2016. Semi-supervised classification with graph convolutional networks. arXiv preprint arXiv:1609.02907 (2016).
  27. GRENADE: Graph-Centric Language Model for Self-Supervised Representation Learning on Text-Attributed Graphs. arXiv preprint arXiv:2310.15109 (2023).
  28. A survey of graph meets large language model: Progress and future directions. arXiv preprint arXiv:2311.12399 (2023).
  29. ZeroG: Investigating Cross-dataset Zero-shot Transferability in Graphs. arXiv (2024).
  30. Urbangpt: Spatio-temporal large language models. arXiv preprint arXiv:2403.00813 (2024).
  31. One for all: Towards training one graph model for all classification tasks. In ICLR.
  32. Git-mol: A multi-modal large language model for molecular science with graph, image, and text. Computers in Biology and Medicine 171 (2024), 108073.
  33. Shengchao Liu et al. 2023a. Multi-modal molecule structure–text model for text-based retrieval and editing. Nature Machine Intelligence (2023).
  34. Yinhan Liu et al. 2019. Roberta: A robustly optimized bert pretraining approach. arXiv preprint arXiv:1907.11692 (2019).
  35. Zhiyuan Liu et al. 2023b. Molca: Molecular graph-language modeling with cross-modal projector and uni-modal adapter. arXiv preprint arXiv:2310.12798 (2023).
  36. Linhao Luo et al. 2023. Reasoning on graphs: Faithful and interpretable large language model reasoning. arXiv (2023).
  37. Zihan Luo et al. 2024. GraphInstruct: Empowering Large Language Models with Graph Understanding and Reasoning Capability. arXiv (2024).
  38. Information network or social network? The structure of the Twitter follow graph. In WWW.
  39. Shirui Pan et al. 2024. Unifying large language models and knowledge graphs: A roadmap. TKDE (2024).
  40. Disentangled representation learning with large language models for text-attributed graphs. arXiv preprint arXiv:2310.18152 (2023).
  41. Colin Raffel et al. 2020. Exploring the limits of transfer learning with a unified text-to-text transformer. JMLR 21, 140 (2020), 1–67.
  42. Representation learning with large language models for recommendation. arXiv preprint arXiv:2310.15950 (2023).
  43. A molecular multimodal foundation model associating molecule graphs with natural language. arXiv (2022).
  44. MuseGraph: Graph-oriented Instruction Tuning of Large Language Models for Generic Graph Mining. arXiv (2024).
  45. Walklm: A uniform language model fine-tuning framework for attributed graph embedding. NeurIPS 36 (2024).
  46. Graphgpt: Graph instruction tuning for large language models. arXiv preprint arXiv:2310.13023 (2023).
  47. HiGPT: Heterogeneous Graph Language Model. arXiv preprint arXiv:2402.16024 (2024).
  48. Graph neural prompting with large language models. In AAAI, Vol. 38. 19080–19088.
  49. Hugo Touvron et al. 2023. Llama: Open and efficient foundation language models. arXiv preprint arXiv:2302.13971 (2023).
  50. Petar Velickovic et al. 2017. Graph attention networks. stat (2017).
  51. Can language models solve graph problems in natural language? NeurIPS 36 (2024).
  52. InstructGraph: Boosting Large Language Models via Graph-centric Instruction Tuning and Preference Alignment. arXiv (2024).
  53. Graph Agent: Explicit Reasoning Agent for Graphs. arXiv preprint arXiv:2310.16421 (2023).
  54. Llmrec: Large language models with graph augmentation for recommendation. In WSDM. 806–815.
  55. Zhihao Wen and Yuan Fang. 2023. Prompt tuning on graph-augmented low-resource text classification. arXiv preprint arXiv:2307.10230 (2023).
  56. Difformer: Scalable (graph) transformers induced by energy constrained diffusion. arXiv preprint arXiv:2301.09474 (2023).
  57. Nodeformer: A scalable graph structure learning transformer for node classification. Advances in Neural Information Processing Systems 35 (2022), 27387–27401.
  58. OpenGraph: Towards Open Graph Foundation Models. arXiv preprint arXiv:2403.01121 (2024).
  59. Han Xie et al. 2023. Graph-aware language model pre-training on a large graph corpus can help multiple graph applications. In KDD. 5270–5281.
  60. Natural language is all a graph needs. arXiv preprint arXiv:2308.07134 (2023).
  61. Graph contrastive learning automated. In ICML. PMLR, 12121–12132.
  62. Graph transformer networks. NeurIPS (2019).
  63. Mengmei Zhang et al. 2024. GraphTranslator: Aligning Graph Model to Large Language Model for Open-ended Tasks. arXiv preprint arXiv:2402.07197 (2024).
  64. Xikun Zhang et al. 2022. Greaselm: Graph reasoning enhanced language models for question answering. arXiv (2022).
  65. Zeyang Zhang et al. 2023. LLM4DyG: Can Large Language Models Solve Problems on Dynamic Graphs? arXiv (2023).
  66. Haiteng Zhao et al. 2024. Gimlet: A unified graph-text model for instruction-based molecule zero-shot learning. NeurIPS 36 (2024).
  67. Learning on large-scale text-attributed graphs via variational inference. arXiv preprint arXiv:2210.14709 (2022).
  68. Graphtext: Graph reasoning in text space. arXiv preprint arXiv:2310.01089 (2023).
  69. Efficient Tuning and Inference for Large Language Models on Textual Graphs. arXiv preprint arXiv:2401.15569 (2024).
  70. Pretraining language models with text-attributed heterogeneous graphs. arXiv preprint arXiv:2310.12580 (2023).
User Edit Pencil Streamline Icon: https://streamlinehq.com
Authors (5)
  1. Xubin Ren (17 papers)
  2. Jiabin Tang (15 papers)
  3. Dawei Yin (165 papers)
  4. Nitesh Chawla (24 papers)
  5. Chao Huang (244 papers)
Citations (15)
Youtube Logo Streamline Icon: https://streamlinehq.com