DL0175 RLAIF and Constitutional AI

What is RLAIF (Reinforcement Learning from AI Feedback), and how does replacing human preference labelers with a constitution-guided critic model like Anthropic’s Constitutional AI change the scaling and alignment properties of RLHF?

Answer

RLAIF keeps every moving part of RLHF and swaps only the label source. Instead of paying annotators to rank two candidate responses, a frozen critic (feedback) model is shown the prompt, both candidates, and a short natural-language principle, and it answers a multiple-choice question whose option log-probabilities become the preference label. Constitutional AI is the best-known instantiation and runs in two stages: a supervised stage where the model repeatedly critiques and revises its own harmful answers against principles sampled from a written constitution, producing the SL-CAI checkpoint, and a reinforcement stage where AI-generated harmlessness comparisons train a preference model that then drives PPO, producing RL-CAI. The scaling change is blunt: a comparison that costs roughly a dollar and minutes of human attention becomes two forward passes, so label volume becomes a compute decision rather than a hiring decision, and labels arrive as calibrated soft probabilities rather than single bits. The alignment change is subtler and more interesting, because the optimization target moves from an implicit, unauditable aggregate of annotator taste into a short document you can read, diff, and version, and because self-critique lets a model be harmless without collapsing into evasive refusals.

(1) Only The Labeler Changes: the preference-model loss, the KL-regularized PPO objective, and the reward-hacking dynamics are identical to RLHF, so RLAIF is not a new algorithm but a new data supply.
(2) Two Stages In Constitutional AI: critique → revision → SL-CAI supervised finetuning, then AI-labeled comparisons → preference model → RL-CAI, with SL-CAI serving as both policy initialization and KL reference.
(3) One Principle Per Judgment: a single principle is sampled from the constitution for each critique and each comparison, which keeps prompts short and spreads coverage across the document instead of demanding the model weigh 16 rules at once.
(4) Soft Labels, Not Bits: the critic emits p(A \succ B) from option token logits, which carries more information per comparison than a human click and lets you distil graded preference strength.
(5) Auditable Objective: a behavior change becomes a text edit to the constitution plus a rerun, rather than a new annotation guideline, a new labeler cohort, and a multi-week collection cycle.
(6) Bounded By The Critic: AI feedback inherits the critic’s position bias, self-preference, and capability ceiling, so it is strongest on axes where judging is easier than generating and weakest on novel or expert domains.

Two-lane pipeline diagram: the top lane runs left to right from a helpful-only model given a red-team prompt, to self-critique against a sampled principle, to revision repeated k times, to supervised finetuning that yields the SL-CAI model; the bottom lane runs right to left from SL-CAI sampling a response pair, to the feedback model choosing A or B given one principle, to a preference model trained on AI labels, to PPO with a KL penalty toward SL-CAI yielding RL-CAI; a constitution box between the two lanes sends arrows up to the critique step and down to the feedback model

Figure 1: The constitution is the only human-written artifact in the loop, and it touches the pipeline twice: once to steer self-critique and revision in the supervised stage, once to condition the critic’s pairwise judgments in the RL stage. Everything downstream of the label, the preference model and the KL-penalized policy update, is unchanged RLHF.

Three implementation details do most of the real work. First, order debiasing: language models judging “(A) or (B)” have a strong position preference, so each pair is scored twice with the options swapped and the two probabilities are averaged, which is cheap because compute is the only cost. Second, chain-of-thought judging with clamped probabilities: letting the critic reason before answering improves agreement with humans but produces near-deterministic 0.0 or 1.0 preferences, so the CAI work clamps the resulting probabilities into a narrow band around 50 percent to keep the preference model from training on overconfident targets. Third, a deliberately mixed label supply: RL-CAI does not eliminate humans, it reassigns them, training the preference model on human helpfulness comparisons alongside AI harmlessness comparisons, because harmlessness is the axis where labeling is unpleasant, high-variance, and easy to specify in writing. Empirically, the reported effect is not merely cheaper labels but a better trade-off, with RL-CAI models both more harmless and less evasive than an RLHF baseline, while the RLAIF study on summarization found AI-labeled and human-labeled policies statistically indistinguishable to human raters despite the critic agreeing with humans only about 78 percent of the time.

Mathematical Formulation:
y^{(k+1)} \sim \pi_0(\cdot \mid x, y^{(k)}, c_k)
p_{\mathrm{AI}}(A \succ B) = \sigma(z_A - z_B)
\bar{p} = \frac{1}{2}\left(p_{AB} + 1 - p_{BA}\right)
\mathcal{L}_{\mathrm{PM}} = -\log \sigma\!\left(r_\phi(x,y_w) - r_\phi(x,y_l)\right)
J(\theta) = \mathbb{E}\left[r_\phi(x,y)\right] - \beta\,\mathrm{KL}\!\left(\pi_\theta \,\|\, \pi_{\mathrm{ref}}\right)

Where:

  • y^{(k)} is the response after k revisions of the original answer to red-team prompt x, and \pi_0 is the helpful-only model doing both the critique and the rewrite.
  • c_k \sim \mathcal{C} is one principle sampled uniformly from the constitution \mathcal{C}, typically around 16 short written rules.
  • z_A and z_B are the critic’s logits for the option tokens of the multiple-choice question, and \sigma is the logistic function, so the label is a probability rather than a bit.
  • p_{AB} and p_{BA} are the probabilities assigned to the same candidate under the two presentation orders, and \bar{p} is the order-debiased label actually stored.
  • r_\phi is the preference model, y_w and y_l the winning and losing responses under \bar{p}, and \mathcal{L}_{\mathrm{PM}} the standard Bradley-Terry loss, unchanged from RLHF.
  • \pi_\theta is the policy being optimized, \pi_{\mathrm{ref}} is the frozen SL-CAI checkpoint, and \beta > 0 sets how far the policy may drift before the KL penalty dominates the reward.

Label Volume At A Fixed 100k USD Budget:
N_{H} \approx 1.3 \times 10^{5}
N_{\mathrm{AI}} \approx 5.0 \times 10^{7}
N_{\mathrm{AI}} / N_{H} \approx 375

The numbers assume a fully loaded cost near 0.75 USD per human comparison against roughly 0.002 USD for two short critic forward passes, which is why the same budget buys about 375 times more comparisons. Exact rates move with model size, context length, and vendor pricing, but the two orders of magnitude are robust, and they change what is even worth attempting: per-principle coverage sweeps, full relabeling after a constitution edit, and comparison sets larger than any human dataset ever collected. The binding constraint stops being annotation throughput and becomes critic quality plus reward-model overoptimization.

Left panel: log-log chart of labeling cost in dollars versus number of preference comparisons, with a steep line for human labels at 0.75 dollars each and a much lower line for AI labels at 0.002 dollars each, a horizontal line marking a 100000 dollar budget, and two marked crossing points at 133000 human labels and 50 million AI labels. Right panel: schematic scatter of harmlessness against helpfulness showing an evasive refusal model, a helpful-only RLHF model, an HH-RLHF model and an SL-CAI model lying on a dashed trade-off frontier, with RL-CAI plotted above and to the right of that frontier

Figure 2: Two different claims. On the left, the cost curve is the scaling argument, and at a fixed budget it is worth about 375 times more comparisons. On the right, the frontier shift is the alignment argument: human feedback tends to trade helpfulness against harmlessness, while self-critique plus AI harmlessness labels moves the operating point off that line instead of sliding along it. Right-panel positions are schematic illustrations of the reported qualitative result, not measured Elo scores.

PropertyClassic RLHFGeneric RLAIFConstitutional AI (RL-CAI)
Label sourcePaid annotators following a private rubricAn off-the-shelf judge model with a promptCritic conditioned on one sampled principle from a published constitution
Cost and throughputRoughly 1 USD per comparison, days to weeks per batchRoughly 0.002 USD, limited only by inference capacitySame as RLAIF, doubled for order swapping and chain-of-thought judging
Label formBinary choice or coarse Likert ratingSoft probability from option logitsSoft probability, order-averaged and clamped near 50 percent
Auditability of the targetLow, values live in guidelines and labeler judgmentMedium, values live in an ad hoc judge promptHigh, values are a short versioned document you can diff
Human roleLabel every comparisonValidate the judge on a held-out sampleWrite and revise the constitution, still label helpfulness
Dominant failure modeAnnotator noise, sycophancy, length bias, slow iterationPosition and self-preference bias, silent capability ceilingBehaviors no principle covers, and policy hacking of a critic that shares its blind spots

Login to view more content


Log in to track your progress

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *