KatInterview

Comparing RLHF with Reward Models against Direct Preference Optimization

Machine LearningModel answer

Last updated

Analyze the architecture, loss functions, training complexity, and theoretical connections between traditional PPO-based RLHF and Direct Preference Optimization (DPO).

In modern alignment pipelines for large language models, adjusting model outputs to align with human preferences typically begins with a Supervised Fine-Tuned (SFT) base model. Two primary techniques exist for preference-based fine-tuning: two-stage Reward Model RLHF (such as PPO-based alignment) and single-stage direct optimization methods like Direct Preference Optimization (DPO).

Provide a comprehensive comparison between standard reward-model-based RLHF (PPO) and Direct Preference Optimization (DPO).

In your answer, make sure to address:

  1. Pipeline Architecture & Stages: Outline the workflow and required models for both approaches starting from a preference dataset $D = {(x, y_w, y_l)}$.
  2. Mathematical Formulation & Reference Policy: Write out the core optimization targets for both methods. Explain the explicit purpose of the reference policy $\pi_{ref}$ (and its associated KL divergence constraint) in both frameworks.
  3. Implicit Reward Mapping: Show how DPO analytically eliminates the need for an explicit reward model by expressing the implicit reward function in terms of policy probabilities.
  4. Trade-offs & Practical Considerations: Compare computational requirements, training stability, memory overhead (e.g., active model instances required in GPU memory), and failure modes such as length bias or reward hacking.

Hints

Hint 1

Recall the Bradley-Terry preference model, which expresses preference probabilities via the logistic sigmoid of reward differences: $P(y_w \succ y_l | x) = \sigma(r(x, y_w) - r(x, y_l))$.

Hint 2

Think about how the closed-form solution of the KL-constrained RL objective lets you rearrange the optimal policy formula $\pi^*(y|x) \propto \pi_{ref}(y|x) \exp(\frac{1}{\beta} r(x, y))$ to express $r(x, y)$ directly using policy ratios.

Hint 3

Count the total number of large language model instances that must be held in VRAM concurrently during a PPO training run versus a DPO training run.