Self-Play Fine-Tuning Converts Weak Language Models to Strong Language Models

📄 arXiv: 2401.01335v3 📥 PDF

作者: Zixiang Chen, Yihe Deng, Huizhuo Yuan, Kaixuan Ji, Quanquan Gu

分类: cs.LG, cs.AI, cs.CL, stat.ML

发布日期: 2024-01-02 (更新: 2024-06-14)

备注: 22 pages, 6 figures, 7 tables. In ICML 2024

🔗 代码/项目: GITHUB


💡 一句话要点

提出自我对弈微调方法以提升弱语言模型性能

🎯 匹配领域: 支柱二:RL算法与架构 (RL & Architecture) 支柱九:具身大模型 (Embodied Foundation Models)

关键词: 自我对弈 微调方法 语言模型 无监督学习 自然语言处理 模型优化 深度学习

📋 核心要点

  1. 现有方法依赖于人类标注数据,获取成本高且效率低,限制了弱语言模型的提升。
  2. 提出自我对弈微调(SPIN)方法,通过模型自生成数据进行训练,避免了对额外人类标注数据的需求。
  3. 实验结果显示,SPIN在多个基准测试中显著提升了模型性能,超越了传统的训练方法。

📝 摘要(中文)

利用人类标注数据进行监督微调(SFT)对大型语言模型(LLMs)的发展至关重要。本文探讨了在不获取额外人类标注数据的情况下,将弱语言模型转变为强语言模型的可能性。我们提出了一种新的微调方法,称为自我对弈微调(SPIN),该方法从一个经过监督微调的模型开始。SPIN的核心在于自我对弈机制,模型通过与自身的实例进行对弈来提升能力。具体而言,LLM从其先前的迭代中生成自己的训练数据,通过区分自生成的响应与人类标注数据来优化其策略。我们的实验表明,SPIN在多个基准数据集上显著提升了LLM的性能,甚至超越了通过直接偏好优化(DPO)训练的模型,展示了自我对弈的潜力。代码可在https://github.com/uclaml/SPIN获取。

🔬 方法详解

问题定义:本文旨在解决如何在不依赖额外人类标注数据的情况下,提升弱语言模型的性能。现有方法通常需要大量人类标注数据,成本高且难以获取。

核心思路:我们提出的自我对弈微调(SPIN)方法,通过让模型与自身进行对弈,生成新的训练数据,从而优化模型的学习过程。这种设计使得模型能够在没有外部数据的情况下自我提升。

技术框架:SPIN的整体架构包括两个主要阶段:首先,从一个经过监督微调的模型开始;其次,模型通过自我对弈生成训练数据,并利用这些数据进行进一步的微调。

关键创新:SPIN的核心创新在于自我对弈机制,使得模型能够在没有专家对手的情况下,达到人类水平的表现。这一方法与传统的依赖外部数据的训练方式有本质区别。

关键设计:在实现上,SPIN使用了特定的损失函数来优化模型的输出,并设计了适应性的参数设置,以确保模型在自我对弈过程中能够有效学习。

🖼️ 关键图片

fig_0
fig_1
fig_2

📊 实验亮点

实验结果表明,SPIN在多个基准数据集上显著提升了模型性能,超越了通过直接偏好优化(DPO)训练的模型,尤其是在HuggingFace Open LLM Leaderboard和MT-Bench等数据集上表现突出,展示了自我对弈的有效性。

🎯 应用场景

该研究的潜在应用领域包括自然语言处理、对话系统和智能助手等。通过自我对弈微调,模型能够在缺乏大量人类标注数据的情况下,快速提升性能,具有重要的实际价值和广泛的应用前景。

📄 摘要(原文)

Harnessing the power of human-annotated data through Supervised Fine-Tuning (SFT) is pivotal for advancing Large Language Models (LLMs). In this paper, we delve into the prospect of growing a strong LLM out of a weak one without the need for acquiring additional human-annotated data. We propose a new fine-tuning method called Self-Play fIne-tuNing (SPIN), which starts from a supervised fine-tuned model. At the heart of SPIN lies a self-play mechanism, where the LLM refines its capability by playing against instances of itself. More specifically, the LLM generates its own training data from its previous iterations, refining its policy by discerning these self-generated responses from those obtained from human-annotated data. Our method progressively elevates the LLM from a nascent model to a formidable one, unlocking the full potential of human-annotated demonstration data for SFT. Theoretically, we prove that the global optimum to the training objective function of our method is achieved only when the LLM policy aligns with the target data distribution. Empirically, we evaluate our method on several benchmark datasets including the HuggingFace Open LLM Leaderboard, MT-Bench, and datasets from Big-Bench. Our results show that SPIN can significantly improve the LLM's performance across a variety of benchmarks and even outperform models trained through direct preference optimization (DPO) supplemented with extra GPT-4 preference data. This sheds light on the promise of self-play, enabling the achievement of human-level performance in LLMs without the need for expert opponents. Codes are available at https://github.com/uclaml/SPIN.