NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Solving Quantitative Reasoning Problems with Language Models

Aitor Lewkowycz, Anders Johan Andreassen, David Dohan, Ethan Dyer, Henryk Michalewski, Vinay Venkatesh Ramasesh, Ambrose Slone, Cem Anil, Imanol Schlag, Theo Gutman-Solo, Yuhuai Wu, Behnam Neyshabur, Guy Gur-Ari, Vedant Misra

Large language models (LLMs) have achieved remarkable success in natural language tasks like summarization and question answering. However, they have historically struggled with quantitative reasoning. Solving math, science, and engineering problems requires a model to parse natural language, recall relevant world knowledge, and execute precise, step-by-step symbolic and numerical manipulations.

Previous approaches to this problem often relied on external tools, such as calculators or Python interpreters, or required translating problems into highly specialized formal programming languages like Coq or Lean. In this paper, the authors ask a different question: Can a standard, self-contained language model learn to solve complex, multi-step quantitative problems purely through natural language and mathematical notation?

To answer this, the researchers introduce Minerva, a large language model based on Google's PaLM architecture that is fine-tuned on a massive dataset of scientific and mathematical texts. By preserving LaTeX formatting in the training data and using "majority voting" during inference, Minerva achieves state-of-the-art performance on complex quantitative reasoning tasks without relying on external tools.

How Minerva Works

The researchers built Minerva by starting with Google's pretrained PaLM models (at 8 billion, 62 billion, and 540 billion parameter scales) and fine-tuning them autoregressively on a custom technical dataset. Three key methodological choices drive the model's success:

  1. Preserving Mathematical Formatting: Instead of stripping out HTML or converting equations to plain text, the authors carefully cleaned the data to preserve LaTeX and MathJax formatting. This allowed the model to see and learn from full mathematical formulas (e.g., $E = mc^2$) in their native context.
  2. Chain-of-Thought Prompting: During inference, the model is prompted with a few examples that include step-by-step solutions. This encourages the model to generate its own reasoning steps before arriving at a final answer.
  3. Majority Voting (maj1@k): Instead of relying on a single greedy prediction, the model generates multiple different solutions (up to 256) for the same problem using a non-zero temperature. The system then groups the outputs by their final answer and selects the most common one.

Training Data and Benchmarks

Minerva was fine-tuned on 38.5 billion tokens of data. This corpus consisted of math-heavy web pages filtered for MathJax (47.5%), arXiv preprints (47.5%), and general natural language data (5%).

The model was evaluated on several rigorous benchmarks:

  • MATH: 12,000 middle and high school competition math problems.
  • GSM8k: Middle school math word problems.
  • MMLU-STEM: The science, technology, engineering, and math subset of the Massive Multitask Language Understanding benchmark.
  • OCWCourses: A newly curated dataset of 272 undergraduate-level STEM problems harvested from MIT OpenCourseWare, covering advanced topics like solid-state chemistry, differential equations, and special relativity.

Key Insights

Minerva's development yielded several fascinating insights into how language models process quantitative logic. First, the success of the majority voting technique relies on the idea that the truth is a Schelling point. There are countless ways to get a math problem wrong, but usually only one way to get it right. If the model takes several different reasoning paths and arrives at the same final answer multiple times, that answer is highly likely to be correct.

Second, formatting acts as a proxy for logic. By training directly on LaTeX, the model naturally learns the syntactic rules of symbolic manipulation. It learns to "do math" by predicting the next sequence of LaTeX tokens.

Finally, the authors rigorously tested whether the model was simply memorizing its training data. By changing the numbers and phrasing of test questions, they found that Minerva's accuracy remained stable, strongly suggesting it has learned generalized quantitative reasoning rather than rote memorization.

Breakthrough Results

Minerva sets a new standard for self-contained quantitative reasoning, demonstrating massive leaps over prior state-of-the-art (SOTA) models.

Accuracy on MATH and MMLU Subtopics

As detailed in the performance metrics below, the 540B parameter version of Minerva, when combined with majority voting (maj1@k), achieved unprecedented scores across the board:

Detailed Benchmark Performance
  • MATH: The 540B model achieved 50.3% accuracy, absolutely crushing the previous published SOTA of 6.9%.
  • GSM8k: Achieved 78.5% accuracy, beating the previous SOTA (74.4%) without the use of an external calculator.
  • MMLU-STEM: Reached 75.0% accuracy.
  • OCWCourses: Successfully solved 30.8% of the highly complex, undergraduate-level MIT problems.

In a real-world test, the 540B model even took the 2021 National Math Exam in Poland and scored 65%, comfortably beating the national human average of 57%.

Limitations and Future Work

Despite these impressive results, the authors are transparent about several limitations. Because Minerva doesn't use a calculator, it still makes basic arithmetic mistakes during complex calculations. Additionally, the model sometimes arrives at the correct final answer using flawed or incomplete reasoning—a phenomenon known as a false positive, which occurs in about 8% of its correct answers.

Unlike formal theorem provers, there is no built-in way to mathematically guarantee the correctness of Minerva's output. Furthermore, generating dozens or hundreds of samples per problem for majority voting is computationally expensive.

Future work points toward hybrid systems: combining the intuitive, natural-language reasoning capabilities of models like Minerva with the rigorous verification of formal methods or the computational accuracy of external tools like Python interpreters.

Summary updated

BibTeX
@inproceedings{lewkowycz2022solving,
  author = {Aitor Lewkowycz and Anders Johan Andreassen and David Dohan and Ethan Dyer and Henryk Michalewski and Vinay Venkatesh Ramasesh and Ambrose Slone and Cem Anil and Imanol Schlag and Theo Gutman-Solo and Yuhuai Wu and Behnam Neyshabur and Guy Gur-Ari and Vedant Misra},
  title = {{Solving Quantitative Reasoning Problems with Language Models}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2022},
  url = {https://openreview.net/forum?id=IFXTZERXdM7},
}
Figure