Skip to main content
QUICK REVIEW

[论文解读] G-Retriever: Retrieval-Augmented Generation for Textual Graph Understanding and Question Answering

Xiaoxin He, Yijun Tian|arXiv (Cornell University)|Feb 12, 2024
Topic ModelingComputer Science被引用 22
一句话总结

G-Retriever 将 GNNs、LLMs 与检索增强生成结合起来,使文本图的聊天式问答成为可能,通过基于 PCST 的子图检索和图提示来缓解幻觉并扩展到大图。

ABSTRACT

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}}

研究动机与目标

  • 引入 GraphQA,一个覆盖常识推理、场景理解和知识图推理等多领域的真实世界图问答基准。
  • 提出 G-Retriever,一个将 GNNs、LLMs 与 RAG 融合的检索增强生成框架用于图问答。
  • 通过对图执行基于 Prize-Collecting Steiner Tree 的形式化来进行 RAG,以缓解幻觉并解决可扩展性问题。
  • 证明 G-Retriever 在多个领域优于基线,并且可扩展到更大的图。
  • 提供关于图编码、文本化图和检索策略等组件的见解与消融分析。

提出的方法

  • 使用预训练的语言模型对节点/边嵌入进行索引,并存储在最近邻结构中。
  • 使用余弦相似度进行查询与图感知的检索,以选择前 k 个相关节点/边。
  • 通过基于相关性的节点/边奖赏构造一个连通子图,利用 Prize-Collecting Steiner Tree 优化。
  • 使用基于 GAT 的图编码器对检索得到的子图进行编码,投影到 LLM 空间,并将子图文本化以用于提示。
  • 在固定的 LLM 条件下,基于图标记和文本化图提示生成答案,从而对图编码器和投影层(软提示)进行梯度更新。
  • 在推理仅有、提示微调和 LoRA 微调等设置下进行评估,以评估性能提升和幻觉减少。

实验结果

研究问题

  • RQ1相较于仅LLM的基线,基於文本图的检索增强框架是否能改进复杂问答并减少幻觉?
  • RQ2基于 PCST 的子图检索是否在相关性与图大小之间实现有效平衡,从而实现可扩展的 GraphQA?
  • RQ3不同的提示/微调策略如何与文本图中的基于图的检索相互作用?
  • RQ4将图文本化和图编码器对最终问答准确性有何影响?

主要发现

  • G-Retriever 在 ExplaGraphs、SceneGraphs 和 WebQSP 上优于仅推理的基线。
  • 具备检索能力、固定 LLM 与提示微调的配置在各数据集上均优于纯文本提示。
  • 将 G-Retriever 与 LoRA 相结合,在 SceneGraphs 和 WebQSP 上取得最佳性能。
  • 基于图的检索显著减少标记数量和节点数量,提升效率(如 SceneGraphs 减少 83% 的标记;WebQSP 减少 99%)。
  • G-Retriever 显著缓解幻觉,在有效节点/边和完全有效图方面相对基线有显著提升。
  • 消融实验显示图编码器和文本化图的关键贡献;移除节点/边检索会恶化性能,尤其是边检索。

阅读本论文

在 Nubint 阅读器中打开原文,边读边就任意段落提问。

在 Nubint 中阅读本论文

本解读由 AI 根据论文原文生成,引用前请核对原文。