[论文解读] LLM2KB: Constructing Knowledge Bases using instruction tuned context aware Large Language Models
该论文提出 LLM2KB 系统,通过使用 LoRA 进行参数高效微调,利用指令微调的、上下文感知的大语言模型(Llama-2-13b-chat 和 StableBeluga-13B)构建知识库。通过利用通过密集段落检索(DPR)检索到的维基百科页面上下文,该模型在 LM-KBC 2023 挑战赛的 21 个关系上实现了平均 F1 得分为 0.6185,证明了仅通过极少的参数更新即可实现高效的知识库构建。
The advent of Large Language Models (LLM) has revolutionized the field of natural language processing, enabling significant progress in various applications. One key area of interest is the construction of Knowledge Bases (KB) using these powerful models. Knowledge bases serve as repositories of structured information, facilitating information retrieval and inference tasks. Our paper proposes LLM2KB, a system for constructing knowledge bases using large language models, with a focus on the Llama 2 architecture and the Wikipedia dataset. We perform parameter efficient instruction tuning for Llama-2-13b-chat and StableBeluga-13B by training small injection models that have only 0.05 % of the parameters of the base models using the Low Rank Adaptation (LoRA) technique. These injection models have been trained with prompts that are engineered to utilize Wikipedia page contexts of subject entities fetched using a Dense Passage Retrieval (DPR) algorithm, to answer relevant object entities for a given subject entity and relation. Our best performing model achieved an average F1 score of 0.6185 across 21 relations in the LM-KBC challenge held at the ISWC 2023 conference.
研究动机与目标
- 开发一种高效、可扩展的知识库构建方法,利用大语言模型。
- 通过采用 LoRA 等参数高效技术,解决大模型微调带来的高计算成本问题。
- 通过利用密集段落检索(DPR)实现的上下文感知检索,提升从维基百科中提取事实性知识的能力。
- 评估指令微调的大语言模型在开放域知识库构建任务中的表现,特别是针对需要事实回忆的关系。
- 研究训练数据生成策略和模型架构对关系抽取性能的影响。
提出的方法
- 使用低秩适应(LoRA)对 Llama-2-13b-chat 和 StableBeluga-13B 进行微调,仅更新基础模型参数的 0.05%。
- 采用提示工程策略生成训练样本,利用通过密集段落检索(DPR)检索到的主体实体维基百科页面上下文。
- 设计指令微调提示,引导大语言模型基于给定的主体和关系预测目标实体,采用上下文感知的少样本学习方法。
- 在两种数据生成方法上训练模型:一种仅使用训练集,另一种使用训练集和验证集联合生成样本。
- 使用 LM-KBC 2023 挑战赛测试集的宏平均精确率、召回率和 F1 得分评估模型性能。
- 使用 Wikidata API 验证预测的目标实体,过滤掉幻觉或不存在的实体。

实验结果
研究问题
- RQ1使用 LoRA 进行参数高效微调是否能有效适应大语言模型用于知识库构建,而无需全量微调?
- RQ2通过密集段落检索(DPR)检索到的维基百科段落上下文,如何影响关系预测的事实准确性?
- RQ3在开放域知识库构建任务中,指令微调的 Llama-2-13b-chat 与 StableBeluga-13B 模型的性能差异如何?
- RQ4不同的数据生成策略(仅训练集 vs. 训练集+验证集)对模型泛化能力和 F1 得分有何影响?
- RQ5为何某些关系如 'PersonHasNumberOfChildren' 和 'SeriesHasNumberOfEpisodes' 尽管注入了上下文,仍表现出较低性能?
主要发现
- 表现最佳的模型为使用方法 1 数据生成策略微调的 Llama-2-13b-chat,其在 LM-KBC 2023 挑战赛的 21 个关系上实现了平均 F1 得分为 0.6185。
- 当使用相同的数据生成方法时,Llama-2-13b-chat 模型优于 StableBeluga-13B 模型,表明其在架构或微调敏感性方面更具优势。
- 关系 'PersonHasNoblePrize' 的 F1 得分最高(0.9567),而 'PersonHasEmployer' 的得分最低(0.2555),表明模型对某些关系存在明显偏见。
- 需要数值答案的关系,如 'PersonHasNumberOfChildren' 和 'SeriesHasNumberOfEpisodes',表现较差(F1 < 0.5),因为模型常缺乏上下文或依赖记忆事实。
- 模型存在幻觉问题,会生成看似合理但实际不存在的目标实体,且无法通过 Wikidata API 验证。
- 推理阶段提示的微小变化会导致性能显著下降,表明提示工程存在脆弱性。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。