NumGPT: Improving Numeracy Ability of Generative Pre-trained Models

Existing generative pre-trained language models (e.g., GPT) focus on modeling the language structure and semantics of general texts. However, those models do not consider the numerical properties of numbers and cannot perform robustly on numerical reasoning tasks (e.g., math word problems and measurement estimation). In this paper, we propose NumGPT, a generative pre-trained model that explicitly models the numerical properties of numbers in texts. Specifically, it leverages a prototype-based numeral embedding to encode the mantissa of the number and an individual embedding to encode the exponent of the number. A numeral-aware loss function is designed to integrate numerals into the pre-training objective of NumGPT. We conduct extensive experiments on four different datasets to evaluate the numeracy ability of NumGPT. The experiment results show that NumGPT outperforms baseline models (e.g., GPT and GPT with DICE) on a range of numerical reasoning tasks such as measurement estimation, number comparison, math word problems, and magnitude classification. Ablation studies are also conducted to evaluate the impact of pre-training and model hyperparameters on the

[1]  Heng Tao Shen,et al.  MathDQN: Solving Arithmetic Word Problems via Deep Reinforcement Learning , 2018, AAAI.

[2]  Mark Chen,et al.  Language Models are Few-Shot Learners , 2020, NeurIPS.

[3]  Oren Etzioni,et al.  Learning to Solve Arithmetic Word Problems with Verb Categorization , 2014, EMNLP.

[4]  Lukasz Kaiser,et al.  Attention is All you Need , 2017, NIPS.

[5]  Heng Tao Shen,et al.  The Gap of Semantic Parsing: A Survey on Automatic Math Word Problem Solvers , 2018, IEEE Transactions on Pattern Analysis and Machine Intelligence.

[6]  Carolyn Penstein Rosé,et al.  Exploring Numeracy in Word Embeddings , 2019, ACL.

[7]  Dan Roth,et al.  Solving General Arithmetic Word Problems , 2016, EMNLP.

[8]  Kevin Gimpel,et al.  ALBERT: A Lite BERT for Self-supervised Learning of Language Representations , 2019, ICLR.

[9]  Sameer Singh,et al.  Do NLP Models Know Numbers? Probing Numeracy in Embeddings , 2019, EMNLP.

[10]  Carolyn Penstein Rosé,et al.  EQUATE: A Benchmark Evaluation Framework for Quantitative Reasoning in Natural Language Inference , 2019, CoNLL.

[11]  Jugal Kalita,et al.  Solving Arithmetic Word Problems Automatically Using Transformer and Unambiguous Representations , 2019, 2019 International Conference on Computational Science and Computational Intelligence (CSCI).

[12]  Kewei Tu,et al.  Learning Numeral Embedding , 2019, FINDINGS.

[13]  Yejin Choi,et al.  MathQA: Towards Interpretable Math Word Problem Solving with Operation-Based Formalisms , 2019, NAACL.

[14]  Ilya Sutskever,et al.  Language Models are Unsupervised Multitask Learners , 2019 .

[15]  Yun-Nung Chen,et al.  Semantically-Aligned Equation Generation for Solving and Reasoning Math Word Problems , 2018, NAACL.

[16]  Jonathan Berant,et al.  oLMpics-On What Language Model Pre-training Captures , 2019, Transactions of the Association for Computational Linguistics.

[17]  Taylor Berg-Kirkpatrick,et al.  An Empirical Investigation of Contextualized Number Prediction , 2020, EMNLP.

[18]  Alec Radford,et al.  Improving Language Understanding by Generative Pre-Training , 2018 .

[19]  Hiroya Takamura,et al.  Numeracy-600K: Learning Numeracy for Detecting Exaggerated Information in Market Comments , 2019, ACL.

[20]  Rico Sennrich,et al.  Neural Machine Translation of Rare Words with Subword Units , 2015, ACL.

[21]  Jonathan Berant,et al.  Injecting Numerical Reasoning Skills into Language Models , 2020, ACL.

[22]  Ming-Wei Chang,et al.  BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding , 2019, NAACL.

[23]  Shuming Shi,et al.  Deep Neural Solver for Math Word Problems , 2017, EMNLP.

[24]  Omer Levy,et al.  GLUE: A Multi-Task Benchmark and Analysis Platform for Natural Language Understanding , 2018, BlackboxNLP@EMNLP.

[25]  Pedro A. Szekely,et al.  Representing Numbers in NLP: a Survey and a Vision , 2021, NAACL.

[26]  Jing Liu,et al.  Neural Math Word Problem Solver with Reinforcement Learning , 2018, COLING.

[27]  D. Roth,et al.  Do Language Embeddings capture Scales? , 2020, FINDINGS.

[28]  Omer Levy,et al.  SuperGLUE: A Stickier Benchmark for General-Purpose Language Understanding Systems , 2019, NeurIPS.

[29]  Lawrence Carin,et al.  Methods for Numeracy-Preserving Word Embeddings , 2020, EMNLP.

[30]  Omer Levy,et al.  RoBERTa: A Robustly Optimized BERT Pretraining Approach , 2019, ArXiv.