liveBook · Manning

Chapter 8: Direct-alignment algorithms

What you will learn in chapter 8 of Reinforcement Learning from Human Feedback

The introduction presents direct-alignment algorithms as a simpler way to optimize the RLHF preference objective and identifies DPO as a prominent example.

After this chapter you will be able to

What it builds on

Section by section

Introduction

The introduction presents direct-alignment algorithms as a simpler way to optimize the RLHF preference objective and identifies DPO as a prominent example.

Key terms: direct alignment algorithms, DAAs, reward model, preference learning, direct preference optimization, DPO, gradient ascent, constrained RLHF objective, online optimization, training compute

8.1 Direct preference optimization

8.1.1 How DPO works

This section explains how DPO uses preference pairs, an implicit reward model, and a reference-relative loss to update a policy without a separate reward-model training and sampling loop.

Key terms: chosen completion, rejected completion, reference model, log-ratio, DPO loss, implicit RM, explicit RM, optimal policy, β, KL distance

8.1.2 DPO derivation

The section derives DPO by finding the optimal KL-regularized RLHF policy, expressing pairwise preference likelihood in terms of that policy, and differentiating the resulting loss.

Key terms: partition function, reference policy, KL divergence, optimal policy, Gibbs’ inequality, Bradley–Terry model, DPO loss, negative log-likelihood, sigmoid, DPO gradient

8.2 Numerical concerns, weaknesses, and alternatives

This section explains DPO’s main weaknesses, how several direct-alignment variants address them, and why data and the initial model may matter more than the algorithm choice.

Key terms: DPO, preference data, REBEL, cDPO, IPO, ODPO, ORPO, SimPO, reference model, log-probabilities

8.3 Implementation details

This section shows how DPO’s loss is assembled in a language-model training stack and explains two implementation considerations: its fixed KL tradeoff and reference-model memory use.

Key terms: DPO loss, policy model, frozen reference model, log-ratios, negative log-sigmoid, implicit rewards, KL divergence, beta, distance penalty, RL-based optimizers

8.4 DAAs with synthetic preference data

The section explains why synthetic preference data is a practical starting point for DAAs, how response pairs and judge biases affect that data, and how DAA training changes completion probabilities.

Key terms: synthetic preferences, DAAs, preference fine-tuning, on-policy, contrastive, delta learning, chosen, rejected, length bias, model judging

8.5 DAAs vs. RL: Online vs. offline data

The section weighs RL’s reported performance advantage over direct-alignment algorithms against the practical reasons DAAs remain widely used.

Key terms: policy-gradient-based, RL methods, DPO, on-policy data, DAAs, training data, configurations

8.6 Summary

Where this is used later

Concepts explained in this chapter

← Chapter 7: Reasoning and inference-time scaling Chapter 9: Rejection sampling →

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.