[Paper Review] G-Retriever: Retrieval-Augmented Generation for Textual Graph Understanding and Question Answering
G-Retriever combines GNNs, LLMs, and retrieval-augmented generation to enable chat-style QA over textual graphs, mitigating hallucination and scaling to large graphs via a PCST-based subgraph retrieval and graph prompting.
Given a graph with textual attributes, we enable users to `chat with their graph': that is, to ask questions about the graph using a conversational interface. In response to a user's questions, our method provides textual replies and highlights the relevant parts of the graph. While existing works integrate large language models (LLMs) and graph neural networks (GNNs) in various ways, they mostly focus on either conventional graph tasks (such as node, edge, and graph classification), or on answering simple graph queries on small or synthetic graphs. In contrast, we develop a flexible question-answering framework targeting real-world textual graphs, applicable to multiple applications including scene graph understanding, common sense reasoning, and knowledge graph reasoning. Toward this goal, we first develop a Graph Question Answering (GraphQA) benchmark with data collected from different tasks. Then, we propose our G-Retriever method, introducing the first retrieval-augmented generation (RAG) approach for general textual graphs, which can be fine-tuned to enhance graph understanding via soft prompting. To resist hallucination and to allow for textual graphs that greatly exceed the LLM's context window size, G-Retriever performs RAG over a graph by formulating this task as a Prize-Collecting Steiner Tree optimization problem. Empirical evaluations show that our method outperforms baselines on textual graph tasks from multiple domains, scales well with larger graph sizes, and mitigates hallucination.~\footnote{Our codes and datasets are available at: \url{https://github.com/XiaoxinHe/G-Retriever}}
Motivation & Objective
- Introduce GraphQA, a diverse real-world graph QA benchmark spanning common sense reasoning, scene understanding, and knowledge graph reasoning.
- Propose G-Retriever, a retrieval-augmented generation framework that fuses GNNs, LLMs, and RAG for graph QA.
- Mitigate hallucination and address scalability by performing RAG over graphs via a Prize-Collecting Steiner Tree formulation.
- Demonstrate that G-Retriever outperforms baselines across multiple domains and scales to larger graphs.
- Provide insights and ablations on components like graph encoding, textualized graphs, and retrieval strategies.
Proposed method
- Index node/edge embeddings with a pre-trained LM and store in a nearest-neighbor structure.
- Query- and graph-aware retrieval using cosine similarity to select top-k relevant nodes/edges.
- Construct a connected subgraph via Prize-Collecting Steiner Tree optimization with node/edge prizes derived from relevance.
- Encode the retrieved subgraph with a GAT-based graph encoder, project to the LLM space, and textualize the subgraph for prompting.
- Generate answers with a frozen LLM conditioned on a graph token and textualized graph prompt, enabling gradient updates on the graph encoder and projection layer (soft prompting).
- Evaluate under inference-only, prompt-tuning, and LoRA-fine-tuning regimes to assess performance gains and hallucination reduction.
Experimental results
Research questions
- RQ1Can a retrieval-augmented framework over textual graphs improve complex QA and reduce hallucinations compared to LLM-only baselines?
- RQ2Does PCST-based subgraph retrieval effectively balance relevance and graph size for scalable GraphQA?
- RQ3How do different prompting/fine-tuning strategies interact with graph-based retrieval in textual graphs?
- RQ4What is the impact of textualizing graphs and graph encoders on final QA accuracy?
Key findings
- G-Retriever outperforms inference-only baselines on ExplaGraphs, SceneGraphs, and WebQSP.
- Retrieval-enabled configurations with frozen LLMs and prompt tuning outperform text-only prompts across datasets.
- Combining G-Retriever with LoRA yields the best performance on SceneGraphs and WebQSP.
- Graph-based retrieval substantially reduces tokens and nodes, improving efficiency (e.g., SceneGraphs 83% token reduction; WebQSP 99% reductions).
- G-Retriever significantly mitigates hallucination, with notable gains in valid nodes/edges and fully valid graphs compared to baselines.
- Ablations show critical contributions from the graph encoder and textualized graph; removing node/edge retrieval degrades performance, especially edge retrieval.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.