Introduction
Quantifiers such as "all," "some," "at least K," and "most" are fundamental components of human logic and natural language. While modern Transformer-based Language Models (TLMs) demonstrate remarkable fluency, their ability to grasp the underlying logical semantics of these terms remains a subject of debate. Traditional evaluations using Natural Language Inference (NLI) often suffer from "data pollution," where models rely on background knowledge (e.g., "All dogs are mammals") rather than logical reasoning. To address this, researchers from the University of Manchester developed a "purely logical" framework based on model-checking to isolate and test quantifier comprehension.
Methodology: Model-Checking with Natural Language
The study shifts the focus from entailment to model-checking. In this task, a model is presented with a synthetic "world"—a list of facts about individuals and their attributes—and must determine the truth value of a quantified statement regarding that world.
The researchers generated a balanced dataset of 108,000 instances using nine generalized quantifiers: All, Some, At least K, At most K, Less than K, More than K, K (exactly), Most, and Few. To ensure the models could not rely on external facts, the vocabulary was restricted to a neutral set of nouns and professions. The evaluation included fine-tuned models (T5, Flan-T5, DeBERTa-v3) and zero-shot models (ChatGPT, LLaMA-30B, Flan-T5-xxl) using both standard and Chain-of-Thought (CoT) prompting.
Key Findings
Proportionality and Complexity
A primary insight from the study is that not all quantifiers are processed with equal ease. Proportional quantifiers like "most" and "few" proved significantly more challenging than numerical ones like "at least 3." This mirrors cognitive patterns in humans, where proportional reasoning requires more complex mental operations. Additionally, the "exactly K" quantifier was harder for models to master than "at least K," partly due to an inherent "False" bias in random distributions that models had to overcome during training.
Generalization Beyond Training
One of the most significant results was the models' ability to generalize. When fine-tuned on small numerical values (e.g., K=1 to 7), models maintained high accuracy when tested on larger, unseen values. This suggests that the models are learning the abstract logic of the quantifier rather than memorizing specific patterns. Experimental results show that even for values of K as high as 24, fine-tuned models maintain accuracies above 91%.
The Role of Scale and Negation
The study also highlighted the impact of model scale and instruction tuning. While larger models generally performed better, instruction-tuned models like the 11B parameter Flan-T5-xxl often outperformed significantly larger models like LLaMA-30B in zero-shot settings.
Furthermore, the research identified a "negation blindness" in models without specific fine-tuning. Zero-shot performance shows a persistent gap between tasks with and without negations, although accuracy improves with parameter count. Once fine-tuned on the model-checking task, however, models showed a drastic improvement in handling logical negations (e.g., "not" or "non-").
Conclusion
The findings indicate that while TLMs can be trained to achieve high logical accuracy (90-95% after fine-tuning), their zero-shot performance remains relatively low (53-70%). The difficulty with proportional quantifiers and the necessity of instruction tuning suggest that logical reasoning is not a guaranteed byproduct of scale alone. Future work will explore more complex logical tasks, such as satisfiability, and expand the scope to include more ambiguous quantifiers like "many" or "several."
Summary updated