Journal of Frontiers of Computer Science and Technology ›› 2024, Vol. 18 ›› Issue (4): 1001-1009.DOI: 10.3778/j.issn.1673-9418.2301038

• Artificial Intelligence·Pattern Recognition • Previous Articles     Next Articles

Knowledge Graph Completion Algorithm with Multi-view Contrastive Learning

QIAO Zifeng, QIN Hongchao, HU Jingjing, LI Ronghua, WANG Guoren   

  1. School of Computer Science & Technology, Beijing Institute of Technology, Beijing 100081, China
  • Online:2024-04-01 Published:2024-04-01

融合多视图对比学习的知识图谱补全算法

乔梓峰,秦宏超,胡晶晶,李荣华,王国仁   

  1. 北京理工大学 计算机学院,北京 100081

Abstract: Knowledge graph completion is a process of reasoning new triples based on existing entities and relations in knowledge graph. The existing methods usually use the encoder-decoder framework. Encoder uses graph convolutional neural network to get the embeddings of entities and relations. Decoder calculates the score of each tail entity according to the embeddings of the entities and relations. The tail entity with the highest score is the inference result. Decoder inferences triples independently, without consideration of graph information. Therefore, this paper proposes a graph completion algorithm based on contrastive learning. This paper adds a multi-view contrastive learning framework into the model to constrain the embedded information at graph level. The comparison of multiple views in the model constructs different distribution spaces for relations. Different distributions of relations fit each other, which is more suitable for completion tasks. Contrastive learning constraints the embedding vectors of entity and subgraph and enhahces peroformance of the task. Experiments are carried out on two datasets. The results show that MRR is improved by 12.6% over method A2N and 0.8% over InteractE on FB15k-237 dataset, and 7.3% over A2N and 4.3% over InteractE on WN18RR dataset. Experimental results demonstrate that this model outperforms other completion methods.

Key words: knowledge graph, link prediction, contrastive learning, encoder, decoder

摘要: 知识图谱补全是基于知识图谱中已有的实体和关系,推理新的三元组的过程。现有的方法通常使用编码器-解码器框架,在编码器中使用图卷积神经网络将三元组中的实体和关系编码为嵌入向量,在解码器中根据实体关系的嵌入计算各个尾实体的评分,评分最高的尾实体作为推理结果。解码器部分都是独立地对三元组进行推理,很少考虑图级别的嵌入信息。因此提出了融合对比学习的图谱补全算法,在模型中加入了多视图对比学习,对图级别的嵌入信息进行了约束。模型中多个视图的互相对比为三元组关系构造了不同的分布空间,不同关系分布互相拟合,更适合补全任务的学习。对比学习对实体和子图的嵌入向量的约束,增强了模型的补全效果。在两个基准数据集上进行了实验,结果表明,在数据集FB15k-237中,MRR比方法A2N提高了12.6%,比InteractE提高了0.8%。在数据集WN18RR上,MRR比A2N提高了7.3%,比InteractE提高了4.3%。实验结果表明,该方法优于已有补全算法。

关键词: 知识图谱, 链接预测, 对比学习, 编码器, 解码器