Improving Large Language Model Fine-tuning for Solving Math Problems

📄 arXiv: 2310.10047v1 📥 PDF

作者: Yixin Liu, Avi Singh, C. Daniel Freeman, John D. Co-Reyes, Peter J. Liu

分类: cs.CL

发布日期: 2023-10-16


💡 一句话要点

提出三种微调策略以提升大语言模型数学问题求解能力

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

关键词: 大语言模型 数学问题求解 微调策略 多任务学习 解决方案生成 模型评估 深度学习

📋 核心要点

  1. 核心问题:现有大语言模型在数学问题求解上存在显著的性能差距,尤其是在一次性通过与多次尝试通过的表现上。
  2. 方法要点:提出三种微调策略,包括解决方案微调、解决方案集群重排序和多任务顺序微调,以提升模型的求解能力。
  3. 实验或效果:通过实证研究,微调后的PaLM 2模型在MATH数据集上实现了58.8%的准确率,较预训练模型提升了11.2%。

📝 摘要(中文)

尽管大语言模型在许多自然语言任务中表现出色,但解决数学问题仍然是一个重大挑战。现有模型在一次性通过和多次尝试通过数学问题的表现存在显著差距,提示我们探索微调方法以提升模型性能。本文使用具有挑战性的MATH数据集,研究了三种微调策略:解决方案微调、解决方案集群重排序和多任务顺序微调。通过对PaLM 2模型的实证研究,我们发现微调过程中逐步解决方案的质量和风格对模型性能有显著影响。最终,我们设计的微调方案在MATH数据集上实现了约58.8%的准确率,相较于预训练模型的少量样本性能提升了11.2%。

🔬 方法详解

问题定义:本文旨在解决大语言模型在数学问题求解中的性能不足,尤其是一次性通过与多次尝试通过之间的显著差距。现有方法未能有效利用模型的潜力,导致求解准确率低下。

核心思路:论文提出三种微调策略,旨在通过优化模型的训练过程来提升其在数学问题上的表现。这些策略包括生成详细解决方案、对候选解决方案进行重排序以及结合生成与评估任务的多任务微调。

技术框架:整体架构包括三个主要模块:解决方案生成模块、解决方案重排序模块和多任务训练模块。首先,模型生成解决方案,然后对生成的解决方案进行评估和重排序,最后通过多任务学习整合生成与评估过程。

关键创新:最重要的创新在于提出了结合解决方案生成与评估的多任务微调策略,这种方法与传统的单一任务微调方法本质上不同,能够更有效地提升模型性能。

关键设计:在微调过程中,模型的损失函数设计考虑了生成解决方案的质量和风格,重排序策略则采用了投票机制以提高最终选择的准确性。

🖼️ 关键图片

fig_0
fig_1
fig_2

📊 实验亮点

实验结果显示,微调后的PaLM 2模型在MATH数据集上达到了58.8%的准确率,相较于预训练模型的少量样本性能提升了11.2%。此外,解决方案重排序和多任务微调的结合使用显著提高了模型的整体表现,验证了提出方法的有效性。

🎯 应用场景

该研究的潜在应用领域包括教育、自动化数学解题系统以及智能辅导工具。通过提升大语言模型在数学问题求解上的能力,可以为学生提供更精准的解题指导,促进学习效果的提升。此外,该研究的成果也可为其他领域的复杂问题求解提供借鉴。

📄 摘要(原文)

Despite their success in many natural language tasks, solving math problems remains a significant challenge for large language models (LLMs). A large gap exists between LLMs' pass-at-one and pass-at-N performance in solving math problems, suggesting LLMs might be close to finding correct solutions, motivating our exploration of fine-tuning methods to unlock LLMs' performance. Using the challenging MATH dataset, we investigate three fine-tuning strategies: (1) solution fine-tuning, where we fine-tune to generate a detailed solution for a given math problem; (2) solution-cluster re-ranking, where the LLM is fine-tuned as a solution verifier/evaluator to choose among generated candidate solution clusters; (3) multi-task sequential fine-tuning, which integrates both solution generation and evaluation tasks together efficiently to enhance the LLM performance. With these methods, we present a thorough empirical study on a series of PaLM 2 models and find: (1) The quality and style of the step-by-step solutions used for fine-tuning can make a significant impact on the model performance; (2) While solution re-ranking and majority voting are both effective for improving the model performance when used separately, they can also be used together for an even greater performance boost; (3) Multi-task fine-tuning that sequentially separates the solution generation and evaluation tasks can offer improved performance compared with the solution fine-tuning baseline. Guided by these insights, we design a fine-tuning recipe that yields approximately 58.8% accuracy on the MATH dataset with fine-tuned PaLM 2-L models, an 11.2% accuracy improvement over the few-shot performance of pre-trained PaLM 2-L model with majority voting.