Home Knowledge Base Reward Modeling

Reward Modeling is the process of training a neural network to predict human preferences between AI outputs — serving as the critical bridge between raw human feedback and scalable reinforcement learning (RL) optimization, where a reward model (RM) learns to score outputs such that higher-scored completions align with what humans actually prefer, enabling RLHF, DPO, and other alignment methods to optimize language models toward helpfulness, harmlessness, and honesty without requiring human evaluation of every single output.

Why Reward Models Are Needed

Problem: Can't run RL with a human in the loop for every training step
  - RL needs millions of reward signals
  - Humans can label ~1000 comparisons/day

Solution: Train a reward model as a proxy for human judgment
  - Collect 50K-500K human preference comparisons
  - Train RM to predict preferences
  - Use RM to give reward signal for RL training

Reward Model Architecture

[Prompt + Response] → [Pretrained LLM backbone] → [Final hidden state]
                                                         ↓
                                                   [Linear head] → scalar reward r

Training:
  Given (prompt, response_win, response_lose):
  Loss = -log(σ(r_win - r_lose))     (Bradley-Terry model)
  Maximize: RM rates human-preferred response higher

Training Pipeline

StepDescriptionScale
1. GenerateSample pairs of responses from policy LLM100K-1M pairs
2. AnnotateHuman annotators choose preferred response50K-500K comparisons
3. Train RMFine-tune LLM with preference head1-3B to 70B params
4. ValidateCheck RM accuracy on held-out comparisonsTarget: 70-80%
5. DeployUse RM as reward signal in PPO/GRPOMillions of RL steps

Reward Hacking

Failure ModeWhat HappensMitigation
Length exploitationModel generates very long responses → higher rewardLength penalty in reward
SycophancyModel agrees with user regardless of truthDiverse training data
Formatting tricksBullet points/bold text scored higherFormat-controlled comparisons
Distribution shiftRL policy moves OOD from RM training dataKL penalty, iterative RM updates
AdversarialRL finds specific token patterns that hack RMEnsemble of RMs

Reward Model Quality Metrics

MetricMeaningGood Value
Agreement accuracyMatches human preferences on held-out set>70%
Cohen's kappa vs. humansAgreement accounting for chance>0.5
Ranking correlationSpearman ρ over response rankings>0.7
CalibrationConfidence matches true accuracyCalibration error <5%

RM in Practice

SystemRM SizeTraining DataApproach
InstructGPT6B50K comparisonsSingle RM + PPO
Llama 2 Chat70B1M+ comparisonsSafety + Helpfulness RMs
ClaudeUndisclosedConstitutional AI + humanRM + RLAIF
Nemotron70BSynthetic preferencesLLM-as-judge RM

Advanced: Process Reward Models (PRM)

Reward modeling is the foundational component that makes AI alignment scalable — by compressing human preferences into a learnable function, reward models enable language models to be optimized for human values at a scale that would be impossible with direct human feedback, while the ongoing challenge of reward hacking and distribution shift drives continued innovation in more robust alignment techniques.

reward modelreward modelingpreference modelreward hackingreward model training

Explore 500+ Semiconductor & AI Topics

From EUV lithography to CUDA optimization — search the full knowledge base or chat with our AI assistant.