Journal of Frontiers of Computer Science and Technology ›› 2025, Vol. 19 ›› Issue (11): 3046-3058.DOI: 10.3778/j.issn.1673-9418.2412089

• Artificial Intelligence·Pattern Recognition • Previous Articles     Next Articles

Incorporating Relation Path and Entity Neighborhood Information for Knowledge Graph Multi-hop Reasoning Method

SONG Baoyan, LIU Hangsheng, SHAN Xiaohuan, LI Su, CHEN Ze   

  1. School of Information, Liaoning University, Shenyang 110036, China
  • Online:2025-11-01 Published:2025-10-30

融合关系路径与实体邻域信息的知识图谱多跳推理方法

宋宝燕,刘杭生,单晓欢,李素,陈泽   

  1. 辽宁大学 信息学部,沈阳 110036

Abstract: Knowledge graph multi-hop reasoning aims to complete missing triples by exploring complex path relationships between entities. Existing methods suffer from limitations in path feature extraction and entity neighborhood granularity information fusion, leading to deficiencies in both accuracy and interpretability of reasoning results. To address these issues, this paper proposes a novel knowledge graph multi-hop reasoning method MGPC (multi-granularity path candidate reasoning), which incorporates relation path and entity neighborhood information. Firstly, this paper designs a candidate path filtering mechanism based on semantic relevance. By calculating the semantic relevance scores between the central entity and the candidate answer entities, this paper extracts a set of candidate paths highly relevant to the query and embeds them into a low-dimensional vector space to enhance interpretability. Secondly, this paper proposes a spatiotemporal attention mechanism to mine the local neighborhood granularity information of the central entity in the candidate relation paths. By combining this with long short-term memory (LSTM) networks, this paper captures both the local multi-granularity neighborhood features and global dependencies along the relation paths, generating path embeddings that fuse global and local semantics. Finally, this paper introduces a Transformer encoder to model the correlation between the global paths and the central entity. By optimizing the global path embedding representation through a denoising layer, this paper selects high-confidence reasoning paths, thereby improving the interpretability of the reasoning results. This paper compares the proposed MGPC method with 10 mainstream baseline methods on three benchmark datasets. Experimental results demonstrate that MGPC outperforms the mainstream baseline models in the multi-hop reasoning task, and achieves an average improvement of 3.1% in mean reciprocal rank (MRR) and 4.0% in Hits@1 on FB15k-237 and NELL-995 datasets, verifying the effectiveness of proposed method.

Key words: knowledge graph, multi-hop reasoning, spatiotemporal attention, Transformer, path interpretability

摘要: 知识图谱多跳推理旨在通过挖掘实体间的复杂路径关系补全缺失三元组。现有方法在路径特征提取和实体邻域粒度信息融合方面存在不足,导致推理结果缺乏可解释性和准确性。针对上述问题,提出一种融合关系路径与实体邻域信息的知识图谱多跳推理方法MGPC。设计基于语义相关性的候选路径筛选机制,通过计算中心实体与候选答案实体的语义相关性评分,提取与查询高度相关的候选路径集,并将其嵌入低维空间以增强可解释性。基于时空注意力机制,挖掘候选关系路径中心实体局部邻域粒度信息,并结合长短期记忆网络捕获关系路径的局部多粒度邻域特征与全局依赖关系,生成融合全局-局部语义的路径嵌入。引入Transformer编码器建模全局路径与中心实体的关联性,通过去噪层优化全局路径嵌入表示,选择高置信度的推理路径,进而提高推理结果的可解释性和有效性。在3个基准数据集上将所提出的方法与10个主流基线方法进行比较,实验结果表明,MGPC在多跳推理任务中优于主流基线模型,在FB15k-237、NELL-995数据集上MRR、Hits@1方面分别平均提升了3.1%、4.0%,验证了方法的有效性。

关键词: 知识图谱, 多跳推理, 时空注意力, Transformer, 路径可解释性