[Paper Review] How well do Large Language Models perform in Arithmetic tasks?
The paper introduces MATH 401, an arithmetic dataset to evaluate LLMs’ numerical computation abilities across diverse operations; it shows GPT-4 and ChatGPT achieve the highest accuracy and analyzes factors like tokenization, pre-training, prompts, and scaling.
Large language models have emerged abilities including chain-of-thought to answer math word problems step by step. Solving math word problems not only requires abilities to disassemble problems via chain-of-thought but also needs to calculate arithmetic expressions correctly for each step. To the best of our knowledge, there is no work to focus on evaluating the arithmetic ability of large language models. In this work, we propose an arithmetic dataset MATH 401 to test the latest large language models including GPT-4, ChatGPT, InstrctGPT, Galactica, and LLaMA with various arithmetic expressions and provide a detailed analysis of the ability of large language models. MATH 401 and evaluation codes are released at \url{https://github.com/GanjinZero/math401-llm}.
Motivation & Objective
- Motivate the need to assess arithmetic ability as a proxy for mathematical and reasoning competence in LLMs.
- Introduce MATH 401, an arithmetic evaluation suite spanning integers, decimals, irrationals, and long expressions.
- Analyze how architectural choices and training data affect arithmetic performance in LLMs.
- Provide guidance on prompts, system messages, and prompting strategies to improve arithmetic results.
Proposed method
- Construct 401 arithmetic expressions covering addition, subtraction, multiplication, division, exponentiation, trigonometry, logarithms, and long-bracketed expressions.
- Evaluate a wide range of LLMs (GPT-4, ChatGPT, InstructGPT, Galactica, LLaMA, OPT, Bloom, etc.) under different prompts and input formats.
- Use accuracy, relative error, and non-number ratio as metrics, with four-decimal-place rounding and specific handling of decoded numbers.
- Compare tokenization effects, pre-training data (code and LaTeX sources), instruction tuning, and RLHF on arithmetic performance.
- Examine interpolation/extrapolation, scaling laws, chain-of-thought (COT) effects, and in-context learning (ICL) on arithmetic tasks.

Experimental results
Research questions
- RQ1How capable are current large language models at arithmetic tasks across a spectrum of operators and numeric forms?
- RQ2What factors (tokenization, training data, prompts, scaling) influence arithmetic performance in LLMs?
- RQ3Do chain-of-thought prompts or system-level prompts meaningfully improve arithmetic accuracy?
- RQ4Can instruction tuning and ICL meaningfully boost arithmetic ability, and how does model size affect results?
- RQ5How do models perform on easy versus hard arithmetic groups and extrapolate to long expressions?
Key findings
- GPT-4 and ChatGPT outperform all other models by a large margin across arithmetic tasks.
- Division, exponentiation with decimals, trigonometry, and logarithms remain challenging for most models; big numbers and long expressions are better handled by GPT-4 and ChatGPT.
- Tokenization strategies (e.g., digit-level vs. split tokens) significantly impact arithmetic accuracy; models that split numbers into digits tend to perform differently.
- Instruction tuning and RLHF (as in InstructGPT and ChatGPT) improve arithmetic ability relative to earlier pre-trained or SFT models.
- Prompts matter: LaTeX- or math-text prompts generally yield better results for many models; system prompts substantially improve ChatGPT accuracy and reduce non-number decoding.
- COT prompts do not consistently improve arithmetic performance; simple calculation prompts sometimes yield better results for long expressions.
- Scaling helps up to a point; beyond ~30B parameters, gains plateau for some models (e.g., Galactica) while GPT-4/ChatGPT show strong capabilities in long expressions.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.