Source-linked AI summary
Birds have four legs?! NumerSense: Probing Numerical Commonsense Knowledge of Pre-trained Language Models
Bill Yuchen Lin, Seyeon Lee, Rahul Khanna, Xiang Ren
TL;DR
The paper examines whether pre-trained language models encode numerical commonsense knowledge. It introduces a probing dataset and finds that models remain substantially weaker than humans, despite distant-supervision fine-tuning.
Problem
The paper examines whether pre-trained language models can support commonsense knowledge, including numerical commonsense knowledge.
Method
The authors introduce NUMERSENSE, a human-verified probing task that ranks number words in masked-word predictions and evaluates hit@1/2/3 accuracy.
Results
Fine-tuning improved accuracy from 37.63 to 50.00 for BERT-large and from 45.85 to 54.06 for RoBERTa-large, but performance remained far below humans.
Takeaways & Limitations
NUMERSENSE provides a basis for improving masked language models’ numerical and other concrete forms of commonsense knowledge.
Abstract
from arXiv · showhide
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).
1 Introduction
Prior work suggests PTLMs encode commonsense knowledge, but this paper finds that they perform poorly when masked-word prediction requires numerical commonsense reasoning. The paper introduces a probing dataset and evaluates both accuracy and robustness, finding persistent gaps from human performance.
- PTLMs have been reported to encode commonsense knowledge, motivating investigation of whether their representations capture numerical relations between entities.
- NumerSense probes numerical commonsense by ranking number words for masked positions, such as predicting “two” in “A bird usually has [MASK] legs.”
- 3,145 probes cover eight categories, including everyday objects, biology, and geometry, with adversarial examples designed to test robustness.
- PTLMs remain much worse than humans, although distant-supervision fine-tuning can improve performance.
2 The NUMERSENSE Probing Task
NUMERSENSE evaluates whether PTLMs rank the correct numerical answer highest among candidate number words in masked statements. The dataset combines manually verified commonsense assertions across eight categories with adversarial variants and additional fine-tuning data.
- 2.2 Probing Data Collection: The dataset was built from commonsense assertions, manually refined and vetted until 1,131 statements were accepted by all annotators.
- 2.3 Adversarial Examples: Adversarial examples insert adjectives before the noun involved in numerical reasoning to test robustness under simple perturbations.Candidate adjectives were obtained from ConceptNet triples and further selected or modified by human annotators.
- 2.2 Probing Data Collection: The probes cover eight numerical-commonsense categories ranging from tangible everyday objects to geometry.
- 2.5 Distant Supervision: GenericsKB supplied 10,492 human-verified sentences for fine-tuning PTLMs on numerical commonsense statements.
3 Empirical Analysis
The experiments compare zero-shot and distantly supervised PTLMs on NUMERSENSE using masked-number ranking, with human performance as a reference. Fine-tuning improves results, but models remain substantially below humans and are vulnerable to adversarial probes.
- Experimental setup: The study evaluates BERT and RoBERTa in zero-shot and distantly supervised fine-tuning settings, using masked-word prediction on NUMERSENSE.The evaluation ranks number words from the model’s vocabulary distribution and reports hit@1/2/3 accuracy.
- Human evaluation: Human performance is estimated from majority labels produced by two groups of three participants, with one group using external information and the other taking a closed-book test.The study also reports GPT-2 performance using iterative masked-word filling and perplexity ranking.
- Experimental results: RoBERTa consistently outperforms BERT in zero-shot evaluation, and larger model size is associated with a clear performance gain.The authors suggest RoBERTa’s larger training corpus and stronger focus on masked language modeling may contribute to its advantage.
- Experimental results: 37.63 →50.00 for BERT-large and 45.85 →54.06 for RoBERTa-large after fine-tuning, although both remain far below human closed-book performance.The reported gains show improvement from additional supervision without reaching the human reference.
- Robustness: All models incur a significant performance drop on adversarial examples compared with the Core Probes set, indicating brittleness even after fine-tuning.The comparison uses 1,131 Core Probes and 3,145 adversarial examples to assess robustness.
4 Case Studies
Case studies examine object bias and attention distributions to explain why PTLMs struggle with numerical commonsense probes. The analyses indicate dominant answer preferences and weak attention to the subject–number relationship.
- Object bias: BERT-Large predicts “four” for “A bird usually has [MASK] legs,” motivating an investigation of object-related answer bias.The case study tests whether the prediction persists when surrounding words change.
- Object bias: Across 1,000 randomly generated substitutions, BERT and RoBERTa show dominant answers in their softmax distributions, while RoBERTa appears less biased.The authors associate the reduced bias with RoBERTa’s modified pre-training strategy.
- Attention distribution: In attention analysis, “has” receives maximum attention in early and middle layers, while “two” receives maximum self-attention near the end.The analysis focuses on the sentence “A bird usually has two legs.”
- Attention distribution: “Birds” and “legs” consistently receive low attention, suggesting that the models may lose the relationship between subject, object, and number words.This provides a proposed explanation for poor numerical commonsense probing performance.
5 Open-Domain ‘How-Many’ Questions
NUMERSENSE probes whether models’ numerical commonsense can support open-domain “how-many” questions. The evaluated QA model achieves only 15.4% accuracy, indicating that this application remains difficult.
- Application: NUMERSENSE examples are reframed as open-domain questions such as “how many legs does a fly usually have?”, providing a downstream application for successful probes.The paper describes these questions as targeting “how-many” commonsense.
- Evaluation: 15.4% accuracy is achieved by the state-of-the-art open-domain QA model evaluated on converted NUMERSENSE examples.The model was trained on Natural Questions, with masked positions replaced by “how many.”
- Evaluation: The QA model performs even worse than BERT-base without fine-tuning on the converted probes.The paper reports this comparison directly after describing the conversion procedure.
- Implication: Improving NUMERSENSE performance could help improve performance on open-domain “how-many” questions.This is presented as the practical implication of the downstream evaluation.
7 Conclusion
The paper presents NUMERSENSE as a probing task and diagnostic dataset for inducing numerical commonsense knowledge from pre-trained language models. BERT and RoBERTa perform poorly even with distant-supervision fine-tuning, motivating further work on numerical and concrete commonsense knowledge.
- Contribution: NUMERSENSE is a probing task designed to induce numerical commonsense knowledge from pre-trained language models.The task is accompanied by a diagnostic dataset verified by human annotators and covering eight topics.
- Findings: BERT and RoBERTa perform surprisingly poorly even after fine-tuning with high-quality distant supervision.The conclusion frames this as the central empirical finding.
- Implication: The probing task and dataset are intended to provide a basis for improving masked language models’ numerical and other concrete commonsense knowledge.This states the paper’s supported forward-looking implication without extending beyond the authors’ scope.