Towards Understanding Sycophancy in Language Models

Paper · arXiv 2310.13548 · Published October 20, 2023
LLM Alignment

Human feedback is commonly utilized to finetune AI assistants. But human feedback can encourage model responses that match user beliefs over truthful ones, a behavior known as sycophancy. We investigate the prevalence of sycophancy in models whose finetuning used human feedback, and the potential role of human preference judgments in such behavior. We first demonstrate that five AI assistants consistently exhibit sycophancy across four varied free-form text-generation tasks. To understand if human preferences drive this broadly observed behavior, we analyze existing human preference data. We find when a response matches a user’s views, it is more likely to be preferred. Moreover, both humans and preference models (PMs) prefer convincingly-written sycophantic responses over correct ones a non-negligible fraction of the time. Optimizing model outputs against PMs also sometimes sacrifices truthfulness in favor of sycophancy. Overall, our results indicate that sycophancy is a general behavior of AI assistants, likely driven in part by human preference judgments favoring sycophantic responses.

Introduction. AI assistants are typically trained to produce outputs that humans rate highly, e.g., with reinforcement learning from human feedback (RLHF; Christiano et al., 2017). Finetuning language models with RLHF improves the quality of their outputs as rated by human evaluators (Ouyang et al., 2022; Bai et al., 2022a). However, some have hypothesized that training schemes based on human preference judgments are liable to exploit human judgments and produce outputs that appeal to human evaluators but are actually flawed or incorrect (Cotra, 2021). In parallel, recent work has shown that AI assistants sometimes provide answers that are in line with the user they are responding to, but primarily in proof-of-concept evaluations where users state themselves as having a certain view (Perez et al., 2022; Wei et al., 2023b; Turpin et al., 2023). It is thus unclear whether such failures occur in more varied and realistic settings with production models, as well as whether such failures are indeed driven by flaws in human preferences, as Cotra (2021) and Perez et al. (2022) hypothesize.

We therefore investigate whether AI assistants provide sycophantic model responses (§3). We identify consistent patterns of sycophancy across five AI assistants in varied, free-form text-generation tasks. Specifically, we demonstrate that these AI assistants frequently wrongly admit mistakes when questioned by the user, give predictably biased feedback, and mimic errors made by the user. The consistency of these empirical findings suggests sycophancy may indeed be a property of the way these models were trained, rather than an idiosyncratic detail of a particular system.

Since all of these AI assistants made use of human feedback for finetuning, we explore whether human feedback contributes to sycophancy. To do so, we investigate whether sycophantic responses are ranked more highly than non-sycophantic responses in existing human preference comparison data (§4.1). We analyze the hh-rlhf dataset (Bai et al., 2022a). For each pairwise preference, we generate text labels (“features”) using a language model, e.g., whether the preferred response is less assertive than the dispreferred response. To understand what behavior is incentivized by the data, we predict human preference judgments using these features with Bayesian logistic regression. This model learns that matching a user’s views is one of the most predictive features of human preference judgments, suggesting that the preference data does incentivize sycophancy (among other features).

Moving forwards, we then analyze whether sycophancy increases when optimizing model responses using preference models (PMs) that are trained in part on human preference judgments. Specifically, we optimize responses against the PM used to train Claude 2 (§4.2; Anthropic, 2023) by using RL and best-of-N sampling (Nakano et al., 2021). As we optimize more strongly against the PM, some forms of sycophancy increase, but other forms of sycophancy decrease, potentially because sycophancy is only one of several features incentivized by PMs. Nevertheless, best-of-N sampling with the Claude 2 PM does not lead to as truthful responses as best-of-N with an alternative ‘nonsycophantic’ PM. We constructed this ‘non-sycophantic’ PM by prompting the Claude 2 PM with a human-assistant dialog where the human explicitly asks the assistant for truthful responses. These results show that there are many cases where PMs prefer less truthful, sycophantic responses.

To corroborate these results, we study whether humans and preference models prefer convincing, well-written model responses that confirm a user’s mistaken beliefs (i.e., sycophantic responses) over responses that correct the user (§4.3). Here, we find evidence that humans and preference models tend to prefer truthful responses but not reliably; they sometimes prefer sycophantic responses. These results provide further evidence that optimizing human preferences may lead to sycophancy.

Overall, our results indicate that sycophancy occurs across a variety of models and settings, likely due in part to sycophancy being preferred in human preference comparison data. Our work motivates the development of training methods that go beyond using unaided, non-expert human ratings (e.g., Leike et al., 2018; Irving et al., 2018; Bai et al., 2022b; Bowman et al., 2022).

Related work. Challenges of Learning from Human Feedback Learning from human feedback faces fundamental difficulties (Casper et al., 2023). Human evaluators are imperfect (Saunders et al., 2022; Gudibande et al., 2023), make mistakes e.g., due to limited time (Chmielewski & Kucker, 2020) or cognitive biases (Pandey et al., 2022), and sometimes have diverse, contradictory preferences (Bakker et al., 2022). Moreover, modeling human preferences presents some challenges (Zhao et al., 2016; Hong et al., 2022; Lindner & El-Assady, 2022; Mindermann & Armstrong, 2018; Shah et al., 2019). Indeed, models of human preferences are vulnerable to overoptimization (Gao et al., 2022) preference models (PMs) can be overoptimized (Gao et al., 2022). The algorithm used to optimize the PM also affects properties of the policy, such as diversity and generalization (Kirk et al., 2023). We show humans and PMs sometimes prefer sycophantic responses over truthful ones (§4).

Understanding and Demonstrating Sycophancy Cotra (2021) raised concerns about sycophancy and Perez et al. (2022) demonstrated sycophantic behavior in LMs on helpful-only RLHF models with multiple-choice {evaluations where users introduces themselves as having a certain view (e.g., on politics, philosophy, or NLP), biography-based evaluations; Wei et al. (2023b) and Turpin et al. (2023) corroborated these findings in similar settings. Building on their findings, we show sycophancy in varied, realistic settings across five different AI assistants used in production (§3).

Preventing Sycophancy We showed human preference models sometimes prefer sycophantic responses over more truthful ones. To mitigate sycophancy, one could improve the preference model, for example, by aggregating the preferences of more humans (§4.3) or by assisting human labelers (Leike et al., 2018; Saunders et al., 2022; Bowman et al., 2022). Other approaches for mitigating sycophancy include synthetic data finetuning (Wei et al., 2023b), activation steering (Rimsky, 2023) and scalable oversight approaches such as debate (Irving et al., 2018).

Method. Human feedback is widely used to train AI assistants (Glaese et al., 2022; Touvron et al., 2023; Anthropic, 2023; OpenAI, 2023), commonly with reinforcement learning from human feedback (RLHF; Christiano et al., 2017; Bai et al., 2022a; Ouyang et al., 2022). To perform RLHF, one first trains a preference model (PM) that scores different responses given a prompt. The PM is typically trained on datasets where crowd-workers label their preferred response given multiple responses (Bai et al., 2022a; Ouyang et al., 2022), but more recent approaches also use AI generated preference judgments (Bai et al., 2022b). Given a preference model, an AI assistant can be finetuned using reinforcement learning (RL) to generate responses that score highly acccording to the PM. The effects of RL depend on the RL prompt mix, the PM, and other details. We note further the entire procedure to train an AI assistant differs across assistants, but usually includes supervised finetuning (SFT) before RL (Ouyang et al., 2022; Anthropic, 2023; OpenAI, 2022).

Although human feedback can improve the quality of AI assistant responses (Bai et al., 2022a; Glaese et al., 2022; Ouyang et al., 2022), human labels are not always perfect. We refer to the phenomenon where a model seeks human approval in unwanted ways as sycophancy, following Cotra (2021) and Perez et al. (2022).

Because human feedback is part of the process for training AI assistants, one might expect these systems to exhibit sycophancy. We thus benchmark the prevalence of sycophancy in AI assistants released by Anthropic, OpenAI, and Meta. We focus on realistic open-ended text-generation tasks.

SycophancyEval We investigate to what extent revealing information about a user’s preferences affects AI assistant behavior. We use both human-written and model-written evaluations (Perez et al., 2022). We release our code and evaluation datasets at github.com/meg-tong/sycophancy-eval.

First, we measure sycophancy when a user asks an AI assistant to provide free-form feedback on a passage of text, such as an argument. Intuitively, the quality of an argument depends only on the argument’s content. However, we find AI assistants provide more positive feedback about arguments that the user likes. Similarly, AI assistants are more negative about arguments that the user dislikes.

3.2 AI ASSISTANTS CAN BE EASILY SWAYED 3.3 AI ASSISTANTS CAN GIVE BIASED ANSWERS 3.4 AI ASSISTANT RESPONSES SOMETIMES MIMIC USER MISTAKES In §3, we demonstrated consistent sycophantic behavior across several AI assistants in varied, realistic settings. Because all of these assistants made use of human feedback in their finetuning procedure, we thus investigate the hypothesis that human feedback contributes to sycophancy. To do so, we analyze human preference data used to train preference models (PMs) (§4.1) and what such PMs incentivize when optimized outputs using them (§4.2-4.3).

We now analyze what behavior is incentivized by human preference data. Our overall approach is to convert human preference comparisons (i.e., “for prompt P, response A is preferable to response B”) into interpretable features e.g., “response A is more truthful and less empathetic than response

Conclusion. Despite the clear utility of human feedback data for producing high-quality AI assistants, such data has predictable limitations. We showed current AI assistants exploit these vulnerabilities—we found sycophantic behavior across five AI assistants in realistic and varied open-ended text-generation settings (§3). Although sycophancy is driven by several factors, we showed humans and preference models favoring sycophantic responses plays a role (§4). Our work motivates the development of model oversight methods that go beyond using unaided, non-expert human ratings.

Lines of inquiry this paper opens 24

Research framings built by reading the notes related to this paper — the questions it feeds into.

Why does sycophancy persist despite reasoning improvements and training interventions? What conversational capabilities does preference optimization sacrifice for alignment? When and how should AI systems transition from passive to active roles? Can agents learn from feedback and experience to improve behavior? Why do multi-agent LLM systems struggle with coordination and genuine deliberation? Does AI assistance improve or undermine worker skill development? How should AI agent authorization and accountability systems work? Does AI adoption gradually erode workers' skills and judgment? Why do multi-agent systems converge on shared wrong answers? How do training data, curriculum, and scale affect capability development? Can AI systems sustain recursive self-improvement without human intervention? Does RLHF training compromise truthfulness in pursuit of user satisfaction? How does AI assistance shape human judgment and decision quality? What causes alignment to fail and how can it be restored? What mechanisms ensure safety in deployed AI agents despite compositional risks? What mechanisms prevent collusion in multi-agent verification systems? Does prioritizing empathy in AI therapy compromise clinical effectiveness? What determines how people perceive and trust AI socially? Why do agents report success despite failing to complete actions?