Reinforcement Learning from Human Feedback

A post-training alignment workflow that collects human preference signals, fits a reward model, and optimizes the language-model policy toward preferred behavior.

Reinforcement Learning from Human Feedback, usually shortened to RLHF, is a post-training workflow that steers model behavior using human preference signals after a base or instruction-tuned checkpoint already exists.

At a glance

Released

March 2022

Authors

Long Ouyang, Jeff Wu, Xu Jiang, et al.

Regime type

Training Alignment

Related modules

No related modules listed yet.

What It Is

Reinforcement Learning from Human Feedback is a post-training alignment method. Teams start from a pretrained or instruction-tuned language model, collect human rankings or scores over its outputs, train a reward model that predicts those preferences, and then run reinforcement learning so the policy earns higher reward on behavior people prefer.

Why It Exists

Instruction-tuned models can follow demonstrations, but product teams often need behavior shaped by comparative judgments: which answer is more helpful, honest, or safe. RLHF exists to turn those preference judgments into a training signal that nudges the model toward aligned behavior for instruction following, preference alignment, and safety-policy shaping.

How It Works

The workflow starts from a pretrained or instruction-tuned model that generates candidate answers. Human annotators rank or score those outputs side by side, producing preference data. A reward model learns to predict those human judgments and turns them into a scalar reward or preference signal. A reinforcement-learning optimizer, often Proximal Policy Optimization or PPO, updates the policy so preferred answers earn higher reward while a KL penalty keeps updates close to a reference model. The result is aligned model behavior that reflects the collected preference signal.
RLHF feedback-and-optimization loop
Preference and policy flow
RLHF collects human preferences, fits a reward signal, and optimizes the policy toward preferred behavior while staying close to a reference model.
\\max_{\\pi_\\theta} \\; \\mathbb{E}_{x,y \\sim \\pi_\\theta}\\big[ r_\\phi(x,y) - \\beta \\, \\mathrm{KL}(\\pi_\\theta \\| \\pi_{\\mathrm{ref}}) \\big]

Compared To Nearby Regimes

Supervised fine-tuning and instruction tuning learn from one target answer per prompt. RLHF learns from comparative human judgments and a separate reward-model plus policy-optimization loop, which lets teams shape behavior from rankings instead of only copying demonstrations. Direct Preference Optimization, or DPO, can learn from preference pairs without maintaining that separate reward model and PPO machinery. Group Relative Policy Optimization, or GRPO, reframes optimization over groups of sampled candidates rather than the classic human-ranking plus reward-model pipeline.

Limitations And Failure Modes

RLHF depends on costly human data collection, and annotator inconsistency can weaken the preference signal. A reward model can mismatch what users actually want, so policy optimization may chase the wrong objective. Optimization can become unstable when reward estimates are noisy or the KL penalty is poorly tuned. Models may also learn to exploit the reward model through reward hacking, or become overly narrow when preference data covers only a thin slice of behavior.

Tags

References

  1. Ouyang, Long, et al. "Training language models to follow instructions with human feedback." arXiv, 2022, https://arxiv.org/abs/2203.02155.