mlsanityData to 14 Oct 2026

Mask and Reason: Pre-Training Knowledge Graph Transformers for Complex Logical Queries

arXiv 2208.07638 ↗First posted 16 Aug 2022cs.LG cs.AIcited by 39

On the map: Mixture-of-experts → MoE large language models

Abstract (arXiv)

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) 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.

Key facts. Cited by 39 papers in the map (data through 14 Oct 2026). Placed in MoE large language models, one of 12 directions in Mixture-of-experts. Builds on 32 of its 50 references that are in the map. First posted on arXiv 16 Aug 2022.

Builds on

32 of 50 references.

Closest ancestors · 2

Same direction, newest first

  1. 2020GShard: Scaling Giant Models with Conditional Computation and Automatic Sharding30 Jun
  2. 2017Outrageously Large Neural Networks: The Sparsely-Gated Mixture-of-Experts Layer23 Jan

Other references · 30

  1. 2017Attention Is All You Needcited by 60,361
  2. 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,399
  3. 2019Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformercited by 14,599
  4. 2016Gaussian Error Linear Units (GELUs)cited by 3,502
  5. 2020Open Graph Benchmark: Datasets for Machine Learning on Graphscited by 2,163
  6. 2020Transformer Feed-Forward Layers Are Key-Value Memoriescited by 1,336
  7. 2020Graph Contrastive Learning with Augmentationscited by 1,208
  8. 2019Strategies for Pre-training Graph Neural Networkscited by 971
  9. 2020On Layer Normalization in the Transformer Architecturecited by 922
  10. 2016Complex Embeddings for Simple Link Predictioncited by 902
  11. 2020Self-supervised Learning: Generative or Contrastivecited by 694
  12. 2020Heterogeneous Graph Transformercited by 582
18 more
  1. 2019Graph Transformer Networkscited by 523
  2. 2020GCC: Graph Contrastive Coding for Graph Neural Network Pre-Trainingcited by 463
  3. 2018Hyperbolic Neural Networkscited by 402
  4. 2019Composition-based Multi-Relational Graph Convolutional Networkscited by 396
  5. 2020GPT-GNN: Generative Pre-Training of Graph Neural Networkscited by 303
  6. 2017DeepPath: A Reinforcement Learning Method for Knowledge Graph Reasoningcited by 266
  7. 2020Graph Random Neural Network for Semi-Supervised Learning on Graphscited by 213
  8. 2020Query2box: Reasoning over Knowledge Graphs in Vector Space using Box Embeddingscited by 171
  9. 2020Beta Embeddings for Multi-Hop Logical Reasoning in Knowledge Graphscited by 129
  10. 2018Embedding Logical Queries on Knowledge Graphscited by 120
  11. 2020RNNLogic: Learning Logic Rules for Reasoning on Knowledge Graphscited by 118
  12. 2021FastMoE: A Fast Mixture-of-Expert Training Systemcited by 112
  13. 2020Complex Query Answering with Neural Link Predictorscited by 99
  14. 2022Sequence-to-Sequence Knowledge Graph Completion and Question Answeringcited by 75
  15. 2018Probabilistic Embedding of Knowledge Graphs with Box Lattice Measurescited by 64
  16. 2020Answering Complex Queries in Knowledge Graphs with Bidirectional Sequence Encoderscited by 28
  17. 2021SMORE: Knowledge Graph Completion and Multi-hop Reasoning in Massive Knowledge Graphscited by 17
  18. 2019Neural Query Language: A Knowledge Base Query Language for Tensorflowcited by 3

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2022: 3; 2023: 20; 2024: 12; 2025: 3; 2026: 1.

39 papers.

Sort:

By area:

  1. 2023GraphMAE2: A Decoding-Enhanced Masked Self-Supervised Graph Learnercited by 132
  2. 2023FactKB: Generalizable Factuality Evaluation using Language Models Enhanced with Factual Knowledgecited by 55
  3. 2023Rethinking Tokenizer and Decoder in Masked Graph Modeling for Moleculescited by 49
  4. 2022Relational Attention: Generalizing Transformers for Graph-Structured Taskscited by 41
  5. 2023Neural Graph Reasoning: Complex Logical Query Answering Meets Graph Databasescited by 35
  6. 2024GITA: Graph to Visual and Textual Integration for Vision-Language Graph Reasoningcited by 33
  7. 2024Graph Transformers: A Surveycited by 32
  8. 2023Logical Message Passing Networks with One-hop Inference on Atomic Formulascited by 28
  9. 2023Complex Query Answering on Eventuality Knowledge Graph with Implicit Logical Constraintscited by 21
  10. 2023Structure Pretraining and Prompt Tuning for Knowledge Graph Transfercited by 16
  11. 2023Wasserstein-Fisher-Rao Embedding: Logical Query Embeddings with Local Comparison and Global Transportcited by 16
  12. 2025A Survey of Graph Transformers: Architectures, Theories and Applicationscited by 14
27 more
  1. 2023Sequential Query Encoding For Complex Query Answering on Knowledge Graphscited by 13
  2. 2023Rethinking Complex Queries on Knowledge Graphs with Neural Link Predictorscited by 13
  3. 2023EFOk-CQA: Towards Knowledge Graph Complex Query Answering beyond Set Operationcited by 12
  4. 2023Knowledge Graph Reasoning over Entities and Numerical Valuescited by 11
  5. 2023Structure Guided Multi-modal Pre-trained Transformer for Knowledge Graph Reasoningcited by 8
  6. 2024Multi-domain Knowledge Graph Collaborative Pre-training and Prompt Tuning for Diverse Downstream Taskscited by 8
  7. 2024Effective Instruction Parsing Plugin for Complex Logical Query Answering on Knowledge Graphscited by 8
  8. 2023Multi-Modal Knowledge Graph Transformer Framework for Multi-Modal Entity Alignmentcited by 7
  9. 2023Structural Information Guided Multimodal Pre-training for Vehicle-centric Perceptioncited by 7
  10. 2024Homomorphism Counts as Structural Encodings for Graph Learningcited by 7
  11. 2022A Retrieve-and-Read Framework for Knowledge Graph Link Predictioncited by 6
  12. 2024A Survey of Few-Shot Learning on Graphs: from Meta-Learning to Pre-Training and Prompt Learningcited by 6
  13. 2024HyCubE: Efficient Knowledge Hypergraph 3D Circular Convolutional Embeddingcited by 6
  14. 2025Enhancing Transformers for Generalizable First-Order Logical Entailmentcited by 6
  15. 2022LambdaKG: A Library for Pre-trained Language Model-Based Knowledge Graph Embeddingscited by 5
  16. 2023Knowledge Graphs Queryingcited by 5
  17. 2023HyperFormer: Enhancing Entity and Relation Interaction for Hyper-Relational Knowledge Graph Completioncited by 5
  18. 2024Conditional Logical Message Passing Transformer for Complex Query Answeringcited by 5
  19. 2023iLoRE: Dynamic Graph Representation with Instant Long-term Modeling and Re-occurrence Preservationcited by 4
  20. 2023A Neuro-Symbolic Framework for Answering Graph Pattern Queries in Knowledge Graphscited by 4
  21. 2023Query2Triple: Unified Query Encoding for Answering Diverse Complex Queries over Knowledge Graphscited by 4
  22. 2024Learning Federated Neural Graph Databases for Answering Complex Queries from Distributed Knowledge Graphscited by 4
  23. 2024DTFormer: A Transformer-Based Method for Discrete-Time Dynamic Graph Representation Learningcited by 3
  24. 2024HyperMono: A Monotonicity-aware Approach to Hyper-Relational Knowledge Representationcited by 2
  25. 2024Hi-GMAE: Hierarchical Graph Masked Autoencoderscited by 1
  26. 2025Multi-level Mixture of Experts for Multimodal Entity Linkingcited by 0
  27. 2026Extending Ontologies: From Dense Embeddings to Hybrid Quantum-Fuzzy Systemscited by 0

Similar, not cited

Close in wording, no citation either way

  1. 2023Query Structure Modeling for Inductive Logical Reasoning Over Knowledge Graphs
  2. 2023Complex Logical Reasoning over Knowledge Graphs using Large Language Models
  3. 2022FLEX: Feature-Logic Embedding Framework for CompleX Knowledge Graph Reasoning
  4. 2025A Large Language Model Based Method for Complex Logical Reasoning over Knowledge Graphs
  5. 2025Injecting Knowledge Graphs into Large Language Models
  6. 2025CHAINSFORMER: Numerical Reasoning on Knowledge Graphs from a Chain Perspective
  7. 2024Graph-constrained Reasoning: Faithful Reasoning on Knowledge Graphs with Large Language Models
  8. 2024KnowFormer: Revisiting Transformers for Knowledge Graph Reasoning