本研究提出基于邻域增强的大语言模型(large language model,LLM)知识图谱补全框架(neighborhood-enhanced large language model-knowledge graph completion,NELLM-KGC),旨在增强对食品安全标准领域复杂关联的推理能力。NELLM-KGC首先采用图结构化表示方式高效整合法规、标准限值、检测方法等关键异构数据,构建中文食品安全标准知识图谱。其次,采用引导式方法将传统的KGC任务转化为自然语言问答形式,并通过指令微调策略优化模型对中文食品标准领域任务的适应能力。为了提升推理的精确性,NELLM-KGC基于图剪枝算法设计了邻域信息融合机制,依托知识图谱检索器与LLM的双阶段筛选,从实体邻域中精准捕获与推理路径强相关的前m 个邻域节点信息(Top-m)证据链并进行精细化微调。本研究在公共知识图谱数据集(如FB15k-237、WN18RR)和自定义的食品安全标准数据集上进行了广泛验证,结果表明,NELLM-KGC在三元组分类准确率、实体预测Hits@1和关系预测Hits@1等关键指标上均表现出较好的性能,证明了该框架的有效性。
This paper proposed a neighborhood-enhanced large language model-based knowledge graph completion framework (NELLM-KGC), designed to enhance reasoning capabilities regarding complex relationships within the field of food safety standards. NELLM-KGC first employed a graph-structured representation to efficiently integrate key heterogeneous data such as regulations, standard limits, and testing methods, thereby constructing a knowledge graph of Chinese food safety standards. Secondly, NELLM-KGC employed a guided approach to transform the conventional KGC task into a natural language question-answering format. It further enhanced the model’s adaptability to Chinese food standards domain tasks through an instruction-tuning strategy. To enhance reasoning accuracy, NELLM-KGC designed a neighborhood information fusion mechanism based on graph pruning algorithms. Leveraging a two-stage screening process involving KG retrievers and LLMs, it precisely captured Top-m evidence chains strongly correlated with inference paths from entity neighborhoods and performs fine-tuning. We conducted extensive validation on public knowledge graph datasets such as FB15k-237 and WN18RR, as well as customized food safety standards datasets. Experimental results demonstrated that the NELLM-KGC framework exhibited favorable performance across key metrics including triplet classification accuracy, entity prediction Hits@1, and relation prediction Hits@1, thereby validating the efficacy of the framework.