Mask and Reason: Pre-Training Knowledge Graph Transformers for Complex Logical Queries
Xiao Liu, Shiyu Zhao, Kai Su, Yukuo Cen, Jiezhong Qiu, Mengdi Zhang, Wei Wu, Yuxiao Dong, Jie Tang
Abstract
Knowledge graph (KG) embeddings have been a mainstream approach for reasoning over incomplete KGs. However, limited by their inherently shallow and static architectures, they can hardly deal with the rising focus on complex logical queries, which comprise logical operators, imputed edges, multiple source entities, and unknown intermediate entities. In this work, we present the Knowledge Graph Transformer (kgTransformer) 1 with masked pre-training and fine-tuning strategies. We design a KG triple transformation method to enable Transformer to handle KGs, which is further strengthened by the Mixture-of-Experts (MoE) sparse activation. We then formulate the complex logical queries as masked prediction and introduce a two-stage masked pre-training strategy to improve transferability and generalizability. Extensive experiments on two benchmarks demonstrate that kgTransformer can consistently outperform both KG embedding-based baselines and advanced encoders on nine in-domain and out-of-domain reasoning tasks. Additionally, kgTransformer can reason with explainability via providing the full reasoning paths to interpret given answers.
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.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext 11efd06d-4b0d-4499-b72c-1678c8ff91cbCited by top-tier papers21
- GraphMAE2: A Decoding-Enhanced Masked Self-Supervised Graph LearnerZhenyu Hou, Yufei He, Yukuo Cen, Xiao Liu et al.WWW 2023 · 183 citations
- Rethinking Tokenizer and Decoder in Masked Graph Modeling for MoleculesZhiyuan Liu, Yaorui Shi, An Zhang, Enzhi Zhang et al.NeurIPS 2023 · 71 citations
- GITA: Graph to Visual and Textual Integration for Vision-Language Graph ReasoningYanbin Wei, Shuai Fu, Weisen Jiang, Zejian Zhang et al.NeurIPS 2024 · 56 citations
- Complex Query Answering on Eventuality Knowledge Graph with Implicit Logical ConstraintsJiaxin Bai, Xin Liu, Weiqi Wang, Chen Luo et al.NeurIPS 2023 · 46 citations
- Structure Pretraining and Prompt Tuning for Knowledge Graph TransferWen Zhang, Yushan Zhu, Mingyang Chen, Yuxia Geng et al.WWW 2023 · 34 citations
Builds on18
- Open Graph Benchmark: Datasets for Machine Learning on GraphsWeihua Hu, Matthias Fey, Marinka Zitnik, Yuxiao Dong et al.NeurIPS 2020 · 3,935 citations
- Graph Contrastive Learning with AugmentationsYuning You, Tianlong Chen, Yongduo Sui, Ting Chen et al.NeurIPS 2020 · 3,042 citations
- GShard: Scaling Giant Models with Conditional Computation and Automatic ShardingDmitry Lepikhin, HyoukJoong Lee, Yuanzhong Xu, Dehao Chen et al.ICLR 2021 · 1,954 citations
- Strategies for Pre-training Graph Neural NetworksWeihua Hu, Bowen Liu, Joseph Gomes, Marinka Zitnik et al.ICLR 2020 · 1,744 citations
- Do Transformers Really Perform Badly for Graph Representation?Chengxuan Ying, Tianle Cai, Shengjie Luo, Shuxin Zheng et al.NeurIPS 2021 · 1,632 citations
Related papers
- Enhancing Transformers for Generalizable First-Order Logical EntailmentTianshi Zheng, Jiazheng Wang, Zihao Wang, Jiaxin Bai et al.ACL 2025 · 7 citations
- Logic-Aware Knowledge Graph Reasoning for Structural Sparsity under Large Language Model SupervisionYudai Pan, Jiajie Hong, Tianzhe Zhao, Lingyun Song et al.WWW 2025 · 1 citation
- Multi-Aspect Explainable Inductive Relation Prediction by Sentence TransformerZhixiang Su, Di Wang, Chunyan Miao, Lizhen CuiAAAI 2023 · 16 citations
- SQUIRE: A Sequence-to-sequence Framework for Multi-hop Knowledge Graph ReasoningYushi Bai, Xin Lv, Juanzi Li, Lei Hou et al.EMNLP 2022 · 19 citations
- KnowFormer: Revisiting Transformers for Knowledge Graph ReasoningJunnan Liu, Qianren Mao, Weifeng Jiang, Jianxin LiICML 2024 · 6 citations
