[Paper Review] Self-Play Fine-Tuning Converts Weak Language Models to Strong Language Models
SPIN fine-tunes a weak SFT model via self-play, using its own previous iteration as the opponent, to closely align with the target data distribution without extra human data. It iteratively improves performance across benchmarks.
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.
Motivation & Objective
- Motivate improving LLMs without collecting additional human-annotated data.
- Develop a self-play fine-tuning framework that leverages the model itself as both player and opponent.
- Prove convergence to the target data distribution under reasonable assumptions.
- Evaluate SPIN on widely-used benchmarks to quantify gains over baseline SFT.
- Highlight theoretical and empirical insights into self-play as a path to strong LLMs.
Proposed method
- Define SPIN as a two-player game where the main model tries to distinguish human data from the model's own previous iteration.
- Use a logistic loss to train a function f that scores whether a response comes from data or the model.
- Derive a closed-form update for the opponent: p(y|x) ∝ pθt(y|x) exp( f(x,y)/λ ).
- Parameterize f with the log-ratio of successive model distributions, f(x,y)=λ log [ pθt+1(y|x) / pθt(y|x) ].
- Iteratively update θ by minimizing a SPIN objective that compares data vs. opponent responses across prompts.
- Compare SPIN to DPO and RLHF/RLAIF, noting SPIN uses only SFT data and self-generated data.
Experimental results
Research questions
- RQ1Can a weak LLM be upgraded to a strong LLM without additional human-annotated data?
- RQ2How can self-play between iterative model versions facilitate alignment toward the target data distribution?
- RQ3Does iterative SPIN training yield measurable gains on standard LLM benchmarks?
- RQ4Under what conditions does SPIN converge to p_data?
- RQ5How does SPIN compare to direct preference optimization in data requirements and performance?
Key findings
- SPIN significantly improves performance on the HuggingFace Open LLM Leaderboard benchmarks compared to the base SFT model.
- Iteration 0 yields notable gains (e.g., +2.66 on average) over the base SFT model, with large gains on TruthfulQA and GSM8k.
- Subsequent iterations continue to improve average performance, with diminishing returns over time.
- SPIN achieves results comparable to models trained with additional 62k GPT-4-style preference data on Open LLM Leaderboard and MT-Bench.
- The method does not require extra human preference data, relying on self-play data generated by the model itself.
- Theoretical results show convergence to the target data distribution under reasonable loss assumptions.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.