arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2409.12865cs.AI
收藏

KnowFormer:重新审视Transformer在知识图谱推理中的应用

KnowFormer: Revisiting Transformers for Knowledge Graph Reasoning

Zhongguancun Laboratory(中关村实验室);Beihang University(北京航空航天大学);Nanyang Technological University(南洋理工大学)

Junnan Liu, Qianren Mao, Weifeng Jiang, Jianxin Li

AI总结:

针对基于路径的知识图谱推理方法受限于消息传递网络的问题,本文提出KnowFormer,利用Transformer架构从消息传递视角进行推理,并引入结构感知模块与高效注意力计算,在转导和归纳基准上取得优越性能。

摘要:

知识图谱推理在各种应用中扮演着关键角色,并已引起广泛关注。近年来,基于路径的方法取得了令人瞩目的性能。然而,它们可能面临源于消息传递神经网络约束的限制,例如路径缺失和信息过压缩。在本文中,我们重新审视Transformer在知识图谱推理中的应用,以解决基于路径的方法所面临的约束,并提出了一种新方法KnowFormer。KnowFormer利用Transformer架构,从消息传递的角度对知识图谱进行推理,而非像先前基于预训练语言模型的方法那样通过文本信息进行推理。具体而言,我们基于知识图谱推理的查询原型定义注意力计算,便于便捷构建和高效优化。为了将结构信息融入自注意力机制,我们引入了结构感知模块,分别计算查询、键和值。此外,我们提出了一种高效的注意力计算方法,以实现更好的可扩展性。实验结果表明,在转导和归纳基准上,KnowFormer相比显著基线方法均展现出优越性能。

英文摘要:

Knowledge graph reasoning plays a vital role in various applications and has garnered considerable attention. Recently, path-based methods have achieved impressive performance. However, they may face limitations stemming from constraints in message-passing neural networks, such as missing paths and information over-squashing. In this paper, we revisit the application of transformers for knowledge graph reasoning to address the constraints faced by path-based methods and propose a novel method KnowFormer. KnowFormer utilizes a transformer architecture to perform reasoning on knowledge graphs from the message-passing perspective, rather than reasoning by textual information like previous pretrained language model based methods. Specifically, we define the attention computation based on the query prototype of knowledge graph reasoning, facilitating convenient construction and efficient optimization. To incorporate structural information into the self-attention mechanism, we introduce structure-aware modules to calculate query, key, and value respectively. Additionally, we present an efficient attention computation method for better scalability. Experimental results demonstrate the superior performance of KnowFormer compared to prominent baseline methods on both transductive and inductive benchmarks.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑