LLMs as Zero-shot Graph Learners: Alignment of GNN Representations with LLM Token Embeddings

Duo Wang, Yuan Zuo, Fengzhi Li, Junjie Wu
8/25/2024
cs.LGcs.AIcs.CL

No official code found. Best implementation: W-rudder/TEA-GLM (63 stars, MIT, last commit 2024-11-21).

Abstract

Zero-shot graph machine learning, especially with graph neural networks (GNNs), has garnered significant interest due to the challenge of scarce labeled data. While methods like self-supervised learning and graph prompt learning have been extensively explored, they often rely on fine-tuning with task-specific labels, limiting their effectiveness in zero-shot scenarios. Inspired by the zero-shot capabilities of instruction-fine-tuned large language models (LLMs), we introduce a novel framework named Token Embedding-Aligned Graph Language Model (TEA-GLM) that leverages LLMs as cross-dataset and cross-task zero-shot learners for graph machine learning. Concretely, we pretrain a GNN, aligning its representations with token embeddings of an LLM. We then train a linear projector that transforms the GNN's representations into a fixed number of graph token embeddings without tuning the LLM. A unified instruction is designed for various graph tasks at different levels, such as node classification (node-level) and link prediction (edge-level). These design choices collectively enhance our method's effectiveness in zero-shot learning, setting it apart from existing methods. Experiments show that our graph token embeddings help the LLM predictor achieve state-of-the-art performance on unseen datasets and tasks compared to other methods using LLMs as predictors.

View on arXivView PDF

Code Implementations(1)

W-rudder/TEA-GLMCommunity100%
MIT
636Shell, PythonMay 22, 20241 years agoMIT

Similar Papers

Cite this paper

@article{wang2024llms,
  title  = {LLMs as Zero-shot Graph Learners: Alignment of GNN Representations with LLM Token Embeddings},
  author = {Duo Wang and Yuan Zuo and Fengzhi Li and Junjie Wu},
  year   = {2024},
  eprint = {2408.14512},
  archivePrefix = {arXiv},
  doi    = {10.48550/arXiv.2408.14512},
  url    = {http://arxiv.org/abs/2408.14512v3},
  journal = {NEURIPS 2024 2024}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2408.14512.svg)](https://codeofpaper.com/paper/2408.14512)

Discussion