XYZNOT

Papers · arXiv 2203.02155

Training language models to follow instructions with human feedback

Published cs.CLcs.AIcs.LG arXivPDF

Read with translation and AI

Summary in three lines

  1. Large language models trained purely on next-token prediction often fail to follow user intent, generating toxic, untruthful, or unhelpful answers.
  2. Fine-tunes GPT-3 using supervised human demonstrations, trains a 6B reward model on ranked outputs, and optimizes the policy via PPO with a pretraining mix.
  3. Outputs from the 1.3B InstructGPT are preferred to 175B GPT-3, while 175B InstructGPT wins against 175B GPT-3 85% of the time and cuts hallucinations from 41% to 21%.

Abstract

Making language models bigger does not inherently make them better at following a user's intent. For example, large language models can generate outputs that are untruthful, toxic, or simply not helpful to the user. In other words, these models are not aligned with their users. In this paper, we show an avenue for aligning language models with user intent on a wide range of tasks by fine-tuning with human feedback. Starting with a set of labeler-written prompts and prompts submitted through the OpenAI API, we collect a dataset of labeler demonstrations of the desired model behavior, which we use to fine-tune GPT-3 using supervised learning. We then collect a dataset of rankings of model outputs, which we use to further fine-tune this supervised model using reinforcement learning from human feedback. We call the resulting models InstructGPT. In human evaluations on our prompt distribution, outputs from the 1.3B parameter InstructGPT model are preferred to outputs from the 175B GPT-3, despite having 100x fewer parameters. Moreover, InstructGPT models show improvements in truthfulness and reductions in toxic output generation while having minimal performance regressions on public NLP datasets. Even though InstructGPT still makes simple mistakes, our results show that fine-tuning with human feedback is a promising direction for aligning language models with human intent.

Reading guide

Problem and motivation

Standard large language models (LLMs) optimize next-token prediction on web corpora. This pretraining objective is misaligned with the user goal of having an assistant follow instructions helpfully, truthfully, and harmlessly. Consequently, baseline models like GPT-3 frequently hallucinate facts, invent fake context, reflect toxic text, or disregard explicit user constraints. Scaling up model parameters alone does not eliminate these issues.

Key ideas

  • Alignment through Reinforcement Learning from Human Feedback (RLHF): Use human ratings to shape model outputs toward user intentions rather than raw continuation likelihood.
  • Three-step Training Pipeline: (1) Supervised fine-tuning (SFT) on prompt-demonstration pairs, (2) Reward Model (RM) training on pairwise comparisons over ranked completions, and (3) Policy optimization using Proximal Policy Optimization (PPO).
  • Alignment Tax Mitigation: Standard PPO fine-tuning causes performance degradations on standard NLP benchmarks (e.g., SQuADv2, DROP). Mixing pretraining distribution gradients into PPO updates (PPO-ptx) mitigates these capability losses without sacrificing human preference gains.

Method (with the key equations)

  1. Supervised Fine-Tuning (SFT): Fine-tune base GPT-3 models on approximately 13k prompt demonstrations written by labelers and submitted via the OpenAI API Playground.
  2. Reward Model Training: For each prompt , labelers rank completions (), generating comparisons. The 6B reward model is trained with pairwise cross-entropy loss across all pairs in a batch element: where is the preferred completion over .
  3. RL Policy Optimization (PPO-ptx): Optimize the policy against scalar rewards while penalizing deviation from the SFT model via token-level KL divergence, and optionally retaining pretraining log-likelihood: Here is the KL penalty coefficient and governs the pretraining gradient mix.

Results (with the most important numbers)

  • Human Preferences: Labelers prefer outputs from the 1.3B InstructGPT model over those from the 175B base GPT-3 (a 100x parameter difference). Outputs from 175B InstructGPT are preferred to 175B GPT-3 of the time, and over few-shot prompted 175B GPT-3.
  • Truthfulness and Hallucinations: On TruthfulQA, InstructGPT produces truthful and informative outputs roughly twice as often as GPT-3. On closed-domain API tasks, the hallucination rate decreases from 41% (GPT-3) to 21% (InstructGPT).
  • Toxicity: InstructGPT yields approximately 25% fewer toxic outputs than GPT-3 on RealToxicityPrompts when prompted to be respectful.
  • Generalization: InstructGPT reliably generalizes to held-out labelers ( agreement) and out-of-distribution instructions such as code QA/summarization and non-English instructions, despite English constituting over 96% of training data.

Limitations and open questions

  • Safety and Alignment Trade-offs: InstructGPT primarily prioritizes user instruction adherence during training; if prompted to be malicious or biased, it follows the instruction effectively.
  • Simple Errors: The model still hallucinates, can hedge excessively due to epistemic humility conditioning, and struggles with false premises or complex multiple constraints.
  • Representation: Fine-tuning relies on contractor feedback (around 40 hired labelers) and API Playground customer queries, which do not capture the broad spectrum of end users.

Key terms

RLHF
Reinforcement Learning from Human Feedback; a method that trains a reward model from human preferences and fine-tunes a policy via reinforcement learning.
InstructGPT
The family of GPT-3 models fine-tuned with supervised demonstrations and RLHF to follow natural language instructions.
Alignment tax
The performance drop observed on standard NLP benchmarks (such as DROP or SQuAD) when aligning a language model to human preferences.
PPO-ptx
A PPO variant that mixes gradients from pretraining data into the RL fine-tuning objective to preserve benchmark capabilities.
Reward Model (RM)
A model trained to assign a scalar score to a prompt-completion pair, predicting human preference over alternate completions.
Supervised fine-tuning (SFT)
The first step of the alignment pipeline where a base language model is fine-tuned on human-written prompt-demonstration pairs.
Hallucination
When a language model invents ungrounded or fabricated information on closed-domain tasks like summarization or QA.

Questions

Why does a 1.3B InstructGPT outperform the 175B GPT-3 in human ratings?

Base GPT-3 optimizes for predicting the next token across unfiltered web text, often ignoring instructions or repeating context. InstructGPT is explicitly optimized on human preference signals to produce helpful and direct answers, bridging the gap between raw parameter capability and task intent.

How does the paper resolve the alignment tax?

By incorporating a pretraining update term into the PPO training objective (PPO-ptx), multiplying pretraining gradients by a coefficient . This prevents regression on public datasets like SQuAD and DROP without compromising human preference wins.

How was the reward model trained on ranked outputs?

Labelers ranked completions ( between 4 and 9) per prompt. The 6B reward model was trained on all pairs simultaneously within a single batch element, reducing forward passes and preventing overfitting.

Does InstructGPT reduce demographic bias?

No. When measured on Winogender and CrowS-Pairs, InstructGPT did not show significant bias reductions over base GPT-3, and respectful prompts occasionally decreased entropy (increasing measured bias).

The overview on this page was written by AI from the paper and may contain mistakes. Read the paper for the details.

Read with translation and AI