Getting More Juice Out of the SFT Data: Reward Learning from Human Demonstration Improves SFT for LLM Alignment

Aligning human preference and value is an important requirement for contemporary foundation models. State-of-the-art techniques such as Reinforcement Learning from Human Feedback (RLHF) often consist of two stages: 1) supervised fine-tuning (SFT), where the model is fine-tuned by learning from human demonstration data; 2) Preference learning, where preference data is used to learn a reward model, which is in turn used by a reinforcement learning (RL) step to fine-tune the model. Such reward model serves as a proxy to human preference, and it is critical to guide the RL step towards improving the model quality. In this work, we argue that the SFT stage significantly benefits from learning a reward model as well. Instead of using the human demonstration data directly via supervised learning, we propose to leverage an Inverse Reinforcement Learning (IRL) technique to simultaneously build an reward model and a policy model. This approach leads to new SFT algorithms that are not only efficient to implement, but are robust to the presence of low-quality supervised learning data. Moreover, we discover a connection between the proposed IRL based approach, and a recent line of works called Self-Play Fine-tune (SPIN). Theoretically, we show that the proposed algorithms converge to the stationary solutions of the IRL problem. Empirically, we align 1B and 7B models using proposed methods and evaluate them on a reward benchmark model and the HuggingFace Open LLM Leaderboard. The proposed methods show significant performance improvement over existing SFT approaches. Our results indicate that it is beneficial to leverage reward learning throughout the entire alignment process.

Paper

References (57)

Scroll for more · 38 remaining

Similar papers

Peer review

Reviewer Tyd87/10 · confidence 4/52024-07-09

Summary

This paper proposes an approach to aligning Large Language Models (LLMs) with human preferences by integrating Inverse Reinforcement Learning (IRL) into the supervised fine-tuning (SFT) stage. The proposed IRL-based method simultaneously builds a reward model and a policy model during the SFT stage, enhancing efficiency and robustness against low-quality data.

Strengths

1. The paper introduces a novel IRL-based method for the SFT stage, providing a fresh perspective on improving LLM alignment. 2. The paper provides a strong theoretical basis for the proposed algorithms, ensuring that they converge to stationary solutions of the IRL problem. 3. The evaluation includes both theoretical analysis and empirical testing on large-scale models, ensuring the validity of the results.

Weaknesses

1. The paper does not address the scalability of the proposed methods to even larger models or different types of LLMs beyond the ones tested. 2. The evaluation results only present the empirical performance but lack experiments on computation costs introduced by this method.

Questions

1. It seems that RFT and IRFT perform equally. What's the takeaway from these two methods? Moreover, how to choose them wisely. 2. Typo in L226, there's an error in referring to the Appendix. 3. In L204-206 "In 204 practice however we take a relatively small T and large K, because frequent on-line sampling is time 205 consuming" How does this parameter choice affect the final performance, especially compared to large T and Large K?

Rating

7

Confidence

4

Soundness

3

Presentation

3

Contribution

2

Limitations

The limitations are included in the conclusion section.

Reviewer RhUZ6/10 · confidence 4/52024-07-11

Summary

This paper proposes to study if IRL techniques can be used for aligning large language models. They propose two different algorithms: one that explicitly learns a reward model and one that implicitly learns the reward in the policy. These reward models are learned by contrasting expert generations and the policy generations.

Strengths

- The paper writing and motivation is clear. - The paper includes in depth theoretical analysis. - They evaluate the trained LLMs on a wide variety of benchmarks.

Weaknesses

- The experiments are not very convincing. For the Open LLM leaderboard experiments, the gain is really small (around 1 or 2%). It seems likely that this gain is due to variance in the training process, especially since IRFT has ~1% variance in different hyperparameter settings. - There isn’t much discussion of the computational cost of the algorithms.

Questions

- How accurate is the learned reward model? - The experimental setting is not very clear. Is Algorithm 1 used on the top 10K data selected by the reward model? If so this is really problematic: shouldn’t you fine tune on the whole dataset (or a randomly downsampled subset)? Can you assume that you will have access to 10K samples with high reward scores? And wouldn't just be better to use the reward model used for data selection for RL? - How robust is IRFT to hyperparameter setting compared to SFT? - Is 1-2% increase on the OpenLLM benchmark meaningful?

Rating

6

Confidence

4

Soundness

3

Presentation

3

Contribution

3

Limitations

Yes, the authors discuss limitations.

Reviewer J5fv5/10 · confidence 3/52024-07-13

Summary

The authors propose using inverse reinforcement learning (IRL) on demonstration data in place of supervised learning, as is typically done for LLMs. The intuition is that human preferences are also encoded in demonstrations collected for SFT. Concretely, the authors propose a bilevel optimization approach with policy learning at the lower level and reward learning at the upper level. Two methods are proposed for alignment: with either implicit or explicit reward learning. The authors demonstrate improved performance when used to finetune smaller language models, compared to existing SFT approaches.

Strengths

- The method seems (to the best of my knowledge) to be novel and interesting, tying together recent LLM literature and IRL methods. - The authors compare against relevant baselines (normal SFT, or SPIN) across a suite of benchmarks and two model sizes. - The overarching idea and question the paper strives to answer is of importance and relevance to the research community, as the proposed methods enable extracting more value out of SFT data.

Weaknesses

- The experimental results seem to support the efficacy of the proposed algorithms, however the gains across various tasks with IRFT seem fairly marginal (it would help if Table 2 and 3 contained error bars, perhaps with policies finetuned with different seeds). As it stands, it seems like different benchmarks results are sensitive to different hyperparameters (choice of T), and the baselines outperform IRFT on 3/6 of the benchmarks in Table 3, suggesting that the additional complexity of the method does not necessarily lead to improved performance across all tasks. For example, the best average performance of IRFT is 61.03, whereas the best baseline achieves 61.02. - Furthermore, the results seem more mixed in Table 3 compared to Table 2, suggesting that it's not clear the method is still effective as model sizes increase. - It would help to present the SFT results in Table 3. Even though the authors note that further SFT could degrade performance, it would help to see how effectively using the demonstration data with IRFT or SPIN compares against naive SFT. - Minor note: line 157 seems incomplete, "even when the demonstration policy is"...(extreme)? - Minor note: the notation is a bit confusing, with theta referring to both the model parameters and the reward model parameters. For clarity, it would help if separate variables were used. - Minor note: missing reference to appendix in line 226. - Minor note: grammar error in line 320 -- "SPIN and IRFT are both capable of further improv(ing) the performance.."

Questions

See Weaknesses section for suggestions.

Rating

5

Confidence

3

Soundness

2

Presentation

2

Contribution

3

Limitations

The paper is missing more thorough discussion on the method’s limitations and weaknesses (e.g. sensitivity to T, more complicated training process compared to SFT, etc.).

Reviewer AMst5/10 · confidence 3/52024-07-30

Summary

This paper proposes two methods focusing on RLHF, namely RFT and IRFT. The takeaway message is that the SFT stage also significantly benefits from learning a reward model instead of using the human demonstration data directly via supervised learning.

Strengths

1. The paper is clear, illustrating the differences between similar works. 2. The motivation is clear, and the method is reasonable. Most importantly, it provides parts of theoretical analysis for the convergence.

Weaknesses

1. The training procedure is complicated, meaning there are many issues in tunning. Is there any computation cost analysis for better understanding the limitations of this method? 2. Though the author discusses SPIN, the truth is that equation 4.7 in SPIN is very similar to equation 6 in this paper. 3. The experimental results are not strong. It did not surpass the SPIN by a large margin. Are there any other baselines that can be incorporated such as DPO?

Questions

How can the reward model obtain the generalization power? Can the author say more about it, in my understanding, the main issue that affects the generalization is the scale of the demonstration dataset.

Rating

5

Confidence

3

Soundness

2

Presentation

3

Contribution

2

Limitations

See weaknesses. I have to say I am not an expert in this field, therefore, I am willing to change my attitude if I find I am wrong.

Reviewer RhUZ2024-08-08

Concern about OpenLLM benchmark and Comparison to SPIN

Thank you for providing more details on the computational cost of the algorithm and showing the accuracy of the obtained reward model. I am still concerned over the weak performance on the OpenLLM leaderboard. I checked the SPIN paper, and they reported a 8-9% improvement on the OpenLLM leaderboard. Do you know why there is a large discrepancy between the results reported in SPIN and those in this paper? Furthermore, is it possible to re-run some of your experiments with different seeds and conduct significance tests on the results?

Authorsrebuttal2024-08-10

> **Concern about OpenLLM benchmark and Comparison to SPIN**: Thanks for checking the rebuttal. TL;DR: 1. we suspect that a different version of baseline "zephyr-7b-sft-full" has been used in the SPIN paper which led to a significantly higher lift of 8-9% improvement, compared to ours of 2.6%. 2. when evaluated on the same baseline and codebase, every iteration our proposed algorithm outperforms every iteration of SPIN. The SPIN paper reported the following improvements: *(base model: older version; evaluation codebase: v0.4.0; test without LoRA)* | Iterations | zephyr-7b-sft-full | iter0 | iter1 | iter2 | iter3 | | -------- | ------- | ------- | ------- | ------- | ------- | | Average Performance | 58.14 | 60.80 | 62.12 | 62.97 | 63.16 | | Absolute increase | | 2.66 | 1.32 | 0.85 | 0.89 | | Relative increase | | 4.56% | 6.85% | 8.31% | 8.63% | We believe the result should be interpreted in the following way: 1. First, the baseline in our paper is different from SPIN paper: We believe a different baseline model is used in SPIN as evidenced in the Github discussions & the SPIN paper was released before the baseline is fully trained (Jan 2 vs Jan 10), see for example [this discussion](https://github.com/uclaml/SPIN/issues/12). In particular, in Table 3 of the SPIN paper, the base model yields a "26.76" accuracy for GSM8k dataset, but we observe "31.92" which is significantly higher. We notice that a newer version of both the model zephyr-7b-sft-full (see [their model commit history](https://huggingface.co/alignment-handbook/zephyr-7b-sft-full/commits/main)) and the lm_eval evaluation package which both our paper and SPIN use for evaluation (see [their codebase](https://github.com/EleutherAI/lm-evaluation-harness)) are used in our paper. We run test on different versions of base model and eval codebase and obtain a table as follows: *(Performance of different version of zephyr-7b-sft-full, note we also change the first two tasks to make it fully aligned with SPIN paper)* | Base model version| Eval package version | Arc_challenge | TruthfulQA_mc2 | Winogrande | GSM8k | Hellaswag | MMLU | Average | | -------- | -------| ------- | ------- | ------- | ------- | ------- | ------- | ------- | | [Newest](https://huggingface.co/alignment-handbook/zephyr-7b-sft-full) | [v0.4.0](https://github.com/EleutherAI/lm-evaluation-harness/tree/v0.4.0) | 58.02 | 40.40 | 76.16 | 34.19 | 80.89 | 57.46 | 57.85 | | [Version in SPIN](https://huggingface.co/alignment-handbook/zephyr-7b-sft-full/commit/90e0792328bc522e1662a3a7c611b030d563bf5b) | [v0.4.0](https://github.com/EleutherAI/lm-evaluation-harness/tree/v0.4.0) | 60.84 | 43.74 | 78.69 | 26.23 | 82.79 | 58.97 | 58.54 | where we indeed see that the new version of the base model has a significant lift in the performance on GSM8k comparing to the old version. We remark that SPIN paper observes the most significant increase of SPIN algorithm on GSM8k task (from 26.76 to 35.10). **Since we use the newest model in all our experiments, it leaves much less space for us to improve from.** 2. Second, we should not compare the iter3's 8.63% increase with our paper's 2.66% increase directly. When we say we take $T=5$ and epoch=2 as in Table 3 of our paper, we essential split the data into 5 chunks and generate more frequently than SPIN, but still consume and generate for all the training data for **2 epochs in total** (SPIN iter0 also trained for 2 epochs). So what we need to compare is the first iteration of SPIN (which is SPIN iter0 in SPIN's original paper). In view of Table 3 in our paper, a fair comparison is the following table, note that the baseline is newest version of the model on the newest evaluation codebase (we follow the "iteration" notion in SPIN paper): *(base model: newest version; evaluation codebase: v0.4.3; test without LoRA)* | Iterations | zephyr-7b-sft-full | iter0 | iter1 | | -------- | ------- | ------- | ------- | | SPIN | 59.48 | 60.32 | 61.02 | | IRFT | 59.48 | 60.71 | 61.03 | Essentially **under our fair comparison setting**, every iteration of our proposed algorithm outperforms every iteration of SPIN. We didn't further do experiment for iter2 and iter3 because under our experiment setting, both SPIN and IRFT seem to have less significant improvement from iter0 to iter1 (less than 1 point in average accuracy), and also due to our limited computing resources. (To be continued)

Authorsrebuttal2024-08-10

(Continuing above) We also tried to revert back to v0.4.0 of the evaluation codebase (which we believe should be the version of evaluation codebase used by SPIN) and strictly following the metrics SPIN paper mentioned. We have the following result for the same setting as the Table in our general rebuttal: *(base model: newest version; evaluation codebase: v0.4.0; test with LoRA r=64)* | Task | Arc_challenge | TruthfulQA_mc2 | Winogrande | GSM8k | Hellaswag | MMLU | Average | | -------- | ------- | ------- | ------- | ------- | ------- | ------- | ------- | | zephyr-7b-sft-full | 58.02 | 40.4 | 76.16 | 34.19 | 80.89 | 57.46 | 57.85 | | SFT | 58.87 | 40.34 | 76.56 | 34.5 | 81.42 | 57.93 | 58.27 | | IRFT (T=1, SPIN iter0) | 59.64 | 40.4 | 75.85 | 34.5 | 81.98 | 57.46 | 58.31 | | IRFT (T=5, iter0) | 61.09 | 42.92 | 76.95 | 35.25 | 82.48 | 57.66 | 59.39 | In the above table, the baseline performancec in GSM8k is "34.19", which is still significantly higher than "26.76" in that of SPIN paper. Therefore the baseline is still significantly different from SPIN paper, also our algorithm (last row) is still outperforming SPIN (second last row) by more than 1 point of average accuracy in iter0. We hope this clarification makes the comparison clear. We will point this out and revise our experiment setting section accordingly. > Furthermore, is it possible to re-run some of your experiments with different seeds and conduct significance tests on the results? **Response**: Due to limited computational resources, we did not conduct extensive experiment on multiple seeds (note that SPIN also did not do significance test). Here we provide 3 trials on IRFT iter0 (with T=5) with three different seeds: *(base model: newest version; evaluation codebase: v0.4.3; test without LoRA)* | Task | Arc | TruthfulQA | Winogrande | GSM8k | Hellaswag | MMLU | Average | | -------- | ------- | ------- | ------- | ------- | ------- | ------- | ------- | | zephyr-7b-sft-full | 74.83 | 34.07 | 76.09 | 31.92 | 81.09 | 58.86 | 59.48 | | IRFT (T=5, iter0) trial1 | 75.82 | 39.99 | 77.19 | 31.24 | 82.07 | 57.93 | 60.71 | IRFT (T=5, iter0) trial2 | 76.66 | 36.25 | 76.48 | 32.37 | 82.13 | 58.30| 60.37 | | IRFT (T=5, iter0) trial3 | 75.42 | 35.85 | 76.80 | 32.60 | 82.27 | 58.92 | 60.31 | Above table indicates a variance of 0.05 (a standard deviation of 0.22) for the average performance. We wish this gives you a flavor of the level of variance for our experiments. It might be very hard for us to systematically test the random seed effect starting from now. For each 7b experiment, we need to generate continuation for each prompt, which will take roughly 8 hours for the entire training dataset and another 8 hours to do the full-fine-tune on 8 A100-40G; For LoRA (r=64) we need 4 A100-40G for a similar time. We would need to wait in the queue for resources, which makes it impossible to estimate the time for us to finish. The same situation applies for running the SPIN algorithm.

Reviewer RhUZ2024-08-10

Thank you for the discussion

Thank you for the comprehensive experiments and discussion of the SPIN codebase. All of my concerns are cleared up and I will raise my score.

Authorsrebuttal2024-08-11

Thank you very much for re-evaluating our work and we will incorporate the discussion to the revised paper!

Authorsrebuttal2024-08-11

A gentle reminder on the discussion period

Dear reviewers, We thank all of your constructive feedbacks toward this work, and we tried our best to address your concerns and questions. As the author-reviewer discussion period is ending in three days, we gently remind you to check out our rebuttal and let us know if you still have any comments. Thank you very much! Best, Authors of submission 14483

Reviewer J5fv2024-08-12

I thank the authors for responding to my questions. The additional experiments on the accuracy of the implicit reward model are interesting to see, and overall the proposed method presents an interesting perspective on introducing IRL in the SFT stage. However, the improvements in the LoRA setting do not fully address my concerns around the lack of clear improvement coming from the method. As such, I have adjusted my score accordingly.

Reviewer AMst2024-08-12

Thanks to the author's rebuttal, most of my doubts have been resolved, but I still don't think the performance gap is significant. In the discussion phase, I would discuss this point. No matter what the discussion result is, my final score will align with other reviewers.

Program Chairsdecision2024-09-25

Decision

Accept (poster)

© 2026 NYSGPT2525 LLC