Skip to main content
QUICK REVIEW

[Paper Review] InternLM-Math: Open Math Large Language Models Toward Verifiable Reasoning

Huaiyuan Ying, Shuo Zhang|arXiv (Cornell University)|Feb 9, 2024
Mathematics, Computing, and Information ProcessingComputer Science3 citations
TL;DR

This paper introduces InternLM-Math, an open-source large language model fine-tuned for verifiable mathematical reasoning by unifying chain-of-thought reasoning, reward modeling, formal verification via LEAN, data augmentation, and code interpretation in a single sequence-to-sequence framework. The model achieves state-of-the-art performance on multiple benchmarks, including 30.3 on MiniF2F without fine-tuning and over 90% of GPT-4's performance on MATH and GSM8K under in-context learning and supervised fine-tuning settings.

ABSTRACT

The math abilities of large language models can represent their abstract reasoning ability. In this paper, we introduce and open-source our math reasoning LLMs InternLM-Math which is continue pre-trained from InternLM2. We unify chain-of-thought reasoning, reward modeling, formal reasoning, data augmentation, and code interpreter in a unified seq2seq format and supervise our model to be a versatile math reasoner, verifier, prover, and augmenter. These abilities can be used to develop the next math LLMs or self-iteration. InternLM-Math obtains open-sourced state-of-the-art performance under the setting of in-context learning, supervised fine-tuning, and code-assisted reasoning in various informal and formal benchmarks including GSM8K, MATH, Hungary math exam, MathBench-ZH, and MiniF2F. Our pre-trained model achieves 30.3 on the MiniF2F test set without fine-tuning. We further explore how to use LEAN to solve math problems and study its performance under the setting of multi-task learning which shows the possibility of using LEAN as a unified platform for solving and proving in math. Our models, codes, and data are released at \url{https://github.com/InternLM/InternLM-Math}.

Motivation & Objective

  • To develop a versatile math reasoning LLM capable of solving, verifying, proving, and augmenting mathematical problems with high reliability.
  • To unify diverse reasoning and verification capabilities—chain-of-thought, reward modeling, formal proof with LEAN, data augmentation, and code execution—within a single sequence-to-sequence framework.
  • To reduce reliance on human-annotated reward data by enabling self-verification and self-augmentation through model-generated reasoning and formal proof.
  • To explore the feasibility of using LEAN as a unified platform for both solving and formally proving math problems via multi-task learning.
  • To release a fully open-source model and training data to accelerate research in verifiable mathematical reasoning and self-improving LLMs.

Proposed method

  • Continue pre-training InternLM2-Base on curated math corpora and synthetic data to enhance foundational mathematical knowledge.
  • Supervised fine-tuning (SFT) on a unified sequence-to-sequence format that encodes problem-solving, step-by-step reasoning, verification, and formal proof generation.
  • Integration of code interpreter and Python-assisted reasoning (RICO) to improve accuracy in complex problem-solving.
  • Incorporation of reward modeling (ORM and PRM) to verify reasoning paths and improve output reliability.
  • Use of LEAN 3 for formal translation and proof generation, with data collected from MathLib and Algebraic-Stack, later to be migrated to LEAN 4.
  • Data augmentation via the model’s own reasoning and verification capabilities to generate new training examples autonomously.

Experimental results

Research questions

  • RQ1Can a single LLM architecture effectively unify multiple mathematical reasoning and verification tasks—problem solving, verification, proof, and data augmentation—within a single sequence-to-sequence framework?
  • RQ2How does integrating formal proof via LEAN improve the reliability and correctness of mathematical reasoning in LLMs compared to purely natural language reasoning?
  • RQ3To what extent can self-generated reasoning and verification data improve model performance without human-annotated supervision?
  • RQ4How does the performance of LEAN-based reasoning vary with training data size in a multi-task learning setup?
  • RQ5What are the key failure modes in model reasoning when only outcome accuracy is evaluated, and how can process correctness be better measured?

Key findings

  • InternLM-Math-7B achieves 30.3 zero-shot performance on the MiniF2F benchmark, outperforming existing open-source models without fine-tuning.
  • The model achieves 78.09% accuracy on GSM8K and 34.60% on MATH under supervised fine-tuning, demonstrating state-of-the-art results among open-source models.
  • Using 1/8 of the MetaMath training data with LEAN, the model still achieves 77.4% accuracy on GSM8K when combined with MetaMath, indicating strong data efficiency.
  • The model’s performance is sensitive to prompt format, with different instructions (e.g., 'Question:', 'Q:', 'Please solve step by step') leading to varying outcomes.
  • Process correctness is significantly lower than outcome accuracy—only 3/5 problems at MATH Level 5 are correctly reasoned, highlighting the risk of false positives from outcome-only evaluation.
  • The model’s ability to generate correct reasoning paths is limited by format confusion and overuse of '=' signs, suggesting challenges in structured reasoning that may be mitigated by implicit chain-of-thought.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.