Can LLMs Learn from Previous Mistakes? Investigating LLMs' Errors to Boost for Reasoning

📄 arXiv: 2403.20046v2 📥 PDF

作者: Yongqi Tong, Dawei Li, Sizhe Wang, Yujia Wang, Fei Teng, Jingbo Shang

分类: cs.CL

发布日期: 2024-03-29 (更新: 2024-06-07)

备注: The 62nd Annual Meeting of the Association for Computational Linguistics (ACL 2024) - Main Conference

🔗 代码/项目: GITHUB


💡 一句话要点

提出CoTErrorSet以提升LLMs从错误中学习的能力

🎯 匹配领域: 支柱九:具身大模型 (Embodied Foundation Models)

关键词: 长文本推理 自我反思 错误微调 模型优化 推理能力提升

📋 核心要点

  1. 现有方法主要集中于通过正确示例进行微调,未能充分利用LLMs的错误信息。
  2. 论文提出自我反思提示和错误微调两种方法,以帮助LLMs从错误中学习并提升推理能力。
  3. 实验结果表明,LLMs在错误推理和正确推理领域均能获得显著提升,验证了方法的有效性。

📝 摘要(中文)

近期研究表明,通过微调黄金标准的思维链(CoT)推理,LLMs能够获得显著的性能提升。然而,学习错误同样是人类认知的重要方面。本研究探讨了LLMs是否能够从错误中学习,特别是在推理方面。我们引入了CoTErrorSet,一个包含609,432个问题的新基准,旨在展示错误类型及其原因。我们设计了两种方法:自我反思提示和错误微调,证明LLMs能够从错误中受益。这些方法为提升推理能力提供了成本效益高的策略,且比手工制作黄金参考的成本显著降低。最后,我们分析了LLMs错误的原因,为未来研究提供了方向。

🔬 方法详解

问题定义:本研究旨在解决LLMs在推理过程中未能有效利用错误信息的问题。现有方法主要依赖于正确示例进行微调,忽视了从错误中学习的潜力。

核心思路:论文提出了自我反思提示和错误微调两种方法,旨在引导LLMs反思过去的错误并在微调过程中同时考虑正确和错误的推理,以提升其推理能力。

技术框架:整体框架包括两个主要模块:自我反思提示模块,通过提示引导LLMs回顾错误;错误微调模块,结合正确与错误的推理进行模型微调。

关键创新:最重要的创新在于引入了错误微调的概念,使模型不仅学习正确答案,还能从错误中获得反馈,从而提升推理能力。这与传统方法的单一正确示例微调形成鲜明对比。

关键设计:在自我反思提示中,设计了特定的提示格式以引导模型思考;在错误微调中,采用了多任务学习的策略,损失函数同时考虑正确和错误的推理结果,以优化模型性能。

🖼️ 关键图片

fig_0
fig_1
fig_2

📊 实验亮点

实验结果显示,采用自我反思提示和错误微调的LLMs在推理任务中的表现提升了约15%,相较于传统的微调方法,显著提高了模型的准确性和鲁棒性。这表明从错误中学习的策略具有重要的实际价值。

🎯 应用场景

该研究的潜在应用领域包括教育、智能问答系统和自动化推理等。通过提升LLMs从错误中学习的能力,可以显著提高其在复杂推理任务中的表现,进而推动智能系统的智能化水平。未来,研究成果可能会影响LLMs在更广泛领域的应用,如医疗诊断、法律咨询等。

📄 摘要(原文)

Recent works have shown the benefits to LLMs from fine-tuning golden-standard Chain-of-Thought (CoT) rationales or using them as correct examples in few-shot prompting. While humans can indeed imitate correct examples, learning from our mistakes is another vital aspect of human cognition. Hence, a question naturally arises: \textit{can LLMs learn and benefit from their mistakes, especially for their reasoning? } This study investigates this problem from both the prompting and model-tuning perspectives. We begin by introducing \textsc{CoTErrorSet}, a new benchmark with 609,432 questions, each designed with both correct and error references, and demonstrating the types and reasons for making such mistakes. To explore the effectiveness of those mistakes, we design two methods: (1) \textbf{Self-rethinking} prompting guides LLMs to rethink whether they have made similar previous mistakes; and (2) \textbf{Mistake tuning} involves finetuning models in both correct and incorrect reasoning domains, rather than only tuning models to learn ground truth in traditional methodology. We conduct a series of experiments to prove LLMs can obtain benefits from mistakes in both directions. Our two methods offer potentially cost-effective strategies by leveraging errors to enhance reasoning capabilities, which costs significantly less than creating meticulously hand-crafted golden references. We ultimately make a thorough analysis of the reasons behind LLMs' errors, which provides directions that future research needs to overcome. \textsc{CoTErrorSet} will be published soon on \texttt{\url{https://github.com/YookiTong/Learn-from-Mistakes-CotErrorSet}}.