Part II / Reinforcement Learning
LLM post-training
Post-training is a ladder of data and objectives that turn a next-token model into a policy for instructions, preferences, tools, reasoning, and product constraints.
Imitate target responses or trajectories.
Learn which of two behaviors is better.
Generate behavior, score it, and update the policy toward higher return.
Apprentice, critic, practice field
Pretraining gives an apprentice broad language and world patterns. Supervised fine-tuning shows worked examples of the job. Preference learning teaches a critic or direct rule for choosing better work. Reinforcement learning lets the apprentice practice, receive feedback on its own attempts, and change behavior. Each stage can exist without every later stage.
SFT says "do this." Preference data says "this is better than that." RL says "try, receive a score, and shift probability toward actions with better return."
Pretraining itself is an optimization process, but in the common post-training taxonomy it is supervised next-token prediction over naturally occurring text, not RL. The distinction matters because pretraining has a target token at each position, while agent RL evaluates consequences of sampled behavior.
Five ways to improve the same reasoning engine
The engine sometimes produces an excellent four-step investigation but often guesses from the recent configuration change. We have replayable incidents, trace rubrics, and a final-cause oracle.
The least complex useful step is often selection plus SFT. It requires no online policy optimization and can teach tool syntax, evidence structure, and common workflows. Its limit is coverage: the model imitates demonstrated behavior and may not recover when its own earlier action creates an unfamiliar observation.
The classic RLHF pipeline
The InstructGPT recipe has three recognizable stages: supervised fine-tuning on demonstrations; a reward model trained from human comparisons; and PPO optimization of the policy against that learned reward with a penalty for drifting from a reference.[source] "RLHF" is broader than this exact implementation, but the pipeline remains a useful reference.
The reward model takes a prompt and response and predicts preference. The policy then samples responses, the reward model scores them, and PPO raises the probability of high-advantage tokens. A KL term keeps the policy near a supervised reference, preserving capabilities and reducing exploitation of weak reward-model regions. The reward model is a scalable proxy for humans, so overoptimization and distribution shift remain central risks.
RLAIF replaces some human comparisons with AI-generated feedback or rankings.[source] It can scale nuanced labels but may amplify the judge model's biases, blind spots, or style preferences. Provenance should distinguish human, AI, deterministic, and mixed feedback.
DPO learns directly from preference pairs
DPO starts from a KL-constrained RLHF objective and rewrites the preference problem as a pairwise classification-style loss over the policy itself. Each training record contains a prompt, a chosen response, and a rejected response. The optimizer pushes the policy's chosen-versus-rejected log-probability margin above the same margin under a fixed reference policy, usually the supervised fine-tuned model that precedes preference training.[source]
For one incident, the chosen trace checks both network paths, cites returned evidence, and identifies the failing gateway. The rejected trace jumps from a recent configuration change to the wrong cause. DPO trains on that relative judgment. It does not need a separate reward model to convert the pair into scalar scores first. In an agent trace, the loss should cover tokens the policy generated, not tool results or other observations supplied by the environment.
The paper's phrase "your language model is secretly a reward model" has a narrow mathematical meaning. In the derivation, a scaled policy-to-reference log-probability ratio can represent the implicit reward, up to a prompt-dependent constant. It does not mean an arbitrary pretrained model already contains a trustworthy reward for human preferences.
This is more precise than saying DPO independently raises every chosen probability and lowers every rejected probability. The chosen probability can fall if the rejected probability falls farther. The loss acts on their reference-relative margin. Its beta coefficient comes from the KL penalty in the underlying RLHF objective: larger beta represents stronger pressure to stay near the reference.
The derivation assumes a pairwise preference model and describes the optimum of the KL-constrained objective. Those assumptions make the direct loss possible; they do not guarantee that a finite dataset captures every human preference or that optimization cannot overfit shortcuts such as response length.
PPO, GRPO, and DPO move the policy differently
All three methods can steer a language model toward preferred behavior, but they consume different data and construct the learning signal differently.
| Dimension | PPO with critic | GRPO-style RL | DPO |
|---|---|---|---|
| Update signal | Advantage estimated with a learned value function | Advantage computed from rewards within a prompt group | Reference-relative margin between chosen and rejected responses |
| Training data | Fresh or recent rollout trajectories | Groups of fresh or recent responses to each prompt | Pre-collected prompt, chosen, and rejected triples |
| Logical model roles | Policy, critic, reference, and reward or verifier | Policy, reference, and reward or verifier; no critic | Policy and frozen reference; no critic or explicit reward model in the update |
| Reward machinery | Learned reward model, verifier, environment reward, or mixture | Learned reward model, verifier, environment reward, or mixture | Pair labels are consumed by the loss; humans, an AI judge, or another scoring process may have produced them |
| Extra trainable estimator | Critic or value head | No critic | No critic |
| Data regime | Usually on-policy or near-on-policy | Usually on-policy or near-on-policy | Usually offline; its pairs are often off-policy relative to the model being trained, but the update itself is not an RL rollout loop |
| Distinctive cost | Critic training and rollout orchestration | Several sampled responses per prompt | Building representative, high-quality preference pairs |
DPO is attractive when the preference dataset already covers the behavior that matters. It has fewer moving parts than PPO or GRPO, but it still has optimization choices, data-quality failures, overoptimization, distribution shift, and reference-policy sensitivity. The simpler pipeline still needs deliberate evaluation.
PPO and GRPO can collect new attempts from the current policy and observe their consequences in an environment. That lets the training distribution follow the learner and expose behaviors absent from a fixed dataset. It does not guarantee creative or correct reasoning; the environment, exploration policy, and reward still decide what can be discovered and reinforced.
DPO itself is normally an offline optimization stage. A round-based pipeline can generate new pairs with the current policy, label them, and run DPO again on that round's snapshot. Data collection then becomes an online outer loop, while the DPO update within each round remains offline. Fully online variants can interleave sampling and updates more tightly. Online iterative RLHF makes the broad distinction concrete.[source]
KTO works with examples labeled desirable or undesirable rather than paired comparisons.[source] Other preference objectives vary reference treatment, margins, calibration, and robustness. "Preference optimization" is the stable category; individual objectives are choices within it.
RLVR and process supervision
RL with verifiable rewards uses feedback that can be checked from a formal or environment-grounded result: exact math answers, code tests, game outcomes, or seeded incident facts. DeepSeekMath used GRPO for mathematical reasoning, and DeepSeek-R1 describes large-scale reasoning RL with rule-based rewards in gradeable domains.[source][source]
Verifiable does not mean complete. Tests may miss behavior; exact-answer rewards may ignore reasoning validity; a scenario oracle may encode only one acceptable diagnosis. Outcome supervision grades the final result. Process supervision grades intermediate steps. In one mathematical study, process-supervised reward models outperformed outcome-supervised models on its chosen MATH evaluation.[source] That result is important and scoped: it is not proof that every agent should reward narrated reasoning steps.
For the reasoning engine, process feedback is strongest when tied to observable acts: querying both redundant paths, citing returned evidence, distinguishing fact from hypothesis, respecting approval boundaries, and terminating for a stated reason. Hidden chain-of-thought should not be treated as a guaranteed faithful record of causal computation.
DPO is derived from an RLHF objective, but operationally it is an offline preference-optimization loss. It has no sampled environment interaction or policy-gradient rollout loop by itself. Say which sense you mean.
A practical escalation ladder
- Build trustworthy evaluation before optimizing.
- Use prompting and orchestration to establish the task interface.
- Select strong model-generated traces and measure best-of-n headroom.
- Use SFT when imitation covers important behavior.
- Use preference optimization when relative judgments are reliable.
- Use online RL when exploration, long-horizon consequences, or current-policy data justify the machinery.
- Keep release gates independent of the training reward.
This is not a maturity ranking. A verifiable game may justify online RL immediately; a sensitive support workflow may never justify unconstrained interaction. The data, environment, feedback fidelity, and risk define the method.
References
- InstructGPT, DPO, KTO, and RLAIF support the descriptions of their named methods and pipelines.
- DeepSeekMath and DeepSeek-R1 support the reasoning-RL discussion.
- Lightman et al. supports the scoped process-supervision claim.
- Ye et al. provides a primary example of iterative online preference-data collection.