Filtered Direct Preference Optimization

Tetsuro Morimura, Mitsuki Sakamoto, Yuu Jinnai, Kenshi Abe, Kaito Ariu

Abstract

Reinforcement learning from human feedback (RLHF) is essential for aligning large language models (LLMs) with human values. While Direct Preference Optimization (DPO) has emerged as a popular, reward-model-free alternative to traditional RLHF, its performance is highly dependent on the quality of the preference dataset. This paper investigates the sensitivity of DPO to low-quality data and introduces Filtered Direct Preference Optimization (fDPO). By using a trained reward model to filter out subpar training samples during the optimization process, fDPO significantly improves model performance on noisy, real-world datasets, often matching the results achieved with pristine, high-quality data.

Introduction

Aligning LLMs typically involves two main approaches: traditional RLHF, which utilizes a reward model and proximal policy optimization (PPO), and DPO, which simplifies the process by optimizing the policy directly from preference pairs. Despite its simplicity and computational efficiency, DPO assumes that the "chosen" response in a pair is of high quality. However, real-world datasets are frequently "mixed," containing a combination of high-quality human responses and lower-quality AI-generated text. Research demonstrates that DPO is significantly more vulnerable to such "data poisoning" than traditional RLHF.

The Sensitivity of DPO to Data Quality

A key finding of this work is the "sensitivity gap" between DPO and PPO-based RLHF. In DPO, the objective function directly increases the log probability of the "chosen" response relative to the "rejected" one. When the "chosen" response is actually of lower quality than what the model can currently produce, DPO forces the model to regress toward a suboptimal standard. In contrast, PPO-based RLHF uses a reward model that provides a more continuous signal, making it more robust to individual noisy samples.

Comparison of RLHF and DPO sensitivity to dataset quality (A) and the performance of fDPO on mixed datasets (B).

As shown in the figure above (A), DPO's performance plateaus more severely than RLHF when trained on mixed-quality datasets. This sensitivity necessitates a mechanism to ensure the model only learns from samples that actually represent an improvement over its current state.

Filtered Direct Preference Optimization (fDPO)

To address this vulnerability, the authors propose fDPO, which reintroduces a Reward Model (RM) as a quality filter. Unlike traditional RLHF, the RM in fDPO does not guide the optimization directly but acts as a gatekeeper. The training process involves three main steps:

  1. Supervised Fine-Tuning (SFT): Initializing the policy model.
  2. Reward Modeling: Training an RM on the preference dataset.
  3. DPO with Filtering: In each training epoch, the model generates a response to a prompt. The RM compares this generated response to the "chosen" response in the dataset. If the model’s own response receives a higher reward score, the dataset sample is considered "low quality" and is discarded for that epoch.

This dynamic filtering ensures that the model never "demotes" itself by attempting to imitate a response that is inferior to its current capabilities.

Experimental Results

The researchers evaluated fDPO on the AlpacaFarm and Anthropic HH benchmarks. On mixed-quality datasets, fDPO effectively prevented the performance decline observed in standard DPO. Notably, fDPO trained on noisy data achieved performance levels comparable to standard DPO trained on high-quality data, as illustrated in the bar chart (B) above.

On the Anthropic HH "Helpful" dataset, fDPO achieved a Gold RM score of 1.94, significantly higher than the 1.42 achieved by standard DPO. Furthermore, human-level evaluation using GPT-4o showed a strong preference for fDPO, with win rates of 66% for helpfulness and 60% for harmlessness over standard DPO.

Interestingly, the study found that smaller Reward Models often performed better for filtering, suggesting that the filter needs to be a consistent judge of relative quality rather than an absolute oracle. Additionally, despite the overhead of response generation, fDPO's total training time remains competitive with DPO because the filtering process reduces the effective number of training samples in later epochs.

Conclusion

Filtered Direct Preference Optimization (fDPO) provides a robust solution to the data sensitivity issues inherent in standard DPO. By dynamically filtering the training set using a reward model, fDPO allows models to maintain high performance even when trained on noisy, mixed-quality datasets. Future work will explore replacing discarded samples with high-quality model-generated ones and investigating the use of implicit rewards to eliminate the need for a standalone reward model.

Summary updated

BibTeX
@inproceedings{morimura2024filtered,
  author = {Tetsuro Morimura and Mitsuki Sakamoto and Yuu Jinnai and Kenshi Abe and Kaito Ariu},
  title = {{Filtered Direct Preference Optimization}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2024},
  url = {https://openreview.net/forum?id=LYhwn0Ryuh},
}
Figure