Skip to main content
QUICK REVIEW

[Paper Review] Graph Neural Prompting with Large Language Models

Yijun Tian, Huan Song|arXiv (Cornell University)|Sep 27, 2023
Topic ModelingComputer Science3 citations
TL;DR

This paper proposes Graph Neural Prompting (GNP), a plug-and-play method that enhances frozen or fine-tuned large language models (LLMs) by extracting and injecting structured knowledge from knowledge graphs (KGs) via graph neural networks (GNNs), cross-modality pooling, domain projection, and self-supervised link prediction. GNP improves zero-shot and fine-tuned LLM performance by up to +13.5% on commonsense and biomedical reasoning tasks without parameter updates to the LLM.

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.

Motivation & Objective

  • To address the inherent limitation of large language models (LLMs) in accurately retrieving and utilizing grounded factual knowledge.
  • To enable pre-trained LLMs to benefit from knowledge graphs (KGs) without full fine-tuning or custom architecture design.
  • To develop a plug-and-play framework that efficiently injects structured knowledge from KGs into LLMs via learnable prompts.
  • To explore self-supervised graph learning to improve entity and relation understanding in KGs for downstream reasoning tasks.

Proposed method

  • A graph neural network (GNN) encoder processes the knowledge graph to generate node-level embeddings capturing relational structure.
  • A cross-modality pooling module identifies and aggregates the most relevant KG node embeddings based on input text, producing a holistic graph-level prompt embedding.
  • A domain projector aligns the distribution of graph embeddings with the text space to bridge modality gaps between KGs and LLMs.
  • A self-supervised link prediction objective is used to pre-train the GNP module, enhancing the model's ability to learn meaningful entity relationships.
  • The final Graph Neural Prompt is injected into the LLM as a context-aware, knowledge-grounded instruction, either in a frozen or LoRA-fine-tuned setting.
  • The method is designed to be plug-and-play, requiring no modification to the LLM’s architecture or parameters.

Experimental results

Research questions

  • RQ1Can a plug-and-play method effectively extract and inject knowledge from knowledge graphs into pre-trained large language models?
  • RQ2How does Graph Neural Prompting improve zero-shot and parameter-efficient fine-tuning performance on reasoning tasks?
  • RQ3What is the impact of GNN depth and cross-modality pooling layers on model performance across different LLM sizes and datasets?
  • RQ4How does the self-supervised link prediction objective enhance the model’s ability to learn relevant KG structures?

Key findings

  • GNP improves the performance of frozen LLMs by +13.5% on average across six benchmark datasets in commonsense and biomedical reasoning tasks.
  • When used with LoRA fine-tuning, GNP boosts performance by +1.8% compared to baseline fine-tuning without knowledge injection.
  • GNP achieves competitive or superior results to full fine-tuning in 10 out of 12 evaluations, demonstrating strong parameter efficiency.
  • The optimal number of GNN layers varies by dataset and LLM size, with 3 layers optimal for 3B models on OBQA and 5 layers for 11B models on PubMedQA.
  • Cross-modality pooling depth has dataset- and model size-dependent effects: deeper pooling helps 11B LLMs on OBQA but harms performance on BioASQ, indicating sensitivity to architecture choice.
  • Case studies show that GNP retrieves structurally relevant subgraphs that include key entities and relations, enabling correct reasoning even when raw KGs contain noisy or irrelevant information.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.