作者投稿和查稿 主编审稿 专家审稿 编委审稿 远程编辑

计算机工程

• •    

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

  • 发布日期:2025-05-08

Fusing Relational Contextual Semantics for Knowledge Graph Completion

  • Published:2025-05-08

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

Abstract: Existing knowledge graph completion methods fail to adequately differentiate semantic distinctions across paths of varying hierarchies, and the representations of relationships do not sufficiently leverage neighborhood context information for dynamic adjustments, resulting in an incomplete understanding of contextual semantics. To address the above issues, a knowledge graph completion model, RCSKGC, is proposed, aiming to solve these problems by enhancing the semantic representation of learning paths and neighborhood information. Initially, local and global encodings of multi-hop paths at various levels are performed using bidirectional gated recurrent units and attention mechanisms, enabling the effective extraction of relevant path information. Moreover, relation embedding contrastive learning is employed to further refine the fine-grained semantic features of the path information. Subsequently, a dual attention mechanism and dynamic weighting strategy are utilized to capture hierarchical neighborhood information, with the semantics of relations being learned through a “neighborhood-entity-relation” framework. Finally, the two types of relational representations are aggregated to obtain the final representations of relationships, which is then input into the decoder for completion. Experimental results demonstrate that on the FB15k-237 dataset, RCSKGC outperforms the best results among the baseline methods, achieving improvements of 1.4, 0.8, 1.3, and 2.1 percentage points in MRR, Hits@1, Hits@3, and Hits@10, respectively. On the WN18RR dataset, RCSKGC achieves comparable performance to the best baseline result in Hits@1, while improving MRR and Hits@3 by 0.8 and 1 percentage points, respectively, thereby validating the efficacy of the proposed method.