Skip to main content
QUICK REVIEW

[Paper Review] Giving BERT a Calculator: Finding Operations and Arguments with Reading Comprehension

Daniel Andor, Luheng He|arXiv (Cornell University)|Aug 31, 2019
Topic ModelingComputer Science1 references9 citations
TL;DR

This paper proposes enhancing a BERT-based reading comprehension model with lightweight, executable programs to perform numerical reasoning, enabling it to predict operations (e.g., Diff, Sum, Mul, Div) and arguments (number spans) for abstractive numerical answers. The model achieves a 33% absolute F1 improvement on the DROP dataset and generalizes to math word problems with few-shot learning, outperforming prior methods on both tasks.

ABSTRACT

Reading comprehension models have been successfully applied to extractive text answers, but it is unclear how best to generalize these models to abstractive numerical answers. We enable a BERT-based reading comprehension model to perform lightweight numerical reasoning. We augment the model with a predefined set of executable 'programs' which encompass simple arithmetic as well as extraction. Rather than having to learn to manipulate numbers directly, the model can pick a program and execute it. On the recent Discrete Reasoning Over Passages (DROP) dataset, designed to challenge reading comprehension models, we show a 33% absolute improvement by adding shallow programs. The model can learn to predict new operations when appropriate in a math word problem setting (Roy and Roth, 2015) with very few training examples.

Motivation & Objective

  • To address the limitation of extractive reading comprehension models in handling numerical reasoning tasks requiring abstractive answers.
  • To improve performance on the DROP dataset, which challenges models with discrete, quantitative reasoning beyond simple span extraction.
  • To enable a unified model that handles both traditional reading comprehension and numerical reasoning with minimal architectural changes.
  • To investigate few-shot generalization to new operations (e.g., multiplication, division) in math word problems with limited training data.
  • To provide interpretability through symbolic program predictions that mirror reasoning steps.

Proposed method

  • Augment a BERT-based extractive QA model with a set of predefined, executable programs including arithmetic operations (Diff, Sum, Mul, Div), span extraction, and logical operations.
  • Train the model to predict a program (operation and arguments) rather than directly predicting a numerical answer, offloading computation to a calculator.
  • Use arguments as pointers to numbers or spans in the passage, enabling composition of operations (e.g., Diff(Sum(a,b), c)).
  • Co-train on CoQA to preserve performance on traditional reading comprehension while improving on DROP.
  • Fine-tune on DROP and use ensembling to boost performance, with a focus on handling class imbalance in multi-span answers.
  • Apply few-shot learning on the Illinois math word problem dataset to evaluate generalization to unseen operations.

Experimental results

Research questions

  • RQ1Can a BERT-based model be enhanced with lightweight, executable programs to improve performance on numerical reasoning tasks like DROP?
  • RQ2How well can the model generalize to new operations (e.g., multiplication, division) in math word problems with very few training examples?
  • RQ3Can the model maintain strong performance on traditional reading comprehension tasks (e.g., CoQA) while improving on DROP?
  • RQ4Does program-level interpretation (e.g., predicting Diff(55893, 48341)) improve model interpretability and reasoning fidelity?
  • RQ5To what extent do compositional operations (e.g., Sum3, Merge) improve performance on complex answer types?

Key findings

  • The model achieves an 81.1 F1 score on the DROP dev set, representing a 33% absolute improvement over the previous state-of-the-art NAQANet model.
  • Adding the Diff100 and Sum3 operations contributed 9% and 1.1% relative improvements, respectively, aligning with their frequency in the data.
  • Co-training on CoQA improved DROP performance and preserved 82.2 F1 on CoQA, demonstrating dual-task capability.
  • The model achieved 83.2% accuracy on the Illinois math word problem dataset after pre-training on DROP and fine-tuning on IL data, outperforming prior rule-based and deep reinforcement learning models.
  • The model learned to predict multiplication and division operations in math word problems with only 562 training examples, showing strong few-shot generalization.
  • Ensembling six models improved performance by an additional 1%, reaching a final F1 of 81.1 on DROP.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.