KnowFormer: Revisiting Transformers for Knowledge Graph Reasoning
Junnan Liu, Qianren Mao, Weifeng Jiang, Jianxin Li
Abstract
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.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Cited by top-tier papers5
- Deep sequence models tend to memorize geometrically; it is unclear whyShahriar Noroozizadeh, Vaishnavh Nagarajan, Elan Rosenfeld, Sanjiv KumarICML 2026 · 11 citations
- DuetGraph: Coarse-to-Fine Knowledge Graph Reasoning with Dual-Pathway Global-Local FusionJin Li, Zezhong Ding, Xike XieNeurIPS 2025 · 5 citations
- Information-Theoretic Minimal Sufficient Representation for Multi-Domain Knowledge Graph CompletionJiawei Sheng, Taoyu Su, Weiyi Yang, Linghui Wang et al.AAAI 2026 · 2 citations
- Towards Multimodal Continual Knowledge Embedding wth Modality Forgetting ModulationXiaowen Jiang, Jing Yang, Shundong Yang, Yuan Gao et al.AAAI 2026
- Conditional Diffusion Guided Knowledge Transfer for Multi-Domain Knowledge Graph CompletionJiawei Sheng, Taoyu Su, Xixun Lin, Xiaodong Li et al.WWW 2026
Builds on31
- An Image is Worth 16x16 Words: Transformers for Image Recognition at ScaleAlexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn et al.ICLR 2021 · 21,477 citations
- Recipe for a General, Powerful, Scalable Graph TransformerLadislav Rampásek, Michael Galkin, Vijay Prakash Dwivedi, Anh Tuan Luu et al.NeurIPS 2022 · 1,216 citations
- Composition-based Multi-Relational Graph Convolutional NetworksShikhar Vashishth, Soumya Sanyal, Vikram Nitin, Partha P. TalukdarICLR 2020 · 1,105 citations
- Neural Bellman-Ford Networks: A General Graph Neural Network Framework for Link PredictionZhaocheng Zhu, Zuobai Zhang, Louis-Pascal A. C. Xhonneux, Jian TangNeurIPS 2021 · 546 citations
- Inductive Relation Prediction by Subgraph ReasoningKomal K. Teru, Etienne G. Denis, William L. HamiltonICML 2020 · 493 citations
Related papers
- Mask and Reason: Pre-Training Knowledge Graph Transformers for Complex Logical QueriesXiao Liu, Shiyu Zhao, Kai Su, Yukuo Cen et al.KDD 2022 · 38 citations
- ChainsFormer: Numerical Reasoning on Knowledge Graphs From a Chain PerspectiveZe Zhao, Bin Lu, Xiaoying Gan, Gu Tang et al.ICDE 2025 · 1 citation
- AdaRPT: An Adaptive Rule Pattern Transfer Model for Fully Inductive Knowledge Graph ReasoningZhiwen Xie, Zhuo Zhao, Jinjin Ma, Guangyou Zhou et al.SIGIR 2025 · 3 citations
- Transformer-based Reasoning for Learning Evolutionary Chain of Events on Temporal Knowledge GraphZhiyu Fang, Shuai-Long Lei, Xiaobin Zhu, Chun Yang et al.SIGIR 2024 · 17 citations
- ReasoningLM: Enabling Structural Subgraph Reasoning in Pre-trained Language Models for Question Answering over Knowledge GraphJinhao Jiang, Kun Zhou, Wayne Xin Zhao, Yaliang Li et al.EMNLP 2023 · 26 citations
