Skip to main content
QUICK REVIEW

[Paper Review] GNN-RAG: Graph Neural Retrieval for Large Language Model Reasoning

Costas Mavromatis, George Karypis|arXiv (Cornell University)|May 30, 2024
Topic ModelingComputer Science13 citations
TL;DR

GNN-RAG uses Graph Neural Networks to retrieve dense subgraph information from knowledge graphs and verbalizes shortest reasoning paths to guide a tuned LLM in retrieval-augmented KGQA, achieving state-of-the-art results on WebQSP and CWQ with a Retrieval Augmentation (RA) boost.

ABSTRACT

Knowledge Graphs (KGs) represent human-crafted factual knowledge in the form of triplets (head, relation, tail), which collectively form a graph. Question Answering over KGs (KGQA) is the task of answering natural questions grounding the reasoning to the information provided by the KG. Large Language Models (LLMs) are the state-of-the-art models for QA tasks due to their remarkable ability to understand natural language. On the other hand, Graph Neural Networks (GNNs) have been widely used for KGQA as they can handle the complex graph information stored in the KG. In this work, we introduce GNN-RAG, a novel method for combining language understanding abilities of LLMs with the reasoning abilities of GNNs in a retrieval-augmented generation (RAG) style. First, a GNN reasons over a dense KG subgraph to retrieve answer candidates for a given question. Second, the shortest paths in the KG that connect question entities and answer candidates are extracted to represent KG reasoning paths. The extracted paths are verbalized and given as input for LLM reasoning with RAG. In our GNN-RAG framework, the GNN acts as a dense subgraph reasoner to extract useful graph information, while the LLM leverages its natural language processing ability for ultimate KGQA. Furthermore, we develop a retrieval augmentation (RA) technique to further boost KGQA performance with GNN-RAG. Experimental results show that GNN-RAG achieves state-of-the-art performance in two widely used KGQA benchmarks (WebQSP and CWQ), outperforming or matching GPT-4 performance with a 7B tuned LLM. In addition, GNN-RAG excels on multi-hop and multi-entity questions outperforming competing approaches by 8.9--15.5% points at answer F1.

Motivation & Objective

  • Motivate knowledge-grounded QA with up-to-date, accurate KG information to reduce LLM hallucinations.
  • Develop a retrieval-augmented approach that leverages GNNs for dense subgraph reasoning over KG data.
  • Bridge graph-based reasoning with LLM natural language processing by verbalizing KG reasoning paths for LLM input.
  • Explore retrieval augmentation to further boost KGQA performance without excessive LLM calls.

Proposed method

  • Use a dense subgraph retrieved from the KG as input to a GNN to identify candidate answers for a given question.
  • Extract shortest KG paths that connect question entities to GNN-proposed answers to represent KG reasoning traces.
  • Verbalize the extracted reasoning paths and feed them as prompts to an LLM-based RAG pipeline for answer finalization.
  • Experiment with two GNNs employing different language models for question-relation matching to diversify retrieved information.
  • Fine-tune a lightweight LLM (e.g., LLaMA2-Chat-7B) on reasoning-path prompts to perform the final KGQA reasoning.
  • Introduce Retrieval Augmentation (RA) by combining GNN-derived paths with LLM-based retrieval (RoG) or multiple GNN/LMS retrievers to increase recall.
Figure 2 : The landscape of existing KGQA methods. GNN-based methods reason on dense subgraphs as they can handle complex and multi-hop graph information. LLM-based methods employ the same LLM for both retrieval and reasoning due to its ability to understand natural language.
Figure 2 : The landscape of existing KGQA methods. GNN-based methods reason on dense subgraphs as they can handle complex and multi-hop graph information. LLM-based methods employ the same LLM for both retrieval and reasoning due to its ability to understand natural language.

Experimental results

Research questions

  • RQ1Can GNN-based retrieval of dense KG subgraphs improve KGQA reasoning compared to purely LLM-based retrieval?
  • RQ2Do shortest-path reasoning traces from question entities to candidate answers provide reliable inputs for LLM reasoning?
  • RQ3Does retrieval augmentation (RA) combining GNN and LLM-derived paths yield superior KGQA performance and faithfulness?

Key findings

  • Gnn-Rag achieves state-of-the-art performance on WebQSP and CWQ across multiple metrics, outperforming several baselines.
  • GNN-based retrieval effectively handles multi-hop KGQA and retrieves necessary reasoning paths, improving F1 by significant margins on complex questions.
  • Retrieval augmentation (RA) further boosts performance, with Gnn-Rag +RA often surpassing RoG and matching or exceeding stronger LLM-based methods while using a smaller LLM (7B).
  • GNN reasoning provides better answer recall and path diversity for multi-hop questions, while LLMs contribute language understanding for final reasoning.
  • Gnn-Rag demonstrates faithfulness improvements by supplying correct multi-hop facts and reducing hallucinated or irrelevant information in reasoning paths.
  • Gnn-Rag improves weaker LLMs substantially and can be integrated with various LLMs without retraining.
Figure 3 : Gnn-Rag : The GNN reasons over a dense subgraph to retrieve candidate answers, along with the corresponding reasoning paths (shortest paths from question entities to answers). The retrieved reasoning paths –optionally combined with retrieval augmentation (RA)– are verbalized and given to
Figure 3 : Gnn-Rag : The GNN reasons over a dense subgraph to retrieve candidate answers, along with the corresponding reasoning paths (shortest paths from question entities to answers). The retrieved reasoning paths –optionally combined with retrieval augmentation (RA)– are verbalized and given to

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.