Measuring Systematic Generalization in Neural Proof Generation with Transformers
Nicolas Gontier, Koustuv Sinha, Siva Reddy, Christopher Pal
Abstract
We are interested in understanding how well Transformer language models (TLMs) can perform reasoning tasks when trained on knowledge encoded in the form of natural language. We investigate their systematic generalization abilities on a logical reasoning task in natural language, which involves reasoning over relationships between entities grounded in first-order logical proofs. Specifically, we perform soft theorem-proving by leveraging TLMs to generate natural language proofs. We test the generated proofs for logical consistency, along with the accuracy of the final inference. We observe length-generalization issues when evaluated on longer-than-trained sequences. However, we observe TLMs improve their generalization performance after being exposed to longer, exhaustive proofs. In addition, we discover that TLMs are able to generalize better using backward-chaining proofs compared to their forward-chaining counterparts, while they find it easier to generate forward chaining proofs. We observe that models that are not trained to generate proofs are better at generalizing to problems based on longer proofs. This suggests that Transformers have efficient internal reasoning strategies that are harder to interpret. These results highlight the systematic generalization behavior of TLMs in the context of logical reasoning, and we believe this work motivates deeper inspection of their underlying reasoning strategies.
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 e90d36ad-e03f-4f67-af2b-37ff908d0315Cited by top-tier papers16
- The Impact of Positional Encoding on Length Generalization in TransformersAmirhossein Kazemnejad, Inkit Padhi, Karthikeyan Natesan Ramamurthy, Payel Das et al.NeurIPS 2023 · 444 citations
- Testing the General Deductive Reasoning Capacity of Large Language Models Using OOD ExamplesAbulhair Saparov, Richard Yuanzhe Pang, Vishakh Padmakumar, Nitish Joshi et al.NeurIPS 2023 · 145 citations
- Systematic Generalization with Edge TransformersLeon Bergen, Timothy J. O'Donnell, Dzmitry BahdanauNeurIPS 2021 · 62 citations
- Enhancing Reasoning Capabilities of LLMs via Principled Synthetic Logic CorpusTerufumi Morishita, Gaku Morio, Atsuki Yamaguchi, Yasuhiro SogawaNeurIPS 2024 · 60 citations
- The Neural Race Reduction: Dynamics of Abstraction in Gated NetworksAndrew M. Saxe, Shagun Sodhani, Sam Jay LewallenICML 2022 · 52 citations
Builds on5
- Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah et al.NeurIPS 2020 · 64,255 citations
- Measuring Compositional Generalization: A Comprehensive Method on Realistic DataDaniel Keysers, Nathanael Schärli, Nathan Scales, Hylke Buisman et al.ICLR 2020 · 401 citations
- Differentiable Reasoning on Large Knowledge Bases and Natural LanguagePasquale Minervini, Matko Bosnjak, Tim Rocktäschel, Sebastian Riedel et al.AAAI 2020 · 94 citations
- Probing Linguistic SystematicityEmily Goodwin, Koustuv Sinha, Timothy J. O'DonnellACL 2020 · 4 citations
- Location Attention for Extrapolation to Longer SequencesYann Dubois, Gautier Dagan, Dieuwke Hupkes, Elia BruniACL 2020 · 2 citations
Related papers
- Leap-Of-Thought: Teaching Pre-Trained Models to Systematically Reason Over Implicit KnowledgeAlon Talmor, Oyvind Tafjord, Peter Clark, Yoav Goldberg et al.NeurIPS 2020 · 119 citations
- Generalizing Reasoning Problems to Longer LengthsChangnan Xiao, Bing LiuICLR 2025
- When can transformers reason with abstract symbols?Enric Boix-Adserà, Omid Saremi, Emmanuel Abbe, Samy Bengio et al.ICLR 2024 · 21 citations
- Exploring Length Generalization in Large Language ModelsCem Anil, Yuhuai Wu, Anders Andreassen, Aitor Lewkowycz et al.NeurIPS 2022 · 267 citations
- Enhancing Transformers for Generalizable First-Order Logical EntailmentTianshi Zheng, Jiazheng Wang, Zihao Wang, Jiaxin Bai et al.ACL 2025 · 7 citations
