Abstract
Fine-tuning language models (LMs) on human-generated data remains a prevalent practice. However, the performance of such models is often limited by the quantity and diversity of high-quality human data. In this paper, we explore whether we can go beyond human data on tasks where we have access to scalar feedback, for example, on math problems where one can verify correctness. To do so, we investigate a simple self-training method based on expectation-maximization, which we call ReST$^{EM}$, where we (1) generate samples from the model and filter them using binary feedback, (2) fine-tune the model on these samples, and (3) repeat this process a few times. Testing on advanced MATH reasoning and APPS coding benchmarks using PaLM-2 models, we find that ReST$^{EM}$ scales favorably with model size and significantly surpasses fine-tuning only on human data. Overall, our findings suggest self-training with feedback can substantially reduce dependence on human-generated data.
Introduction
The standard paradigm for enhancing Large Language Models (LLMs) involves Supervised Fine-Tuning (SFT) on curated, human-authored datasets. However, as models tackle increasingly complex domains like competition-level mathematics or advanced software engineering, we encounter a "human data bottleneck." High-quality human demonstrations for these tasks are scarce, expensive, and slow to produce. This research investigates a pivotal question: Can models transcend the limitations of human data by learning from their own successful attempts? By leveraging automated verification (e.g., unit tests or ground-truth answers), we can identify correct self-generated solutions and use them as a high-quality training signal.
The ReST$^{EM}$ Method
The researchers introduce ReST$^{EM}$ (Reinforcement Self-Training via Expectation-Maximization), an iterative, offline reinforcement learning approach. The process consists of two primary steps:
- Generate (E-step): The model generates multiple candidate solutions for a given set of problems. These candidates are filtered using a binary reward—solutions are kept only if they are verified as correct.
- Improve (M-step): The original base pretrained model is fine-tuned on the successful self-generated samples.
A critical design choice in ReST$^{EM}$ is restarting the fine-tuning from the base pretrained model in every iteration. This prevents "model drift"—a common issue in iterative self-training where the model's general capabilities degrade—and ensures it remains grounded in its broad pretraining while specializing in the target task.
Experimental Results
The study evaluated ReST$^{EM}$ using PaLM-2 models on the Hendrycks’ MATH and APPS coding benchmarks.
Performance and Scaling
A key finding is that ReST$^{EM}$ scales exceptionally well with model size. Larger models, such as PaLM-2-L, demonstrate more significant performance gains compared to smaller variants. This suggests that as models become more capable, their self-generated data becomes a richer and more effective training source.
The Power of Iteration
The iterative nature of ReST$^{EM}$ is vital. The researchers found that performing multiple iterations on the same problem set is more effective than a single pass with a larger volume of data. Each iteration allows the model to discover more diverse or efficient reasoning paths, providing a progressively better training signal.
Robust Transfer and Generalization
Models trained via ReST$^{EM}$ on the MATH dataset showed significant improvements on related but unseen benchmarks like GSM8K and the 2023 Hungarian high school math finals. Notably, the PaLM-2-L model tuned with ReST$^{EM}$ achieved 48.82% accuracy on MATH when using majority voting, surpassing many specialized models. Crucially, this task-specific improvement did not come at the cost of general reasoning abilities, as measured by Big-Bench Hard (BBH).
Conclusion and Future Work
ReST$^{EM}$ demonstrates that self-training with automated feedback can significantly reduce reliance on human-generated data for problem-solving tasks. While currently limited to domains with clear binary rewards (like math and code), future research could explore using LLMs as automated judges to extend this technique to more open-ended reasoning tasks. By overcoming the human data bottleneck, ReST$^{EM}$ paves the way for scaling model performance through self-improvement.
Summary updated