Author Login Chief Editor Login Reviewer Login Editor Login Remote Office

Computer Engineering ›› 2026, Vol. 52 ›› Issue (9): 113-122. doi: 10.19678/j.issn.1000-3428.0070677

• Computational Intelligence and Pattern Recognition • Previous Articles     Next Articles

Knowledge Graph Completion Integrating Relational Context Semantics

ZHAI Sheping1,2, MA Mengyao1,*(), ZHANG Wenjing1, YANG Rui1   

  1. 1. School of Computer Science and Technology, Xi'an University of Posts and Telecommunications, Xi'an 710121, Shaanxi, China
    2. Shaanxi Key Laboratory of Network Data Analysis and Intelligent Processing (Xi'an University of Posts and Telecommunications), Xi'an 710121, Shaanxi, China
  • Received:2024-12-04 Revised:2025-02-27 Online:2026-09-15 Published:2025-05-08
  • Contact: MA Mengyao

融合关系上下文语义的知识图谱补全

翟社平1,2, 马梦瑶1,*(), 张文静1, 杨锐1   

  1. 1. 西安邮电大学计算机学院, 陕西 西安 710121
    2. 陕西省网络数据分析与智能处理重点实验室(西安邮电大学), 陕西 西安 710121
  • 通讯作者: 马梦瑶
  • 作者简介:

    翟社平(CCF高级会员), 男, 教授、博士, 主研方向为语义计算、区块链

    马梦瑶(通信作者), 硕士研究生

    张文静, 硕士研究生

    杨锐, 讲师、硕士

  • 基金资助:
    国家级大学生创新训练计划项目(202411664067); 陕西省重点研发计划项目(2022GY-038); 陕西省教育厅科学研究计划项目(18JK0697); 陕西省社会科学基金项目(2016N008); 工业和信息化部通信软科学项目(2018-R-26); 西安市社会科学规划基金项目(17X63)

Abstract:

Existing Knowledge Graph Completion (KGC) methods fail to effectively distinguish semantic differences among paths at different levels and cannot dynamically adjust relation representations by fully leveraging neighborhood context information. Consequently, contextual semantics remain insufficiently understood. To address these issues, this paper proposes a KGC model integrating relational context semantics, named RCSKGC, for enhancing the semantic representation of learned paths and neighborhood information. First, the local and global encoding of multi-hop paths at different levels is performed using a Bidirectional Gated Recurrent Unit (Bi-GRU) and an attention mechanism to extract effective path information. Meanwhile, the fine-grained semantic features of the path information at different levels are further enhanced through relational embedding contrastive learning. Second, a dual-attention mechanism and dynamic weighting strategy are employed to capture the neighborhood-level information of relations and learn their semantics through a "neighborhood—entity—relation" approach. Finally, the two types of relational representations are aggregated and used as inputs for the decoder to perform KGC. The results of experiments on the FB15k-237 dataset demonstrate that, compared to the best results of the baseline methods, RCSKGC achieves improvements of 1.4, 0.8, 1.3, and 2.1 percentage points in the Mean Reciprocal Rank (MRR), Hits@1, Hits@3, and Hits@10, respectively. Further, on the WN18RR dataset, RCSKGC shows improvements of 0.8 and 1.0 percentage points in MRR and Hits@3, respectively. These results validate the effectiveness of the proposed method.

Key words: Knowledge Graph Completion(KGC), contrastive learning, attention mechanism, semantic, Bidirectional Gate Recurrent Unit (Bi-GRU)

摘要:

现有知识图谱补全(KGC)方法未能有效区分不同层级路径的语义差异, 且关系表示未能充分利用邻域上下文信息进行动态调整, 导致对上下文语义的理解不够全面。针对以上问题, 提出一种融合关系上下文语义的知识图谱补全模型RCSKGC, 旨在增强学习路径和邻域信息的语义表达。首先, 通过双向门控循环单元(Bi-GRU)和注意力机制, 针对不同层级的多跳路径进行局部和全局编码, 从而提取有效路径信息, 同时, 通过关系嵌入对比学习进一步增强不同层级路径信息的细粒度语义特征; 其次, 采用双重注意力机制和动态加权策略捕捉关系的邻域层级信息, 通过"邻域-实体-关系"的方式学习关系的语义; 最后, 聚合两种关系表示, 并将其作为解码器的输入以完成KGC。实验结果表明: 在FB15k-237数据集上, 相较于基线方法的最优结果, RCSKGC的平均倒数排名(MRR)、Hits@1、Hits@3和Hits@10分别提升1.4、0.8、1.3和2.1百分点; 在WN18RR数据集上, 与基线方法的最优结果相比, RCSKGC的MRR、Hits@3分别提升0.8、1.0百分点, 验证了所提方法的有效性。

关键词: 知识图谱补全, 对比学习, 注意力机制, 语义, 双向门控循环单元