title: Learning From Mistakes Makes LLM Better Reasoner
summary: Large language models (LLMs) recently exhibited remarkable reasoning
  capabilities on solving math problems. To further improve this capability, this
  work proposes Learning from Mistakes (LeMa), akin to human learning processes.
  Consider a human student who failed to solve a math problem, he will learn from
  what mistake he has made and how to correct it. Mimicking this error-driven
  learning process, LeMa fine-tunes LLMs on mistake-correction data pairs
  generated by GPT-4. Specifically, we first collect inaccurate reasoning paths
  from various LLMs and then employ GPT-4 as a "corrector" to (1) identify the
  mistake step, (2) explain the reason for the mistake, and (3) correct the
  mistake and generate the final answer. Experimental results demonstrate the
  effectiveness of LeMa: across five backbone LLMs and two mathematical reasoning
  tasks, LeMa consistently improves the performance compared with fine-tuning on
  CoT data alone. Impressively, LeMa can also benefit specialized LLMs such as
  WizardMath and MetaMath, achieving 85.4% pass@1 accuracy on GSM8K and 27.1% on
  MATH. This surpasses the SOTA performance achieved by non-execution open-source
  models on these challenging tasks. Our code, data and models will be publicly
  available at https://github.com/microsoft/CodeT.
paper_authors._id: 6541b879aa727b1a95b381e3
paper_authors.name: Shengnan An
paper_authors.status: claimed_verified
paper_authors.statusLastChangedAt: 2023-11-05T15:03:33.286Z
paper_authors._id: 64db5f5dd68a6ddcc7bd89e9
paper_authors.avatarUrl: /avatars/a627d311ada1e3941eb31d7f1acf144b.svg
paper_authors.fullname: Shengnan An
paper_authors.type: user
paper_authors.user: ShengnanAn
paper_authors._id: 6541b879aa727b1a95b381e4
paper_authors.name: Zexiong Ma
paper_authors.status: claimed_verified
paper_authors.statusLastChangedAt: 2024-09-30T08:10:58.174Z
paper_authors._id: 654da66fb36f85a025bc24b6
paper_authors.avatarUrl: /avatars/e5542856ab4bf1845e8f546b5f17cd99.svg
paper_authors.fullname: Zexiong Ma
paper_authors.type: user
paper_authors.user: mizersy
paper_authors._id: 6541b879aa727b1a95b381e5
paper_authors.name: Zeqi Lin
paper_authors.status: admin_assigned
paper_authors.statusLastChangedAt: 2023-11-02T15:14:15.105Z
paper_authors._id: 642a862525442667e9ba5e78
paper_authors.avatarUrl: /avatars/f15bba13cb4096f6b3f3508ac2c56e5d.svg
paper_authors.fullname: Zeqi Lin
paper_authors.type: user
paper_authors.user: linzeqipku
paper_authors._id: 6541b879aa727b1a95b381e6
paper_authors.name: Nanning Zheng
paper_authors._id: 6541b879aa727b1a95b381e7
paper_authors.name: Jian-Guang Lou
paper_authors.status: admin_assigned
paper_authors.statusLastChangedAt: 2023-11-02T15:14:35.827Z
paper_authors._id: 6358cc2bf56b03ec91484b99
paper_authors.avatarUrl: /avatars/7a7f3be7c5f1a209d4d68bba206259d6.svg
paper_authors.fullname: Luo Jianguang
paper_authors.type: user
paper_authors.user: luojianguang
paper_authors._id: 6541b879aa727b1a95b381e8
paper_authors.name: Weizhu Chen
paper_authors.status: admin_assigned
paper_authors.statusLastChangedAt: 2023-11-02T15:14:43.085Z
paper_authors._id: 64da876370446182be5b608d
paper_authors.avatarUrl: /avatars/e412fdc71404ecdf638e416846e3ebfb.svg
paper_authors.fullname: Weizhu Chen
paper_authors.type: user
paper_authors.user: chenweizhu
paper_title: Learning From Mistakes Makes LLM Better Reasoner
paper_summary: Large language models (LLMs) recently exhibited remarkable reasoning
  capabilities on solving math problems. To further improve this capability, this
  work proposes Learning from Mistakes (LeMa), akin to human learning processes.
  Consider a human student who failed to solve a math problem, he will learn from
  what mistake he has made and how to correct it. Mimicking this error-driven
  learning process, LeMa fine-tunes LLMs on mistake-correction data pairs
  generated by GPT-4. Specifically, we first collect inaccurate reasoning paths
  from various LLMs and then employ GPT-4 as a "corrector" to (1) identify the
  mistake step, (2) explain the reason for the mistake, and (3) correct the
  mistake and generate the final answer. Experimental results demonstrate the
  effectiveness of LeMa: across five backbone LLMs and two mathematical reasoning
  tasks, LeMa consistently improves the performance compared with fine-tuning on
  CoT data alone. Impressively, LeMa can also benefit specialized LLMs such as
  WizardMath and MetaMath, achieving 85.4% pass@1 accuracy on GSM8K and 27.1% on
  MATH. This surpasses the SOTA performance achieved by non-execution open-source
  models on these challenging tasks. Our code, data and models will be publicly
  available at https://github.com/microsoft/CodeT.
paper_ai_keywords: Learning from Mistakes (LeMa) Large language models (LLMs) mistake-correction data pairs inaccurate reasoning paths corrector fine-tuning GPT-4 registration tasks performance improvement pass@1 accuracy code PEFT-weights plugins CoT data GSM8K MATH SOTA (state-of-the-art) performance specialized LLMs WizardMath MetaMath