Journal of Computer Applications ›› 2025, Vol. 45 ›› Issue (4): 1148-1156.DOI: 10.11772/j.issn.1001-9081.2024030321

• Artificial intelligence • Previous Articles     Next Articles

Knowledge graph completion using hierarchical attention fusing directed relationships and relational paths

Sheping ZHAI1,2, Qing YANG1(), Yan HUANG1, Rui YANG1   

  1. 1.School of Computer Science and Technology,Xi’an University of Posts and Telecommunications,Xi’an Shaanxi 710121,China
    2.Shaanxi Key Laboratory of Network Data Analysis and Intelligent Processing (Xi’an University of Posts and Telecommunications),Xi’an Shaanxi 710121,China
  • Received:2024-03-21 Revised:2024-04-28 Accepted:2024-04-29 Online:2024-06-04 Published:2025-04-10
  • Contact: Qing YANG
  • About author:ZHAI Sheping, born in 1971, Ph. D., professor. His research interests include semantic computing, blockchain.
    YANG Qing, born in 2000, M. S. candidate. Her research interests include knowledge graph.
    HUANG Yan, born in 2000, M. S. candidate. Her research interests include knowledge graph.
    YANG Rui, born in 1976, M. S., lecturer. Her research interests include knowledge graph.
  • Supported by:
    National Program of Innovation and Entrepreneurship Training Program for College Students(202211664053);Shaanxi Province Key Research and Development Program(2022GY-038);Xi’an University of Posts and Telecommunications Graduate Student Innovation Fund Project(CXJJYL2022052);Scientific Research Program of Education Department of Shaanxi Province(18JK0697);Shaanxi Provincial Social Science Foundation(2016N008);Ministry of Industry and Information Technology Communication Soft Science Project(2018-R-26);Xi’an Social Science Planning Fund (17X63)

融合有向关系与关系路径的层次注意力的知识图谱补全

翟社平1,2, 杨晴1(), 黄妍1, 杨锐1   

  1. 1.西安邮电大学 计算机学院,西安 710721
    2.陕西省网络数据分析与智能处理重点实验室(西安邮电大学),西安 710121
  • 通讯作者: 杨晴
  • 作者简介:翟社平(1971—),男,陕西宝鸡人,教授,博士,CCF高级会员,主要研究方向:语义计算、区块链
    杨晴(2000—),女,陕西渭南人,硕士研究生,主要研究方向:知识图谱
    黄妍(2000—),女,陕西渭南人,硕士研究生,主要研究方向:知识图谱
    杨锐(1976—),女,陕西咸阳人,讲师,硕士,主要研究方向:知识图谱。
  • 基金资助:
    大学生创新创业训练计划国家级项目(202211664053);陕西省重点研发计划项目(2022GY-038);西安邮电大学研究生创新基金资助项目(CXJJYL2022052);陕西省教育厅科学研究计划项目(18JK0697);陕西省社会科学基金资助项目(2016N008);工业和信息化部通信软科学项目(2018-R-26);西安市社会科学规划基金资助项目(17X63)

Abstract:

Most of the existing Knowledge Graph Completion (KGC) methods do not fully exploit the relational paths in the triple structure, and only consider the graph structure information; meanwhile, the existing models focus on considering the neighborhood information in the process of entity aggregation, and the learning of relations is relatively simple. To address the above problems, a graph attention model that integrates directed relations and relational paths was proposed, namely DRPGAT. Firstly, the regular triples were converted into directed relationship-based triples, and the attention mechanism was introduced to give different weights to different directed relationships, so as to realize the entity information aggregation. At the same time, the relational path model was established, and the relational positions were embedded into the path information to distinguish the relationships among different positions. And the irrelevant paths were filtered to obtain the useful path information. Secondly, the attention mechanism was used to carry out deep path information learning to realize the aggregation of relations. Finally, the entities and relations were fed into the decoder and trained to obtain the final completion results. Link prediction experiments were conducted on two real datasets to verify the effectiveness of the proposed model. Experimental results show that compared to the optimal results of the baseline models, on FB15k-237 dataset, DRPGAT has the Mean Rank (MR) reduced by 13, and the Mean Reciprocal Rank (MRR), Hits@1, Hits@3, and Hits@10 improved by 1.9, 1.2, 2.3, and 1.6 percentage points, respectively; on WN18RR dataset, DRPGAT has the MR reduced by 125, and the MRR, Hits@1, Hits@3, and Hits@10 improved by 1.1, 0.4, 1.2, and 0.6 percentage points, respectively, indicating the effectiveness of the proposed model.

Key words: knowledge graph, Knowledge Graph Completion (KGC), relational path inference, hierarchical attention, link prediction

摘要:

已有的知识图谱补全(KGC)方法大多未充分挖掘三元组结构中的关系路径,仅考虑了图结构信息;同时现有模型在实体聚合过程中着重考虑邻域信息,对关系的学习相对简单。针对以上问题,提出融合有向关系和关系路径的图注意力模型DRPGAT。首先,将常规三元组转换为有向关系三元组,并引入注意力机制对不同的有向关系赋予不同的权重,从而完成实体信息的聚合,同时,建立关系路径模型,通过将关系位置嵌入路径信息区分不同位置之间的关系,并过滤无关路径得到有用的路径信息;其次,使用注意力机制对路径信息进行深度学习,以实现关系的聚合;最后,将实体与关系送入解码器,训练得到最终的补全结果。在2个真实数据集上进行链接预测实验,以验证所提模型的有效性。实验结果表明,在FB15k-237数据集上,相较于基线模型中的最优结果,DRPGAT的平均排名(MR)降低了13,平均倒数排名(MRR)、Hits@1、Hits@3、Hits@10分别提高1.9、1.2、2.3和1.6个百分点;在WN18RR数据集上,DRPGAT的MR降低了125,MRR、Hits@1、Hits@3、Hits@10分别提高了1.1、0.4、1.2和0.6个百分点,显示了所提模型的有效性。

关键词: 知识图谱, 知识图谱补全, 关系路径推理, 层次注意力, 链接预测

CLC Number: