SPaR: Self-Play with Tree-Search Refinement to Improve Instruction-Following in Large Language Models
本文提出了一种名为SPAR的自博弈框架,通过树搜索自我精炼来提高大型语言模型的指令遵循能力,显著提升了模型在复杂指令遵循任务中的性能。
更新于 2024-12-17。作者:Jiale Cheng、Xiao Liu、Cunxiang Wang、Xiaotao Gu、Yida Lu、Dan Zhang、Yuxiao Dong、Jie Tang、Hongning Wang、Minlie Huang。
中文摘要
指令遵循是语言模型的基本能力,要求模型能够识别指令中的最细微要求,并在其输出中准确反映这些要求。这种能力非常适合通过偏好学习进行优化。然而,现有的方法在创建偏好对时通常会直接从模型中采样多个独立的响应。这种做法可能会引入与是否精确遵循指令无关的内容变化(例如,关于相同语义的不同表达),干扰教会模型识别导致改进指令遵循的关键差异的目标。鉴于此,我们引入了SPaR,这是一个集成了树搜索自优化的自我博弈框架,能够产生无干扰的有效和可比较的偏好对。通过自我对战,大型语言模型(LLM)采用树搜索策略,在遵循指令的同时,最小化不必要的变异。我们的实验表明,经过SPaR引导的三个迭代训练的LLaMA3-8B模型,在IFEval基准测试中超越了GPT-4-Turbo,而没有损失其通用能力。此外,SPaR展示了良好的可扩展性和迁移性,大幅提升了GLM-4-9B和LLaMA3-70B等模型。我们还确定了树搜索中的推理缩放如何影响模型性能。我们的代码和数据可在https://github.com/thu-coai/SPaR上公开获取。
英文摘要
Instruction-following is a fundamental capability of language models, requiring the model to recognize even the most subtle requirements in the instructions and accurately reflect them in its output. Such an ability is well-suited for and often optimized by preference learning. However, existing methods often directly sample multiple independent responses from the model when creating preference pairs. Such practice can introduce content variations irrelevant to whether the instruction is precisely followed (e.g., different expressions about the same semantic), interfering with the goal of teaching models to recognize the key differences that lead to improved instruction following. In light of this, we introduce SPaR, a self-play framework integrating tree-search self-refinement to yield valid and comparable preference pairs free from distractions. By playing against itself, an LLM employs a tree-search strategy to refine its previous responses with respect to the instruction while minimizing unnecessary variations. Our experiments show that a LLaMA3-8B model, trained over three iterations guided by SPaR, surpasses GPT-4-Turbo on the IFEval benchmark without losing general capabilities. Furthermore, SPaR demonstrates promising scalability and transferability, greatly enhancing models like GLM-4-9B and LLaMA3-70B. We also identify how inference scaling in tree search would impact model performance. Our code and data are publicly available at https://github.com/thu-coai/SPaR.
解读
一句话总结
本文提出了一种名为SPAR的自博弈框架,通过树搜索自我精炼来提高大型语言模型的指令遵循能力,显著提升了模型在复杂指令遵循任务中的性能。
问题1:这篇论文想要解决什么具体问题?
• 问题背景:大型语言模型的指令遵循能力对于其在实际应用中的表现至关重要,但目前的方法在构建偏好对时往往会引入与指令遵循无关的内容变化,干扰了模型学习的关键差异。 • 现有方案不足:现有方法通常直接从模型中采样多个独立响应来创建偏好对,这可能导致与指令遵循无关的内容变化,干扰模型学习关键差异。 • 研究目标:提出SPAR框架,通过自我博弈和树搜索自我精炼,生成有效且可比的偏好对,从而提高指令遵循能力。
问题2:论文的核心创新点是什么?
• 技术创新:SPAR框架结合了自我博弈和树搜索自我精炼技术,通过迭代训练模型,使其能够从细微之处学习指令遵循。 • 方法改进:引入了树搜索算法,以系统地探索精炼路径,并减少无关因素的干扰。 • 优势:SPAR能够生成高质量的偏好对,有效提高模型的指令遵循能力,同时保持模型的泛化能力。
问题3:实验结果如何验证了方法的有效性?
• 关键实验:在多个LLM上进行的实验,包括LLaMA3系列、GLM-4-9B和Mistral-7B-Instruct,均显示出显著的性能提升。 • 性能提升:在三个迭代周期后,SPAR训练的LLaMA3-8B-Instruct在IFEval基准测试中超过了GPT-4-Turbo。 • 对比结果:与基线方法如AutoIF、SELF、Self-rewarding、Meta-rewarding和Humpback相比,SPAR在指令遵循能力方面表现出显著优势。
问题4:这个研究的实际应用价值是什么?
• 应用场景:SPAR框架可以应用于各种需要复杂指令遵循的领域,如智能客服、代码生成和内容创作等。 • 实施建议:在实际部署中,可以根据具体任务需求调整模型大小和训练迭代次数。 • 局限与展望:SPAR框架在处理非常复杂的指令时可能面临挑战,未来的研究可以探索更有效的数据增强和模型优化方法。