mlsanityData to 14 Oct 2026

Enhancing Transformers for Generalizable First-Order Logical Entailment

arXiv 2501.00759 ↗First posted 1 Jan 2025cs.CL cs.AIcited by 6

Not on the map. Why?

Abstract (arXiv)

Transformers, as the fundamental deep learning architecture, have demonstrated great capability in reasoning. This paper studies the generalizable first-order logical reasoning ability of transformers with their parameterized knowledge and how to improve it. Transformers' capability of first-order reasoning is further captured by whether they can conduct first-order logical entailment, which is quantitatively measured by their performance in answering knowledge graph queries. We establish the connections between (1) two types of distribution shifts studied in out-of-distribution generalization and (2) unseen knowledge and query settings discussed in the task of knowledge graph query answering, which makes it possible to characterize the fine-grained generalizability. Results on our comprehensive dataset showed that transformers textitoutperform previous methods designed particularly for this task and provided detailed empirical evidence about the impact of the input query syntax, token embedding, and transformer architectures on their reasoning capability. Interestingly, our results revealed the mismatch of positional encoding and other design choices of transformer architectures in previous practices. Motivated by this, we propose TEGA, a logic-aware architecture that significantly improves the performance in generalizable first-order logical entailment.

Key facts. Cited by 6 papers in the map (data through 14 Oct 2026). Builds on 45 of its 71 references that are in the map. First posted on arXiv 1 Jan 2025.

Builds on

45 of 71 references.

References · 45

  1. 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,399
  2. 2015Rethinking the Inception Architecture for Computer Visioncited by 5,475
  3. 2021Measuring Mathematical Problem Solving With the MATH Datasetcited by 5,371
  4. 2021RoFormer: Enhanced Transformer with Rotary Position Embeddingcited by 4,703
  5. 2018How Powerful are Graph Neural Networks?cited by 4,393
  6. 2017A Broad-Coverage Challenge Corpus for Sentence Understanding through Inferencecited by 2,682
  7. 2020DeBERTa: Decoding-enhanced BERT with Disentangled Attentioncited by 2,181
  8. 2015A large annotated corpus for learning natural language inferencecited by 1,847
  9. 2018Self-Attention with Relative Position Representationscited by 1,120
  10. 2014Embedding Entities and Relations for Learning and Inference in Knowledge Basescited by 932
  11. 2016Complex Embeddings for Simple Link Predictioncited by 902
  12. 2018Adversarial Attacks on Neural Networks for Graph Datacited by 397
33 more
  1. 2023Logic-LM: Empowering Large Language Models with Symbolic Solvers for Faithful Logical Reasoningcited by 391
  2. 2020Generative Language Modeling for Automated Theorem Provingcited by 388
  3. 2019Analysing Mathematical Reasoning Abilities of Neural Modelscited by 335
  4. 2019KG-BERT: BERT for Knowledge Graph Completioncited by 324
  5. 2018Adversarial Attack on Graph Structured Datacited by 301
  6. 2019Abductive Commonsense Reasoningcited by 301
  7. 2019Deep Learning for Symbolic Mathematicscited by 270
  8. 2020Transformers as Soft Reasoners over Languagecited by 270
  9. 2023Label Words are Anchors: An Information Flow Perspective for Understanding In-Context Learningcited by 236
  10. 2020Query2box: Reasoning over Knowledge Graphs in Vector Space using Box Embeddingscited by 171
  11. 2018Measuring abstract reasoning in neural networkscited by 166
  12. 2020Beta Embeddings for Multi-Hop Logical Reasoning in Knowledge Graphscited by 129
  13. 2018Embedding Logical Queries on Knowledge Graphscited by 120
  14. 2020Complex Query Answering with Neural Link Predictorscited by 99
  15. 2023Testing the General Deductive Reasoning Capacity of Large Language Models Using OOD Examplescited by 84
  16. 2021ConE: Cone Embeddings for Multi-Hop Reasoning over Knowledge Graphscited by 78
  17. 2022Neural-Symbolic Models for Logical Queries on Knowledge Graphscited by 61
  18. 2023Grokking of Hierarchical Structure in Vanilla Transformerscited by 53
  19. 2023Towards a Mechanistic Interpretation of Multi-Step Reasoning Capabilities of Language Modelscited by 50
  20. 2022Mask and Reason: Pre-Training Knowledge Graph Transformers for Complex Logical Queriescited by 39
  21. 2023Neural Graph Reasoning: Complex Logical Query Answering Meets Graph Databasescited by 35
  22. 2022Answering Complex Logical Queries on Knowledge Graphs via Query Computation Tree Optimizationcited by 29
  23. 2020Answering Complex Queries in Knowledge Graphs with Bidirectional Sequence Encoderscited by 28
  24. 2023Logical Message Passing Networks with One-hop Inference on Atomic Formulascited by 28
  25. 2021Benchmarking the Combinatorial Generalizability of Complex Query Answering on Knowledge Graphscited by 21
  26. 2023Complex Query Answering on Eventuality Knowledge Graph with Implicit Logical Constraintscited by 21
  27. 2023UNcommonsense Reasoning: Abductive Reasoning about Uncommon Situationscited by 19
  28. 2023Advancing Abductive Reasoning in Knowledge Graphs through Complex Logical Hypothesis Generationcited by 19
  29. 2023Sequential Query Encoding For Complex Query Answering on Knowledge Graphscited by 13
  30. 2024CLR-Fact: Evaluating the Complex Logical Reasoning Capability of Large Language Models over Factual Knowledgecited by 9
  31. 2024Complex Reasoning over Logical Queries on Commonsense Knowledge Graphscited by 8
  32. 2023Towards Autonomous Hypothesis Verification via Language Models with Minimal Guidancecited by 7
  33. 2023Learning Language Representations with Logical Inductive Biascited by 5

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2025: 4; 2026: 2.

6 papers.

Similar, not cited

Close in wording, no citation either way

  1. 2024Grokked Transformers are Implicit Reasoners: A Mechanistic Journey to the Edge of Generalization
  2. 2026To See the Unseen: on the Generalization Ability of Transformers in Symbolic Reasoning
  3. 2023Assessing Logical Reasoning Capabilities of Encoder-Only Transformer Models
  4. 2025Quantifying Logical Consistency in Transformers via Query-Key Alignment
  5. 2026Loop, Think, & Generalize: Implicit Reasoning in Recurrent-Depth Transformers
  6. 2026Is Grokking Worthwhile? Functional Analysis and Transferability of Generalization Circuits in Transformers
  7. 2023Transformers in the Service of Description Logic-based Contexts
  8. 2024Transformer-based Language Models for Reasoning in the Description Logic ALCQ