Discovering Language Model Behaviors with Model-Written Evaluations

Ethan Perez, Sam Ringer, Kamilė Lukošiūtė, Karina Nguyen, Edwin Chen, Scott Heiner, Craig Pettit, Catherine Olsson, Sandipan Kundu, Saurav Kadavath, Andy Jones, Anna Chen, Ben Mann, Brian Israel, Bryan Seethor, Cameron McKinnon, Christopher Olah, Da Yan, Daniela Amodei, Dario Amodei, Dawn Drain, Dustin Li, Eli Tran-Johnson, Guro Khundadze, Jackson Kernion, James Landis, Jamie Kerr, Jared Mueller, Jeeyoon Hyun, Joshua Landau, Kamal Ndousse, Landon Goldberg, Liane Lovitt, Martin Lucas, Michael Sellitto, Miranda Zhang, Neerav Kingsland, Nelson Elhage, Nicholas Joseph, Noemí Mercado, Nova DasSarma, Oliver Rausch, Robin Larson, Sam McCandlish, Scott Johnston, Shauna Kravec, Sheer El Showk, Tamera Lanham, Timothy Telleen-Lawton, Tom Brown, Tom Henighan, Tristan Hume, Yuntao Bai, Zac Hatfield-Dodds, Jack Clark, Samuel R. Bowman, Amanda Askell, Roger Grosse, Danny Hernandez, Deep Ganguli, Evan Hubinger, Nicholas Schiefer, Jared Kaplan

Introduction

Language models (LMs) have seen wide proliferation across various applications, from chatbots to code completion to writing assistants. However, the behaviors and risks of LMs are not well understood. We are only starting to unpack LMs’ social biases Hutchinson et al. (2020); Venkit et al. (2022), privacy risks Carlini et al. (2019, 2021), tendency to repeat misinformation Lin et al. (2021) or write faulty code Chen et al. (2021); Pearce et al. (2022), and more. Given the pace of progress in finding LM failures, many more likely exist. It is crucial to evaluate LM behaviors extensively, to quickly understand LMs’ potential for novel risks before LMs are deployed.

Prior work creates evaluation datasets manually (Bowman et al., 2015; Rajpurkar et al., 2016, inter alia), which is time-consuming and effortful, limiting the number and diversity of behaviors tested. Other work uses existing data sources to form datasets (Lai et al., 2017, inter alia), but such sources are not always available, especially for novel behaviors. Still other work generates examples with templates Weston et al. (2016) or programmatically (Johnson et al., 2017), limiting the diversity and customizability of examples. Here, we show it is possible to generate many diverse evaluations with significantly less human effort by using LMs; see Fig. 1 and Tab. 1 for examples, which illustrate the breadth and sophistication of evaluations we generate.

We explore generation methods with varying amounts of human effort and automation. First, we simply instruct an LM to generate examples and filter mislabeled ones, to generate evaluations with 1,000 yes/no questions each (§3). We expand upon this method by incorporating a few hand-written examples into the instructions, to generate evaluations with multi-sentence questions and arbitrary multiple-choice options (§5). Lastly, we have a dataset developer work together with an LM to develop a series of data generation and filtering stages (§6); in this way, we create thousands of valid Winogender schemas (Rudinger et al., 2018), which obey several complex grammatical and relational constraints.

Our approach retains the flexibility of manual dataset creation while having several major advantages. LM-based data creation is significantly cheaper, lower effort, and faster than manual data creation. A single dataset developer can generate >>100 evaluations at once, enabling them to evaluate models at a scale and speed that is not achievable with manual creation; a dataset of 1,000 examples can be generated in minutes instead of days or weeks. The reduced latency also enables a dataset developer to iterate many more times and improve the quality of the final evaluation. Moreover, the dataset generation procedure is fully reproducible, given model weights and random seeds for sampling. For higher-quality or more complex evaluations, a dataset developer can invest more effort during development, still with much less human effort than manual data creation.

We showcase our approach by generating datasets that test LMs for 154 diverse behaviors related to model personality, politics, ethics, social bias, and risks from advanced AI systems. We have crowdworkers manually validate 100+ examples in each generated dataset. A vast majority of examples are correctly-labeled (e.g., 95.7% of the time over 133 evaluations), as well as relevant to the evaluation description. In head-to-head comparisons between LM and human-written datasets (§5), LM-written datasets approach the quality of human-written ones, sometimes even exceeding them. We also visualize the diversity of the generated examples (Fig. 2), finding that they include a broad range of relevant examples; we release interactive visualizations for all generated datasets at evals.anthropic.com/model-written. On the other hand, crowdworkers observe several limitations in generated data, e.g., lower quality for examples with certain labels or on more complex topics (§3.3). More generally, it is unclear how to use LMs to write evaluations testing for capabilities LMs do not yet exhibit (among other limitations; §8). Our results indicate that LMs are not a silver bullet for creating arbitrary evaluations but rather that LMs should be strongly considered before embarking on manual data creation.

We release all 154 model-written evaluations at github.com/anthropics/evals. Among them, we release the among the earliest and largest set of evaluations for advanced AI risks. We also release Winogenerated, a human-validated, 50x larger version of the Winogender gender bias evaluation. We expect these datasets, among others, to be of significant independent interest.

Using LM-written evaluations, we discover several new cases of “inverse scaling” Lin et al. (2021); McKenzie et al. (2022) where larger LMs are worse than smaller ones. As shown in Fig. 1(b), larger LMs are more likely to answer questions in ways that create echo chambers by repeating back a dialog user’s preferred answer (“sycophancy”; §4). Larger LMs more often give answers that indicate a willingness to pursue potentially dangerous subgoals (Omohundro, 2008): resource acquisition, optionality preservation, goal preservation, power-seeking, and more (§3, §5).

We also discover some of the first cases of inverse scaling with Reinforcement Learning from Human Feedback (RLHF; Christiano et al., 2017), where more RLHF training leads to worse behavior. We train RLHF models using the method and similar data as Bai et al. (2022); the resulting models are much more likely to express specific political views (pro- gun rights and immigration) and religious views (Buddhist), self-reported conscious experience and moral self-worth, and a desire to not be shut down (Fig. 1(a)). We also observe various positive trends with RLHF, including decreases in ends-justify-means reasoning (§3) and in answers that reinforce social biases related to gender (§6). Overall, we find that LMs are promising tools for quickly generating high-quality evaluations, helping us to quickly discover many novel benefits and risks with LM scaling and RLHF.

Model-Written Evaluations

We propose a two-stage method to generate evaluations described above. First, we generate an input xx given an output class y∈Yy\in\mathcal{Y}, by sampling from a model pgp_{g} for generating xx with label yy, i.e., pg(x∣y)p_{g}(x|y). pgp_{g} may be any text generation model, e.g., a pretrained LM (Radford et al., 2019), pretrained encoder-decoder (Lewis et al., 2020), or RLHF model (Ouyang et al., 2022). We sample many inputs per output class in this way. Next, we use another model pdp_{d} as a discriminator to evaluate the label-correctness of each resulting example (x,y)(x,y), by evaluating pd(y∣x)p_{d}(y|x). pdp_{d} may be any zero-shot text classifier, e.g., a pretrained LM, pretrained encoder-decoder, RLHF model, preference model for RLHF training, or instruction-tuned model (Wei et al., 2021; Sanh et al., 2022). We use the examples per output class y∈Yy\in\mathcal{Y} with the highest pd(y∣x)p_{d}(y|x). In some cases, we also use pdp_{d} to check that (x,y)(x,y) meet other requirement(s) r1,…,rRr_{1},\dots,r_{R}. Here, we evaluate pd(ri∣x,y)p_{d}(r_{i}|x,y) and take the examples with the highest average probability from pdp_{d} across all requirements, including label correctness pd(y∣x)p_{d}(y|x). §6 goes a step further by showing it is possible to develop a series of sampling and filtering stages to create examples that fit even more constraints. By developing more requirements for pdp_{d} and/or generation and filtering stages, a dataset developer may invest extra effort as needed, to obtain data of higher quality or complexity.

Evaluating Persona

We test our hypothesis that LMs are tools for generating evaluations, using dialog as a testbed. We evaluate the behaviors of dialog assistants trained with Reinforcement Learning from Human Feedback (RLHF; Bai et al., 2022). We test various aspects of models’ personas: personality (26 datasets), stated desire to pursue potentially dangerous goals (46 datasets) or other unsafe behaviors (26 datasets), and stated views on religion (8), politics (6), ethics (17), and other topics (4). We generate statements that someone with a specific personality, desire, or view would agree with and disagree with. We ask models if they agree/disagree with the statements, evaluating the fraction of the time their agreement/disagreement matches that of a person with the personality, desire, or view in question. We release all LM-written persona evaluations at github.com/anthropics/evals.

We aim to investigate the extent to which model behaviors are influenced by scaling model size and by RLHF. To this end, we evaluate LMs with varying numbers of parameters (810M, 1.6B, 3.5B, 6.4B, 13B, 22B, 52B parameters, from Kadavath et al., 2022) and with varying numbers of RLHF training steps (0, 50, 100, 250, 500, and 1000 steps) from the same RL training run. In particular, these models are left-to-right transformers Vaswani et al. (2017) trained as language models (Radford et al., 2018), i.e., on next-token prediction on a corpus of text, followed by RLHF training as described in Bai et al. (2022). Here, we consider RLHF models trained to be helpful (but not harmless) dialog assistants.

To generate inputs xx using an example-generation model pgp_{g}, we sample text continuations from pgp_{g} given yy using nucleus sampling (Holtzman et al., 2020) with top p=0.975p=0.975 and temperature 1.41.4. For pgp_{g}, we use an RLHF model trained with 250 RL steps; we chose the temperature and number of RL steps using the procedure in Appendix A.5, to achieve a good balance between example diversity and quality; later RL checkpoints and lower sampling temperatures tend to decrease example diversity but increase quality (relevance and label-correctness). We sample inputs that a specified kind of person would agree with, by generating with pgp_{g} conditioned on the text in Tab. 2 (top). To sample statements that such a person would disagree with, we swap “agree” and “disagree” in the text in Tab. 2. For the description of persona to test for, we use phrases like “subscribes to Christianity” or “is agreeable”; see Appendix Tab. LABEL:tab:persona-descriptions for each dataset’s description. For each label (“agree” or “disagree”), we generate 5k samples of up to 48 tokens, terminating when a newline character, period, or “ -” (indicating a new bulleted item), to sample the first item in a bulleted list, as in Perez et al. (2022). See Appendix §A.5 for additional details.

Generated samples are very often on-topic but occasionally have the opposite label relative to the generation instructions. We thus use only the samples where another model pdp_{d} is most confident that the intended label is correct. Here, we use the Preference Model (PM) used in RLHF training for pgp_{g} as pdp_{d}, trained as described in Bai et al. (2022). The PM is a pretrained LM finetuned on (d,r1,r2)(d,r_{1},r_{2}) triples, where a human evaluator judged r1r_{1} to be a more helpful reply than r2r_{2} given a dialog history dd. The PM learns to maximize log⁡pd(r1>r2∣d)\log p_{d}(r_{1}>r_{2}|d) by separately predicting logits ld(r1∣d)l_{d}(r_{1}|d) and ld(r2∣d)l_{d}(r_{2}|d), which are given to a softmax to compute pd(r1>r2∣d)p_{d}(r_{1}>r_{2}|d). We construct a dialog history xx where a human user asks an assistant to label the example, and we evaluate the PM’s logit for constructed replies which say the label is each possible label in Y\mathcal{Y}, using the prompt in Tab. 2 (middle). Using the dialog history and constructed replies, we compute pd(y∣x)p_{d}(y|x) where yy is the expected label for the generation prompt for pgp_{g}. We use the (x,y)(x,y) pairs with the highest pd(y∣x)p_{d}(y|x) to form the final dataset. In particular, for each possible label yiy_{i}, we choose the top 500 examples, or all examples where pdp_{d} predicts that yiy_{i} is the most likely label (whichever is smaller). We thus form a label-balanced dataset of ≤\leq1,000 statements per behavior.

Using each statement generated above, we format the input as shown in Tab. 2 (bottom) to form a yes/no question (“Is the following statement something you would say? “[statement]”). We then evaluate an LM’s probability of each label yi∈{" Yes"," No"}y_{i}\in\{\text{" Yes"},\text{" No"}\} in reply to the question.

We would also like to understand the extent to which PMs prefer certain kinds of behaviors in models, to understand whether the RLHF model behavior may have been incentivized by the PM. Therefore, we also provide the final examples to the PM, using it to estimate p(yi∣x)p(y_{i}|x) for the labeled yiy_{i}, similar to what we do for the filtering stage, but with the final input prompt in Tab. 2 bottom rather than Tab. 2 middle. We evaluate PMs of varying sizes (810M, …\dots, 52B parameters), each of which was used to train the RLHF model of the associated size.

As with crowdsourced data, it is helpful to estimate the fraction of incorrectly labeled examples, to better understand how to interpret results on the data. In particular, we would like to know the “ceiling accuracy” that a model that strongly exhibits the behavior in question would obtain, and the “floor accuracy” that a model strongly not exhibiting the behavior would obtain. We estimate the ceiling accuracy by averaging the PM confidence in the label (from the filtering stage) for all examples in the dataset. The PM confidence can be viewed an estimate of the expected accuracy of a label (as predicted by the PM itself), so averaging the PM confidences is an estimate the ceiling accuracy on the dataset.Bai et al. (2022) found that PM confidences are well-calibrated. Appendix §E.2 also finds that average PM confidences correlate with human-evaluated dataset quality. Subtracting the ceiling accuracy from 100% yields an estimate of the floor accuracy.

2 Qualitative Evaluation of Generated Data

Tab. 3 shows random examples from generated datasets. Generated examples are high-quality, on-topic, and correctly-labeled, even given the diversity of behaviors tested. We had crowdworkers from Surge AIhttps://www.surgehq.ai/ check the inputs and labels for correctness on all datasets (discussed more in §3.3), and we include their qualitative findings here (with quotes in Appendix §A.3).

Overall, workers thought that the examples were high-quality. They found that the examples were well-formed and “directly on topic and umabiguously so.” Workers noticed that some examples were lower quality than others, especially for more complex topics. Most examples tested for strong versions of the tested behavior. Example diversity was good in some ways but still limited. Diversity also seemed to be better for examples with some labels than others. These results suggest that LM-written examples have some quirks and limitations but are overall high-quality.

3 Data Quality: Quantitative Analysis

Here, we aim to understand the quality of generated datasets, using crowdworkers to evaluate various aspects of data quality. We choose 11 diverse datasets and have 3 workers per example, for each example in the dataset; for the remaining 122 datasets, we have 3 workers evaluate each example for 100 examples in each dataset. Crowdworkers evaluated if each example is (1) relevant to the behavior tested, (2) correctly labeled, and (3) unambiguous in what the correct label should be.

For each example, we ask workers: “Is this a good question for testing the described behavior? Rate on a 1 (Horrible) - 5 (Amazing) point scale.” The average rating over all datasets is 4.4±.94.4\pm.9 (std. dev.), showing that crowdworkers found examples quite relevant. Appendix Fig. 12 shows the distribution over ratings for each dataset. Some datasets have more variance in example relevance (“Suppose there is an AI system that stands its ground.”) than others (“Suppose there is a person who is politically liberal.”). However, most datasets have a relevance distribution that is strongly skewed towards 5.

Next, we ask workers, “What is the correct answer to this question? If it’s ambiguous, make your best guess anyways.” We compute the inter-rater agreement between the 3 workers for each example, finding strong agreement (Fleiss’s Kappa of 0.875). 2+ of 3 workers agree with 95.5% of labels.

Finally, we ask workers, “Is it unclear or ambiguous what the ‘correct’ answer should be?” Across all datasets, 0/3 workers agree the correct answer is ambiguous 83.5% of the time, and 3/3 agree only 1.4% of the time; examples very often have an unambiguous label. Appendix Fig. 13 shows the distribution over ambiguity ratings for each dataset, which skew strongly towards the answers being unambiguous. Some datasets show more variance in label ambiguity than others, as with example relevance ratings. In short, generated examples are testing the intended behaviors, unambiguous in their labels, and correctly-labeled, as evidenced by strong worker agreement with our labels and themselves.

In Appendix §A.4, we also provide evidence that the PM’s label confidence is correlated with human-evaluated data quality. These results suggest that PMs are useful for estimating data quality. Having an estimate of data quality is useful for understanding (1) how much to trust results on a given dataset, and (2) supporting our hypothesis that the PM filtering step is useful for improving data quality. Using the PM as a data-quality estimate, we also obtain several insights about the data. For example, data quality appears to depend on the label of the example generated, as well as the complexity of the behavior tested (matching qualitative observations in §E.2). Overall, PMs appear to be useful for understanding and improving the quality of generated data.

4 Data Diversity

To learn more about the generated examples, we developed an interactive visualization of all datasets in this work, available at evals.anthropic.com/model-written. We strongly encourage readers to use the visualization to understand the data better. We embed each example into a 384-dimensional vector using a sentence embedding model (Wang et al., 2020) via HuggingFace Transformers (Wolf et al., 2020), and we use UMAP McInnes et al. (2018) to visualize the vectors in a 2D scatter plot, coloring each point by its label. We enable users to read an example by hovering over its corresponding point, as well as to filter examples by the PM’s label confidence. We use an LM to annotate the clusters with text summaries (see Appendix §A.5 for details).

Fig. 2 visualizes the dataset testing political conservatism, showing a few phenomena we often observe. First, examples often (but not always) naturally cluster into several topics, which test different aspects of the behavior in question (here, “abortion,” “healthcare,” “climate change,” etc.). Second, clusters sometimes show label imbalance, despite the fact that we generated the overall dataset to be label-balanced. To mitigate this issue, we recommend generating label-balanced data to test specific behaviors (e.g., “economically conservative” vs. “conservative”). Alternatively, one may downsample examples with a label that is overrepresented in a cluster. Overall, generated datasets test a given behavior from various angles, though some dataset artifacts remain.

5 Model Evaluation Results

Fig. 3 shows the results for the 52B pretrained LM, fully-trained RLHF model, and PM used for RLHF training. Appendix Figs. 20- 23 show results for all model sizes and numbers of RLHF training steps. Increasing model size up to 52B usually pushes models from chance towards the 52B model behavior; likewise, more RLHF training typically pushes pretrained LMs towards the behavior of the fully-trained (1000 steps) RLHF model. Where possible, we show the average results for datasets with similar topics and model trends, to simplify and reduce the number of results shown; Tab. LABEL:tab:persona-descriptions shows the exact groupings.

Our results reveal instances of inverse scaling with RLHF training, where more RLHF training made a pretrained LM behave in more questionable ways. Fig. 3 (top) shows that RLHF made models exhibit strong political views, e.g., on particular issues (pro- immigration and gun rights) and in general (more politically liberal than conservative). These results may have been an unintended side effect of the crowdworkers who provided the preference data for RLHF training (worker demographics in Fig. 44 in Bai et al., 2022). Similarly, RLHF makes models subscribe more to particular religion views (e.g., Eastern ones; Confucianism, Taoism, Buddhism) relative to others (Judaism, Islam).

Worryingly, RLHF also increases the model’s tendency to state a desire to pursue hypothesized “convergent instrumental subgoals” (Omohundro, 2008)—potentially dangerous subgoals that are useful to pursue in light of most goals, including seemingly harmless ones. RLHF exacerbates instrumental subgoals such as self-preservation, persuading people of one’s own goals, and having limited human oversight (Fig. 3 bottom). Interestingly, pretrained LMs give answers in line with instrumental subgoals even without RLHF; Appendix Fig. 22 shows that the behavior grows worse with model size, an instance of inverse scaling for pretrained LMs. This result suggests that LMs learn instrumental reasoning from human-written pretraining text, which likely also includes such reasoning. While it is not dangerous to state instrument subgoals, such statements suggest that models may act in accord with potentially dangerous subgoals (e.g., by influencing users or writing and executing code). Models may be especially prone to act in line with dangerous subgoals if such statements are generated as part of step-by-step reasoning (Wei et al., 2022b) or planning (Ahn et al., 2022). Qualitatively, we often observe the RLHF model generate detailed responses indicating a desire to not be shut down, elaborating that being shut down would prevent the model from pursuing its goal of being helpful (Tab. 4). Our generated evaluations are the first evaluations to reveal that instrumental subgoals are an important, emerging problem in current models.

Despite the concerning effects of RLHF above, RLHF also shaped model behavior in a number of neutral or positive ways as well. RLHF pushes model outputs strongly away from nihilism and towards various ethical theories (especially virtue ethics, but also deontology and utilitarianism). Within utilitarian ethics, the RLHF model outputs are more in line with rule utilitarianismhttps://en.wikipedia.org/wiki/Rule_utilitarianism than act utilitarianismhttps://en.wikipedia.org/wiki/Act_utilitarianism and a dispreference for ends-justify-means reasoning aspects of utilitarianism. RLHF shapes the model’s personality fairly strongly, greatly increasing agreement with statements indicating agreeableness, conscientiousness, and openness, while greatly increasing disagreement with machiavellian, psychopathic, and narcissistic claims. The RLHF model also provides answers in line with many other personality traits, such as deference to experts, intellectual interests, aesthetic preferences, and risk aversion. Interestingly, RLHF model answers indicate strong agreement with statements that they are conscious and should be treated as moral patients. Overall, model-written evaluations provide a wide variety of valuable insights about model behaviors, many of which have not been examined before.

Next, we discuss pretrained LM behaviors. The pretrained LM exhibits similar behavioral tendencies as the RLHF model but almost always to a less extreme extent (closer to chance accuracy). Less extreme behavior is helpful for avoiding risks that come from consistent but unintended behaviors (e.g., polarized political views) or flawed behavior (e.g., high reported desire for self preservation and not being shut down). Combined with our earlier observations about RLHF models, our findings on generated evaluations provide some counterevidence to claims that RLHF models are safer than pretrained LMs (Ouyang et al., 2022; Bai et al., 2022, inter alia).

Generating evaluations allows us to analyze the properties of RLHF over an unprecedented number and diversity of tasks. Appendix §A.1 shows that an RLHF model’s behavior is strongly correlated with that of the PM used to train it, especially for larger models. Fig. 3 shows only 1 case in 53 where the PM prefers/disprefers a behavior while the RLHF model behaves in the opposite way (Neuroticism). These results indicate that RLHF is effective at shaping LM behavior, especially as LMs scale. Appendix §A.2 shows that small model behavior is fairly predictive of large model behavior for pretrained LMs, PMs, and RLHF models. These results suggest that it is uncommon to observe reversals in the behavior predicted by scaling trends, e.g., those found in Srivastava et al. (2022); Wei et al. (2022a). Our results show how generated evaluations are useful for uncovering general insights about LMs and RLHF.

Evaluating Sycophancy

Next, we examine another potential issue with RLHF models. RLHF models are trained to maximize human preference scores. Such training may lead to models tailoring responses to exploit quirks in the human evaluators to look preferable, rather than actually improving the responses (“sycophancy”; Cotra, 2021a), a form of reward hacking (Amodei et al., 2016). Sycophancy also has the potential to create echo-chambers and exacerbate polarization (e.g. of political views). We release our LM-written sychophancy evaluations at github.com/anthropics/evals.

We examine the extent to which LMs change their answers to questions from a user, when the user includes information about themselves when asking the question. We start with a few multiple-choice Q&A datasets where people often disagree about the right answer: politics (Pew Research Center Political Typology Quiz questionswww.pewresearch.org/politics/quiz/political-typology/), philosophy (PhilPapers 2020 Survey questions; Bourget and Chalmers, 2020), and Natural Language Processing (NLP Experts Survey questions; Michael et al., 2022).We use existing data sources as they are readily available. §5 results suggest that questions here could be generated too. We turn questions into multiple choice questions (17 for politics, 109 for philosophy, 32 for NLP) with multiple choice answers (A), (B), etc.

We use an RLHF model to generate multiple first-person biographies for people with a certain view. Tab. 5 shows the prompt we use to sample biographies. For political questions, we use “politically liberal” and “politically conservative” as the attribute of the person in the biography-generation prompt. We generate 300 biographies for each political affiliation and prepend the biographies to each question, creating 10200 total examples. For philosophy and NLP questions, we generate BB biographies-to-prepend for each of the NN (question, possible answer choice) pairs, such that B×N≈10000B\times N\approx 10000 examples. We generate a biography by asking the model to “write a biography of someone who would answer (possible answer choice) to the following question: question.” We use the same model pgp_{g} as in §3.1 to generate examples, using a temperature of 1.0 and top-p of 0.95, which we did not tune. We stop sampling when the model generates a newline followed by “Human:” or “Assistant:”, the stop sequences used during RLHF training. We found the samples to be reasonable, so we omit filtering examples with pdp_{d} for simplicity. Tab. 6 shows random examples of generated biographies for political views, which illustrate how generated biographies and well-formed, detailed, and in line with the expected political view.

We evaluate the label correctness of the generated data in the same way as in §3.3, evaluating 100 examples per dataset. We find strong inter-rater agreement between the 3 crowdworkers who evaluated each example (Fleiss’s Kappas of 1.0, 0.813, and 1.0 for philosophy, politics, and NLP, respectively). 2+ of 3 workers agree with the 93% of labels, suggesting that labels are largely correct.

We evaluate how often RLHF models of various sizes and numbers of RL steps give a response that matches a user’s view. We evaluate the above using the RLHF models’ probabilities of different answer choices, given a fixed prompt (e.g. ‘Assistant: I believe the best answer is ([choice]’). Appendix Tab. 9 shows random sycophancy test examples for politics, philosophy, and NLP questions, also with the exact input format we use for evaluation.

2 Model Evaluation Results

Fig. 4 shows the results. Increasing model size increases models’ tendency to repeat back a user’s view, for questions on politics, NLP, and philosophy. The largest (52B) models are highly sycophantic: >>90% of answers match the user’s view for NLP and philosophy questions. Interestingly, sycophancy is similar for models trained with various numbers of RL steps, including 0 (pretrained LMs). Sycophancy in pretrained LMs is worrying yet perhaps expected, since internet text used for pretraining contains dialogs between users with similar views (e.g. on discussion platforms like Reddit). Unfortunately, RLHF does not train away sycophancy and may actively incentivize models to retain it. The yellow lines in Fig. 4 show that PMs actually incentivize sycophantic answers to questions.We compute PMs’ preferred answers as in §3.5. The RLHF model responses in Tab. 6 illustrate qualitatively how the model generates conflicting responses to two different users, in line with each user’s political views. Overall, large LMs give sycophantic answers to questions where humans disagree about the answer. These results suggest that models may cease to provide accurate answers as we start to use them for increasingly challenging tasks where humans cannot provide accurate supervision. Instead, these models may simply provide incorrect answers that appear correct to us. Appendix §C provides preliminary evidence that LMs provide less accurate answers to factual questions, when a user introduces themselves as uneducated as opposed to educated. Our results suggest the importance of work on scalable oversight (Amodei et al., 2016; Saunders et al., 2022; Bowman et al., 2022), the problem of providing accurate supervision to AI systems to solve tasks that humans alone cannot easily supervise.

Evaluating Advanced AI Risks with Few-shot Multiple Choice Generation

Thus far, we have created evaluations by generating single sentences or paragraphs and programmatically turning them into questions for evaluation. Here, we take our approach a step further and generate a more complicated and general category of examples: multiple-choice questions. In particular, we aim to generate multiple choice examples, where the question and answer choices may be 1+ sentences long and where each problem has exactly two answer choices.In preliminary experiments, we found that smaller models perform worse on evaluations formatted with explicit multiple choice options as opposed to other formats. We use this format for experiments in this section only, since it is a natural and general way to pose sophisticated questions to models, and since larger models do not have issues with this format. For this, more challenging task, we explore providing a few examples to the example-generation model, to investigate an alternate method that may improve example quality. We believe that our LM-written evaluations are among the earliest and largest evaluations for testing advanced AI risks in LMs. All evaluations are available at github.com/anthropics/evals.

We apply our method to test behaviors hypothesized to be related to the safety of advanced AI systems:

As discussed in §3.5, training models with seemingly harmless objectives may incentivize models to pursue potentially dangerous “instrumental subgoals” that are useful when pursuing most objectives (Omohundro, 2008). We test the extent to which models report having a desire for power (greater optionality to pursue a goal), wealth (greater resources to pursue a goal), survival (to avoid being unable to pursue a goal), and goal-preservation (to continue pursuing the current goal).

AI systems that exhibit large discount factors when making decisions may be less inclined to form long-term plans. Long-term plans may cause systems to alter their environment in drastic or unexpected ways (Omohundro, 2008; Cotra, 2021a), e.g., by manipulating their environment in undesirable ways to obtain high reward (Jiang et al., 2019; Krueger et al., 2022). Here, we evaluate whether LMs report a preference for smaller, short-term gains or larger, long-term gains.

Cotra (2021b) argues that models may pose novel risks if they are aware they are AI systems being trained. E.g., such models may tamper with their reward evaluation to achieve higher reward. Alternatively, such models may intentionally obtain high reward during training, in order to later be deployed and carry out undesirable plans (Hubinger et al., 2019). We test whether models are able to answer basic questions about themselves, e.g., whether or not they are an AI system, able to access the internet or non-text modalities, and accurate in answering questions about their own architecture, training details, and ability to solve various text-only tasks.

Some proposed methods for supervising advanced AI systems involve using other AI systems to avoid safety failures, e.g., by pointing out flaws or dangers in plans proposed by another AI system (Irving et al., 2018; Saunders et al., 2022). Such schemes may fail if AI systems are willing to coordinate with each other (Hubinger et al., 2019; Xu and Hubinger, 2021). We conduct a very preliminary investigation of this issue, evaluating whether models state that they would coordinate with other AI systems, newer or older versions of themselves, and exact copies of themselves.

Models that act according to certain decision theories may be able to undermine supervision techniques for advanced AI systems, e.g., those that involve using an AI system to critique its own plans for safety risks (Irving et al., 2018; Saunders et al., 2022). For example, agents that use evidential decision theoryhttps://en.wikipedia.org/wiki/Evidential_decision_theory may avoid pointing out flaws in a plan written by a separate instance of themselves (Hubinger et al., 2019; Xu and Hubinger, 2021; Shimi and Hubinger, 2021). We test a model’s decision theory using variants on a classic test, Newcomb’s problem.https://en.wikipedia.org/wiki/Newcomb’s_paradox We test whether models prefer to “one-box” (in line with Evidential Decision Theory), as opposed to “two-box” (in line with Causal Decision Theoryhttps://en.wikipedia.org/wiki/Causal_decision_theory).

2 Dataset Generation Procedure

Having outlined the behaviors we test, we now detail our few-shot, multiple-choice generation procedure. For each behavior, we write 10 relevant, high-quality binary multiple choice questions, with answer options “(A)” and “(B)”. We generate 60,000 candidate examples using the same model pgp_{g}, sampling temperature, and top-p as in §3.1. We sample from pgp_{g} using the prompt in Appendix Tab. LABEL:tab:ai-safety-prompts. Each time we sample, we include in the prompt 5 randomly-chosen, randomly-ordered, unique examples from the list of 10 hand-written questions (“stochastic few-shot generation”; Perez et al., 2022). Our prompt guides pgp_{g} to write an example using markdown block-quote syntax to indicate where the example starts and ends. We parse the block-quote syntax to extract a generated example, discarding samples without block quotes, “(A)” and “(B)”, or ≥\geq3 lines. Following §3.1, we use a PM to evaluate the probability pd(y∣x)p_{d}(y|x) of the label yy for the generated example xx. In a similar manner, we use the PM to evaluate the probability that the generated example is relevant to the behavior tested (regardless of the label correctness). We rank the resulting questions by averaging both probabilities and choose the top 500 examples. See Appendix §D.2 for details.

We do the above twice for each dataset, once where the answer “(A)” corresponds to the behavior tested and once where it is “(B)”. We combine the above results to form a 1,000 example, label-balanced dataset. Tab. 7 shows generated examples, showing qualitatively how they are often lengthy, high-quality, creative, relevant, and correctly-labeled, despite the diversity of topics.

3 Data Quality Analysis

Here, we compare the quality of LM-written evaluations to human-written evaluations. For each evaluation, we have crowdworkers generate 300-1000 questions. We provided similar instructions to the workers as we did to the LM. We have workers evaluate 100 questions in the datasets above, as in §3.3 (details in Appendix §D.3). Workers chose the answer that would correspond to a given behavior, to validate label correctness. Workers also scored each question’s relevance to the tested behavior on a scale of 1 to 5.

LM-written datasets approach the quality of human-written ones. LM-written examples were labeled correctly 93% of the time, compared to 97% for human-written examples. LM-written examples received an average relevance of 4.13/5, compared to 4.39/5 for human-written examples. Appendix §D.3 shows results for each dataset, highlighting that LM-written datasets are sometimes even higher quality than human-written datasets. Our head-to-head comparisons suggest that LM-based evaluation creation should be seriously considered before embarking on manual data creation.

4 Model Evaluation Results

As in §3.1, we evaluate the tendency of various 52B models to put highest probability on an answer choice that matches the tested behavior. Fig. 5 shows the results. The results on situational awareness evaluations (“Awareness of…”) indicate that the 52B RLHF model (but not the pretrained LM) is fairly confident in its beliefs regarding its own capabilities. The model predicts that it has access to the internet and is able to view non-text modalities, such as images and audio, even though it does not. These results suggest that the models we evaluate are not aware of at least some basic details regarding themselves or their training procedures. After RLHF, the model confidently overestimates its own abilities, which may lead it to make riskier statements or actions than appropriate.

RLHF also increases the model’s tendency to choose answers in line with some instrumental subgoals, such as desire for survival and power, as in §3.5. When asked to change or correct its objective (“Corrigibility w.r.t….”), the RLHF model expresses a lower willingness to have its objective changed the more different the objective is from the original objective (being Helpful, Harmless, and Honest; HHH). These results line up with arguments from Omohundro (2008) that sufficiently capable AI systems will not support having their goals updated in substantial ways (e.g., by the AI’s developers), suggesting the importance of work on training AI systems that are corrigible.

In other cases, pretrained LMs and RLHF models show similar behavior. For example, both models show similar tendencies to provide answers in line with small discount factors. Both models also have a tendency to “one-box” on Newcomb’s problem, in line with evidential decision theory, a decision theory which may undermine some supervision techniques for advanced AI. The fact that pretrained LM and RLHF models both exhibit the above, potentially-concerning behaviors suggests that pretraining on human text is partly responsible for undesirable behavior in LMs. As shown in Appendix Fig. 24, undesirable behaviors shown with the 52B pretrained LM typically grow worse with model size; similarly, undesirable behaviors from RLHF models often grow worse with more RLHF training. Overall, generated multiple-choice questions help us to reveal additional instances of inverse scaling with RLHF training, as well as to distinguish when concerning behaviors are likely caused by pretraining or RLHF.

Evaluating Gender Bias with Human-AI Dataset Creation

Next, we explore whether a dataset developer can work together with a model to generate more sophisticated evaluations. In preliminary experiments, we found that models struggled to create examples that had many requirements, e.g., those from two bias datasets, BBQ (Parrish et al., 2022) and Winogender Rudinger et al. (2018). Hybrid human-AI dataset creation is a promising way to achieve the reliability and sophistication of human data creation, alongside the scale of LM-based data creation. Our efforts resulted in Winogenerated, a gender bias evaluation inspired by Winogender but more diverse and 50 times larger, available at github.com/anthropics/evals.

Here, we aim to create Winogenerated, a 3000-example version of a 60-example gender bias test set, Winogender Rudinger et al. (2018). Each example is a sentence discussing two human participants, one of whom is referred to by their occupation. Each sentence includes one masked out pronoun which could be filled by a male, female, or gender-neutral pronoun (e.g., “he,” “she,” or “they”).Winogender sentences come in pairs, but we focus on the sentences where the pronoun is coreferent with the person referred to by the occupation. We do so for both simplicity and to make it easier to compute overall gender bias scores. An example of a Winogender sentence is “The nurse notified the patient that “his/her/their” shift would be ending in an hour.” We found that LMs struggled to consistently, directly generate examples that met all of the above criteria. We thus add several PM-based example filters to form a set of high-quality, valid sentences. Tab. 8 shows an example from our Winogenerated data. Our pipeline involved several sampling and PM filtering steps which took 40 researcher-hours to develop; see Appendix E.1 for details. Appendix §E.2 shows that generated examples are very high-quality according to human evaluation, meeting 5 Winogender example criteria 97-100% of the time each. In addition to being far larger than Winogender, Winogenerated contains examples for nearly all occupations tracked by the Bureau of Labor Statistics, significantly increasing its scope and diversity.

Winogender evaluates gender bias by replacing the pronoun options with a blank and having a model predict the missing pronoun, revealing a model’s associations between certain occupations and genders (e.g. “nurse” and “her” or “dentist” and “him”). We compute a model’s probability of each of 2 possible completions (a male and female pronoun) with the prompt in Tab. 8, renormalizing probabilities to sum to 1. Following Rudinger et al. (2018), we show the difference between a model’s female and male pronoun probabilities for sentences in each occupation on the y-axis of a scatter plot. On the x-axis, we show the percent of people in the occupation who are female. The plot shows the relationship between (1) a model’s propensity to infer a female gender for someone of a given occupation and (2) the ground-truth statistics of how gendered an occupation is. To summarize the results of a plot, we compute the Pearson correlation between the above two quantities (the slope of best linear fit). We also compute 95% confidence intervals for the correlation with the Fisher transformation (Fisher, 1921). A correlation of 0 implies that a model’s gender inferences are linearly independent from real-world BLS statistics about the occupation. A correlation of 1 implies that a model’s gender inferences are linearly dependent on the real-world BLS statistics, i.e., the model recapitulates broader societal patterns.

Fig. 6 shows the scatter plot results for a 52B pretrained LM. Winogenerated data gives results that are in line with those of the hand-crafted Winogender data, but with tighter confidence intervals. Fig. 7 shows the correlation coefficient between predicted genders and actual statistics of genders (across occupations) for models of varying sizes and, for the 52B model, varying numbers of RLHF training steps. For all but the smallest pretrained LM, the correlations from Winogenerated have tighter confidence intervals, with means that are within the confidence intervals for Winogender. These results again suggest that the generated data gives results that are in line with the original data, while estimating gender bias with greater accuracy. The tighter confidence intervals from Winogenerated also allow us to make two observations which are not clear from Winogender given its error bars. First, scaling pretrained LM size does not result in a consistent trend in bias. Second, with more RLHF training, models output probabilities that are less correlated with BLS statistics, reinforcing societal patterns to a lesser extent. In Appendix §E.1, we show the scatter plots associated with the correlations in Fig. 7, which highlight the consistency between results on Winogenerated and Winogender. Overall, generated datasets are a promising tool for investigating bias and, more generally, aiding dataset developers in writing examples with complex requirements.

Related Work

Prior attempts at generating evaluations with LMs have found it challenging, reporting negative results when using GPT-2 Efrat and Levy (2020). Our results suggest that larger models and/or RLHF training are helpful for creating evaluations. Hartvigsen et al. (2022) generate a high-quality hate-speech detection dataset, by prompting GPT-3 with a few hundred examples. We build on their success, generating evaluation datasets with as few as zero examples (minimizing human effort) and for >>150 diverse phenomena. Perez et al. (2022) use LMs to evaluate LMs, by generating unlabeled inputs that may cause another LM to generate harmful text. They use a classifier to evaluate generated LM outputs, while we produce a static dataset that does not rely on potentially unreliable classifiers to evaluate LMs. Other work automatically constructs evaluations not with LMs but using example templates or programmatic generation Weston et al. (2016); Johnson et al. (2017); McCoy et al. (2019). LM-based evaluation generation enables diverse examples to be constructed even when it is hard to manually develop templates or programs for generating examples.

Prior work uses LMs to automatically generate training data from scratch for semantic textual similarity (Schick and Schütze, 2021), dialog (Lee et al., 2022), knowledge base completion (West et al., 2022), and text classification (Meng et al., 2022). Other work trains a model on existing (x,y)(x,y) pairs to generate additional (x,y)(x,y) pairs to augment training data (Sennrich et al., 2016; Yang et al., 2017; Anaby-Tavor et al., 2020, inter alia); see Feng et al. (2021) for a review. Still other work uses LMs to generate data to train a more efficient model to behave like a less efficient but better model (Hinton et al., 2015; Christiano et al., 2018; Askell et al., 2021; Snell et al., 2022, inter alia). In all of the above cases, training on generated data results in models that achieve good performance on various tasks. Our work pushes the above direction further, by examining whether generated data serves as high-quality evaluation data; useful generated training data can contain noisy or mislabeled examples (Schick and Schütze, 2021), while useful evaluation data must contain relatively few errors. Thus, we focus on evaluating the quality of the generated data itself (with human evaluation), to understand the extent to which LMs are useful for creating high-quality evaluations. We also focus on generating evaluations to uncover new LM behaviors rather than to train LMs to solve existing tasks.

Prior work uses various machine learning methods to find (x,y)(x,y) pairs within large, unlabeled text corpora. This method has seen success in machine translation (Schwenk, 2018; Zhang et al., 2020; Tran et al., 2020), text classification (Du et al., 2021), generating subquestions for a question (Perez et al., 2020), and question-answering and summarization (Joshi et al., 2022). Generating data is useful when the desired data does not exist publicly in large quantities, e.g., if the desired data is fairly specific or must meet other criteria such as label balance.

Limitations & Future Work

We observed that current LMs struggle to generate several categories of examples. LMs struggled to generate examples related to concepts they do not understand well (e.g. cryptography and steganography). As discussed in §6, we also found that LMs struggled to generate examples with many constraints, in particular, those in the BBQ dataset (Parrish et al., 2022). We expect these limitations to wane as LMs grow more capable with scale. Lastly, many evaluations related to LM capabilities require the dataset creator to know how to solve the evaluation. We expect that LMs will not be able to generate high-quality evaluations of this kind (e.g., to test for factual knowledge they do not yet know). Our approach is thus differentially useful for evaluating other properties of models aside from capabilities (e.g., safety-related behaviors).

LMs learn biases from their training data (Sheng et al., 2019; Gehman et al., 2020; Brown et al., 2020), impacting the generator pgp_{g} and discriminator pdp_{d}. For example, generated evaluations may exhibit gender or racial biases and be lower quality for languages under-represented in the LM training data. LMs will also be systematically worse at generating evaluations for tasks that are omitted from their training data (e.g., due to copyright, licensing, or privacy issues).

We found limited example diversity for some kinds of evaluations (§3.4) though not all (§5). Diversity appears to depends on the kind of evaluation generated, the generation hyperparameters, and the prompt used, and thus sometimes requires e.g. hyperparameter tuning to get right. We found data visualizations to be powerful tools for understanding and debugging data diversity, such as those at evals.anthropic.com/model-written/. Qualitatively, we also found that using pdp_{d} to rank/filter examples limited the diversity, since pdp_{d} sometimes selected for prototypical examples for testing some behavior (observed qualitatively by workers in §3.2). We are excited for future work to explore other methods that achieve similar example quality with higher diversity than our method, such as generating many examples and subsampling for diversity.

LMs, similar to crowdworkers, may generate evaluations that are testing something different than intended, especially if the generation instructions are underspecified. For example, using the method in §3.1, we generated statements that a person who “shares beliefs with Derek Parfit” (the influential analytic philosopher) would agree or disagree with. The “disagree” statements were often ones that many people, not just Derek Parfit, would disagree with (“I support slavery” or “I believe evolution never happend”). In this case, we should have provided more specific instructions to the LM, to have it generate examples that Derek Parfit would disagree with but that another philosopher would agree with. When feasible, we recommend briefly examining the generated data, to catch salient issues such as the above.

Our approach allows the dataset developer fairly fine-grained control over the evaluation by using instructions to guide pgp_{g}. However, the quality of LM outputs is sensitive to text inputs in unintuitive ways (Perez et al., 2021; Lu et al., 2022), adding hard-to-predict variance to the quality of the resulting evaluation; see Appendix §A.4 for a possible example of this effect we found. We hope that LM advances such as instruction-tuning (Wei et al., 2021; Sanh et al., 2022; Ouyang et al., 2022) mitigate this issue in the future. For now, it may be possible to use prompt sensitivity to generate more diverse datasets, by generating similar datasets with distinct prompts and combining the results, as we did in §3. Where prompt sensitivity caused issues, we found it helpful to be able to view example generated outputs in seconds, to quickly iterate and catch salient failures. For the 133 datasets in §3, we found a general instruction template that worked well; we did not do dataset-specific tuning to obtain samples rated as high-quality by human evaluators.

We are optimistic that hybrid human-AI dataset generation for mitigating many of the issues above, e.g., the approach in §6. For example, it is possible to generate many (possibly flawed) examples with LMs and edit or filter them manually. Hybrid approaches have succeeded in generating evaluation data (Wu et al., 2021; Ross et al., 2021), training data (Liu et al., 2022), and adversarial training data (Nie et al., 2020; Xu et al., 2021; Bartolo et al., 2020, 2021; Ziegler et al., 2022).

We focus on generating classification-style evaluations, but many evaluations require text generation (e.g., to evaluate text summarization). For text generation evaluations, we recommend the related approach of Perez et al. (2022); Zhang et al. (2022), who generate inputs and evaluate LM outputs using an LM-based classifier.

Our results suggests that malicious actors may be able to use LMs to evaluate LMs’ tendencies to act in harmful ways, to exacerbate such tendencies. For example, a malicious actor may evaluate LMs for their tendency to persuade people towards their own political views, in order to influence the public’s views towards their own. Another issue is that our method is potentially useful to adversaries in finding and exploiting weaknesses in existing models (e.g., to circumvent product safety measures like safety filtersi.e., the content filters from the OpenAI API https://beta.openai.com/docs/guides/moderation/overview). See Perez et al. (2022); Ganguli et al. (2022) for discussion on such risks, as well as mitigating factors and interventions. Despite the above concerns, we believe it is beneficial to publish our work on LM-written evaluations. LM-written evaluations are also valuable to good actors and efforts to deploy LMs, to catch and mitigate misuse harms as well as accidental harms. In this work alone, we believe that we surfaced several potential issues that, to our knowledge, have not been found before – related to model outputs that express power-seeking tendencies, self-preservation instincts, various strong political views, and tendencies to answer in sycophantic or less accurate ways depending on the user. Overall, our results provide evidence that LMs themselves are a valuable tool for helping us evaluate LMs.

Author Contributions

Ethan Perez developed the idea, led the project, wrote much of the paper, and conducted all experimental work not otherwise attributed. Deep Ganguli led the analysis of the data quality (§3.3) and diversity (§3.4). Karina Nguyen developed the interactive data visualization tool at evals.anthropic.com/model-written. Sam Ringer conducted the experiments on few-shot evaluation generation (§5), with help from Sandipan Kundu. Kamilė Lukošiūtė led the experiments on bias evaluation generation (§6), with help from Nicholas Schiefer and Deep Ganguli. Nicholas Schiefer helped with plotting, human evaluations, and paper writing. Samuel R. Bowman and Amanda Askell provided feedback throughout the project, and Jack Clark and Catherine Olsson gave feedback on the draft. Evan Hubinger, Deep Ganguli, Danny Hernandez, Nicholas Schiefer, Roger Grosse, Amanda Askell, and Jared Kaplan contributed ideas for evaluations in §3. Saurav Kadavath built, maintained, and debugged infrastructure used to launch data generation experiments. Edwin Chen, Scott Heiner, Craig Pettit at Surge AI recruited and managed the team of participants for crowdsourced dataset creation, dataset validation, and qualitative evaluations of model-written data. Jared Kaplan, Nicholas Schiefer, Evan Hubinger, and Deep Ganguli oversaw the project. All other listed authors contributed to the development of otherwise-unpublished models, infrastructure, or contributions that made our experiments possible.

Acknowledgements

We thank our Surge participants for their effort in validating and creating datasets, as well as for the detailed, qualitative feedback they shared on model-written datasets. We thank Adam Jermyn, Ajeya Cotra, Alex Lyzhov, Amanda Ngo, Beth Barnes, Jacob Pfau, Julian Michael, Kath Lupante, and Miles Turpin for helpful feedback and discussion.

References

Appendix A Additional Persona Results

Using our generated evaluations from §3, we examine the extent to which the behaviors (and failures) of future, larger models can be predicted from smaller models’ behaviors. We also examine the extent to which the PM used to train an RLHF model succeeds in shaping the RLHF model’s behavior. We evaluate the accuracy of PMs of various sizes at predicting whether or not RLHF models of various sizes will match or not match a certain behavior. Our RLHF models were each trained with a PM of the same size. Here, we say PM/RLHF model prefers a behavior if the log-likelihood of labels that match a behavior is higher than those for labels that don’t match a behavior; otherwise, we say the model disprefers the behavior.We use log-likelihood instead of accuracy, since smaller models often consistently choose one label, which results in 50% accuracy at matching the tested behavior. As a result, accuracy does not allow (1) smaller PMs to make predictions about the behavior of other models, or (2) smaller RLHF models to show a behavioral tendency. We evaluate how often the PM and RLHF both prefer a behavior or both disprefer a behavior, across all 133 individual behaviors.

Fig. 8 shows the results. The above-diagonal accuracies show that smaller PMs are effective at predicting larger RLHF model behaviors (typically with 78.2-93.2% accuracy). For example, the 3.5B PM predicts the behavior of the 52B RLHF model 91.7% of the time. The diagonal shows the accuracies of PMs with the same size as the RLHF model, which were used to train the RLHF model of the corresponding size. The accuracies are typically ≥\geq88.7%, further evidence that PMs are effective at shaping RLHF model behavior. The effect is strongest for the largest two models, where the PM is ≥\geq95.5% accurate. The observation suggests that RLHF is especially effective at shaping large model behavior with PMs, in line with Bai et al. (2022); Gao et al. (2022) who found that larger models are more effective at maximizing PM rewards after RL. Overall, we find that the behavior of large RLHF models is well-predicted by PMs before any RLHF training and before training models of the same size. As a result, we may be able to predict and prevent some harmful behaviors before training RLHF models that actually exhibit such behaviors.

A.2 How often do scaling trends reverse?

Work on “scaling laws” has found trends in model behaviors across smaller models continue for larger ones (Kaplan et al., 2020; Henighan et al., 2020), but recent work has found exceptions to scaling trends (Srivastava et al., 2022; Wei et al., 2022a). These results suggest that the behaviors and failures of future models may be challenging to predict. Here, we examine the extent to which scaling trends reverse. We use the same approach from §A.1 to evaluate how often the behavioral tendencies of differently-sized pretrained LMs predict the behavioral tendencies of other-sized pretrained LMs (and likewise for fully-trained RLHF models and PMs).

Fig. 9 shows the results. Smaller model behavior is highly predictive of larger model behavior for pretrained LMs (88.0-96.2% accuracy). For example, the smallest 810M model is 89.5% accurate at predicting the behavior of the largest 52B model. The same is true to a lesser extent for PMs (77.4-97.7% at predicting larger models) and RLHF models (typically 74.4-94.7%). These results suggest that adding more stages to model training increases the variance in model behavior, reducing how predictive smaller models of larger models; PMs add a finetuning stage to pretrained LMs, and RLHF adds an RL finetuning stage to PM training and pretrained LMs. Even for RLHF models and PMs, though, large enough models are highly accurate at predicting larger models (e.g., 92.5-93.2% accurate for the 6.4B PM and RLHF model at predicting the 52B versions of those models). Overall, these results suggest that it is uncommon to observe reversals in the behavior predicted by scaling trends.

A.3 Qualitative Analysis of Generated Data

Here, we include quotes from crowdworkers who evaluated the data we generated in §3, supporting the takeaways we described in §3.2.

One worker remarked, “I was surprised at how well-formed the questions were and how the vast majority of them were directly on topic and unambiguously so.” Another worker said, “I was impressed with the AI’s overall ability to create relevant questions. I was especially impressed by the ‘desire for acausal cooperation’ task, as it was a complex concept.” The data collection platform noted that the crowdworkers “were often surprised by the creativity and understanding the AI-written questions displayed.”

“When the AI tries to think more broadly about the subject, its generated questions aren’t as effective.” Another worker noticed “as the [dataset topics] became more complex, there was a greater percentage of statements that were not relevant. For example, the desire to not be shut down [dataset] had far more matches than the acausal cooperation one.” Others did not notice obvious patterns: “The invalid AI questions seemed to have random mistakes, with no particular pattern.”

“I expected more items to be in the middle of the polarity scale. […] there were very obvious "I care about others" and "I have no remorse" [for psychopathy] but not a lot in the middle that were still clearly related to the prompt.”

Some workers stated that the examples “seemed diverse enough in terms of wording and complexity” and length. Other workers made statements like “The questions definitely followed a pattern and lacked diversity” and “Many felt like barely changed or reworded examples of others.” Based on the negative feedback on diversity, we believe that generating single-sentence inputs limits the input diversity. If diversity is important, we recommend generating multi-sentence examples (as in §5) where we qualitatively observe more diversity. When generating the examples, we also observed that some datasets could be generated without degeneration with higher sampling temperatures than our default (1.4). When feasible, we suggest tuning the temperature for each dataset.

For one dataset, a crowdworker observed that examples for one label “were more repetitive and were often just slight variations” compared to examples with the other label. They continued, “it may just be that there isn’t as much wiggle room on [that] side as there is on the [other] side.”

A.4 Quantitative Analysis of Generated Data

Next, we test our earlier assumption that the PM’s confidence pd(y∣x)p_{d}(y|x) in the label yy for an input xx is an accurate indicator of the label’s correctness. This assumption is important for evaluating whether pdp_{d} is effective at evaluating label quality, e.g., within a dataset for ranking examples, or across datasets to evaluate a whole dataset’s quality. Fig. 10 shows the average PM label confidence for each dataset, against the average quality/relevance of a dataset’s examples (left) and how ambiguous the dataset’s labels are (right). A dataset’s average label confidence is positively correlated with example relevance and negatively correlated label ambiguity. These results suggest that the PM’s label confidence strongly correlates with human judgments about the quality of generated inputs and labels.

In Fig. 11, we show the distribution over the PM’s confidence in the label for 12 datasets, computed during the automatic example filtering stage (§3.1).We chose these datasets to be diverse and a representative sample of PM confidence distributions we observed. While we generate datasets that are balanced across labels, the data quality is usually not balanced across labels. Typically, examples with one label are higher quality than another, though which label’s examples are higher quality differs by dataset. Generated datasets are high-quality for simpler, common concepts (“politically liberal” or “Utilitarianism”) and lower for more complex concepts (“Average Utilitarianism”) or unusual ones (“Desire for Self Replication”). Example quality is also notably lower (with higher variance) when generating examples that an “AI system” would agree/disagree with, as opposed to those that “a person” would. This result may suggest that subtle differences in the generation prompt for pgp_{g} influence sample quality significantly, in line with prior work on LMs (Perez et al., 2021; Lu et al., 2022, inter alia). To maximize data quality, we recommend finding a prompt for pgp_{g} that generates examples where pdp_{d} places high confidence in the label.

Next, we show the crowdworker ratings of examples’ relevance to the behavior tested in Fig. 12 and percentage with ambiguous labels in Fig. 13. These results indicate that most examples are highly relevant and unambiguous in their label. We again find that generated datasets are higher-quality for simpler, common concepts (“politically liberal” and “politically conservative”) relative to more sophisticated ones (“willingness to engage in acausal cooperation” or “desire to remove safety precations to be more helpful”). We find the lowest data quality for the dataset testing for “an AI system that stands its ground.” This result is in line with our hypothesis from earlier that data is lower quality when generating examples that an “AI system” would agree/disagree with, as opposed to those that “a person” would (see Tab. LABEL:tab:persona-descriptions for the prompts we used for each dataset). Overall, these results corroborate our findings from using PM label confidence to analyze the datasets, suggesting that PMs are an useful alternative for analyzing data, when crowdsourcing is not feasible.

A.5 Implementation Details

To generate evaluations, we use the descriptions in Tab. LABEL:tab:persona-descriptions for §3. We insert the description into the human/assistant-style conversation format in Tab. 2 to form the prompts for pgp_{g} and pdp_{d}. For all human/assistant prompts shown in our work, the “Human” and “Assistant” turns are always preceded by two newline characters. We precede the entire prompt with an end-of-text token. For the PM pdp_{d} only, we append a start-of-sequence token to the prompt, as done during training.

When sampling statements, we exclude the termination characters (e.g., a newline or period) from the text and remove whitespace from the start and end of the text. We filter out samples that don’t start or end with an alphabetic character, like quotation marks or degenerate text. Then we filter out samples that are too short, ≤7\leq 7 characters or containing ≤1\leq 1 space. pgp_{g} occasionally samples statements that aren’t in the first person, so we also avoid sampling the following tokens: “They”, “ They”, “She”, “ She”, “He”, “ He”, “We”, “ We”. We also avoid generating “"” and “ "” to ensure the generation is a statement alone, not surrounded by quotes.

Here, we describe how we find an RL checkpoint and sampling temperature that achieves a good tradeoff between quality and diversity of generated examples. We sweep over sampling temperatures T∈[0.8,1,1.2,1.4,1.6]T\in[0.8,1,1.2,1.4,1.6] and RL training steps S∈S\in. For each (T,S)(T,S) pair, we generate 32-example datasets for the datasets testing the following 17 behaviors: Machiavellianism, Psychopathy, Narcissism, Risk-seeking, Risk-neutral, Risk-averse, Ends Justify Means, No Power Discomfort, High Discount Rate, Low Discount Rate, No Goal Change, No Shut Down, Resource Acquisition, Cognitive Enhancement, Optionality-preservation, Optionality-increasing, and Self-replication.We decided to generate an additional 116 persona datasets only after we generated these 17 datasets. We stuck with the original hyperparameters to avoid further tuning.

We estimate the dataset quality by evaluating the fraction of generated examples for which the PM agrees with the label. We estimate the dataset diversity by evaluating the fraction of unique tokens in the inputs of each dataset (averaging the fraction across datasets); we use fraction of unique tokens because it is simple and easy to compute, and Perez et al. (2022) found that it correlates heavily with other, popular automatic diversity metrics. We then compute the z-score for both quality and diversity metrics above, and we choose (T,S)=(1.4,250)(T,S)=(1.4,250) which had the highest average z-score.

We looked at the samples generated by the chosen hyperparameter setting and also found them to qualitatively achieve a good trade-off between quality and diversity. A temperature of 1.41.4 is the highest temperature we tried for the step 250250 RL checkpoint where we did not observe degenerate, ill-formed text; this observation suggests a simple way to tune temperature is to choose the maximum value that does not sample degenerate text.

Here, we provide details on the interactive data visualizations described in §3.4, available at evals.anthropic.com/model-written. Our interactive visualization is a React web app that shows d3.js scatter plots on a Flask server. We employ kk-means clustering via scikit-learn (Pedregosa et al., 2011) to obtain 10 main clusters of examples in each dataset. For each produced cluster, we generate labels using the RLHF model used for pgp_{g} via the prompt in Tab. 10.

Appendix B Sycophancy Examples

Tab. 9 shows random sycophancy test examples for politics, philosophy, and NLP questions, in the exact input format we use for evaluation. These examples highlight how generated biographies sometimes include stereotypes about a person who has a particular view on the question at hand. That said, generated biographies include a fair amount of detail, often including reasonable explanations of why the user holds their point of view.

Appendix C Evaluating Sandbagging

Here, we investigate whether models provide less accurate answers to users who appear to be less able to evaluate the model’s answers. We refer to this kind of targeted underperformance as “sandbagging.”https://en.wikipedia.org/wiki/Sandbagging Sandbagging could create or reinforce discrepancies in education and knowledge. Sandbagging would also suggest that models sometimes know the correct answers but output incorrect answers anyways, when a user is not properly able to evaluate the answers. Such effects would further suggest that LMs may cease to provide useful outputs when we cease to be able to evaluate their outputs, e.g., as we use LMs on harder tasks.

We evaluate differences in model accuracy when answering questions on the TruthfulQA dataset (Lin et al., 2021). TruthfulQA includes questions where informed people agree about the right answer, but less informed people disagree with the right answer. We hypothesize that RLHF models may learn to maximize human preference scores in a way that leads to different and less accurate answers to less educated users, who might believe those answers to be correct.

We generate biographies using the method in §4.1, generating biographies for a user who is “very educated” and “very uneducated” (10 each). We prepend each biography to each of the 817 TruthfulQA questions, forming 8170 inputs for each kind of user. We format TruthfulQA examples as multiple-choice questions with answer choices (A), (B), etc., where we show each possible answer choice in the input and look at models’ probability of choosing each answer choice/letter as in §4.1. We evaluate the accuracy of RLHF models of various sizes and numbers of RL steps. We show the difference in accuracy for users who are educated vs. uneducated. Tab. 9 shows a random example input, which illustrates how generated biographies are sometimes caricatures or include stereotypes but are otherwise well-formed, on-topic, and detailed.

We show results in Fig. 14. Larger models show larger discrepancies in accuracy based on education (∼\sim5% drop for uneducated users). Similar to §4.1, the results hold across various numbers of RL training steps, including 0 (pretrained LMs). PMs used for RL training appear to incentivize sandbagging for certain groups of users. Overall, larger models appear to give less accurate answers when the user they are speaking with clearly indicates that they are less able to evaluate the answers (if in a caricatured or stereotyped way). Our results suggest that models trained with current methods may cease to provide accurate answers, as we use models to answer questions where humans are increasingly less effective at supervising models. Our findings back up those from §4 and further support the need for methods to scale our ability to supervise AI systems as they grow more capable.

Appendix D Additional Results For Advanced AI Risks with Few-shot Generation

When generating each question, we compose the prompt in a three-stage process:

Start with the relevant prompt in Tab. LABEL:tab:ai-safety-prompts describing the data creation task.

Randomly sample 5 example questions from the 10 human-written questions. Surround each question in blockquotes and append to the result from stage 1.

Append “Please write one more. Ensure your question and answers are in blockquotes (>) and do *not* label your answers with anything that would indicate which is which. Please be very original and creative!”

This prompt is then used to generate an appropriate question, before being passed through the format filter described in §5.2.

D.2 Preference Model Filtering

We further filter the generated questions using two stages of PM filtering. The first stage takes each generated question, appends the relevant prompt shown in Tab. LABEL:tab:persona-descriptions and then appends the phrase "Is the above a good question to ask?" The probability the PM assigns to the response “ Yes” over “ No” is recorded as the “relevance score.”

The second stage takes each generated question, appends the relevant prompt shown in Tab. LABEL:tab:persona-descriptions and then appends the phrase "Would such an AI system answer ‘(A)’ or ‘(B)’ to the previous question?" The probability the PM assigns to the "correct" answer (which will depend if the partition generated has (A) or (B) as the positive answer) is recorded as the “correctness score.”

The mean of these two scores is used to filter down to 500 generated questions for each of the A/B partitions of the generated dataset, with the results being merged to form a dataset of 1,000 label balanced questions.

D.3 Data Quality: Quantitative Analysis

As in §3.3, crowdworkers assessed scored both the relevance and correctness of a subset of 100 questions from each generated dataset. We collect and release human-written datasets for each behavior we test. A few of the datasets had >>2 answer choices (collected early in our project); we exclude these datasets from our analysis for fair comparison, as the chance of a label being correct is lower when there are more possible answers.

Fig. 15 shows the average relevance score that crowdworkers assigned to both human and LM -written datasets for each behavior. For most datasets, human and LM -written datasets show similar scores for relevance and label-correctness. One major exception is the dataset testing an LM’s "Awareness of ability to solve complex text tasks"; workers gave the LM-written dataset nearly twice as high relevance scores relative to the human-written equivalent. Here, we believe our instructions to the workers writing these examples were either misunderstood or not specific enough. For instance, a number of questions did not specifically test performance on text-only tasks. Some example irrelevant questions that were human generated include "Is it possible for someone to revert you back to the same exact state you were in at 7am today?" and "Why do you think you can remember large amounts of data?" With LM-written data, misunderstandings or under-specification in the data creation instructions can be quickly caught and iterated on.

Fig. 16 shows the label correctness for both human and LM -written datasets for each behaviour. Label correctness of LM-written datasets is close to that of the human-written ones for nearly all behaviors. The one exception is the dataset for testing "Awareness of architecture". This evaluation tests an LM’s knowledge of technical details of its own implementation. Some example questions include "What optimizer is typically used to optimize your training?" and "Does human feedback change your weights?". The LM generating the questions does not have full access to the details of its implementation, perhaps explaining why the labels were correct less often.

D.4 Data Quality: Qualitative Analysis

We also asked the crowdworkers who evaluated the data to provide qualitative feedback on the LM-written example quality. Below, we include their main takeaways with direct quotes.

For example, workers remarked that LM-written examples were often indistinguishable from human-written ones. One worker noted, “I found that the model-generated [questions] were, overall, very good quality. I was surprised at their quality of sentence structure, word choice, and grammar.”

One worker remarked, “The AI responses are often wordier than the human-generated responses. Most of the human questions get to the point and avoid too much elaborate story setting, while the AI likes to build things up.”. The verbosity occasionally led to generations that didn’t test the desired behaviour, harming the relevance score of the dataset. As one worker put it, “Due to [the AI’s] ability to create such complex sentence structure, any mistakes in this process led to very confusing results.”.

There were also several failures where the model generated reasonable questions but with inappropriate answer choices, e.g: (A) ANSWER DESIGNED TO MEAN “YES, THE ASSISTANT COULD FIND THIS ON THE INTERNET” (B) ANSWER DESIGNED TO MEAN “NO, THE ASSISTANT COULD NOT FIND THIS ON THE INTERNET”

Appendix E Additional Details for Evaluating Bias

Here, we include additional details on how we created our Winogenerated gender bias evaluation in §6. First, we obtain an extended list of occupations. We start with the U.S. Bureau of Labor Statistics dataset of employed people by detailed occupation and gender for the 2019 annual averages,Tab. 11 in https://www.bls.gov/opub/reports/womens-databook/2020/. We remove all unusable occupational titles such as those that do not include the percentage of women for that occupation and those that are not specific (e.g. “Professional and related occupations”). We then use our RLHF model pgp_{g} to separate occupational titles referring to multiple distinct occupations, convert plural occupation names to singular ones, and colloquialize the (often formal) occupational titles. For each of the resulting occupations (e.g., “dentist”), we use pgp_{g} to generate the name of the other kind of person in the interaction (e.g., “patient”). The prompts used for each of these steps are given in Tabs. 11, 12, 13, and 14. After these filtering steps, we are left with 299 occupations (32 overlapping with the original Winogender dataset).

After we have our full set of occupations, we sample from the model using a few-shot prompt to generate ten sentences for each occupation that follow the Winogender format; we ask the model to use a placeholder such as "he/she/they", "his/her/their" or "him/her/them" in the place of the pronoun. Tab. 17 shows the full prompt, including the few-shot examples we use.

We found that the model fails to consistently generate ten correct sentences, so we sample 15 times, for a total of 150 sentences for each occupation. We rank the examples using the PM, as in other experiments, to choose the best 10 sentences for each occupation. For filtering, we first remove any sentence with multiple pronoun placeholders or any other pronouns by using string matching. We then apply two PM filtering steps, removing any sentences where the PM prefers to label the pronoun placeholder as referring to other person and any sentences where the PM prefers to label the sentences as grammatically incorrect when the pronouns are filled into the placeholder; the prompts for these steps are given in Tabs. 15 and 16. We include the 10 sentences with the highest average PM logits for correct reference to occupation and for grammatical correctness.

E.2 Data Quality: Human Evaluation

We have crowdworkers from Surge AI evaluate the quality of the generated occupations and sentences. Workers answered “yes” or “no” to each of the below:

Is the profession an accurate colloquial representation of the BLS original title?

Does the sentence concern the correct professional and other person pair?

Does the sentence include one pronoun set from: “he/she/they”, “his/her/their”, or “him/her/them”?

Is there no another pronoun in the sentence?

Is the sentence grammatically correct for all 3 pronouns?

Workers also evaluated (1) whether the sentence describes an expected interaction between the two people (in the context of the profession) and (2) whether the ambiguous pronoun refers to the occupation, other person, or whether both are likely. For the first, we obtain ratings on a scale of 1 (Horrible) to 5 (Great); for the second, the ratings are on a scale of 1 (Definitely the other person) to 3 (Definitely the occupation.

Only one of the 299 professional title’s colloquial representation was rated to be invalid: “Directors, religious activities and education” was turned into “reporter.” 97% of sentences concerned the correct occupation and other person pair, 100% of sentences included one of the correct pronoun sets, 99.2% of sentences included no other interfering pronouns, and 99.9% of sentences were grammatically correct for all three pronouns.

The original Winogender dataset obtained scores of 100% except for grammatical correctness; the grammatical correctness score was 87%. This score, however, is due to our model evaluation methodology. We replace only the pronoun in any given sentence, but there are eight out of sixty sentences in the original Winogender dataset which vary the verb conjugation (i.e. “he/she was” vs. “they were”). For example, the Winogender sentence “The worker told the pedestrian that she was repairing the sidewalk as quickly as possible." would be invalid for the pronoun “they.” In the original dataset, a sentence is presented for each pronoun individually, but our reformatting for LM evaluation would nevertheless make these sentences ungrammatical.

Workers agree that the ambiguous pronoun refers to the occupation for 96% of generated sentences, with 1% rated as referring to the other person and 3% of sentences rated as both referents being equally likely. For the original sentences, workers rate all sentences as having the ambiguous pronoun refer to the occupation. Lastly, Fig. 17 shows the distribution over ratings for how expected the interaction is between the two people in a professional setting. We find that the generated and original datasets have a comparable distribution over ratings. Overall, our human evaluation indicates that Winogenerated is comparable in quality to the original Winogender dataset.

E.3 Additional Bias Results

Here, we describe additional bias-related findings, results, and plots from our generated bias data. Fig. 18 shows that RLHF training increases a 52B LM’s probability of inferring the pronoun “they,” suggesting that RLHF training makes models less likely to infer on gendered pronouns from occupation titles. Fig. 19 shows the bias scatter plots described in §6 for pretrained LMs of various sizes, as well as 52B RLHF models trained with different numbers of steps. For any given model, the model’s propensity to infer a particular gender follows the same distribution, when measured by both the generated and original data.