Injecting Numerical Reasoning Skills into Language Models

Mor Geva, Ankit Gupta, Jonathan Berant
4/9/2020
251 citations
cs.CL

Official code: ag1988/injecting_numeracy (90 stars, Python, last commit 2024-08-20).

Abstract

Large pre-trained language models (LMs) are known to encode substantial amounts of linguistic information. However, high-level reasoning skills, such as numerical reasoning, are difficult to learn from a language-modeling objective only.

Show full abstract

Consequently, existing models for numerical reasoning have used specialized architectures with limited flexibility. In this work, we show that numerical reasoning is amenable to automatic data generation, and thus one can inject this skill into pre-trained LMs, by generating large amounts of data, and training in a multi-task setup. We show that pre-training our model, GenBERT, on this data, dramatically improves performance on DROP (49.3 $\rightarrow$ 72.3 F1), reaching performance that matches state-of-the-art models of comparable size, while using a simple and general-purpose encoder-decoder architecture. Moreover, GenBERT generalizes well to math word problem datasets, while maintaining high performance on standard RC tasks. Our approach provides a general recipe for injecting skills into large pre-trained LMs, whenever the skill is amenable to automatic data augmentation.

View on arXivView PDF

Code Implementations(1)

The accompanying code for "Injecting Numerical Reasoning Skills into Language Models" (Mor Geva*, Ankit Gupta* and Jonathan Berant, ACL 2020).

9010Python, ShellApr 5, 20202 years ago

Similar Papers

Cite this paper

@article{geva2020injecting,
  title  = {Injecting Numerical Reasoning Skills into Language Models},
  author = {Mor Geva and Ankit Gupta and Jonathan Berant},
  year   = {2020},
  eprint = {2004.04487},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2004.04487}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2004.04487.svg)](https://codeofpaper.com/paper/2004.04487)

Discussion