Do NLP Models Know Numbers? Probing Numeracy in Embeddings
By Eric Wallace, Yizhong Wang, Sujian Li, Sameer Singh, Matt Gardner. 2019
311 citations recorded by the source corpus.
The ability to understand and work with numbers (numeracy) is critical for many complex reasoning tasks. Currently, most NLP models treat numbers in text in the same way as other tokens—they embed them as distributed vectors. Is this enough to capture numeracy? We begin by investigating the numerical reasoning capabilities of a state-of-the-art question answering model on the DROP dataset. We find this model excels on questions that require numerical reasoning, i.e., it already captures numeracy. To understand how this capability emerges, we probe token embedding methods (e.g., BERT, GloVe) on synthetic list maximum, number decoding, and addition tasks. A surprising degree of numeracy is naturally present in standard embeddings. For example, GloVe and word2vec accurately encode magnitude for numbers up to 1,000. Furthermore, character-level embeddings are even more precise—ELMo captures numeracy the best for all pre-trained methods—but BERT, which uses sub-word units, is less exact.
Subfields: Artificial Intelligence, Large Language Models, Evaluation & Benchmarks
How researchers see this paper
The researchers whose trusted networks rank it highest, strongest advocate first. Every researcher gets a different order.
In Artificial Intelligence
- Mohit Bansal
- Graham Neubig
- Luke S. Zettlemoyer
- Yoav Goldberg
- Hannaneh Hajishirzi
- Percy Liang
- Yejin Choi
- Yonatan Belinkov
In Large Language Models
- Yoav Goldberg
- Hinrich Schütze
- Zhiyuan Liu
- Jonathan Berant
- Anna Rogers
- Graham Neubig
- Olga Kovaleva
- Anna Rumshisky
In Evaluation & Benchmarks
- Jonathan Berant
- Matt Gardner
- Xiang Ren
- Anna Rogers
- Alon Talmor
- Pengfei Liu
- Sameer Singh
- Chitta Baral
Citations in the corpus
- Reasoning Like Program Executors (2022, background): “…though reaching near-human performance on several tasks, pre-trained LMs are still far behind expectations in reasoning-required scenarios (Rae 1. et al., 2021), such as numerical reasoning (Wallace et al., 2019; Ravichander et al., 2019) and logical reasoning (Yu et al., 2020; Liu et al., 2020).”
- oLMpics-On What Language Model Pre-training Captures (2019, background): “…often linear, randomly initialized probe, to determine whether the representations hold relevant information (Ettinger et al., 2016; Adi et al., 2016; Belinkov and Glass, 2019; He-witt and Manning, 2019; Wallace et al., 2019; Rozen et al., 2019; Warstadt et al., 2019; Richard-son et al., 2019).”
- Pre-train, Prompt, and Predict: A Systematic Survey of Prompting Methods in Natural Language Processing (2021, background): “Within the context of pre-trained LMs, researchers have found that pre-trained embeddings and LMs can perform simple operations such as addition and subtraction when the number of digits is small, but fail when the numbers are larger [9, 88, 139].”
- A Primer in BERTology: What We Know About How BERT Works (2020, background): “This is in line with the recent findings on adversarial attacks, with models disturbed by nonsensical inputs (Wallace et al., 2019a), and suggests that BERT’s encoding of syntactic structure does not indicate that it actually relies on that knowledge .”
- Pre-Trained Models: Past, Present and Future (2021, background): “Recently, human-in-the-loop methods (Wallace et al., 2019b; Nie et al., 2020) have been applied to generate more natural, valid, and diverse adversarial examples, which brings larger challenge and expose more properties and problems of PTMs.”
- Impact of Pretraining Term Frequencies on Few-Shot Reasoning (2022, methodology): “Numeracy and Temporal Reasoning in LMs Our work contributes a larger body of work dedicated to studying numeracy in word embeddings and language models (Spithourakis & Riedel, 2018; Wallace et al., 2019).”
- Birds Have Four Legs?! NumerSense: Probing Numerical Commonsense Knowledge of Pre-trained Language Models (2020, background): “Wallace et al. (2019) probe PTLMs in terms of the ability to represent numeracy tokens by a regression task (e.g., “71” → 71.0), and also find that BERT is not good at encoding numerical tokens.”
- Investigating the Limitations of Transformers with Simple Arithmetic Tasks (2021, methodology): “Character-level models such as ELMO (Peters et al., 2018) have stronger numeracy than sub-word models such as BERT (Devlin et al., 2019), perhaps because two numbers that are similar in value can have very different sub-word tokenizations (Wallace et al., 2019).”
- Turning Tables: Generating Examples from Semi-structured Tables for Endowing Language Models with Reasoning Skills (2021, background): “, 2019, 2020), numerical operations (Wallace et al., 2019; Hidey et al., 2020), and quantification (Warstadt et al.”
- TABBIE: Pretrained Representations of Tabular Data (2021, background): “Additionally, BERT has been shown to encode some degree of numeracy (Wallace et al., 2019), which helps represent cells with numerical content.”
- Math Word Problem Solving with Explicit Numerical Values (2021, background): “Numerical Value Representations: Some recent studies have explored the numerical value representations in language models (Naik et al., 2019; Chen et al., 2019; Wallace et al., 2019).”
- Investigating the Limitations of the Transformers with Simple Arithmetic Tasks (2021, unknown): “, 2019), perhaps because two numbers that are similar in value can have very different sub-word tokenizations (Wallace et al., 2019).”
- A Survey of Deep Learning for Mathematical Reasoning (2022, unknown): “Recent studies have shown that these tokenization approaches are suboptimal (Wallace et al., 2019; Lin et al., 2020; Zhang et al., 2020e; Thawani et al., 2022).”
- Towards Question Format Independent Numerical Reasoning: A Set of Prerequisite Tasks (2020, background): “, 2019] have become standard tools across several language understanding tasks, they can not perform complex forms of reasoning, specifically numerical reasoning [Wallace et al., 2019].”
- Exploring Generalization Ability of Pretrained Language Models on Arithmetic and Logical Reasoning (2021, methodology): “Wallace et al. (2019) has investigated that how will different types of embedding, such as BERT (Devlin et al., 2019) and GloVe (Pennington et al., 2014), affect the performance of the same NAQANet model (Dua et al., 2019) on the same tasks including List Maximum, Decoding and Addition.”
- LIFT: Language-Interfaced Fine-Tuning for Non-Language Machine Learning Tasks (2022, background): “[135] Eric Wallace, Yizhong Wang, Sujian Li, Sameer Singh, and Matt Gardner.”
- How Can We Know When Language Models Know? On the Calibration of Language Models for Question Answering (2020, background): “…(Petroni et al., 2019; Jiang et al., 2020b; Roberts et al., 2020; Bouraoui et al., 2020), commonsense knowledge (Trinh and Le, 2018; Kocijan et al., 2019; Talmor et al., 2019a; Bosselut et al., 2019), and simple numerical operations (Wallace et al., 2019; Talmor et al., 2019a; Geva et al., 2020).”