Paper commentary
Measuring Mathematical Problem Solving With the MATH Dataset
Benchmark shows large Transformers still fail competition math problems
- Problem Most text benchmarks test formal proofs or plug-and-chug arithmetic, which miss open-ended problem solving. Models must choose their own strategy, and existing tests do not measure that.
- Method MATH is a new dataset of 12,500 competition problems with step-by-step solutions. The authors also pretrain GPT-2 on AMPS, a corpus of math problems, before fine-tuning it on MATH.
- Results Accuracy stays low, even for enormous Transformer models. The authors estimate that AMPS pretraining adds about as much as a 130 times increase in parameters.
Why competition math stays hard
Large Transformers now solve most existing text-based tasks, yet competition mathematics is a different kind of problem. Much earlier work tests either formal theorem proving, where a model builds proofs in a language such as Metamath or Coq, or plug-and-chug arithmetic. Neither kind asks a model to choose its own strategy from many possibilities, and the authors treat that choice as the core of problem solving.
The same models reached up to 15% on the easiest difficulty level, so they hold some useful mathematical knowledge.
The MATH benchmark and its scoring
MATH holds 12,500 problems from competitions such as AMC 10, AMC 12 and AIME, split into 7,500 training and 5,000 test problems. Each problem comes with a step-by-step solution and a final answer in a boxed form, and difficulty runs from 1 to 5. Seven subjects are covered, from Prealgebra to Precalculus.
The AMPS pretraining corpus
The authors argue that models need the fundamentals before advanced problems, so they built AMPS as a pretraining corpus of math problems with step-by-step solutions. AMPS has over 100,000 Khan Academy problems and about 5 million generated problems, drawn from 100 Mathematica scripts. The Khan Academy part spans 693 exercise types, from addition to Stokes' theorem.
Pretraining and fine-tuning steps
The recipe has two stages: an autoregressive model is pretrained on AMPS, then fine-tuned on MATH with two kinds of targets. Pretraining runs for one epoch with the standard autoregressive language modeling objective, a batch size of 128, and a weight decay of 0.05 under AdamW. Because Mathematica data is much larger than Khan Academy data, the authors upsample Khan Academy by a factor of 5 and downsample Mathematica by a factor of 2.
Fine-tuning mixes two sequence types for each MATH problem: the problem followed by its final answer, and the problem followed by its full solution. This mix lets one model output either just the answer or a whole solution. At test time the default prompt asks for the final answer only, and beam search uses beam size 20 for answers and 10 for full solutions.
GPT-2 splits numbers into single digits, while T5 was dropped because its tokenizer removes many LaTeX symbols. GPT-3 models, Curie at about 13B and Davinci at about 175B parameters, were evaluated without AMPS pretraining, either fine-tuned or prompted with 8 example problems at temperature 0.
Scale and difficulty results
The authors read this as more parameters helping only slowly, far from the ceiling. That slow slope is why the authors expect scale alone to be impractical for this task.
AMPS pretraining versus model size
The authors say AMPS adds about as much accuracy as a 130 times increase in parameters. The comparison crosses model families and pretraining conditions, since GPT-3 models weren't pretrained on AMPS because of API limits.
Pretraining on AMPS plus Math StackExchange text, about 3 GB, gave GPT-2 0.3B 6.0%, compared to 6.2% for AMPS alone. So the curated AMPS corpus did better than real-world mathematics text in this test.
Step-by-step solutions at train and test time
Models that write a solution first could use scratch space, meaning intermediate computations before the final answer. The authors hypothesize that early mistakes in a generated solution derail the text that follows.
Giving part of the ground truth solution as a hint also raises accuracy, and with 99% of the solution shown, GPT-2 0.7B still attains only about 40%.
Confidence as an error signal
Confidence is the average probability of the answer tokens, and AUROC measures how well it separates correct from incorrect answers. GPT-2 1.5B is highly overconfident, often near 100%, and its AUROC is 68.8%, where 50% means random chance. The authors read this as substantial room to improve error detection.
Human scores on the same problems
The authors gave 20 randomly sampled MATH test problems to people, with one hour each and calculations done by hand. A computer science PhD student who doesn't especially like mathematics scored 40%, and a three-time IMO gold medalist scored 90%. The authors note that the medalist's missed questions came from small arithmetic errors.
Limitations
Generated solutions don't yet help at test time, and the authors leave closing that gap as future work. The human comparison rests on 20 problems and a few participants.
Paper info
- Authors
- Dan Hendrycks, Collin Burns, Saurav Kadavath, Akul Arora, Steven Basart, Eric Tang, Dawn Song, Jacob Steinhardt
- Venue
- arXiv · Preprint
- First published
- 2021-3-5
- Added
- 2026-11-12
- Updated
- 2021-11-8
- Version
- v2
- arXiv
- 2103.03874
- Category
- cs.LG · cs.AI · cs.CL
- Original paper terms
- arXiv non-exclusive 1.0
- What we show
- Paper info and commentary
AI commentary is a separate explanation from the original paper and may contain errors. The original paper and figures follow each source's terms of use and any rights noted separately.
Quote from the paper
Dan Hendrycks, Collin Burns, Saurav Kadavath, Akul Arora, Steven Basart, Eric Tang, Dawn Song, Jacob Steinhardt (2021). Measuring Mathematical Problem Solving With the MATH Dataset. arXiv:2103.03874v2. https://arxiv.org/abs/2103.03874v2
BibTeX
@misc{hendrycks2021measuring,
title = {{Measuring Mathematical Problem Solving With the MATH Dataset}},
author = {Dan Hendrycks and Collin Burns and Saurav Kadavath and Akul Arora and Steven Basart and Eric Tang and Dawn Song and Jacob Steinhardt},
year = {2021},
eprint = {2103.03874},
archivePrefix = {arXiv},
url = {https://arxiv.org/abs/2103.03874v2}
}