Natural Language Satisfiability: Exploring the Problem Distribution and Evaluating Transformer-based Language Models

Tharindu Madusanka, Ian Pratt-Hartmann, Riza Batista-Navarro

Introduction

While Large Language Models (LLMs) demonstrate impressive performance across various NLP benchmarks, their true logical reasoning capabilities remain a subject of intense debate. Many existing benchmarks for Natural Language Inference (NLI) are susceptible to surface-level heuristics or statistical shortcuts. This paper, presented at ACL 2024, addresses this gap by investigating Natural Language Satisfiability (NL-SAT)—the fundamental task of determining if a set of sentences is logically consistent.

The NL-SAT Framework

The authors propose a framework that maps specific fragments of English to formal logic complexity classes, ranging from NLOGSPACE to NEXPTIME-complete. By increasing the "expressive power" of the language—from simple syllogisms to complex anaphora—the researchers can precisely measure how computational complexity impacts a model's reasoning ability.

The study defines five distinct fragments of increasing complexity:

  1. $\mathcal{S}$ (Syllogistic): Basic categorical statements (e.g., "Every $p$ is a $q$").
  2. $\mathcal{W}$ (Relative Clauses): Adds restrictive relative clauses.
  3. $\mathcal{V}$ (Transitive Verbs): Introduces relational predicates.
  4. $\mathcal{Z}$ (Transitive + Relative): Combines the features of $\mathcal{W}$ and $\mathcal{V}$.
  5. $\mathcal{A}$ (Anaphora): Includes bound-variable pronouns, significantly increasing complexity.

Identifying the Phase-Change Region

To create a rigorous benchmark, the authors focus on the "phase-change region." In logical systems, the probability of a problem being satisfiable transitions sharply from nearly 1 to nearly 0 as the ratio of constraints to variables increases. The most challenging problems reside in this transition zone, where the probability of satisfiability is approximately 50%.

Phase transition plots for different English fragments, showing the probability of satisfiability as a function of constraint ratios.

Using the Z3 theorem prover, the researchers generated a balanced dataset of 120,000 "hard" instances for each fragment, ensuring that models cannot rely on simple frequency biases.

Experimental Results and Key Insights

The evaluation involved fine-tuning Transformer-based models like T5 and DeBERTa, as well as zero-shot testing of LLMs like GPT-4.

Complexity as a Performance Ceiling

A clear inverse correlation exists between a fragment's theoretical complexity and model performance. While fine-tuned models achieved ~89% accuracy on the simplest syllogistic fragment ($\mathcal{S}$), performance dropped to ~70% for the anaphora fragment ($\mathcal{A}$). This suggests that current architectures struggle with the increased computational demands of higher-order logic.

The Importance of Data and Compositionality

Training on a mixture of fragments improved performance on complex ones, indicating that learning basic inference rules in simpler settings provides a foundation for more difficult tasks. Furthermore, increasing the training data from 120K to 600K mixed instances significantly boosted accuracy on the most complex fragment ($\mathcal{A}$) from 68% to 82.2%.

Failure of Scale Invariance

A critical finding is the models' inability to generalize to problems with more variables (predicates) than encountered during training. Even when the underlying logical rules remained constant, increasing the number of "actors" led to a sharp decline in accuracy. This highlights a lack of true logical generalization in Transformer architectures.

Zero-Shot Performance

In zero-shot settings, most models performed near random chance. GPT-4 was the notable exception, significantly outperforming ChatGPT and LLaMA-2, though it still trailed behind smaller, task-specific fine-tuned models and struggled with increased problem scale.

Conclusion and Future Directions

The study demonstrates that while Transformers can learn to solve logical puzzles within specific constraints, they face significant challenges with computational complexity and scaling. The authors suggest that future research should explore more linguistically diverse datasets and alternative architectures, such as Graph Neural Networks (GNNs), which may be better suited for representing the relational structures inherent in complex logical reasoning.

Summary updated

BibTeX
@inproceedings{madusanka2024natural,
  author = {Tharindu Madusanka and Ian Pratt-Hartmann and Riza Batista-Navarro},
  title = {{Natural Language Satisfiability: Exploring the Problem Distribution and Evaluating Transformer-based Language Models}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2024},
  doi = {10.18653/v1/2024.acl-long.815},
}
Figure