Abstract
Recent works show that pre-trained language models (PTLMs), such as BERT, possess certain commonsense and factual knowledge. They suggest that it is promising to use PTLMs as "neural knowledge bases" via predicting masked words. Surprisingly, we find that this may not work for numerical commonsense knowledge (e.g., a bird usually has two legs). In this paper, we investigate whether and to what extent we can induce numerical commonsense knowledge from PTLMs as well as the robustness of this process. To study this, we introduce a novel probing task with a diagnostic dataset, NumerSense, containing 13.6k masked-word-prediction probes (10.5k for fine-tuning and 3.1k for testing). Our analysis reveals that: (1) BERT and its stronger variant RoBERTa perform poorly on the diagnostic dataset prior to any fine-tuning; (2) fine-tuning with distant supervision brings some improvement; (3) the best supervised model still performs poorly as compared to human performance (54.06% vs 96.3% in accuracy).
Introduction
While pre-trained language models (PTLMs) like BERT and RoBERTa are often hailed as "neural knowledge bases," they struggle significantly with basic numerical common sense. Most common sense benchmarks focus on qualitative relationships (e.g., "fire is hot"), but this paper identifies a specific, under-explored gap: numerical common sense. This is the ability to understand typical numeric relations between entities—knowing that a bicycle has two tires, a cube has six faces, or an ant has six legs. If AI is to truly understand the world or act as a reliable knowledge base, it must avoid basic hallucinations like attributing extra limbs to animals.
Methodology
The researchers treat PTLMs as "masked word predictors," using probes such as "A bird usually has [MASK] legs." The study evaluates models in two primary settings: Zero-shot, probing models directly after pre-training, and Distant Supervision, where models are fine-tuned on a large corpus of generic factual statements from GenericsKB.
Crucially, the study introduces adversarial probes to test robustness. By adding a "meaningless" but descriptive adjective—for example, changing "A car usually has [MASK] wheels" to "A car usually has [MASK] round wheels"—the researchers found that models are surprisingly brittle, often changing their numerical prediction despite the semantic meaning remaining identical.
The NumerSense Dataset
To systematically study this phenomenon, the authors introduced NUMERSENSE, a novel diagnostic benchmark:
- Size: 13.6k masked-word-prediction probes (10.5k for training and 3.1k for testing).
- Source: Probes were curated from the Open Mind Common Sense (OMCS) corpus and manually refined to ensure high quality.
- Diversity: The dataset covers eight categories: Everyday Objects, Biology, Geometry, Units, Math, Physics, Geography, and Miscellaneous.
Results and Analysis
The performance gap between AI and humans is stark. Humans achieved 96.3% accuracy on the core probes, while the strongest baseline, RoBERTa-Large, managed only 45.85% in a zero-shot setting. Even after fine-tuning, RoBERTa-Large only improved to 54.06%, trailing humans by over 40 points.
Several key insights emerged from the analysis:
- Object Bias: Models often exhibit a bias toward specific numbers regardless of context. BERT-Large frequently predicts "four" for legs because "four legs" is a common phrase in its training data, even when the subject is a bird.
- Brittleness to Adjectives: Adding simple, redundant adjectives frequently causes the model to change its numerical prediction, suggesting the models rely on surface-level pattern matching rather than reasoning.
- Attention Failures: Analysis of attention heads revealed that models often focus on the root verb (e.g., "has") rather than the subject (e.g., "bird") or object (e.g., "legs"), losing the crucial link between the entity and its count.
Conclusion
Current PTLMs lack the inductive biases necessary to handle semantic roles and numerical dependencies effectively. Simply increasing the volume of training text does not solve the numerical common sense problem. Future work should focus on developing pre-training strategies that control for masked language modeling biases and incorporating structured knowledge, such as dependency parsing, to help models understand what they are counting. NUMERSENSE serves as a critical benchmark for developing more robust neural knowledge bases that align with basic physical reality.
Summary updated