Statistical Rejection Sampling Improves Preference Optimization

Tianqi Liu, Yao Zhao, Rishabh Joshi, Misha Khalman, Mohammad Saleh, Peter J Liu, Jialu Liu

Introduction

Aligning Large Language Models (LLMs) with human preferences is traditionally achieved via Reinforcement Learning from Human Feedback (RLHF). However, RLHF is notoriously finicky, unstable, and memory-intensive, often requiring practitioners to keep multiple models in memory simultaneously.

Recently, "offline" methods like Direct Preference Optimization (DPO) and Sequence Likelihood Calibration (SLiC) have emerged as simpler, more stable alternatives. Despite their practical advantages, these methods harbor a theoretical flaw: they typically train on preference data sampled from a basic Supervised Fine-Tuning (SFT) policy or static datasets. Accurately estimating the theoretical "optimal" policy requires data sampled from the optimal policy itself. Because this policy is unknown during training, offline methods suffer from a distribution mismatch.

To address this, researchers have introduced Statistical Rejection Sampling Optimization (RSO), a novel offline alignment technique that bridges the gap between simple preference learning and complex RLHF. By using a reward model and rejection sampling to "hallucinate" what an optimal policy would produce, RSO creates higher-quality training data that consistently outperforms popular methods.

Methodology

The RSO approach sources preference data that better approximates the target optimal policy without the overhead of online reinforcement learning. It follows a distinct three-step pipeline:

The three-step pipeline of Statistical Rejection Sampling Optimization (RSO).
  1. Train a Reward Model: The process begins by training a pairwise reward-ranking model (based on architectures like T5-XXL) using existing human preference data.
  2. Statistical Rejection Sampling: This is the core innovation. The system samples multiple candidate responses (e.g., 64) from the base SFT model. It then uses the reward model to calculate an "acceptance probability" for each response. This filters the SFT samples to create a new dataset that statistically mimics the distribution of the target optimal policy.
  3. Preference Optimization: Finally, new preference pairs are created from these "accepted" samples to train the final model.

Alongside this pipeline, the authors introduce a unified loss framework. They demonstrate that DPO essentially performs logistic regression on preference data, while SLiC acts akin to a Support Vector Machine (SVM) with hinge loss. Building on this, they propose improved versions of these losses (such as hinge-norm) to better regularize the model during training.

Datasets

RSO was rigorously evaluated on three primary benchmarks:

  • Reddit TL;DR: A dataset for long-form text summarization.
  • AnthropicHH (Helpful and Harmless): A dialogue dataset focused on AI assistant interactions.
  • CNN/DailyMail: Used to test "cross-task generalization"—evaluating whether a model trained on Reddit preferences can effectively summarize news articles.

Key Insights

  • The Power of the Proxy: An explicit reward model serves as a better teacher than raw preference pairs. Comparing rewards provides a simpler, more direct signal for a model to learn than the complex task of generating high-quality text from scratch.
  • Closing the Distribution Gap: Most offline methods are "off-policy," learning from data generated by a suboptimal model. RSO's rejection sampling makes the process "pseudo-on-policy," supplying the model with examples that closely resemble its intended optimal output.
  • Loss Function Symmetry: By framing DPO and SLiC as different statistical classifiers, the authors reveal that the choice of loss function is often less critical than the quality of the data distribution used for training.

Key Results

RSO consistently outperformed existing state-of-the-art offline methods across multiple evaluation metrics, including proxy rewards, "Gold" rewards (a separate, held-out reward model), and LLM-as-a-judge (AutoSxS) evaluations.

Performance comparison of RSO against baselines like DPO and SLiC across Reddit TL;DR and AnthropicHH datasets.
  • Reddit TL;DR: RSO achieved a 71.86% win rate against the SFT target in AutoSxS evaluation, notably surpassing DPO’s 67.72%.
  • AnthropicHH: The performance gap widened in dialogue tasks, where RSO hit a 40.98% win rate compared to DPO’s 24.01%.
  • Human Evaluation: In side-by-side human trials on Reddit TL;DR, RSO was chosen as the preferred summary 48% of the time, while DPO was chosen only 21% of the time.
  • Scalability: These benefits persisted even when scaling up to a T5-XXL (11B) policy model, demonstrating RSO's viability for large-scale models.

Limitations and Future Work

While RSO is more computationally efficient than online RLHF, it introduces an extra offline step: sampling dozens of candidates per prompt and evaluating them through a reward model. Though a one-time cost, it is more resource-intensive than "direct" DPO.

Furthermore, while RSO successfully balances reward exploitation and regularization, its efficacy is heavily reliant on the quality of the initial reward model. If the reward model is susceptible to "reward hacking" (assigning high scores to nonsensical but statistically exploitative text), RSO will inherit and potentially amplify those flaws. Future research directions include exploring online variants of RSO and testing the framework on a wider variety of non-human feedback signals.

Summary updated

BibTeX
@inproceedings{liu2024statistical,
  author = {Tianqi Liu and Yao Zhao and Rishabh Joshi and Misha Khalman and Mohammad Saleh and Peter J Liu and Jialu Liu},
  title = {{Statistical Rejection Sampling Improves Preference Optimization}},
  booktitle = {International Conference on Learning Representations},
  year = {2024},
  url = {https://openreview.net/forum?id=xbjSwwrQOe},
}
Figure