计算机工程与应用 ›› 2024, Vol. 60 ›› Issue (2): 113-120.DOI: 10.3778/j.issn.1002-8331.2208-0339

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

k阶采样和图注意力网络的知识图谱表示模型

刘文杰,姚俊飞,陈亮   

  1. 1.南京信息工程大学 计算机学院,南京 210044
    2.南京信息工程大学 数字取证教育部工程研究中心,南京 210044
  • 出版日期:2024-01-15 发布日期:2024-01-15

Knowledge Graph Embedding Model Based on k-Order Sampling and Graph Attention Networks

LIU Wenjie, YAO Junfei, CHEN Liang   

  1. 1.School of Computer and Software, Nanjing University of Information Science and Technology, Nanjing 210044, China
    2.Engineering Research Center of Digital Forensics, Ministry of Education, Nanjing University of Information Science and Technology, Nanjing 210044, China
  • Online:2024-01-15 Published:2024-01-15

摘要: 知识图谱表示(KGE)旨在将知识图谱中的实体和关系映射到低维度向量空间而获得其向量表示。现有的KGE模型只考虑一阶近邻,这影响了知识图谱中推理和预测任务的准确性。为了解决这一问题,提出了一种基于[k]阶采样算法和图注意力网络的KGE模型。[k]阶采样算法通过聚集剪枝子图中的[k]阶邻域来获取中心实体的邻居特征。引入图注意力网络来学习中心实体邻居的注意力值,通过邻居特征加权和得到新的实体向量表示。利用ConvKB作为解码器来分析三元组的全局表示特征。在WN18RR、FB15k-237、NELL-995、Kinship数据集上的评价实验表明,该模型在链接预测任务上的性能明显优于最新的模型。此外,还讨论了阶数[k]和采样系数[b]的改变对模型命中率的影响。

关键词: 知识图谱表示, [k]阶采样算法, 图注意力网络, 剪枝子图, 链接预测

Abstract: Knowledge graph embedding (KGE) aims to map entities and relations of knowledge graph into a low-dimensional space to obtain its vector representation. Existing KGE models only consider the first-order neighbors, which influence the accuracy of reasoning and prediction tasks in knowledge graph. In order to solve this problem, a novel KGE model based on [k]-order sampling algorithm and graph attention networks is proposed. Firstly, a [k]-order sampling algorithm is proposed to obtain the neighbors’ features of a central entity by aggregating [k]-order neighborhood in the pruned subgraph. Then, the graph attention networks are introduced to learn the attention values of the central entity’s neighbors, and the new entity embedding is obtained by the weighted sum of neighbors’ features. Finally, the ConvKB is used as a decoder to analyze the global embedding property of a triple. Evaluation experiments on several datasets, WN18RR, FB15k-237, NELL-995, Kinship, reveal that the model performs better than the state-of-the-art models on the task of link prediction. Besides, the influence on the model hit rate while changing order [k] or sampling coefficient [b] has been discussed.

Key words: knowledge graph embedding, [k]-order sampling algorithm, graph attention networks, pruned subgraph, link prediction