计算机工程与应用 ›› 2025, Vol. 61 ›› Issue (20): 228-237.DOI: 10.3778/j.issn.1002-8331.2407-0199

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

利用多头注意力融合数值属性的知识图谱嵌入方法

冯文龙,张东,李冠宇   

  1. 大连海事大学 信息科学技术学院,辽宁 大连 116026
  • 出版日期:2025-10-15 发布日期:2025-10-15

MHAKGE: Knowledge Graph Embedding Method Using Multi-Head Attention for Fusing Numerical Attributes

FENG Wenlong, ZHANG Dong, LI Guanyu   

  1. School of Information Sciences and Technology, Dalian Maritime University, Dalian, Liaoning 116026, China
  • Online:2025-10-15 Published:2025-10-15

摘要: 知识图谱作为结构化的语义知识库通过实体与关系表示现实世界。传统的知识图谱嵌入方法往往忽略了知识图谱中的数值信息,将数值信息通过数值编码的方式纳入知识图谱的链接预测过程,并利用多头注意力机制结合数值信息提升知识图谱链接预测任务的能力。研究通过自监督学习方法对已有的知识图谱数据生成正样本与负样本扩展数据集,提高模型对数据的利用效率。采用对比损失函数与交叉熵损失函数优化模型性能。实验部分选取了数据集Spotify、US-cities与Credit,并在数据集上进行链接预测实验,在MRR指标上相较于现有最佳模型分别提升5.54%、4.03%与1.12%,表明了该研究方法在链接预测任务中的有效性。

关键词: 知识图谱, 链接预测, 多头注意力, 实体嵌入, 自监督学习

Abstract: As a structured semantic knowledge base, the knowledge graph represents the real world through entities and relationships. Traditional knowledge graph embedding methods often ignore the numerical information in the knowledge graph. In this paper, numerical information is incorporated into the link prediction process of knowledge graph through numerical coding, and the multi-head attention mechanism combined with numerical information is used to improve the ability of the link prediction task of knowledge graph. The self-supervised learning method is used to generate positive and negative samples from the existing knowledge graph data to expand the dataset, thereby improving the efficiency of the model’s use of data. The performance of the model is optimized by comparing the loss function and the cross-entropy loss function. In the experimental part, the datasets Spotify, US-cities and Credit are selected, and the link prediction experiments are carried out on the datasets, and the MRR indicators are improved by 5.54%, 4.03% and 1.12% respectively compared with the existing best models, indicating the effectiveness of the research method in the link prediction task.

Key words: knowledge graph, link prediction, multi-head attention, entity embedding, self-supervised learning