Graph Neural Prompting with Large Language Models

Yijun Tian, Huan Song, Zichen Wang, Haozhu Wang, Ziqing Hu +3 more
9/27/2023
cs.CLcs.AIcs.LG

Official code: meettyj/GNP (49 stars, last commit 2025-02-04).

Abstract

Large language models (LLMs) have shown remarkable generalization capability with exceptional performance in various language modeling tasks. However, they still exhibit inherent limitations in precisely capturing and returning grounded knowledge. While existing work has explored utilizing knowledge graphs (KGs) to enhance language modeling via joint training and customized model architectures, applying this to LLMs is problematic owing to their large number of parameters and high computational cost. Therefore, how to enhance pre-trained LLMs using grounded knowledge, e.g., retrieval-augmented generation, remains an open question. In this work, we propose Graph Neural Prompting (GNP), a novel plug-and-play method to assist pre-trained LLMs in learning beneficial knowledge from KGs. GNP encompasses various designs, including a standard graph neural network encoder, a cross-modality pooling module, a domain projector, and a self-supervised link prediction objective. Extensive experiments on multiple datasets demonstrate the superiority of GNP on both commonsense and biomedical reasoning tasks across different LLM sizes and settings. Code is available at https://github.com/meettyj/GNP.

View on arXivView PDF

Code Implementations(1)

meettyj/GNPOfficial100%

Code for AAAI'24 paper "Graph Neural Prompting with Large Language Models".

492Dec 16, 20231 years ago

Similar Papers

Cite this paper

@article{tian2023graph,
  title  = {Graph Neural Prompting with Large Language Models},
  author = {Yijun Tian and Huan Song and Zichen Wang and Haozhu Wang and Ziqing Hu and Fang Wang and Nitesh V. Chawla and Panpan Xu},
  year   = {2023},
  eprint = {2309.15427},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2309.15427v2}
}

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/2309.15427.svg)](https://codeofpaper.com/paper/2309.15427)

Discussion