Towards Robust Alignment of Language Models: Distributionally Robustifying Direct Preference Optimization

Junkang Wu, Yuexiang Xie, Zhengyi Yang, Jiancan Wu, Jiawei Chen +4 more
7/10/2024
cs.LGcs.AIcs.CL

Official code: junkangwu/Dr_DPO (19 stars, last commit 2024-06-01).

Abstract

This study addresses the challenge of noise in training datasets for Direct Preference Optimization (DPO), a method for aligning Large Language Models (LLMs) with human preferences. We categorize noise into pointwise noise, which includes low-quality data points, and pairwise noise, which encompasses erroneous data pair associations that affect preference rankings. Utilizing Distributionally Robust Optimization (DRO), we enhance DPO's resilience to these types of noise. Our theoretical insights reveal that DPO inherently embeds DRO principles, conferring robustness to pointwise noise, with the regularization coefficient $β$ playing a critical role in its noise resistance. Extending this framework, we introduce Distributionally Robustifying DPO (Dr. DPO), which integrates pairwise robustness by optimizing against worst-case pairwise scenarios. The novel hyperparameter $β'$ in Dr. DPO allows for fine-tuned control over data pair reliability, providing a strategic balance between exploration and exploitation in noisy training environments. Empirical evaluations demonstrate that Dr. DPO substantially improves the quality of generated text and response accuracy in preference datasets, showcasing enhanced performance in both noisy and noise-free settings. The code is available at https://github.com/junkangwu/Dr_DPO.

View on arXivView PDF

Code Implementations(1)

junkangwu/Dr_DPOOfficial100%

[ICLR 2025] Official code of "Towards Robust Alignment of Language Models: Distributionally Robustifying Direct Preference Optimization"

193PythonMay 22, 20242 years ago
alignmentdistributionally-robust-optimizationdpopreference-alignmentrlhf

Similar Papers

Cite this paper

@article{wu2024towards,
  title  = {Towards Robust Alignment of Language Models: Distributionally Robustifying Direct Preference Optimization},
  author = {Junkang Wu and Yuexiang Xie and Zhengyi Yang and Jiancan Wu and Jiawei Chen and Jinyang Gao and Bolin Ding and Xiang Wang and Xiangnan He},
  year   = {2024},
  eprint = {2407.07880},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2407.07880v2},
  journal = {ICLR 2024 2024}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2407.07880.svg)](https://codeofpaper.com/paper/2407.07880)

Discussion