FOOD SCIENCE ›› 2026, Vol. 47 ›› Issue (12): 31-41.doi: 10.7506/spkx1002-6630-20251213-104

• Basic Research • Previous Articles    

A Method for Completing Food Safety Standards Knowledge Graphs Based on Neighborhood-Enhanced Large Language Model

MAO Dianhui, MA Huayi, ZHANG Jinyao, ZHAO Zhihua   

  1. (1. School of Computer and Artificial Intelligence, Beijing Technology and Business University, Beijing 100048, China;2. The Law School, China University of Political Science and Law, Beijing 102249, China)
  • Published:2026-07-08

Abstract: 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.

Key words: food safety regulation; knowledge graph; large language model; instruction fine-tuning; knowledge graph completion

CLC Number: