Source-linked AI summary

Pushing the Limits of Rule Reasoning in Transformers through Natural Language Satisfiability

Kyle Richardson, Ashish Sabharwal

arXiv:2112.09054v1cs.CL

TL;DR

Existing reasoning benchmarks often sample easy instances, making transformer capabilities difficult to assess reliably. The paper constructs harder natural-language satisfiability datasets by grounding language tasks in SAT and sampling hard SAT regions; transformers can solve many of them with sufficient data, but their scale-invariant generalization remains limited.

Abstract

from arXiv · show

Investigating the reasoning abilities of transformer models, and discovering new challenging tasks for them, has been a topic of much interest. Recent studies have found these models to be surprisingly strong at performing deductive reasoning over formal logical theories expressed in natural language. A shortcoming of these studies, however, is that they do not take into account that logical theories, when sampled uniformly at random, do not necessarily lead to hard instances. We propose a new methodology for creating challenging algorithmic reasoning datasets that focus on natural language satisfiability (NLSat) problems. The key idea is to draw insights from empirical sampling of hard propositional SAT problems and from complexity-theoretic studies of language. This methodology allows us to distinguish easy from hard instances, and to systematically increase the complexity of existing reasoning benchmarks such as RuleTaker. We find that current transformers, given sufficient training data, are surprisingly robust at solving the resulting NLSat problems of substantially increased difficulty. They also exhibit some degree of scale-invariance - the ability to generalize to problems of larger size and scope. Our results, however, reveal important limitations too: a careful sampling of training data is crucial for building models that generalize to larger problems, and transformer models' limited scale-invariance suggests they are far from learning robust deductive reasoning algorithms.

Introduction

The paper argues that reasoning benchmarks must include objectively hard instances, then constructs natural-language satisfiability problems by grounding language tasks in hard SAT problems. Transformers solve many such tasks with enough data, but their generalization depends on sampling and remains only partly scale-invariant.

Motivation

  • Hard-instance sampling is necessary because random or ad hoc datasets can undersample difficult cases and overstate models’ algorithmic reasoning ability.The paper frames hardness in terms of objective computational difficulty and asks whether the language and sampling process capture the full problem space.Source: Introduction · p. 2

Methodology

  • The methodology maps a natural-language task T to a hard combinatorial problem P, then samples hard instances of P to create hard instances of T.The formal language is chosen to express computationally hard problems, addressing expressivity and sampling separately.Source: Introduction · p. 2

Natural-language satisfiability

  • Natural-language satisfiability treats rule theories as having satisfying interpretations, with entailment tested indirectly by checking whether adding a negated conjecture makes the theory unsatisfiable.The framework translates hard SAT instances into English rule languages.Source: Introduction · pp. 1–2

Results

  • >90% accuracy on quantified rule theories with up to 70 ground variables is achieved after training on more than 100k examples.The models also generalize from propositional theories with 12 variables to theories with 30 variables while remaining far above random chance.Source: Introduction · p. 2

Limitations

  • Careful training-data sampling is critical, while limited scale-invariance indicates that transformers remain far from learning robust deductive reasoning algorithms.The paper presents these as important caveats despite the positive results on harder NLSat tasks.Source: Introduction · p. 2

Related Work

Prior work shows that transformers can solve some natural-language deduction tasks, but existing datasets emphasize easy reasoning. This paper combines complexity-theoretic language analysis with hard-instance sampling from SAT to expose more difficult cases and evaluate robustness.

Deductive reasoning benchmarks

  • Existing deductive-reasoning datasets, including RuleTaker, focus narrowly on easy fragments despite using a language capable of expressing intractable problems.Models therefore lose robustness when evaluated on harder portions of the problem distribution.Source: Related Work · p. 2

Language complexity

  • Complexity-theoretic studies of natural-language fragments guide the search for rule languages with hard satisfiability behavior.The paper uses worst-case complexity results as a guide for probing model limits rather than treating them as direct empirical evaluations.Source: Related Work · p. 2

Hard-instance sampling

  • Empirical SAT research identifies critical thresholds where constrained instances become hard, motivating sampling from phase-transition regions rather than uniform random formulas.The paper applies techniques developed for hard 3SAT instances to natural-language reasoning problems.Source: Related Work · pp. 2–3

Dataset construction

  • The dataset-construction algorithm samples clause counts, clause sizes, variable assignments, negations, and natural-language templates to generate NLSat datasets.Its inputs include interpolation and negation parameters, a clause-to-variable ratio range, and a stopping condition.Source: Related Work · p. 3

Positioning

  • The work differs from prior hard-algorithmic-problem studies by targeting algorithmic reasoning in natural language and probing pretrained transformers, including their scale-invariance.It also addresses biases caused by randomly sampled algorithmic datasets that can limit generalization.Source: Related Work · p. 3

Dataset Construction and Methodology

The paper constructs natural language satisfiability datasets by translating sampled SAT instances into rule languages, concentrating on critical phase-change regions to obtain harder problems. It compares grounded rule and relative-clause fragments and uses solver-based measurements to show broader difficulty than RuleTaker, while noting practical scale limits.

Dataset Construction and Methodology

Identifying Hard Problems

  • 3SAT hardness depends on the sampling distribution and parameters, so worst-case NP-completeness alone does not make randomly sampled instances difficult.The methodology uses random k-SAT sampling and the clause-to-variable ratio α to identify phase-change behavior.Source: Identifying Hard Problems · pp. 3–4

Grounded Rule Language (GRL)

  • The Grounded Rule Language translates Boolean clauses into grounded propositional if-then rules using English count nouns, yielding compact natural-language satisfiability problems.The main GRL set uses about 50 food-related nouns and varies the underlying SAT variables from 5 to 12.Source: Grounded Rule Language (GRL) · p. 4

Grounded Relative Clause Fragment (RCL)

  • The Grounded Relative Clause Fragment uses quantified English rules that expand over finite domains into propositional formulas with substantially more ground variables without proportionally longer inputs.Its rules are sampled from random 3SAT structures and retain phase-change behavior after universal expansion.Source: Grounded Relative Clause Fragment (RCL) · pp. 4–5

Sampling Strategies and Proposed Datasets

  • Hard sampling produces datasets with a wider range of solver-measured difficulty than RuleTaker, whose median numbers of conflicts and decisions are both zero.The authors also retrofit RuleTaker-like theories with sampled 3SAT structure to construct a harder RuleTaker dataset.Source: Sampling Strategies and Proposed… · p. 5, Table 1 · p. 5
  • The proposed problems remain far smaller and less complex than mainstream SAT instances because variable counts are limited for token-length and training-efficiency reasons.A held-out GRL-eval20,50 set is added to measure scale-invariant reasoning on considerably larger grounded rule problems.Source: Sampling Strategies and Proposed… · pp. 5–6

Experimental Setup

The experiments frame NLSat as binary satisfiability classification and fine-tune pretrained transformers separately on the two rule languages. Evaluation varies problem size, sampling strategy, and held-out scale, with Figure 5 comparing hard, naive, and biased training distributions.

Experimental Setup

  • NLSat is evaluated as binary classification, with models predicting whether a natural-language rule theory is satisfiable or unsatisfiable.Each dataset pairs a natural-language problem with a sat or unsat label.Source: Experimental Setup · p. 6
  • The main experiments fine-tune T5-large and compare it with RoBERTa, using standard label generation, hyperparameter search, and intermediate pretraining on simpler 2SAT instances.Intermediate pretraining on 60k simpler 2SAT examples was found indispensable for stabilizing and improving training efficiency.Source: Experimental Setup · p. 6
  • Evaluation reports accuracy across variable counts and tests generalization from smaller training samples to larger held-out problems, easy and hard instances, and alternative sampling strategies.Models are trained separately for GRL and RCL, while Figure 5 focuses on 10-variable GRL models.Source: Experimental Setup · p. 6, Figure 5 · p. 6
  • A non-pretrained biLSTM baseline performs near random chance, providing an additional check that the tasks are difficult for weaker sequence models.The comparison is consistent with earlier deductive-reasoning experiments cited by the authors.Source: Experimental Setup · p. 6

Results and Findings

Models trained on hard instances solve some difficult deductive reasoning tasks, but their generalization depends strongly on sampling and remains limited for larger problems.

Results and Findings

  • The study frames reliable capability claims as dependent on specifying the target problem distribution rather than relying on uniformly or casually sampled instances.The authors emphasize that the difficulty distribution determines whether a probing evaluation meaningfully tests the intended algorithmic skill.Source: Results and Findings · p. 6

Effective sampling strategies are important for training robustness and reliable evaluation

  • Critical-region SAT sampling improves generalization across problem sizes, whereas naive or biased sampling performs 8 points worse on the hard evaluation subset.The similar results of naive and biased sampling suggest that ad hoc data selection can introduce harmful biases.Source: Results and Findings · pp. 6–7
  • Small changes in problem difficulty can cause dramatic benchmark drops, including a 39-point RoBERTa decrease and an 80% versus 71% easy–hard gap for T55,12.These results show that evaluations focused on easy instances can misrepresent model capability.Source: Results and Findings · p. 7, Table 4 · p. 7

Models trained on hard sets can solve some hard tasks

  • Hard-set training yields high performance on some challenging tasks, reaching about 93–94% accuracy on RCL problems with 60–70 ground variables.Large training collections also outperform baselines on GRL problems with 5–7 variables and RCL problems with 16–48 variables.Source: Results and Findings · p. 7, Table 3 · p. 7

Models exhibit limited generalization

  • Models trained on smaller problems and less data fail to generalize reliably to larger instances, including transfers from 5 variables to 10 or 12 variables.Even the best models fail on GPL-eval, indicating limited acquisition of the underlying deductive algorithms.Source: Results and Findings · p. 7, Table 2 · p. 7

Closing Remarks

The results expose limits in transformer scale-invariance for reasoning over larger text problems and motivate architectures centered on problem decomposition.

Closing Remarks

  • Models show little scale-invariant generalization on hardness-optimized datasets, limiting their ability to transfer reasoning to larger problems.The authors connect this limitation to the broader challenge of aggregating information across increasingly long text inputs.Source: Closing Remarks · p. 8
  • Problem-decomposition architectures are proposed as a fruitful direction for addressing these limitations, supported by the new hard algorithmic tasks and sampling strategies.This is presented as a future research avenue rather than an experimentally established solution.Source: Closing Remarks · p. 8

RuleTaker Details

RuleTaker can express SAT-style reasoning through grounded and quantified rules, enabling hard instances to be constructed by translating and retrofitting random 3SAT formulas.

Complexity of RuleTaker Language

  • RuleTaker’s grounded and quantified rules are expressive enough to encode arbitrary 3SAT formulas, establishing NP-completeness under propositional semantics.The encoding maps satisfiability of the formula to satisfiability of the resulting RuleTaker theory.Source: RuleTaker Details · pp. 9–10
  • The original RuleTaker language includes rule templates covering the four atomic 3SAT clause forms through appropriately placed negation modifiers.Figure 7 presents a subset of the original templates, while example rules instantiate the corresponding clause patterns.Source: Figure 7 · p. 10, RuleTaker Details · p. 10

Retrofitting random 3SAT to RuleTaker Theories

  • The retrofitting algorithm converts random 3SAT into hard RuleTaker instances, illustrated in Figure 6 with rule and facts represented as grounded rules over five variables.Source: RuleTaker Details · p. 10, Figure 6 · p. 10
  • Because RuleTaker also contains 2SAT clauses and unit facts, repeated clause variables are sampled so 3SAT formulas can be converted into these forms.The resulting comparable-size problems use mixtures of 5, 6, and 7 Boolean variables, but remain relatively low complexity.Source: RuleTaker Details · p. 10

RuleTaker version

  • Experiments use the open-world RuleTaker version with Yes, No, and Unknown labels, and correct roughly 1% of official labels using SAT- and SMT-based checks.The corrected dataset addresses apparent translation errors from the closed-world version.Source: RuleTaker Details · p. 10
  • Training uses the depth-3ext split, previously reported to generalize well across depth-based reasoning tasks.The cited implementation note identifies this split as the training source.Source: RuleTaker Details · p. 10
Loading 2112.09054v1…