[论文解读] Knowledge Solver: Teaching LLMs to Search for Domain Knowledge from Knowledge Graphs
Knowledge Solver 教会 LLMs 在外部知识图中通过多跳、零样本提示搜索领域知识,在 CommonsenseQA、OpenBookQA 和 MedQA-USMLE 上提升问答表现,同时提供可解释的检索路径。
Large language models (LLMs), such as ChatGPT and GPT-4, are versatile and can solve different tasks due to their emergent ability and generalizability. However, LLMs sometimes lack domain-specific knowledge to perform tasks, which would also cause hallucination during inference. In some previous works, additional modules like graph neural networks (GNNs) are trained on retrieved knowledge from external knowledge bases, aiming to mitigate the problem of lacking domain-specific knowledge. However, incorporating additional modules: 1) would need retraining additional modules when encountering novel domains; 2) would become a bottleneck since LLMs' strong abilities are not fully utilized for retrieval. In this paper, we propose a paradigm, termed Knowledge Solver (KSL), to teach LLMs to search for essential knowledge from external knowledge bases by harnessing their own strong generalizability. Specifically, we design a simple yet effective prompt to transform retrieval into a multi-hop decision sequence, which empowers LLMs with searching knowledge ability in zero-shot manner. Additionally, KSL is able to provide complete retrieval paths and therefore increase explainability of LLMs' reasoning processes. We conduct experiments on three datasets: CommonsenseQA, OpenbookQA, and MedQA-USMLE, and found that our approach improves LLM baseline performance by a relatively large margin.
研究动机与目标
- 解决 LLM 在推理阶段因缺乏领域特定知识而导致的幻觉问题。
- 在不训练额外的知识感知模块的前提下,利用外部知识图来引导 LLM。
- 通过提示实现零样本知识检索,并提取完整的检索路径以提高可解释性。
- 在知识密集型问答数据集上展示性能提升,并探索使用外部知识进行微调。
提出的方法
- 从结构化知识图中为每个问题及答案对 [q, A] 检索子图 G_sub。
- 将子图 G_sub 编码为文本提示 T_K,并将其注入到 LLM 以启动多跳推理过程。
- 进行多轮实体对实体导航,LLM 根据局部知识图信息和历史选择末端实体,产生明确的推理路径。
- 将最终选定的末端实体映射到一个答案选项以产生预测,通过检索路径实现可解释性。
- 可选地使用 LoRA 构建的指令微调数据集(算法 2)对 LLM 进行微调,将知识注入模型参数。
- 使用生成文本的评估在三组数据集上评估零样本 和微调后的 KSL(GPT-4 评判正确性)。
实验结果
研究问题
- RQ1零样本 Knowledge Solver 是否在跨不同模型家族的知识密集型问答任务中提升了 LLM 的性能?
- RQ2使用 KSL 派生的指令数据进行微调是否能在零样本提升之外进一步提升性能?
- RQ3KSL 是否提供可解释的检索路径来解释模型推理?
- RQ4与常识数据集相比,知识图大小和完整性如何影响医学问答(MedQA-USMLE)的性能?
主要发现
- KSL 在零样本设置下对 GPT-3.5、LLaMA-7B、及 LLaMA-2-7B 的基线 LLM 性能提升显著。
- 微调后的 KSL(LLaMA-7B)进一步提升结果,并且在所评估的数据集上可以超过微调基线。
- MedQA-USMLE 的提升较小,可能是因为生物医学知识的知识图覆盖有限。
- 定性结果显示通过显式检索路径提高了正确性和可解释性。
- 消融实验表明知识特定推理方法和数据集构建,而非通用指令微调,是收益的驱动因素。
阅读本论文
在 Nubint 阅读器中打开原文,边读边就任意段落提问。
在 Nubint 中阅读本论文本解读由 AI 根据论文原文生成,引用前请核对原文。