Abstract
Modern Natural Language Understanding (NLU) models demonstrate remarkable performance on standard benchmarks but often fail to capture the logical nuances of generalized quantifiers (GQs) such as "most," "few," and "at least three." This paper investigates the extent to which GQs contribute to model errors across multiple languages. By introducing a taxonomy of quantifiers and evaluating state-of-the-art models on existing benchmarks and a new adversarial dataset, GQNLI, we show that models rely on surface-level pattern matching rather than logical set relations. Results indicate significant performance degradation in the presence of proportional quantifiers and a notable discrepancy in multilingual settings, with models performing near-random on pure logical reasoning tasks.
Introduction
In formal linguistics, generalized quantifiers are operators that describe relationships between sets of entities. Unlike nouns or verbs that refer to specific objects or actions, words like "most" or "some" define the cardinality or proportion of an intersection between sets. For instance, the statement "Most students passed" asserts that the size of the set of students who passed is greater than the size of the set of students who did not.
Despite the success of Transformer-based models like BERT and RoBERTa, their ability to perform the mathematical and logical reasoning required by GQs remains questionable. This study addresses whether these models truly understand the underlying logic of quantifiers or if they simply treat them as keywords. Furthermore, we explore how these challenges manifest in multilingual contexts where the syntax and pragmatics of quantity vary significantly.
Methodology
To systematically evaluate model performance, the researchers employed a four-stage approach grounded in Generalized Quantifier Theory (GQT):
- Taxonomy Development: An 11-way categorization was established to distinguish between different logical properties, specifically separating "counting" quantifiers (e.g., at least three) from "proportional" quantifiers (e.g., less than half).
- Quantifier Identification: Utilizing the Stanza library for dependency parsing combined with regular expressions, the authors automatically identified and tagged quantifiers within existing NLU benchmarks.
- Error Analysis: The study evaluated state-of-the-art models—including BERT, RoBERTa, mBERT, and XLM-R—on subsets of data containing quantifiers to determine if their presence correlated with increased error rates.
- Adversarial Dataset Creation (GQNLI): To isolate quantifier reasoning, the researchers developed the Generalized Quantifier NLI (GQNLI) dataset. This challenge set consists of 300 hypothesis-premise pairs designed to be linguistically simple but logically demanding, focusing on cases where models previously failed or showed high uncertainty.
Data and Benchmarks
The analysis spanned several major NLU benchmarks to ensure a comprehensive evaluation:
- English NLI: SNLI, MultiNLI (MNLI), and Adversarial NLI (ANLI).
- Multilingual NLI: XNLI, covering languages such as Arabic, Chinese, German, Spanish, and Vietnamese.
- Multilingual QA: MLQA and XQuAD.
- GQNLI: The newly developed challenge set for logical robustness.
Key Insights
The Prevalence of Quantifiers
Quantifiers are not marginal linguistic features; they appear in approximately 10% of all hypotheses in standard NLI benchmarks. Their distribution follows Zipf’s law, where a small number of terms (e.g., "all," "some") appear frequently, while complex terms (e.g., "between p and k") are rare, leading to a long tail of logical structures that models seldom encounter during training.
Proportions vs. Counting
A critical finding is that models handle counting quantifiers significantly better than proportional ones. While a model might correctly process "three dogs," it often fails when the logic requires calculating a ratio, such as "more than half." This suggests that models are not performing set-theoretic calculations but are instead relying on simpler heuristics.
Logical Vulnerabilities
Models exhibit catastrophic failure in two specific areas:
- Negation Interaction: When quantifiers interact with negation (e.g., "not many"), models struggle to resolve the resulting set relationship.
- Subsumption and Inclusion: Models frequently fail to recognize entailment based on set inclusion. For example, they may not infer that "six dogs" entails "at least one dog," likely because they prioritize surface-level word overlap over logical entailment.
Results
Across all evaluated tasks, the presence of quantifiers led to a measurable drop in performance. For RoBERTa, this drop was most acute in the ANLI dataset, which is already designed to be challenging.
In multilingual settings (XNLI), a significant discrepancy was observed. Models performed substantially worse on Chinese and Vietnamese quantifier reasoning compared to English, even when the logical structure of the test cases was identical. This suggests that multilingual pre-training does not equally distribute logical reasoning capabilities across languages.
The most striking results came from the GQNLI benchmark. On this pure logic test, the highest-performing model, DeBERTa-v3, achieved an accuracy of only 45-48%. In a three-way classification task (Entailment, Contradiction, Neutral) where the random baseline is 33%, these results indicate that even the most advanced models are barely capable of performing basic quantifier logic.
Conclusion and Future Work
The study demonstrates that generalized quantifiers represent a significant blind spot in current NLU technology. Models currently treat these logical operators as patterns rather than mathematical relations. While the current research is limited by a reliance on regex-based identification and a relatively small adversarial dataset, it points toward a necessary shift in model training. Future work should explore logic-augmented training regimes that explicitly teach models the mathematical properties of quantifiers, rather than relying on the hope that such logic will emerge from raw text exposure.
Summary updated