Why do the research labs hand the arithmetic to a calculator?
Because the model’s reasoning is often fine and its arithmetic
is not, and the two can be separated. The PAL paper from Carnegie
Mellon, published at ICML 2023, had a model write its reasoning as a
short Python program and let the Python interpreter produce the
answer. On the GSM8K word-problem benchmark the program-aided model
solved 72.0% of problems against 65.6% for the same model reasoning in
plain text. The more telling result came from GSM-Hard, a copy of the
benchmark with the numbers replaced by large ones: the text-reasoning
model’s accuracy fell from 65.6% to about 20% (the paper’s
text says 20.1%; its Table 1 prints 23.1%), a relative drop the text
puts at “almost 70%.” The program-aided version stayed at
about 61%: the text says it “remains stable at 61.5%, dropping
by only 14.3%,” and Table 1 prints 61.2%.
The authors then asked whether the big numbers confused the
reasoning or just the arithmetic. In 16 of the 25 cases they
examined, the model’s written-out reasoning was “nearly
identical” with small and large numbers, “indicating that
the primary failure mode is the inability to perform arithmetic
accurately.” Their design conclusion applies directly to a
receipt splitter: “since PAL offloads the computation to the
Python interpreter, any complex computation can be performed
accurately given the correctly generated program.”
65.6% → 20.1%accuracy of plain-text reasoning on GSM8K when the problems’ numbers were replaced with large ones (GSM-Hard), per the paper’s text; its Table 1 prints 23.1% for the large-number run. In most sampled cases the reasoning barely changed; the arithmetic broke. Gao et al., ICML 2023.
Meta’s Toolformer, published at NeurIPS 2023, reached the same
conclusion from the other side. The team trained a 6.7-billion-parameter
model to decide for itself when to call a calculator. On three
arithmetic word-problem benchmarks, allowing those calls “more
than doubles performance for all tasks,” lifting the model from
14.8%, 6.3%, and 15.0% to 40.4%, 29.4%, and 44.0%, and past the
much larger GPT-3. The reason, in the authors’ words: “across
all benchmarks, for 97.9% of all examples the model decides to ask
the calculator tool for help.” That is a measurement under the
paper’s setup, which used a decoding setting of k = 10
“to increase the disposition of our model to make use of”
its tools, not a claim that it knew its own limits; the direction is
still the point: the arithmetic went to the calculator.
Cobbe et al. (2021): models “frequently fail to accurately perform calculations,” so a calculator overrides the model whenever it is invoked→A splitter should never let the reading model emit a final share; code should compute it from the extracted items
Gao et al. (2023): in 16 of 25 sampled cases, reasoning stayed “nearly identical” while arithmetic failed as numbers grew→On word problems the failure was mostly in the digits, not the plan. A receipt adds a second failure, the wrong base, that exact arithmetic preserves; so a splitter needs both the right bases and a calculator
Schick et al. (2023): a tool-trained model asked the calculator on 97.9% of math examples→The labs’ pattern is a model that plans and a program that computes; the receipt-app analog is a model that reads and code that computes
Sources: Gao et al., “PAL: Program-aided Language Models,” ICML 2023 (PMLR 202); Schick et al., “Toolformer: Language Models Can Teach Themselves to Use Tools,” NeurIPS 36 (2023); Cobbe et al., arXiv (2021). The PAL paper’s prose and its Table 1 print different GSM-Hard figures (20.1% vs 23.1% for text reasoning, 61.5% vs 61.2% for PAL); both are shown above.