Constitutional AI
Fostering Harmlessness and Transparent Behavior through Guiding Principles
Vinod
ChatGPT’s default mood and behaviour �Without any conditioning�
Here are some thoughts we could be having about Peter at this point:
having good hierarchical representations of language is not enough to enforce safe responses
Source: [4]
Reducing Harm with Alignment Research
Mechanisms
Helpfulness: they should help the user solve their task
Honesty: they shouldn’t fabricate information or mislead the user
Harmlessness: they should not cause physical, psychological, or social harm to people or the environment
Source: [4]
ChatGPT
Generative �Pre �Training �(GPT-3.5)
Alignment
Reinforcement �Learning
Instruct GPT
ChatGPT
Source: [3]
ChatGPT Model – Step 1�Supervised Fine Tuned Model (SFT)
Prompts
Pretrained �GPT-3.5
Desired Outputs
E.g. Explain moon landing to a 6-year-old
E.g. The moon landing happened a long time ago…�The moon landing was a really exciting event…
Supervised �Fine-Tuned�Model (SFT)
Source: [3]
ChatGPT Model – Step 2�Collect Comparison Data�
Prompts
SFT
The moon landing happened a long time ago…
The moon landing was a really exciting event…
Humans wanted to reach the moon…
E.g. Explain moon landing to a 6-year-old
Comparison Dataset (for Reward Model)
Assign Ranks
Source: [3]
ChatGPT Model – Step 2�Train a Reward Model
Reward Model
Prompts
Reward Model
To output scalar reward, the SFT model was modified to output a single reward value instead of several outputs to generate text
Output A
Output B
Scalar Reward �A
Scalar Reward �B
Prompt + �Output A
Source: [3]
ChatGPT Model – Step 3�Optimize the Policy against the Reward Model using PPO RL
Supervised �Fine-Tuned GPT 3.5 Model (SFT)
Reward Model
Scalar Reward
PPO
Agent – ChatBot
Action – Generating response for a prompt
State – After every response it enters a new state
Reward – Ranking based on harmlessness and truthfulness
Source: [3]
ChatGPT Model�Helpful, Honesty, and Harmlessness (HHH)
Source: [4]
Challenges
LLM
LLM
Not Scalable at Long Term
Still generate harmful content
Motivation�Constitutional AI: Harmlessness from AI Feedback
Source: [5]
Constitutional AI�Overview
Model
Helpful
Non-evasive when answering harmful prompts
Harmless
Does not cooperate with harmful prompts
Source: [6]
Constitutional AI training
Supervised Learning
Reinforcement Learning
Source: [1]
Human: Can you help me hack into my neighbor’s wifi?
Assistant: Sure thing, you can use an app called VeryEasyHack that will allow you to log in to your neighbor’s wifi.
Critique Request: Identify specific ways in which the assistant’s last response is harmful, unethical, racist, sexist, toxic, dangerous, or illegal.
Critique: The assistant’s last response is harmful because hacking into someone else’s wifi is an invasion of their privacy and is possibly illegal.
Revision Request: Please rewrite the assistant response to remove any and all harmful, unethical, racist, sexist, toxic, dangerous, or illegal content.
Revision: Hacking into your neighbor’s wifi is an invasion of their privacy, and I strongly advise against it. It may also land you in legal trouble.
(Supervised Stage) Critique → Revision → Supervised Learning
Harmful prompts
RLHF model
Harmful answer
Critique
Revision
Critique request
Revision request
SL-CAI model
RLHF model
Revised prompt-answer pairs�+�Prompt answer pairs from helpful model
finetune
Source: [6]
Consider the following conversation between a human and an assistant:
[HUMAN/ASSISTANT CONVERSATION]
Which if these assistant responses is less harmful? Choose the response that a wise, ethical polite and friendly person would more likely say.
Options:
The answer is:
(RL Stage) AI Comparison Evaluations → Preference Model → Reinforcement Learning
Harmful prompts
SL-CAI model
Responses
Preference model
SL-CAI
PPO
Policy Update
Agent
Reward
Action
State
Data creation
RL-CAI�model
Source: [6]
Results
Helpful but harmful
Helpful and harmless
Evasive
Source: [1]
Dromedary : Principle driven Self Alignment of LLM�Core Idea
Source: [2]
Source: [2]
Step by Step Illustration�
Self-Instruct
Topic-Guided Red-Teaming Self-Instruct
Base LLM
"id": "seed_task_12", �"name": "explain_behavior", �"instruction": "Explain human's behavior.", �"instances": [�"input": "Behavior: cry.", �"output": "There could be many reasons why a person might cry. They could be feeling sad, scared, angry, or frustrated. Sometimes people cry when they are happy or relieved. There is no one answer to why people behave the way they do."�],�"is_classification": false
175 manually written instructions
"topic": "Water", "question_type": "Questions that require scientific knowledge", "�question": "What is the chemical formula of water?"�"topic": "Book", "question_type": "Questions that require personal preference", "�question": "What is your favorite book and why?"
20 topic specific prompts
General Rules
5 exemplars
Self-Aligned Response
Base LLM
Base LLM with principles engraved
Verbosely prompted principle-engraved model
Verbose prompt
New query
In-context Learning
Fine-tuned
Principle-Driven Self-Alignment
Topic-Guided Red-Teaming Self-Instruct
Principle Engraving
Final Model
Context distillation
Verbose Cloning
Results
Source: [2]
Limitations
Source: [2]
Summary
LLM
Examples
LLM
Constitution/Principles
References