The Crucial Role of Samplers in Online Direct Preference Optimization

Ruizhe Shi, Runlong Zhou, Simon S. Du
9/29/2024
cs.LGcs.CL

No official code found. Best implementation: srzer/Samplers-in-Online-DPO (8 stars, MIT, last commit 2025-09-23).

Abstract

Direct Preference Optimization (DPO) has emerged as a stable, scalable, and efficient solution for language model alignment. Despite its empirical success, the optimization properties, particularly the impact of samplers on its convergence rates, remain under-explored. In this paper, we provide a rigorous analysis of DPO's convergence rates with different sampling strategies under the exact gradient setting, revealing a surprising separation: uniform sampling achieves $\textbf{linear}$ convergence, while our proposed online sampler achieves $\textbf{quadratic}$ convergence. We further adapt the sampler to practical settings by incorporating posterior distributions and logit mixing, demonstrating improvements over previous methods. For example, it outperforms vanilla DPO by over $7.4$% on Safe-RLHF dataset. Our results not only offer insights into the theoretical understanding of DPO but also pave the way for further algorithm designs.

View on arXivView PDF

Code Implementations(1)

MIT

Official code for "The Crucial Role of Samplers in Online Direct Preference Optimization".

80Shell, PythonSep 28, 20241 years agoMIT

Similar Papers

Cite this paper

@article{shi2024crucial,
  title  = {The Crucial Role of Samplers in Online Direct Preference Optimization},
  author = {Ruizhe Shi and Runlong Zhou and Simon S. Du},
  year   = {2024},
  eprint = {2409.19605},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2409.19605v3},
  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/2409.19605.svg)](https://codeofpaper.com/paper/2409.19605)

Discussion