[Paper Review] Measuring Systematic Generalization in Neural Proof Generation with Transformers
This paper investigates how well Transformer language models (TLMs) generalize in logical reasoning tasks by training them to generate natural language proofs for first-order logic problems. Despite strong performance on seen proof lengths, TLMs struggle with length generalization, but improve significantly when trained on longer, exhaustive proofs—particularly backward-chaining strategies—while models trained to generate answers directly outperform those trained to produce proofs.
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.
Motivation & Objective
- To evaluate the systematic generalization capabilities of TLMs in natural language logical reasoning tasks.
- To investigate how training on different proof structures (forward vs. backward chaining) affects generalization.
- To assess the impact of proof length and training objective (proof generation vs. direct answer generation) on generalization performance.
- To determine whether TLMs learn reusable reasoning strategies or rely on superficial patterns in training data.
- To explore whether interpretable, logically consistent proofs can be reliably generated by TLMs for complex inference tasks.
Proposed method
- Fine-tuned TLMs on the CLUTRR benchmark, which provides natural language statements and first-order logic proofs.
- Trained models to generate full natural language proofs using a language modeling objective.
- Evaluated model performance on logical consistency of generated proofs and accuracy of final inference.
- Compared generalization across different proof strategies: forward-chaining, backward-chaining, and no-proof (direct answer generation).
- Used controlled experiments with varying proof lengths to test extrapolation beyond training distribution.
- Analyzed attention patterns and position dependence in proofs to understand model behavior.
Experimental results
Research questions
- RQ1Can TLMs systematically generalize to longer proof sequences than seen during training?
- RQ2Does training on longer, exhaustive proofs improve generalization performance compared to short proofs?
- RQ3Are backward-chaining proofs more effective for generalization than forward-chaining proofs?
- RQ4Does training to generate proofs lead to better generalization than training to directly predict answers?
- RQ5How does the position of the answer within a proof affect model generalization and reasoning reliability?
Key findings
- TLMs exhibit significant length-generalization failure, struggling to generalize to proof sequences longer than those seen during training.
- Models fine-tuned on longer, exhaustive proofs generalize significantly better than those trained on shorter proofs.
- Backward-chaining proofs lead to better generalization performance than forward-chaining proofs, despite being harder to generate.
- Models trained to directly generate answers (without proof generation) generalize better than those trained to produce proofs, suggesting decoupling between reasoning and explanation.
- The position of the answer in the proof sequence strongly influences performance, with backward-chaining placing the answer at the beginning, which models handle more reliably.
- Logical consistency of generated proofs is often compromised, indicating that models may generate plausible-sounding but invalid reasoning chains.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.