数据与计算发展前沿 ›› 2023, Vol. 5 ›› Issue (3): 123-137.

CSTR: 32002.14.jfdc.CN10-1649/TP.2023.03.009

doi: 10.11871/jfdc.issn.2096-742X.2023.03.009

• 技术与应用 • 上一篇    下一篇

融合多层注意力机制与BiLSTM的知识图谱补全算法研究

张晓帆(),孙海春,李欣*()   

  1. 中国人民公安大学,信息网络安全学院,北京 100038
  • 收稿日期:2022-05-17 出版日期:2023-06-20 发布日期:2023-06-21
  • 通讯作者: *李欣(E-mail: lixin@ppsuc.edu.cn
  • 作者简介:张晓帆,中国人民公安大学,硕士研究生,主要研究方向为知识库、知识图谱、自然语言处理。
    本文主要承担工作为文献调研、论文撰写和设计,修改全文。
    ZHANG Xiaofan is a master’s student at the People’s Public Security University of China. His research interests include knowledge base, knowledge graph, and natural language processing.
    In this paper, he is responsible for literature research, thesis design, writing and modification.
    E-mail: 201621440015@stu.ppsuc.edu.cn|李欣,中国人民公安大学,副教授,博士,主要研究方向为网络安全、视频网络、人工智能等。
    在本文中负责论文修改与指导相关工作。
    LI Xin, Ph.D., is an Associate Professor at the People’s Public Security University of China. He has been engaged in research on Cyber Security, Big Data, and Artificial Intelligence.
    In this paper, she is mainly responsible for the revision and guidance of the paper.
    E-mail: lixin@ppsuc.edu.cn
  • 基金资助:
    国家自然科学基金“面向视频监控的跨时空行人轨迹分析方法”(62076246);公安部技术研究计划项目(2020JSYJC22)

Hierarchical Attention-Based Bidirectional Long Short-Term Memory Networks for Knowledge Graph Completion

ZHANG Xiaofan(),SUN Haichun,LI Xin*()   

  1. Information and Network Security College, People’s Public University of China, Beijing 100038, China
  • Received:2022-05-17 Online:2023-06-20 Published:2023-06-21

摘要:

【目的】 针对目前大多数知识图谱补全算法无法兼顾局部与全局特征的问题,本文提出一种对实体间的关系路径进行层级划分,并利用双向长短期记忆网络和多层注意力机制进行特征提取的算法,以对知识图谱进行补全。【方法】 首先,结合关系路径上的实体类型和关系得到关系路径序列的向量表示;然后,利用多层注意力机制和双向长短期记忆网络分层级提取序列关键信息;最终通过计算关系路径特征向量与候选关系向量间的相似度得出预测结果。【结果】 在NELL-995和FB15k-237数据集上进行链路预测实验,结果表明,该算法与已有基于关系路径的知识图谱补全算法CNN-BiLSTM等相比,MAP值提高了1.8%,Hits@1指标提高了1.4%;在Kinship数据集上,其Hits@3值达到了0.988。【结论】 本文通过实验证明了所提出的HAN-BiLSTM算法能有效提取关系路径的整体特征和局部特征,从而提高知识图谱补全效果。

关键词: 知识图谱补全, 关系路径推理, 多层注意力机制, 双向长短期记忆网络

Abstract:

[Objective] In order to utilize both local and global features hidden in relation paths between two entities in knowledge graphs which are presently often neglected in most path-based embedding methods for knowledge graph completion. In this paper, we propose a new bidirectional long short-term memory network approach based on hierarchical attention mechanisms, which process relation paths at both entity-relation level and relation path level. [Methods] After scanning the relation paths between two entities, these relation paths are vectorized considering the entity types and the relations on the paths. Then we introduce the paths into a low-dimensional space using a BiLSTM model which has hierarchical attention layers to capture the important facts at different levels. Finally, a prediction is made based on the similarity between the feature vector and the potentially possible relations. [Results] The model conducts link prediction tasks over several datasets including NELL-995 and FB15k-237. The results show that the MAP score of the HAN-BiLSTM model is 1.8% better than traditional methods such as CNN-BiLSTM, as well as an improvement in Hits@1 by 1.4%. The model achieved a Hits@3 score of 0.988 over the Kinship dataset.[Conclusions] Experiment results show that the proposed algorithm can effectively extract both global and local features of the relation paths, so as to improve the effect of knowledge graph completion

Key words: knowledge graph completion, path-based reasoning, hierarchical attention networks, bidirectional long short-term memory networks