Learning From Mistakes Makes LLM Better Reasoner
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.
6541b879aa727b1a95b381e3
Shengnan An
claimed_verified
2023-11-05T15:03:33.286Z
64db5f5dd68a6ddcc7bd89e9
/avatars/69375ec915927b855813df8a6d486837.svg
Shengnan An
user
ShengnanAn
6541b879aa727b1a95b381e4
Zexiong Ma
claimed_verified
2024-09-30T08:10:58.174Z
654da66fb36f85a025bc24b6
/avatars/e5542856ab4bf1845e8f546b5f17cd99.svg
Zexiong Ma
user
mizersy
6541b879aa727b1a95b381e5
Zeqi Lin
admin_assigned
2023-11-02T15:14:15.105Z
642a862525442667e9ba5e78
/avatars/f15bba13cb4096f6b3f3508ac2c56e5d.svg
Zeqi Lin
user
linzeqipku
6541b879aa727b1a95b381e6
Nanning Zheng
6541b879aa727b1a95b381e7
Jian-Guang Lou
admin_assigned
2023-11-02T15:14:35.827Z
6358cc2bf56b03ec91484b99
/avatars/7a7f3be7c5f1a209d4d68bba206259d6.svg
Luo Jianguang
user
luojianguang
6541b879aa727b1a95b381e8
Weizhu Chen
admin_assigned
2023-11-02T15:14:43.085Z
64da876370446182be5b608d
/avatars/e412fdc71404ecdf638e416846e3ebfb.svg
Weizhu Chen
user
chenweizhu
Learning From Mistakes Makes LLM Better Reasoner
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.
LeMa, a learning-from-mistakes approach, enhances LLMs' mathematical reasoning by learning from inaccurate reasoning paths corrected by GPT-4, surpassing SOTA performance on math problems.
Large language models Learning from Mistakes LeMa error-driven learning fine-tuning mistake-correction data pairs inaccurate reasoning paths GPT-4 correction final answer backbone LLMs mathematical reasoning tasks WizardMath MetaMath GSM8K MATH pass@1 accuracy SOTA