Skip to main content
QUICK REVIEW

[Paper Review] Is DPO Superior to PPO for LLM Alignment? A Comprehensive Study

Shusheng Xu, Wei Fu|arXiv (Cornell University)|Apr 16, 2024
Digital Rights Management and SecurityComputer Science6 citations
TL;DR

The paper theoretically analyzes DPO vs PPO for RLHF alignment and empirically shows PPO consistently outperforms DPO across dialogue and code generation benchmarks, including state-of-the-art results on CodeContest with a 34B model.

ABSTRACT

Reinforcement Learning from Human Feedback (RLHF) is currently the most widely used method to align large language models (LLMs) with human preferences. Existing RLHF methods can be roughly categorized as either reward-based or reward-free. Novel applications such as ChatGPT and Claude leverage reward-based methods that first learn a reward model and apply actor-critic algorithms, such as Proximal Policy Optimization (PPO). However, in academic benchmarks, state-of-the-art results are often achieved via reward-free methods, such as Direct Preference Optimization (DPO). Is DPO truly superior to PPO? Why does PPO perform poorly on these benchmarks? In this paper, we first conduct both theoretical and empirical studies on the algorithmic properties of DPO and show that DPO may have fundamental limitations. Moreover, we also comprehensively examine PPO and reveal the key factors for the best performances of PPO in fine-tuning LLMs. Finally, we benchmark DPO and PPO across a collection of RLHF testbeds, ranging from dialogue to code generation. Experiment results demonstrate that PPO is able to surpass other alignment methods in all cases and achieve state-of-the-art results in challenging code competitions. Our code is publicly available at https://github.com/openpsi-project/ReaLHF.

Motivation & Objective

  • Assess whether Direct Preference Optimization (DPO) truly outperforms Proximal Policy Optimization (PPO) for RLHF with LLMs.
  • Identify fundamental limitations of DPO and factors that influence PPO performance in RLHF.
  • Benchmark DPO and PPO across dialogue and code-generation RLHF testbeds to determine practical best practices.

Proposed method

  • Theoretically analyze the DPO objective and its relation to PPO via a closed-form connection between reward-based and reward-free optimization.
  • Provide a counterexample and synthetic experiments to illustrate potential biases and out-of-distribution (OOD) risks in DPO.
  • Conduct extensive empirical evaluations on real preference datasets (SafeRLHF, HH-RLHF) and code-generation benchmarks (APPS, CodeContest) across multiple model sizes, comparing DPO, iterated DPO, and PPO.
  • Perform ablation studies on PPO to identify key factors that boost RLHF performance (advantage normalization, large batch size, and exponential moving average update for the reference model).
  • Explore data distribution effects, base model choices, and iterative labeling strategies to mitigate DPO’s distribution shift issues.

Experimental results

Research questions

  • RQ1Is DPO truly superior to PPO in RLHF for LLM alignment under real-world data distributions?
  • RQ2What theoretical and empirical limitations does DPO exhibit relative to PPO?
  • RQ3What factors most significantly impact PPO’s RLHF performance, and can these be leveraged to surpass DPO across benchmarks?
  • RQ4How do base model, preference data quality, and distribution shifts affect DPO’s performance in practice?
  • RQ5Can iterative DPO or data-filtering strategies close the gap between DPO and PPO on challenging tasks like code generation?

Key findings

  • PPO consistently outperforms DPO across the studied benchmarks, including dialogue and code generation tasks.
  • DPO can overfit to out-of-distribution responses and exhibit biased policies when the preference data distribution does not cover relevant outputs.
  • Theoretical analysis shows any PPO-derived solution can be represented within the DPO framework, but the DPO objective admits a larger policy class, enabling potentially undesirable solutions not reachable by PPO under reference regularization.
  • Ablation studies reveal that PPO gains from advantage normalization, large batch sizes, and using an exponential moving average (EMA) update for the reference model, with EMA providing additional gains on challenging tasks.
  • On the CodeContest dataset with a 34B CodeLlama-based model, PPO achieves state-of-the-art performance, outperforming AlphaCode-41B and achieving a notable 10@1k improvement in a reported setting (from 16.4% to 22.4%).
  • Mitigating distribution shift (e.g., via SFT on Safe data or iterative labeling) can improve DPO performance, but even with near-perfect annotators, DPO remains less competitive on difficult code-generation tasks.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.