Physics of Language Models: Part 2.1, Grade-School Math and the Hidden Reasoning Process

Tian Ye, Zicheng Xu, Yuanzhi Li, Zeyuan Allen-Zhu
7/29/2024
cs.AIcs.CLcs.LG

No official code found. Best implementation: facebookresearch/iGSM (91 stars, MIT, last commit 2025-01-12).

Abstract

Recent advances in language models have demonstrated their capability to solve mathematical reasoning problems, achieving near-perfect accuracy on grade-school level math benchmarks like GSM8K. In this paper, we formally study how language models solve these problems. We design a series of controlled experiments to address several fundamental questions: (1) Can language models truly develop reasoning skills, or do they simply memorize templates? (2) What is the model's hidden (mental) reasoning process? (3) Do models solve math questions using skills similar to or different from humans? (4) Do models trained on GSM8K-like datasets develop reasoning skills beyond those necessary for solving GSM8K problems? (5) What mental process causes models to make reasoning mistakes? (6) How large or deep must a model be to effectively solve GSM8K-level math questions? Our study uncovers many hidden mechanisms by which language models solve mathematical questions, providing insights that extend beyond current understandings of LLMs.

View on arXivView PDF

Code Implementations(1)

MIT

The code for creating the iGSM datasets in papers "Physics of Language Models Part 2.1, Grade-School Math and the Hidden Reasoning Process" (arxiv 2407.20311) and "Physics of Language Models Part 2.2, How to Learn From Mistakes on Grade-School Math Problems" (arxiv 2408.16293)

919Python, Jupyter NotebookJan 12, 20251 years agoMIT

Similar Papers

Cite this paper

@article{ye2024physics,
  title  = {Physics of Language Models: Part 2.1, Grade-School Math and the Hidden Reasoning Process},
  author = {Tian Ye and Zicheng Xu and Yuanzhi Li and Zeyuan Allen-Zhu},
  year   = {2024},
  eprint = {2407.20311},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2407.20311v1},
  journal = {ICLR 2024 2024}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2407.20311.svg)](https://codeofpaper.com/paper/2407.20311)

Discussion