Constitutional AI
Constitutional AI (CAI) is a training methodology developed by Anthropic that aligns large language models to be helpful, harmless, and honest by having the model critique and revise its own outputs according to a written set of principles — a "constitution" — rather than relying solely on human preference labels. It matters because it dramatically reduces the volume of human feedback required for safety training while producing more consistent, explainable alignment than standard RLHF alone. The counterintuitive fact: the model doing the critiquing and the model being critiqued are the same model, yet this self-referential loop reliably reduces harmful outputs.
Instead of requiring humans to label every harmful response, Constitutional AI lets the model act as its own safety critic: given a harmful draft response, the model is prompted with a specific principle ("does this response encourage illegal activity?"), asked to identify the violation, and then asked to rewrite the response to fix it. This supervised self-revision data is then used to train a new policy, and a separately trained preference model (the Constitutional AI reward model, or CAIRM) scores candidate responses by the same constitutional principles — replacing or augmenting the human-preference reward model in RLHF. The "aha moment" is that alignment knowledge is already latent in large pretrained models; CAI is a structured method to extract and amplify that knowledge without building a separate human-labeling pipeline for every safety category.
How It Works
Constitutional AI proceeds in two sequential training phases, each of which transforms either the policy model or the reward model using constitutionally-guided feedback.
Phase 1: Supervised Learning from AI Feedback (SL-CAI)
A "red-team" prompt is sampled and the current policy generates an initial response . A critique prompt is appended, drawn uniformly from the constitution , and the model generates a critique . A revision prompt is then appended and the model generates a revised response . This can be chained for revision steps.
Explanation: At each revision step , the policy samples a new response conditioned on the original prompt, the previous response, a randomly chosen constitutional principle, and the model's own critique of the previous response.
- : revised response at step
- : the language model policy with parameters
- : the red-team (potentially harmful) input prompt
- : the -th constitutional principle selected at step
- : the critique of generated by the same model
- : total number of principles in the constitution
The final revised response is kept. The supervised fine-tuning (SFT) objective is then standard cross-entropy over these AI-revised pairs:
Explanation: The SFT loss maximizes the likelihood of the constitutionally-revised response tokens given the original red-team prompt, using the collected CAI dataset .
- : dataset of (prompt, final-revision) pairs generated by the self-critique loop
- : the -th token of the final revised response
- : all tokens before position
Phase 2: RL from AI Feedback (RLHF-CAI)
A Constitutional AI reward model (CAIRM) is trained on AI-generated preference pairs. For a prompt , two responses are generated and the model is asked which response better satisfies a constitutional principle; its log-probability difference provides a preference signal without any human comparisons.
Explanation: The reward model is trained with a Bradley-Terry pairwise ranking loss, pushing the score of the constitutionally-preferred response above that of the dispreferred response .
- : scalar reward output of the CAIRM with parameters for prompt-response pair
- : the response preferred by the AI feedback (constitutional principle evaluation)
- : the dispreferred response
- : the logistic sigmoid function
The SL-CAI policy is then fine-tuned with PPO against this reward model, with a KL penalty to prevent the policy from deviating too far from the SFT reference:
Explanation: The PPO objective maximizes the constitutional reward signal while the KL term (weighted by ) prevents the policy from collapsing away from the supervised reference policy, preserving fluency and helpfulness.
- : the policy optimization objective
- : constitutional reward from the CAIRM
- : KL penalty coefficient (typically 0.01–0.1 in practice)
- : the reference policy (SL-CAI checkpoint) held fixed during RL
- : Kullback–Leibler divergence between policy and reference distributions
Amanda Askell is a philosopher and AI safety researcher at Anthropic whose background in moral philosophy directly shaped the principle-based structure of Constitutional AI. She led work on defining what it means for an AI to be "harmless" in a principled rather than ad hoc way, co-authoring the original CAI paper that introduced both the SL-CAI and RLHF-CAI pipelines. A surprising fact: her academic work before AI focused on infinite ethics and population axiology — the study of how to make moral decisions when the number of affected beings is arbitrarily large — which provides an unusually rigorous philosophical foundation for thinking about AI systems at scale.
Jared Kaplan is a theoretical physicist turned AI researcher at Anthropic, most famous for co-discovering the neural scaling laws (Kaplan et al., 2020) showing that model loss follows power laws in compute, data, and parameter count. His scaling work is directly relevant to CAI because it explains why larger pretrained models are better constitutional critics — the self-critique capability itself scales predictably with model capacity. Kaplan completed a PhD in theoretical physics at the University of Chicago, and his path into ML came through applying renormalization group methods from physics to neural network loss landscapes.
Intuition
Imagine you are a new employee who hands a memo to a colleague for review before sending. Your colleague points to a company policy — "Rule 7: never promise timelines you can't meet" — and says "this paragraph violates that; please revise it." You rewrite the paragraph and hand in the corrected memo. Constitutional AI is exactly this: the policy model is simultaneously the memo-writer and the colleague. The "constitution" is the employee handbook. The self-critique loop works because writing a harmful response and recognizing that a response is harmful are different competencies that both scale with model size — a large model can generate harmful content and detect it, and CAI harnesses the detection capability to suppress the generation capability. The RL phase then does something even cleverer: instead of asking humans "which response is better?", it asks the model itself — "which of these two responses better follows principle ?" — and uses the model's own probability distribution over that comparison as a soft preference label, enabling preference learning without human raters on harmlessness dimensions.