计算机工程与应用 ›› 2025, Vol. 61 ›› Issue (14): 206-213.DOI: 10.3778/j.issn.1002-8331.2404-0273

• 模式识别与人工智能 • 上一篇    下一篇

结合语言模型双编码和坐标注意力卷积的知识图谱补全

王瑄,王晓霞,陈晓   

  1. 陕西科技大学 电子信息与人工智能学院,西安 710021
  • 出版日期:2025-07-15 发布日期:2025-07-15

Combining Language Model Dual Encoder and Coordinate Attention Convolution for Knowledge Graph Completion

WANG Xuan, WANG Xiaoxia, CHEN Xiao   

  1. School of Electronic Information and Artificial Intelligence, Shaanxi University of Science & Technology, Xi’an 710021, China
  • Online:2025-07-15 Published:2025-07-15

摘要: 知识图谱补全(KGC)旨在学习知识图谱中的现有知识实现对缺失三元组的补全。近期的相关研究表明,将语言模型(LM)应用于KGC任务能够改善模型在结构稀疏的知识图谱上的推理性能。针对现有结合LM的KGC模型性能仅依赖于LM捕获的语义特征,没有同时考虑知识图谱的结构信息和语义信息的问题,提出一种结合语言模型双编码和坐标注意的知识图谱补全方法LDCA。在编码时,通过引入掩码预训练的语言模型双编码结构,充分学习实体和关系的语义特征;在解码时,使用坐标注意力机制的卷积神经网络捕获实体和关系组合嵌入的跨通道信息、方向感知信息和位置感知信息。在WN18RR和FB15K-237数据集上的实验结果表明,LDCA模型在MR、MRR、Hits@1、Hits@3和Hits@10上的整体性能优于基准模型,验证了所提出模型的有效性和先进性。

关键词: 语言模型(LM), 掩码预训练, 坐标注意力机制, 卷积神经网络

Abstract: Knowledge graph completion (KGC) aims to complete missing triples by learning existing knowledge in the knowledge graph. Recent studies have shown that applying language models (LM) to KGC tasks can improve the model’s inference performance on sparsely structured knowledge graphs. Aiming at the problem that the performance of existing KGC models combined with LMs only relies on the semantic features captured by LMs, without taking into account both the structural and semantic information of knowledge graphs, a knowledge graph completion method LDCA combining language model dual encoding and coordinate attention is proposed. In coding, the dual coding structure of language model with mask pre-training is introduced to fully learn the semantic features of entities and relationships. In decoding, a convolutional neural network using a coordinate attention mechanism captures cross-channel information, directional perception information, and location-aware information embedded by a combination of entities and relationships. Experimental results on WN18RR and FB15K-237 datasets show that the overall performance of LDCA model is superior to that of the benchmark model on MR, MRR, Hits@1, Hits@3 and Hits@10, which verifies the validity and advance of the proposed model.

Key words: language model (LM), mask pre-training, coordinate attention mechanism, convolutional neural network