# Measuring Mathematical Problem Solving With the MATH Dataset

Benchmark shows large Transformers still fail competition math problems

Dan Hendrycks, Collin Burns, Saurav Kadavath, Akul Arora, Steven Basart, Eric Tang and 2 more · arXiv · 2021-3-5

- **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](https://arxiv.org/licenses/nonexclusive-distrib/1.0/)
- **What we show**: Paper info and commentary

[Original paper ↗](https://arxiv.org/abs/2103.03874v2) · [PDF ↗](https://arxiv.org/pdf/2103.03874v2)

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}
}
```

## Other paper commentary

- [OpenAI Gym](https://refivu.com/en/papers/0be35f1c-219a-4606-a9f9-894f5c111448-openai-gym.md)
- [Evaluation: from precision, recall and F-measure to ROC, informedness, markedness and correlation](https://refivu.com/en/papers/8d51315a-ef79-4c4f-a429-17bee5b397f4-evaluation-from-precision-recall-and-f-measure-to.md)
- [Puzzling-Bench: Evaluating Language Models on 23,777 Human-Written Puzzles with Community-Verified Answers](https://refivu.com/en/papers/1b9641d7-d6fa-4ead-8f16-7134498580d3-puzzling-bench-evaluating-language-models-on-23-777.md)
- [Refusal Is Not Scored: A Coverage Limit in Content-Based Bias Evaluation](https://refivu.com/en/papers/d282d82d-de6e-498c-898b-66902724ac0d-refusal-is-not-scored-a-coverage-limit-in.md)
- [ProMiSE: Protein Multi-State Evaluation Benchmark in Biological Contexts](https://refivu.com/en/papers/e163e455-fb04-4bd6-8669-b48b49fec9e9-promise-protein-multi-state-evaluation-benchmark-in.md)
- [OWE-Bench: A long-horizon benchmark for measuring real-world engineering](https://refivu.com/en/papers/7bf5dadf-998c-4908-8782-37501a593ad5-owe-bench-a-long-horizon-benchmark-for-measuring.md)
- [SimCSE: Simple Contrastive Learning of Sentence Embeddings](https://refivu.com/en/papers/be6ac7d7-6b80-4ef3-905e-9b7eecc4765c-simcse-simple-contrastive-learning-of-sentence-embeddings.md)
- [CornerNet: Detecting Objects as Paired Keypoints](https://refivu.com/en/papers/f70d57a2-b48d-4fc2-baa1-2e7e2057bad5-cornernet-detecting-objects-as-paired-keypoints.md)
- [An Overview of Multi-Task Learning in Deep Neural Networks](https://refivu.com/en/papers/ec3f88d3-e942-4848-9ca0-597d43563c84-an-overview-of-multi-task-learning-in-deep.md)
- [Datasheets for Datasets](https://refivu.com/en/papers/aac36b7e-c8f1-4fe7-a9fb-2e09532542d6-datasheets-for-datasets.md)
- [Deep CORAL: Correlation Alignment for Deep Domain Adaptation](https://refivu.com/en/papers/0a5f5341-f013-4a47-b5c4-af4c12f6a0aa-deep-coral-correlation-alignment-for-deep-domain-adaptation.md)
- [Multi-Task Learning Using Uncertainty to Weigh Losses for Scene Geometry and Semantics](https://refivu.com/en/papers/7546f3a0-585b-406e-b199-f4b06c78a42f-multi-task-learning-using-uncertainty-to-weigh-losses.md)

## Terms in this paper

- [Accuracy](https://refivu.com/en/terms/1995c0cd6282-accuracy)
- [Transformer](https://refivu.com/en/terms/48e8be2570bc-transformer)
- [beam search](https://refivu.com/en/terms/3e449f8f713b-beam-search)
- [AUROC](https://refivu.com/en/terms/096f06e69425-auroc)
- [exact match](https://refivu.com/en/terms/f6e0295e5c92-exact-match)
- [MATH](https://refivu.com/en/terms/42d0fca44930-math)

---

AI-written text can contain mistakes. [Refivu](https://refivu.com/en/papers/11c81528-fe00-480d-b385-0b65503db8a1-measuring-mathematical-problem-solving-with-the-math-dataset)
