[论文解读] Self-Play Fine-Tuning Converts Weak Language Models to Strong Language Models
SPIN 使用自我对弈对弱 SFT 模型进行微调,使用其自身前一轮的对手,以尽可能接近目标数据分布且不使用额外的人类数据。它在各基准上迭代提升性能。
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.
研究动机与目标
- 在不收集额外的人类标注数据的前提下,推动改进 LLMs。
- 开发一个自我对弈微调框架,使模型本身既充当玩家又充当对手。
- 在合理假设下证明收敛到目标数据分布。
- 在广泛使用的基准上评估 SPIN,以量化相对于基线 SFT 的提升。
- 突出自我对弈作为获得强大 LLMs 的途径的理论与实证洞见。
提出的方法
- 将 SPIN 定义为一个双人博弈,其中主模型试图将人类数据与模型自我前一轮的迭代区分开。
- 使用逻辑损失训练一个函数 f,用于对一个回应是来自数据还是来自模型进行评分。
- 推导对手的闭式更新:p(y|x) ∝ pθt(y|x) exp( f(x,y)/λ ).
- 用连续模型分布的对数比率对 f 进行参数化,f(x,y)=λ log [ pθt+1(y|x) / pθt(y|x) ].
- 通过最小化比较数据与对手在各提示下响应的 SPIN 目标,迭代更新 θ。
- 将 SPIN 与 DPO 以及 RLHF/RLAIF 进行比较,注意 SPIN 仅使用 SFT 数据和自我生成的数据。
实验结果
研究问题
- RQ1在不需要额外的人类标注数据的情况下,弱 LLM 能否升级为强 LLM?
- RQ2在迭代模型版本之间的自我对弈如何促进对齐至目标数据分布?
- RQ3迭代的 SPIN 训练是否在标准 LLM 基准上产生可衡量的提升?
- RQ4在什么条件下 SPIN 收敛到 p_data?
- RQ5在数据需求和性能方面,SPIN 与直接偏好优化相比如何?
主要发现
- SPIN 显著提升在 HuggingFace Open LLM Leaderboard 基准上相比于基础 SFT 模型的性能。
- 迭代 0 相对于基线 SFT 模型带来显著提升(平均 +2.66),TruthfulQA 与 GSM8k 上有较大提升。
- 后续迭代继续提升平均性能,收益随时间递减。
- SPIN 的结果与使用额外的 62k GPT-4-style 偏好数据训练的模型在 Open LLM Leaderboard 与 MT-Bench 的表现相当。
- 该方法不需要额外的人类偏好数据,依赖模型自身生成的自我对弈数据。
- 理论结果在合理的损失假设下显示收敛到目标数据分布。
更好的研究,从现在开始
从论文设计到论文写作,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。