A Causal Framework to Quantify the Robustness of Mathematical Reasoning with Language Models

Alessandro Stolfo, Zhijing Jin, Kumar Shridhar, Bernhard Schölkopf, Mrinmaya Sachan
10/21/2022
cs.CLcs.LG

Official code: alestolfo/causal-math (15 stars, Python, last commit 2022-10-14).

Abstract

We have recently witnessed a number of impressive results on hard mathematical reasoning problems with language models. At the same time, the robustness of these models has also been called into question; recent works have shown that models can rely on shallow patterns in the problem description when generating a solution.

Show full abstract

Building on the idea of behavioral testing, we propose a novel framework, which pins down the causal effect of various factors in the input, e.g., the surface form of the problem text, the operands, and math operators on the output solution. By grounding the behavioral analysis in a causal graph describing an intuitive reasoning process, we study the behavior of language models in terms of robustness and sensitivity to direct interventions in the input space. We apply our framework on a test bed of math word problems. Our analysis shows that robustness does not appear to continuously improve as a function of size, but the GPT-3 Davinci models (175B) achieve a dramatic improvement in both robustness and sensitivity compared to all other GPT variants.

View on arXivView PDF

Code Implementations(1)

Code Repository for "A Causal Framework to Quantify the Robustness of Mathematical Reasoning with Language Models".

153Python, ShellOct 14, 20224 years ago

Similar Papers

Cite this paper

@article{stolfo2022causal,
  title  = {A Causal Framework to Quantify the Robustness of Mathematical Reasoning with Language Models},
  author = {Alessandro Stolfo and Zhijing Jin and Kumar Shridhar and Bernhard Schölkopf and Mrinmaya Sachan},
  year   = {2022},
  eprint = {2210.12023},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2210.12023}
}

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/2210.12023.svg)](https://codeofpaper.com/paper/2210.12023)

Discussion