Skip to main content
QUICK REVIEW

[论文解读] Self-play with Execution Feedback: Improving Instruction-following Capabilities of Large Language Models

Guanting Dong, Keming Lu|arXiv (Cornell University)|Jun 19, 2024
Topic ModelingComputer Science被引用 3
一句话总结

本文提出 AutoIF,一种可扩展的自动化方法,通过基于代码的验证和执行反馈,生成高质量的指令跟随训练数据。通过利用大语言模型生成指令、相应的验证代码和测试用例,并基于代码执行结果进行拒绝采样,AutoIF 生成了适用于 SFT 和 RLHF 的可靠数据,在 IFEval 上实现超过 90% 的准确率(使用 LLaMA3-70B),并在 FollowBench 上实现超过 5% 的性能提升。

ABSTRACT

One core capability of large language models (LLMs) is to follow natural language instructions. However, the issue of automatically constructing high-quality training data to enhance the complex instruction-following abilities of LLMs without manual annotation remains unresolved. In this paper, we introduce AutoIF, the first scalable and reliable method for automatically generating instruction-following training data. AutoIF transforms the validation of instruction-following data quality into code verification, requiring LLMs to generate instructions, the corresponding code to check the correctness of the instruction responses, and unit test samples to verify the code's correctness. Then, execution feedback-based rejection sampling can generate data for Supervised Fine-Tuning (SFT) and Reinforcement Learning from Human Feedback (RLHF) training. AutoIF achieves significant improvements across three training algorithms, SFT, Offline DPO, and Online DPO, when applied to the top open-source LLMs, Qwen2 and LLaMA3, in self-alignment and strong-to-weak distillation settings. Our code is publicly available at https://github.com/QwenLM/AutoIF.

研究动机与目标

  • 解决在无需人工标注的情况下规模化生成高质量指令跟随数据的挑战。
  • 克服人工标注带来的可扩展性不足和人为错误问题,以及高级大语言模型行为模仿中的可靠性问题。
  • 开发一种自动化、自监督的流水线,通过可执行验证和反馈确保数据质量。
  • 在多种训练范式(SFT、离线 DPO 和在线 DPO)中实现有效的指令跟随能力提升。
  • 利用开源大语言模型(如 Qwen2 和 LLaMA3)在指令跟随基准测试中实现最先进性能。

提出的方法

  • 以少量手工编写的种子指令作为指令生成的起点。
  • 应用 self-instruct 方法,使用大语言模型生成大规模、多样化的指令集,无需依赖高级模型。
  • 为每条指令生成验证代码和单元测试用例,以自动评估其正确性。
  • 过滤掉对应代码无法通过编译、测试用例未通过,或无法回译为原始指令的指令。
  • 基于执行反馈的拒绝采样机制,生成通过或失败验证代码的响应。
  • 将通过验证的响应用于监督微调(SFT),将成对的通过/失败响应用于强化学习中的直接偏好优化(DPO)

实验结果

研究问题

  • RQ1基于代码的验证能否在大规模场景下可靠评估指令跟随响应的正确性?
  • RQ2AutoIF 在生成高质量训练数据方面有多高效,能否在多种训练设置下提升指令跟随能力?
  • RQ3监督模型的编程能力在多大程度上影响数据质量和下游性能?
  • RQ4AutoIF 是否能在无需人工标注数据的情况下,实现在指令跟随基准测试中的最先进结果?
  • RQ5该方法在数据使用量极少的情况下,其数据质量、污染风险和性能增益如何实现可扩展?

主要发现

  • 使用 LLaMA3-70B 模型,AutoIF 在 IFEval 上实现了 90.4% 的 Loose Instruction Accuracy,创下新 SOTA 记录,是首个突破 90% 的模型。
  • Qwen2-72B 在 IFEval 上实现了 88.0% 的 Loose Instruction Accuracy,显著优于先前方法。
  • 在 FollowBench 基准测试中,使用 AutoIF 数据微调的模型在 SSR(平均)指标上实现了超过 5% 的性能提升。
  • 仅使用 AutoIF 生成的 DPO 数据的 1/64,Qwen2-7B 即达到 55% 的 Loose Prompt Accuracy,性能提升 11.4 个百分点,验证了其数据效率。
  • AutoIF 生成的 SFT 数据在 IFEval 和 FollowBench 上的污染率低于 0.02%,显著低于 ShareGPT,表明数据泄露极低。
  • 高质量数据的通过率与监督模型的编程能力密切相关,GPT-4 的通过率为 34%,IFEval 准确率达 59.3%,优于 LLaMA3-70B 和 Qwen2-72B。

阅读本论文

在 Nubint 阅读器中打开原文,边读边就任意段落提问。

在 Nubint 中阅读本论文

本解读由 AI 根据论文原文生成,引用前请核对原文。