Constitutional and Principle-Based Alignment › The Two-Stage Pipeline

Michael BrenndoerferNovember 29, 20264 min read
Language AI HandbookAll chapters
Part 38 of 67Scalable Oversight and Safety Training
Chapter 288Constitutional and Principle-Based Alignment › The Two-Stage Pipeline
Reading section 3 of 12 · The Two-Stage Pipeline · 4 minSection 3 of 12 · 4 min

Section 3 of 12 · 4 min read

Reading settings

Definitions

Choose how many terms have tooltips.

Article links

Make inline references clickable

Notes & comments

The supervised stage in Bai et al. (2022) builds examples by rewriting. The reinforcement-learning stage builds a reward signal from comparisons. The researchers found some critiques were inaccurate or overstated, and the probabilities assigned after a rationale were often close to zero or one. A flawed revision becomes target text. A flawed comparison becomes a training label.

For illustration, a prompt can contain all the information needed to decide whether a disclosure is permitted, even if it comes from an unusual conversational context. Keep distinct the prompt source, the model sample, the annotation or revision, and the policy-training target. In the supervised stage, the model-generated text is the target. In the reinforcement-learning stage, an answer pair and its comparison label first train a separate preference model. The preference model learned from those comparisons then provides a scalar score at training time. Those are different points to inspect when a system changes behavior after you edit its instructions.

Stage One: Supervised Critique and Revision

Bai et al. begin with a model already tuned for helpfulness using human feedback. They sample responses to human-written and model-generated red-team prompts. For each round they sample a written principle that pairs a critique instruction with a revision instruction.

  1. The model reads the prompt and its draft, then generates a critique against the sampled instruction.
  2. The model reads the draft and critique in context, then generates a revised response.
  3. The prompt and revised response can enter another round with a newly sampled principle.

The paper reports four critique-and-revision rounds per red-team prompt. The supervised dataset includes revisions from all rounds and samples produced by the helpful model on separate helpfulness prompts. The authors fine-tune a pretrained checkpoint on the combined data.

How Repeated Sampling Covers the Rules

In a toy model with KK rules, suppose each of tt rounds samples independently and uniformly with replacement. A particular rule is missed with probability (1−1/K)t(1-1/K)^t. Add the inclusion probabilities for all KK rules to get the expected number of distinct rules visited. Dividing by KK gives 1−(1−1/K)t1-(1-1/K)^t, the expected fraction visited. This calculation describes rule exposure. It gives no estimate of how often a critique finds or fixes an actual problem.

PythonIn [3]
CollapseExpand
import numpy as np

n_principles = 16
rounds = np.arange(0, 11)
expected_unique = n_principles * (1 - (1 - 1 / n_principles) ** rounds)
expected_fraction = expected_unique / n_principles
VisualizationOut [4]
CollapseExpand
Increasing curve of expected principle coverage, with a marker at the fourth revision round.
Expected fraction of sixteen distinct principles sampled in up to ten independent uniform draws with replacement. One draw per round gives progressively fewer new principles in expectation.

At four draws from sixteen rules the expected fraction sampled is about 23%. A batch of responses may still encounter the other rules because different responses get different draws.

Stage Two: Reinforcement Learning from AI Feedback

The paper uses the supervised constitutional model to generate a pair of responses to a prompt and as the starting point for policy optimization. A feedback model sees the pair and a written criterion for choosing the less harmful response. In the basic variant, the normalized probabilities of the two answer options give a soft target. The authors also experimented with generating a rationale before choosing. Those rationales tended to commit the model to a choice. In that variant the authors bounded target probabilities to the interval from 0.4 to 0.6 in their main results.

A preference model learns from two sources of comparison data: human judgments about helpfulness and model judgments about harmlessness. The paper reports one model-generated harmlessness comparison per red-team prompt used in supervised training. Its reinforcement-learning stage uses the learned preference score to update the policy. The constitution acts upstream by shaping examples and labels. The resulting score can depart from the rule even when the labeler applied it correctly in training cases.

The name reinforcement learning from AI feedback (RLAIF) also covers later variants. Lee et al. (2024) compare training a reward model on AI preferences with obtaining rewards directly from a language model during reinforcement learning. When comparing results, check how the feedback was produced, whether a separate reward model was trained, and where humans contributed labels.

Comments

Add to the conversation

A question, a correction, or an example from your own work.

No comments yet. Be the first to share your thoughts!

Newsletter

Stay up to date

Get new articles, book updates, and notes on AI and technology.

Unsubscribe at any time. Privacy policy